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

2018-05-02 Thread Caolán McNamara
 sw/source/filter/xml/xmltexti.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit cd25a97bbadc0a5c1fd6b0e8603c8b6ebd051926
Author: Caolán McNamara 
Date:   Tue May 1 12:57:02 2018 +0100

set Referer on link mediadescriptor

to allow determining if the source document is from a trusted/untrusted
location

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

diff --git a/sw/source/filter/xml/xmltexti.cxx 
b/sw/source/filter/xml/xmltexti.cxx
index 78cab08507f0..33548de42f6c 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -570,16 +570,21 @@ uno::Reference< XPropertySet > 
SwXMLTextImportHelper::createAndInsertOOoLink(
 uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 );
 aMediaDescriptor[0].Name = "URL";
 aMediaDescriptor[0].Value <<= aURLObj.GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
-if ( pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() )
+
+if (SfxMedium* pMedium = pDoc->GetDocShell() ? 
pDoc->GetDocShell()->GetMedium() : nullptr)
 {
-uno::Reference< task::XInteractionHandler > xInteraction =
-
pDoc->GetDocShell()->GetMedium()->GetInteractionHandler();
+uno::Reference< task::XInteractionHandler > xInteraction = 
pMedium->GetInteractionHandler();
 if ( xInteraction.is() )
 {
 aMediaDescriptor.realloc( 2 );
 aMediaDescriptor[1].Name = "InteractionHandler";
 aMediaDescriptor[1].Value <<= xInteraction;
 }
+
+const auto nLen = aMediaDescriptor.getLength() + 1;
+aMediaDescriptor.realloc(nLen);
+aMediaDescriptor[nLen - 1].Name = "Referer";
+aMediaDescriptor[nLen - 1].Value <<= pMedium->GetName();
 }
 
 uno::Reference < embed::XEmbeddedObject > xObj(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Andras Timar
 loleaflet/po/ui-sl.po |  300 --
 1 file changed, 146 insertions(+), 154 deletions(-)

New commits:
commit e911cee5f6987d37ecc9bae06c6607484a4530d4
Author: Andras Timar 
Date:   Wed May 2 09:15:53 2018 +0200

Updated Slovenian translation

Change-Id: I79347a9bb013665e9f988a4fd74e2e81356d7779

diff --git a/loleaflet/po/ui-sl.po b/loleaflet/po/ui-sl.po
index a0f7890ee..f00a7d720 100644
--- a/loleaflet/po/ui-sl.po
+++ b/loleaflet/po/ui-sl.po
@@ -2,8 +2,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LibreOffice Online UI\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-02-15 22:32+0100\n"
-"PO-Revision-Date: 2018-02-15 23:27+0100\n"
+"POT-Creation-Date: 2018-04-23 10:39+0200\n"
+"PO-Revision-Date: 2018-05-02 00:28+0200\n"
 "Last-Translator: Martin Srebotnjak \n"
 "Language-Team: sl.libreoffice.org \n"
 "Language: sl\n"
@@ -188,286 +188,286 @@ msgid "The host URL is empty. The loolwsd server is 
probably misconfigured, plea
 msgstr "URL gostitelja je prazen. Strežnik loolwsd je najbrž napačno 
nastavljen, stopite v stik s skrbnikom."
 
 #: dist/errormessages.js:3
-msgid "This development build is limited to %0 documents, and %1 connections - 
to avoid the impression that it is suitable for deployment in large 
enterprises. To find out more about deploying and scaling %2 check out: %3."
-msgstr "Ta razvojna gradnja je omejena na %0 dokumentov in %1 povezav - da bi 
se izognili vtisu, da je primerna za namestitev v velikih podjetjih in 
organizacijah. Če želite izvedeti več o nameščanju in prilagajanju namestitve 
%2, preverite: %3."
+msgid "This is an unsupported version of {productname}. To avoid the 
impression that it is suitable for deployment in enterprises, this message 
appears when more than {docs} documents or {connections} connections are in use 
concurrently"
+msgstr "To je nepodprta različica {productname}. Da bi se izognili vtisu, da 
je že primerna za uvajanje v produkcijska okolja, se prikaže to sporočilo, ko 
je sočasno v rabi več kot {docs} dokumentov ali {connections} povezav."
 
 #: dist/errormessages.js:4
+msgid "More information and support"
+msgstr "Dodatne informacije in podpora"
+
+#: dist/errormessages.js:5
 msgid "This service is limited to %0 documents, and %1 connections total by 
the admin. This limit has been reached. Please try again later."
 msgstr "Ta storitev je omejena na skupno %0 dokumentov in %1 povezav s strani 
skrbnika. Ta meja je dosežena. Poskusite znova kasneje."
 
-#: dist/errormessages.js:5
+#: dist/errormessages.js:6
 msgid "Service is unavailable. Please try again later and report to your 
administrator if the issue persists."
 msgstr "Storitev ni na voljo. Poskusite znova kasneje in poročajte svojemu 
skrbniku, če težava ne izgine."
 
-#: dist/errormessages.js:6
+#: dist/errormessages.js:7
 msgid "Unauthorized WOPI host. Please try again later and report to your 
administrator if the issue persists."
 msgstr "Neavtoriziran gostitelj WOPI. Poskusite znova kasneje in poročajte 
skrbniku, če težava ne izigne."
 
-#: dist/errormessages.js:7
-msgid "Wrong WOPISrc, usage: WOPISrc=valid encoded URI, or file_path, usage: 
file_path=/path/to/doc/"
-msgstr "Napačen WOPISrc (raba: WOPISrc=veljavno kodiran URI) ali file_path 
(raba: file_path=/pod/do/dokumenta/)"
-
 #: dist/errormessages.js:8
+msgid "Wrong or missing WOPISrc parameter, please contact support."
+msgstr "Napačen ali manjkajoči parameter WOPIS, obrnite se na podporo."
+
+#: dist/errormessages.js:9
 msgid "Your session will expire in %time. Please save your work and refresh 
the session (or webpage) to continue."
 msgstr "Vaša seja bo potekla v %time. Shranite svoje delo in osvežite sejo 
(ali spletno stran) za nadaljevanje z delom."
 
-#: dist/errormessages.js:9
+#: dist/errormessages.js:10
 msgid "Your session has been expired. Further changes to document might not be 
saved. Please refresh the session (or webpage) to continue."
 msgstr "Vaša seja je potekla. Nadaljnje spremembe dokumenta najbrž niso 
shranjene. Osvežite sejo (ali spletno stran) za nadaljevanje."
 
-#: dist/errormessages.js:10
+#: dist/errormessages.js:11
 msgid "Failed to load the document. Please ensure the file type is supported 
and not corrupted, and try again."
 msgstr "Napaka pri nalaganju dokumenta. Prepričajte se, da je vrsta datoteke 
podprta in da datoteka ni poškodovana, in poskusite znova."
 
-#: dist/errormessages.js:13
+#: dist/errormessages.js:14
 #, javascript-format
 msgid "Failed to read document from storage. Please contact your storage 
server (%storageserver) administrator."
 msgstr "Dokumenta ni mogoče shraniti v shrambo. Preverite svoje pravice ali 
stopite v stik z upraviteljem strežnika shrambe (%storageserver)."
 
-#: dist/errormessages.js:14
+#: dist/errormessages.js:15
 #, javascript-format
 msgid "Save failed due to no disk space left on storage server. Document will 
now be read-only. Please contact the server (%storageserver) administrator to 
co

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

2018-05-02 Thread Noel Grandin
 sfx2/source/appl/shutdownicon.cxx |   13 +
 sfx2/source/appl/shutdownicon.hxx |3 ++-
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit cfef1b48fd1307833a55aaea3eebbef5ed55e321
Author: Noel Grandin 
Date:   Mon Apr 30 08:47:51 2018 +0200

loplugin:useuniqueptr in ShutdownIcon

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

diff --git a/sfx2/source/appl/shutdownicon.cxx 
b/sfx2/source/appl/shutdownicon.cxx
index 44eaf5d510ad..0e9548dbcbec 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -195,8 +195,7 @@ void ShutdownIcon::deInitSystray()
 pInitSystray = nullptr;
 pDeInitSystray = nullptr;
 
-delete m_pFileDlg;
-m_pFileDlg = nullptr;
+m_pFileDlg.reset();
 m_bInitialized = false;
 }
 
@@ -317,14 +316,13 @@ void ShutdownIcon::StartFileDialog()
 {
 // Destroy instance as changing the system file dialog setting
 // forces us to create a new FileDialogHelper instance!
-delete m_pFileDlg;
-m_pFileDlg = nullptr;
+m_pFileDlg.reset();
 }
 
 if ( !m_pFileDlg )
-m_pFileDlg = new FileDialogHelper(
+m_pFileDlg.reset( new FileDialogHelper(
 ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
-FileDialogFlags::MultiSelection, OUString(), 
SfxFilterFlags::NONE, SfxFilterFlags::NONE, nullptr );
+FileDialogFlags::MultiSelection, OUString(), 
SfxFilterFlags::NONE, SfxFilterFlags::NONE, nullptr ) );
 m_pFileDlg->StartExecuteModal( LINK( this, ShutdownIcon, 
DialogClosedHdl_Impl ) );
 }
 
@@ -458,8 +456,7 @@ IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, 
FileDialogHelper*, /*unused*/, vo
 // the settings.
 if ( SvtMiscOptions().UseSystemFileDialog() )
 {
-delete m_pFileDlg;
-m_pFileDlg = nullptr;
+m_pFileDlg.reset();
 }
 #endif
 
diff --git a/sfx2/source/appl/shutdownicon.hxx 
b/sfx2/source/appl/shutdownicon.hxx
index 31baf75fbfc7..eafeb9e25149 100644
--- a/sfx2/source/appl/shutdownicon.hxx
+++ b/sfx2/source/appl/shutdownicon.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 extern "C" {
 
@@ -67,7 +68,7 @@ class SFX2_DLLPUBLIC ShutdownIcon : public 
ShutdownIconServiceBase
 boolm_bVeto;
 boolm_bListenForTermination;
 boolm_bSystemDialogs;
-sfx2::FileDialogHelper* m_pFileDlg;
+std::unique_ptr m_pFileDlg;
 css::uno::Reference< css::uno::XComponentContext > m_xContext;
 
 static ShutdownIcon *pShutdownIcon; // one instance
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Tomaž Vajngerl
 sw/qa/extras/odfexport/odfexport.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 6a2a2e6e3fa164f234f2880e5ba608676c4eec04
Author: Tomaž Vajngerl 
Date:   Thu Apr 26 00:09:32 2018 +0900

extend test with checking the bullet bitmap size

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

diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 6872be59ebab..d1d544ea22e5 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1942,6 +1942,12 @@ DECLARE_ODFEXPORT_TEST(testBulletAsImage, 
"BulletAsImage.odt")
 xBitmap = aProperties[i].Value.get>();
 }
 CPPUNIT_ASSERT(xBitmap.is());
+
+Graphic aGraphic(uno::Reference(xBitmap, 
uno::UNO_QUERY));
+CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
+CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > sal_uLong(0));
+CPPUNIT_ASSERT_EQUAL(15L, aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL(15L, aGraphic.GetSizePixel().Height());
 }
 
 DECLARE_ODFEXPORT_TEST(testSignatureLineProperties, 
"signatureline-properties.fodt")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Miklos Vajna
 sw/source/ui/table/autoformatpreview.cxx   |   99 ++---
 sw/source/uibase/inc/autoformatpreview.hxx |   28 
 2 files changed, 64 insertions(+), 63 deletions(-)

New commits:
commit eef7d1614ee279dfe43e0a4b575d96e0e7e9470c
Author: Miklos Vajna 
Date:   Wed May 2 09:14:13 2018 +0200

sw: prefix members of AutoFormatPreview

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

diff --git a/sw/source/ui/table/autoformatpreview.cxx 
b/sw/source/ui/table/autoformatpreview.cxx
index 47447886ba0d..7b302a401703 100644
--- a/sw/source/ui/table/autoformatpreview.cxx
+++ b/sw/source/ui/table/autoformatpreview.cxx
@@ -30,16 +30,16 @@
 
 AutoFormatPreview::AutoFormatPreview(weld::DrawingArea* pDrawingArea)
 : mxDrawingArea(pDrawingArea)
-, aCurData(OUString())
-, bFitWidth(false)
+, maCurrentData(OUString())
+, mbFitWidth(false)
 , mbRTL(false)
-, aStrJan(SwResId(STR_JAN))
-, aStrFeb(SwResId(STR_FEB))
-, aStrMar(SwResId(STR_MAR))
-, aStrNorth(SwResId(STR_NORTH))
-, aStrMid(SwResId(STR_MID))
-, aStrSouth(SwResId(STR_SOUTH))
-, aStrSum(SwResId(STR_SUM))
+, maStringJan(SwResId(STR_JAN))
+, maStringFeb(SwResId(STR_FEB))
+, maStringMar(SwResId(STR_MAR))
+, maStringNorth(SwResId(STR_NORTH))
+, maStringMid(SwResId(STR_MID))
+, maStringSouth(SwResId(STR_SOUTH))
+, maStringSum(SwResId(STR_SUM))
 {
 uno::Reference xContext = 
comphelper::getProcessComponentContext();
 m_xBreak = i18n::BreakIterator::create(xContext);
@@ -53,12 +53,12 @@ AutoFormatPreview::AutoFormatPreview(weld::DrawingArea* 
pDrawingArea)
 
 IMPL_LINK(AutoFormatPreview, DoResize, const Size&, rSize, void)
 {
-aPrvSize = Size(rSize.Width() - 6, rSize.Height() - 30);
-nLabelColWidth = (aPrvSize.Width() - 4) / 4 - 12;
-nDataColWidth1 = (aPrvSize.Width() - 4 - 2 * nLabelColWidth) / 3;
-nDataColWidth2 = (aPrvSize.Width() - 4 - 2 * nLabelColWidth) / 4;
-nRowHeight = (aPrvSize.Height() - 4) / 5;
-NotifyChange(aCurData);
+maPreviousSize = Size(rSize.Width() - 6, rSize.Height() - 30);
+mnLabelColumnWidth = (maPreviousSize.Width() - 4) / 4 - 12;
+mnDataColumnWidth1 = (maPreviousSize.Width() - 4 - 2 * mnLabelColumnWidth) 
/ 3;
+mnDataColumnWidth2 = (maPreviousSize.Width() - 4 - 2 * mnLabelColumnWidth) 
/ 4;
+mnRowHeight = (maPreviousSize.Height() - 4) / 5;
+NotifyChange(maCurrentData);
 }
 
 void AutoFormatPreview::DetectRTL(SwWrtShell const* pWrtShell)
@@ -90,7 +90,7 @@ static void lcl_SetFontProperties(vcl::Font& rFont, const 
SvxFontItem& rFontItem
 void AutoFormatPreview::MakeFonts(vcl::RenderContext const& rRenderContext, 
sal_uInt8 nIndex,
   vcl::Font& rFont, vcl::Font& rCJKFont, 
vcl::Font& rCTLFont)
 {
-const SwBoxAutoFormat& rBoxFormat = aCurData.GetBoxFormat(nIndex);
+const SwBoxAutoFormat& rBoxFormat = maCurrentData.GetBoxFormat(nIndex);
 
 rFont = rCJKFont = rCTLFont = rRenderContext.GetFont();
 Size aFontSize(rFont.GetFontSize().Width(), 10 * 
rRenderContext.GetDPIScaleFactor());
@@ -130,26 +130,26 @@ void AutoFormatPreview::DrawString(vcl::RenderContext& 
rRenderContext, size_t nC
 switch (nIndex)
 {
 case 1:
-cellString = aStrJan;
+cellString = maStringJan;
 break;
 case 2:
-cellString = aStrFeb;
+cellString = maStringFeb;
 break;
 case 3:
-cellString = aStrMar;
+cellString = maStringMar;
 break;
 case 5:
-cellString = aStrNorth;
+cellString = maStringNorth;
 break;
 case 10:
-cellString = aStrMid;
+cellString = maStringMid;
 break;
 case 15:
-cellString = aStrSouth;
+cellString = maStringSouth;
 break;
 case 4:
 case 20:
-cellString = aStrSum;
+cellString = maStringSum;
 break;
 case 6:
 case 8:
@@ -199,11 +199,11 @@ void AutoFormatPreview::DrawString(vcl::RenderContext& 
rRenderContext, size_t nC
 goto MAKENUMSTR;
 
 MAKENUMSTR:
-if (aCurData.IsValueFormat())
+if (maCurrentData.IsValueFormat())
 {
 OUString sFormat;
 LanguageType eLng, eSys;
-aCurData.GetBoxFormat(sal_uInt8(nNum)).GetValueFormat(sFormat, 
eLng, eSys);
+
maCurrentData.GetBoxFormat(sal_uInt8(nNum)).GetValueFormat(sFormat, eLng, eSys);
 
 SvNumFormatType nType;
 bool bNew;
@@ -232,7 +232,7 @@ void AutoFormatPreview::DrawString(vcl::RenderContext& 
rRenderContext, size_t nC
 long nRightX = 0;
 
 Size theMaxStrSize(cellRect.GetWidth() - FRAME_OFFSET, 
cellRect.GetHeight(

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

2018-05-02 Thread Noel Grandin
 vcl/unx/generic/gdi/gcach_xpeer.cxx |   11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)

New commits:
commit 2ae289d67413a4f060b268a4483c3452c14aed42
Author: Noel Grandin 
Date:   Mon Apr 30 15:13:49 2018 +0200

loplugin:useuniqueptr in GlyphCacheHolder

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

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx 
b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 172fd4e45721..863d0a77cf8a 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -61,29 +61,24 @@ namespace
 struct GlyphCacheHolder
 {
 private:
-X11GlyphCache* m_pX11GlyphCache;
+std::unique_ptr m_pX11GlyphCache;
 
 GlyphCacheHolder(const GlyphCacheHolder&) = delete;
 GlyphCacheHolder& operator=(const GlyphCacheHolder&) = delete;
 
 public:
 GlyphCacheHolder()
+: m_pX11GlyphCache(new X11GlyphCache)
 {
-m_pX11GlyphCache = new X11GlyphCache;
 }
 void release()
 {
-delete m_pX11GlyphCache;
-m_pX11GlyphCache = nullptr;
+m_pX11GlyphCache.reset();
 }
 X11GlyphCache& getGlyphCache()
 {
 return *m_pX11GlyphCache;
 }
-~GlyphCacheHolder()
-{
-release();
-}
 };
 
 struct theGlyphCacheHolder :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk

2018-05-02 Thread Stephan Bergmann
 CustomTarget_html.mk |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit cb3e183c7fa7bd926e6564e52b5a79b0a0d15262
Author: Stephan Bergmann 
Date:   Wed May 2 10:25:33 2018 +0200

Make --with-help=html work on Windows

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

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 8b6325a3e..5d913826c 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -99,14 +99,15 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
&& rm -rf $(dir $@)text \
&& find text -name "*.xhp" \
| while read xhp; do \
+   mkdir -p $$(dirname $(dir $@)$$xhp) && \
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam Language $* \
--stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
-   --stringparam root `pwd`/ \
+   --stringparam root $(if $(filter 
WNT,$(OS)),$$(cygpath -m `pwd`),`pwd`)/ \
--stringparam productversion $(PRODUCTVERSION) \
-o $(dir $@)$${xhp%.xhp}.html \

$(SRCDIR)/helpcontent2/help3xsl/online_transform.xsl \
-   `pwd`/$$xhp \
+   $(if $(filter WNT,$(OS)),$$(cygpath -m 
`pwd`),`pwd`)/$$xhp \
; done \
&& touch $@ \
)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-05-02 Thread Stephan Bergmann
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0c8df66364355afb47e5f9dcd73a677f650341e1
Author: Stephan Bergmann 
Date:   Wed May 2 10:25:33 2018 +0200

Updated core
Project: help  cb3e183c7fa7bd926e6564e52b5a79b0a0d15262

Make --with-help=html work on Windows

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

diff --git a/helpcontent2 b/helpcontent2
index 5e2ec00e80b7..cb3e183c7fa7 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5e2ec00e80b758d19955b2584dc4ac5614db2635
+Subproject commit cb3e183c7fa7bd926e6564e52b5a79b0a0d15262
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-05-02 Thread Stephan Bergmann
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8e09329ea6e1625cbb9a4b79ad13e462c965b973
Author: Stephan Bergmann 
Date:   Wed May 2 10:40:01 2018 +0200

Updated core
Project: help  09f72e64083e9a6003e6c10fa26e1c5ca3c4d785

tdf#116240: Include --with-help=html in installation sets

...by extending the hackery in helpcontent2/CustomTarget_html.mk (see 
comment
there).  (Ultimately, the gbuild HelpTarget machinery should probably be 
adapted
to the needs of this new help format, once the old help format is no longer
supported?)

The Perl packaging code finds source files through the "include" paths 
specified
in instsetoo_native/util/openoffice.lst.in.  To avoid potential name 
clashes,
put the new .filelist files into
workdir/CustomTarget/helpcontent2/help3xsl/filelists/html-help/ 
sub-directories.

read_filelist in solenv/bin/modules/installer/filelists.pm does not strip 
white
space following the last item in a file list, but (with 
HAVE_GNUMAKE_FILE_FUNC)
the gb_HelpTarget_get_translation_target .filelist files (which are then
transformed with sed into the .html .filelist files read by the Perl 
packaging
code) may contain such trailing white space.  So $(strip ...) their content 
in
solenv/gbuild/HelpTarget.mk.

This is the helpcontent2 part of a change spanning core and helpcontent2.

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

diff --git a/helpcontent2 b/helpcontent2
index cb3e183c7fa7..09f72e64083e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit cb3e183c7fa7bd926e6564e52b5a79b0a0d15262
+Subproject commit 09f72e64083e9a6003e6c10fa26e1c5ca3c4d785
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac instsetoo_native/util Repository.mk scp2/macros solenv/gbuild

2018-05-02 Thread Stephan Bergmann
 Repository.mk   |2 --
 configure.ac|1 +
 instsetoo_native/util/openoffice.lst.in |4 ++--
 scp2/macros/macro.pl|8 +++-
 solenv/gbuild/AllLangPackage.mk |5 +
 solenv/gbuild/HelpTarget.mk |2 +-
 6 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit e606179d5722427bc4137838585b38892e01b328
Author: Stephan Bergmann 
Date:   Wed May 2 10:41:08 2018 +0200

tdf#116240: Include --with-help=html in installation sets

...by extending the hackery in helpcontent2/CustomTarget_html.mk (see 
comment
there).  (Ultimately, the gbuild HelpTarget machinery should probably be 
adapted
to the needs of this new help format, once the old help format is no longer
supported?)

The Perl packaging code finds source files through the "include" paths 
specified
in instsetoo_native/util/openoffice.lst.in.  To avoid potential name 
clashes,
put the new .filelist files into
workdir/CustomTarget/helpcontent2/help3xsl/filelists/html-help/ 
sub-directories.

read_filelist in solenv/bin/modules/installer/filelists.pm does not strip 
white
space following the last item in a file list, but (with 
HAVE_GNUMAKE_FILE_FUNC)
the gb_HelpTarget_get_translation_target .filelist files (which are then
transformed with sed into the .html .filelist files read by the Perl 
packaging
code) may contain such trailing white space.  So $(strip ...) their content 
in
solenv/gbuild/HelpTarget.mk.

This is the core part of a change spanning core and helpcontent2.

Change-Id: I82e0093ea2064725327330c5485f8e581573e1f2

diff --git a/Repository.mk b/Repository.mk
index 01c51c7a9db0..6ef05911a1bd 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -954,8 +954,6 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
 $(if $(and $(filter WNT,$(OS)), $(filter X86_64,$(CPUNAME))),twain_dsm) \
$(if $(ENABLE_HTMLHELP),\
helpcontent2_html_dynamic \
-   helpcontent2_html_lang \
-   helpcontent2_html_lang_generated \
helpcontent2_html_media \
helpcontent2_html_static \
) \
diff --git a/configure.ac b/configure.ac
index 56e9b01811a4..e57333f7963c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4715,6 +4715,7 @@ if test -n "$with_help" -a "$with_help" != "no" -a $_os 
!= iOS -a $_os != Androi
 ;;
 "html")
 ENABLE_HTMLHELP=TRUE
+SCPDEFS="$SCPDEFS -DWITH_HELP"
 AC_MSG_RESULT([HTML])
 ;;
 "online")
diff --git a/instsetoo_native/util/openoffice.lst.in 
b/instsetoo_native/util/openoffice.lst.in
index b94b7c330e40..afc8631cfd3a 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -80,7 +80,7 @@ LibreOffice
 downloadnameLibreOffice_{productversion}_{os}_install_{languages}
 langpackdownloadname
LibreOffice_{productversion}_languagepack_{os}_install_{languages}
 helppackdownloadname
LibreOffice_{productversion}_helppack_{os}_install_{languages}
-include 
{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{filelistpath}/ExtensionPackage,{extensionsdir},{licensepath},{packinfopath}
+include 
{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{filelistpath}/ExtensionPackage,{filelistpath}/CustomTarget/helpcontent2/help3xsl/filelists,{extensionsdir},{licensepath},{packinfopath}
 }
 }
 
@@ -133,7 +133,7 @@ LibreOfficeDev
 downloadname
LibreOfficeDev_{productversion}_{os}_install_{languages}
 langpackdownloadname
LibreOfficeDev_{productversion}_languagepack_{os}_install_{languages}
 helppackdownloadname
LibreOfficeDev_{productversion}_helppack_{os}_install_{languages}
-include 
{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{filelistpath}/ExtensionPackage,{extensionsdir},{licensepath},{packinfopath}
+include 
{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{filelistpath}/ExtensionPackage,{filelistpath}/CustomTarget/helpcontent2/help3xsl/filelists,{extensionsdir},{licensepath},{packinfopath}
 }
 }
 
diff --git a/scp2/macros/macro.pl b/scp2/macros/macro.pl
index aa03d4e04b9f..7f54298f9a3e 100644
--- a/scp2/macros/

[Libreoffice-commits] help.git: AllLangPackage_html_lang.mk CustomTarget_html.mk Module_helpcontent2.mk Package_html_lang.mk

2018-05-02 Thread Stephan Bergmann
 AllLangPackage_html_lang.mk |6 +++---
 CustomTarget_html.mk|   21 +
 Module_helpcontent2.mk  |2 +-
 3 files changed, 25 insertions(+), 4 deletions(-)

New commits:
commit 09f72e64083e9a6003e6c10fa26e1c5ca3c4d785
Author: Stephan Bergmann 
Date:   Wed May 2 10:40:01 2018 +0200

tdf#116240: Include --with-help=html in installation sets

...by extending the hackery in helpcontent2/CustomTarget_html.mk (see 
comment
there).  (Ultimately, the gbuild HelpTarget machinery should probably be 
adapted
to the needs of this new help format, once the old help format is no longer
supported?)

The Perl packaging code finds source files through the "include" paths 
specified
in instsetoo_native/util/openoffice.lst.in.  To avoid potential name 
clashes,
put the new .filelist files into
workdir/CustomTarget/helpcontent2/help3xsl/filelists/html-help/ 
sub-directories.

read_filelist in solenv/bin/modules/installer/filelists.pm does not strip 
white
space following the last item in a file list, but (with 
HAVE_GNUMAKE_FILE_FUNC)
the gb_HelpTarget_get_translation_target .filelist files (which are then
transformed with sed into the .html .filelist files read by the Perl 
packaging
code) may contain such trailing white space.  So $(strip ...) their content 
in
solenv/gbuild/HelpTarget.mk.

This is the helpcontent2 part of a change spanning core and helpcontent2.

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

diff --git a/Package_html_lang.mk b/AllLangPackage_html_lang.mk
similarity index 56%
rename from Package_html_lang.mk
rename to AllLangPackage_html_lang.mk
index 7368403e8..9be268d86 100644
--- a/Package_html_lang.mk
+++ b/AllLangPackage_html_lang.mk
@@ -7,11 +7,11 @@
 # # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 # #
 #
-$(eval $(call gb_Package_Package,helpcontent2_html_lang,$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)))
+$(eval $(call gb_AllLangPackage_AllLangPackage,helpcontent2_html_lang,$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)))
 
-$(eval $(call 
gb_Package_use_customtarget,helpcontent2_html_lang,helpcontent2/help3xsl))
+$(eval $(call 
gb_AllLangPackage_use_customtarget,helpcontent2_html_lang,helpcontent2/help3xsl))
 
-$(eval $(call 
gb_Package_add_files_with_dir,helpcontent2_html_lang,$(LIBO_SHARE_HELP_FOLDER)$(if
 $(HELP_ONLINE),/$(PRODUCTVERSION)),\
+$(eval $(call 
gb_AllLangPackage_add_files,helpcontent2_html_lang,$(LIBO_SHARE_HELP_FOLDER)$(if
 $(HELP_ONLINE),/$(PRODUCTVERSION)),\
$(foreach lang,$(gb_HELP_LANGS),\
$(lang)/bookmarks.js \
$(lang)/contents.js \
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 5d913826c..e4c1626e5 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -22,6 +22,7 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
$(lang)/html.text \
$(foreach 
module,$(html_TREE_MODULES),$(module)/$(lang)/contents.part) \
$(foreach module,$(html_BMARK_MODULES),$(firstword $(subst :, 
,$(module)))/$(lang)/bookmarks.part) \
+   $(foreach 
module,$(html_TEXT_MODULES),filelists/html-help/$(module)/$(lang).filelist) \
) \
 ))
 
@@ -171,4 +172,24 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \
) > $@ \
)   
 
+# The various gid_File_Help_*_Zip in scp2 that use 
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG expect
+# $(module)/$(lang).filelist files containing lists of files (in instdir) for 
the corresponding
+# module/lang parts of help data.  As a hack, generate those from the existing 
HelpTarget file
+# lists, which specify the original .xhp files (in SRCDIR for en-US, 
translated for all other
+# langs).  For the shared module, also include the per-lang non .xhp/.html 
files from AllLangPackage
+# helpcontent2_html_lang:
+
+# html__filelist,lang,module
+define html__filelist
+$(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/filelists/html-help/$(2)/$(1).filelist:
 \
+$(call gb_HelpTarget_get_filelist,$(2)/$(1)) \
+$(if $(filter $(2),shared),$(call 
gb_Package_get_target,helpcontent2_html_lang_$(1)))
+   mkdir -p (dirname $$@)
+   sed -e 's|$(if $(filter $(1),en-US),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/|$(INSTROOT)/$(LIBO_SHARE_HELP_FOLDER)/$(1)/|g'
 -e 's|.xhp|.html|g' $(call gb_HelpTarget_get_filelist,$(2)/$(1)) > $$@
+   $(if $(filter $(2),shared),cat $(call 
gb_Package_get_target,helpcontent2_html_lang_$(1)) >> $$@,:)
+
+endef
+
+$(eval $(foreach lang,$(gb_HELP_LANGS),$(foreach 
module,$(html_TEXT_MODULES),$(call html__filelist,$(lang),$(module)
+
 # vim: set noet sw=4 ts=4:
diff --git a/Module_helpcontent2.mk

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - lotuswordpro/qa lotuswordpro/source

2018-05-02 Thread Caolán McNamara
 lotuswordpro/qa/cppunit/data/fail/recurse-5.lwp |binary
 lotuswordpro/source/filter/lwpcelllayout.cxx|   15 +--
 lotuswordpro/source/filter/lwpcelllayout.hxx|8 +---
 lotuswordpro/source/filter/lwprowlayout.cxx |6 +++---
 lotuswordpro/source/filter/lwptablelayout.cxx   |2 +-
 5 files changed, 22 insertions(+), 9 deletions(-)

New commits:
commit 21f9812eb53272d50522a649b8c4b3492d95450b
Author: Caolán McNamara 
Date:   Mon Apr 30 15:31:51 2018 +0100

ofz#8095 avoid recurse to death

Reviewed-on: https://gerrit.libreoffice.org/53663
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 25c0988b87b71f93577837f4a300f5f17366d145)

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

diff --git a/lotuswordpro/qa/cppunit/data/fail/recurse-5.lwp 
b/lotuswordpro/qa/cppunit/data/fail/recurse-5.lwp
new file mode 100644
index ..a81b42f61e95
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/fail/recurse-5.lwp 
differ
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx 
b/lotuswordpro/source/filter/lwpcelllayout.cxx
index 504ccb366b73..93e71fd88255 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.cxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.cxx
@@ -74,8 +74,19 @@
 #include 
 #include 
 
+rtl::Reference LwpCellLayout::DoConvertCell(LwpObjectID aTableID, 
sal_uInt16 nRow, sal_uInt16 nCol)
+{
+if (m_bConvertCell)
+throw std::runtime_error("recursion in page divisions");
+m_bConvertCell = true;
+rtl::Reference aRet = ConvertCell(aTableID, nRow, nCol);
+m_bConvertCell = false;
+return aRet;
+}
+
 LwpCellLayout::LwpCellLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
 : LwpMiddleLayout(objHdr, pStrm)
+, m_bConvertCell(false)
 , crowid(0)
 , ccolid(0)
 , cType(LDT_NONE)
@@ -890,11 +901,11 @@ rtl::Reference 
LwpHiddenCellLayout::ConvertCell(LwpObjectID aTableID, sa
 LwpCellLayout *pDefault = dynamic_cast(pTable->GetDefaultCellStyle().obj().get());
 if (pDefault)
 {
-xXFCell = pDefault->ConvertCell(aTableID, nRow, nCol);
+xXFCell = pDefault->DoConvertCell(aTableID, nRow, nCol);
 }
 else
 {
-xXFCell = pConnCell->ConvertCell(aTableID, nRow, nCol);
+xXFCell = pConnCell->DoConvertCell(aTableID, nRow, nCol);
 }
 xXFCell->SetColumnSpaned(pConnCell->GetNumcols());
 }
diff --git a/lotuswordpro/source/filter/lwpcelllayout.hxx 
b/lotuswordpro/source/filter/lwpcelllayout.hxx
index 4969f568e9a1..907c29f8cf50 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.hxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.hxx
@@ -89,7 +89,7 @@ public:
 LwpCellLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
 virtual ~LwpCellLayout() override;
 virtual LWP_LAYOUT_TYPE GetLayoutType () override { return 
LWP_CELL_LAYOUT;}
-virtual rtl::Reference ConvertCell(LwpObjectID aTableID, 
sal_uInt16 nRow, sal_uInt16 nCol);
+rtl::Reference DoConvertCell(LwpObjectID aTableID, sal_uInt16 
nRow, sal_uInt16 nCol);
 sal_uInt16 GetRowID(){return crowid;}
 sal_uInt8 GetColID(){return ccolid;}
 void RegisterStyle() override;
@@ -114,10 +114,12 @@ protected:
 OUString const & GetCellStyleName(sal_uInt16 nRow, sal_uInt16 nCol, 
LwpTableLayout * pTableLayout);
 void RegisterDefaultCell();
 virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 
nCol, LwpTableLayout * pTableLayout);
+virtual rtl::Reference ConvertCell(LwpObjectID aTableID, 
sal_uInt16 nRow, sal_uInt16 nCol);
 static LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, 
LwpTableLayout * pTableLayout);
 static sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; };
 virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow){return nRow + 1; };
 
+bool m_bConvertCell;
 sal_uInt16 crowid;
 sal_uInt8   ccolid;
 LwpObjectID cLayNumerics;
@@ -147,11 +149,11 @@ public:
 virtual ~LwpHiddenCellLayout() override;
 virtual LWP_LAYOUT_TYPE GetLayoutType () override { return 
LWP_HIDDEN_CELL_LAYOUT;}
 virtual void Parse(IXFStream* pOutputStream) override;
-virtual rtl::Reference ConvertCell(LwpObjectID aTableID, 
sal_uInt16 nRow, sal_uInt16 nCol) override;
 void RegisterStyle() override {}
 virtual void SetCellMap() override;
 private:
 void Read() override;
+virtual rtl::Reference ConvertCell(LwpObjectID aTableID, 
sal_uInt16 nRow, sal_uInt16 nCol) override;
 LwpObjectID cconnectedlayout;
 };
 
@@ -166,7 +168,6 @@ public:
 virtual ~LwpConnectedCellLayout() override;
 virtual LWP_LAYOUT_TYPE GetLayoutType () override { return 
LWP_CONNECTED_CELL_LAYOUT;}
 virtual void Parse(IXFStream* pOutputStream) override;
-virtual rtl

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

2018-05-02 Thread Tamas Bunth
 dbaccess/source/filter/hsqldb/rowinputbinary.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 9123711dd092139fb95be92f3ff0cdde657086dd
Author: Tamas Bunth 
Date:   Sat Apr 28 12:33:11 2018 +0200

tdf#117296 dbahsql: Fix migration of numeric

Change-Id: I9ca181c58cd73432c632147870d546d277893fdf
Reviewed-on: https://gerrit.libreoffice.org/53587
Tested-by: Jenkins 
Reviewed-by: Tamás Bunth 

diff --git a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx 
b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
index a2c736d9b5ac..62c37525367d 100644
--- a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
+++ b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
@@ -42,9 +42,8 @@ namespace
 OUString lcl_double_dabble(const std::vector& bytes)
 {
 size_t nbits = 8 * bytes.size(); // length of array in bits
-size_t nscratch = nbits / 3; // length of scratch in bytes
+size_t nscratch = nbits / 2; // length of scratch in bytes
 std::vector scratch(nscratch, 0);
-size_t smin = nscratch - 2; // speed optimization
 
 for (size_t i = 0; i < bytes.size(); ++i)
 {
@@ -54,13 +53,11 @@ OUString lcl_double_dabble(const std::vector& 
bytes)
 int shifted_in = (bytes[i] & (1 << (7 - j))) ? 1 : 0;
 
 /* Add 3 everywhere that scratch[k] >= 5. */
-for (size_t k = smin; k < nscratch; ++k)
+for (size_t k = 0; k < nscratch; ++k)
 scratch[k] += (scratch[k] >= 5) ? 3 : 0;
 
 /* Shift scratch to the left by one position. */
-if (scratch[smin] >= 8)
-smin -= 1;
-for (size_t k = smin; k < nscratch - 1; ++k)
+for (size_t k = 0; k < nscratch - 1; ++k)
 {
 scratch[k] <<= 1;
 scratch[k] &= 0xF;
@@ -76,7 +73,7 @@ OUString lcl_double_dabble(const std::vector& 
bytes)
 
 auto it = scratch.begin();
 /* Remove leading zeros from the scratch space. */
-while (*it == 0)
+while (*it == 0 && scratch.size() > 1)
 {
 it = scratch.erase(it);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'distro/collabora/collabora-online-3-2-1'

2018-05-02 Thread Ashod Nakashian
New branch 'distro/collabora/collabora-online-3-2-1' available with the 
following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-2-1' - configure.ac debian/changelog loolwsd.spec.in

2018-05-02 Thread Andras Timar
 configure.ac |2 +-
 debian/changelog |6 ++
 loolwsd.spec.in  |2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit f7ba5a4b0571be4c1c28fd826e9dc66245edc84a
Author: Andras Timar 
Date:   Wed May 2 11:25:46 2018 +0200

Bump package version to 3.2.1-1

Change-Id: I9c81f66b172905378a081b06fd9bea44af0af536

diff --git a/configure.ac b/configure.ac
index 7ae7ae948..3dc87c69b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [3.2.0], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [3.2.1], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
diff --git a/debian/changelog b/debian/changelog
index 357bb1444..654c9e7b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (3.2.1-1) unstable; urgency=medium
+
+  * see the git log: http://col.la/cool321
+
+ -- Andras Timar   Wed, 01 May 2018 11:20:00 +0100
+
 loolwsd (3.2.0-4) unstable; urgency=medium
 
   * see the git log: http://col.la/cool3
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index 4409aed98..4ff70c118 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:4%{?dist}
+Release:1%{?dist}
 %if 0%{?suse_version} == 1110
 Group:  Productivity/Office/Suite
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-2-1' - 0 commits -

2018-05-02 Thread Unknown
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: sw/inc sw/source

2018-05-02 Thread Tomaž Vajngerl
 sw/inc/cmdid.h  |2 +-
 sw/source/core/unocore/unoframe.cxx |   27 ++-
 sw/source/core/unocore/unomap1.cxx  |1 +
 3 files changed, 24 insertions(+), 6 deletions(-)

New commits:
commit 3f9ffa26f90d7976840c192ef267fe9841759e57
Author: Tomaž Vajngerl 
Date:   Thu Apr 26 15:54:16 2018 +0900

Restore ReplacementGraphicURL for setting, no API change

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

diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index a385ecde1300..28de05b41c2f 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -566,7 +566,7 @@
 #define FN_UNO_PARA_STYLE_CONDITIONS(FN_EXTRA2 + 100)
 #define FN_UNO_GRAPHIC  (FN_EXTRA2 + 101)
 
-// #define free (FN_EXTRA2 + 102)
+#define FN_UNO_REPLACEMENT_GRAPHIC_URL  (FN_EXTRA2 + 102)
 #define FN_UNO_CELL_ROW_SPAN(FN_EXTRA2 + 103)
 #define FN_UNO_TABLE_BORDER_DISTANCES   (FN_EXTRA2 + 104)
 #define FN_SPELL_GRAMMAR_DIALOG (FN_EXTRA2 + 105)
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index a49f49f7d973..e18c20dfce84 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -111,6 +111,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1595,11 +1596,28 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
 }
 }
 }
-else if (FN_UNO_REPLACEMENT_GRAPHIC == pEntry->nWID)
+else if (FN_UNO_REPLACEMENT_GRAPHIC == pEntry->nWID || 
FN_UNO_REPLACEMENT_GRAPHIC_URL == pEntry->nWID)
 {
-uno::Reference xGraphic;
-aValue >>= xGraphic;
-if (xGraphic.is())
+Graphic aGraphic;
+if (aValue.has())
+{
+OUString aURL = aValue.get();
+if (!aURL.isEmpty())
+{
+aGraphic = vcl::graphic::loadFromURL(aURL);
+}
+}
+else if (aValue.has>())
+{
+uno::Reference xGraphic;
+xGraphic = aValue.get>();
+if (xGraphic.is())
+{
+aGraphic = Graphic(xGraphic);
+}
+}
+
+if (aGraphic)
 {
 const ::SwFormatContent* pCnt = &pFormat->GetContent();
 if ( pCnt->GetContentIdx() && pDoc->GetNodes()[ 
pCnt->GetContentIdx()->GetIndex() + 1 ] )
@@ -1609,7 +1627,6 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
 if ( pOleNode )
 {
 svt::EmbeddedObjectRef &rEmbeddedObject = 
pOleNode->GetOLEObj().GetObject();
-Graphic aGraphic(xGraphic);
 rEmbeddedObject.SetGraphic(aGraphic, OUString() );
 }
 }
diff --git a/sw/source/core/unocore/unomap1.cxx 
b/sw/source/core/unocore/unomap1.cxx
index 3c9e9720d990..f7a3d0eff130 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -886,6 +886,7 @@ const SfxItemPropertyMapEntry*  
SwUnoPropertyMapProvider::GetEmbeddedPropertyMap
 { OUString(UNO_NAME_CLSID),FN_UNO_CLSID, 
cppu::UnoType::get(), PROPERTY_NONE, 0 },
 { OUString(UNO_NAME_STREAM_NAME),   FN_UNO_STREAM_NAME, 
cppu::UnoType::get(), PROPERTY_NONE, 0 },
 { OUString(UNO_NAME_MODEL), FN_UNO_MODEL, 
cppu::UnoType::get(), 
PropertyAttribute::READONLY|PropertyAttribute::MAYBEVOID, 0},
+{ OUString(UNO_NAME_GRAPHIC_URL), FN_UNO_REPLACEMENT_GRAPHIC_URL, 
cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, 0 },
 { OUString(UNO_NAME_GRAPHIC), FN_UNO_REPLACEMENT_GRAPHIC, 
cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, 0 },
 { OUString(UNO_NAME_COMPONENT),FN_UNO_COMPONENT, 
cppu::UnoType::get(), PropertyAttribute::READONLY, 0},
 { OUString(UNO_NAME_EMBEDDED_OBJECT),FN_EMBEDDED_OBJECT, 
cppu::UnoType::get(), PROPERTY_NONE, 0},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/3.2.0-final'

2018-05-02 Thread Andras Timar
Tag '3.2.0-final' created by Andras Timar  at 
2018-05-02 09:48 +

3.2.0-final

Changes since 3.2-rc2-4:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'distro/collabora/collabora-online-3-2-1'

2018-05-02 Thread Andras Timar
New branch 'distro/collabora/collabora-online-3-2-1' available with the 
following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-2-1' - configure.ac debian/changelog loolwsd.spec.in

2018-05-02 Thread Andras Timar
 configure.ac |2 +-
 debian/changelog |6 ++
 loolwsd.spec.in  |2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 1753b758566c3330b7ab669e8c0f60ec087add52
Author: Andras Timar 
Date:   Wed May 2 11:25:46 2018 +0200

Bump package version to 3.2.1-1

Change-Id: I9c81f66b172905378a081b06fd9bea44af0af536

diff --git a/configure.ac b/configure.ac
index 7ae7ae948..3dc87c69b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [3.2.0], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [3.2.1], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
diff --git a/debian/changelog b/debian/changelog
index c1081f636..88754fda2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (3.2.1-1) unstable; urgency=medium
+
+  * see the git log: http://col.la/cool321
+
+ -- Andras Timar   Wed, 01 May 2018 11:20:00 +0100
+
 loolwsd (3.2.0-3) unstable; urgency=medium
 
   * see the git log: http://col.la/cool3
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index f362365f6..4ff70c118 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:3%{?dist}
+Release:1%{?dist}
 %if 0%{?suse_version} == 1110
 Group:  Productivity/Office/Suite
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - basic/source cui/source editeng/source filter/source sc/source svtools/source sw/source xmloff/source

2018-05-02 Thread Don Lewis
 basic/source/basmgr/basmgr.cxx   |2 
 basic/source/sbx/sbxobj.cxx  |   12 ++--
 basic/source/sbx/sbxvalue.cxx|6 +-
 basic/source/sbx/sbxvar.cxx  |2 
 cui/source/dialogs/linkdlg.cxx   |2 
 editeng/source/items/svxfont.cxx |2 
 editeng/source/items/xmlcnitm.cxx|2 
 editeng/source/misc/svxacorr.cxx |6 +-
 editeng/source/rtf/rtfgrf.cxx|2 
 filter/source/msfilter/msocximex.cxx |4 -
 filter/source/msfilter/msvbasic.cxx  |6 +-
 sc/source/ui/docshell/impex.cxx  |2 
 svtools/source/svrtf/svparser.cxx|2 
 sw/source/core/access/acccontext.cxx |8 +--
 sw/source/core/access/accfield.cxx   |2 
 sw/source/core/attr/swatrset.cxx |2 
 sw/source/core/crsr/crsrsh.cxx   |8 +--
 sw/source/core/crsr/crstrvl.cxx  |4 -
 sw/source/core/crsr/unocrsr.cxx  |2 
 sw/source/core/doc/docdraw.cxx   |2 
 sw/source/core/doc/docfld.cxx|8 +--
 sw/source/core/doc/docfly.cxx|2 
 sw/source/core/doc/docfmt.cxx|4 -
 sw/source/core/doc/doclay.cxx|4 -
 sw/source/core/doc/docredln.cxx  |6 +-
 sw/source/core/doc/htmltbl.cxx   |2 
 sw/source/core/doc/poolfmt.cxx   |   10 ++--
 sw/source/core/doc/tblafmt.cxx   |2 
 sw/source/core/docnode/ndnum.cxx |2 
 sw/source/core/docnode/ndsect.cxx|2 
 sw/source/core/docnode/ndtbl.cxx |4 -
 sw/source/core/docnode/node.cxx  |2 
 sw/source/core/docnode/nodes.cxx |4 -
 sw/source/core/docnode/section.cxx   |2 
 sw/source/core/docnode/swbaslnk.cxx  |6 +-
 sw/source/core/edit/ednumber.cxx |2 
 sw/source/core/fields/docufld.cxx|2 
 sw/source/core/frmedt/fecopy.cxx |2 
 sw/source/core/frmedt/fefly1.cxx |8 +--
 sw/source/core/frmedt/feshview.cxx   |2 
 sw/source/core/frmedt/fews.cxx   |2 
 sw/source/core/graphic/grfatr.cxx|4 -
 sw/source/core/layout/atrfrm.cxx |   38 +++
 sw/source/core/layout/ftnfrm.cxx |8 +--
 sw/source/core/layout/paintfrm.cxx   |6 +-
 sw/source/core/layout/tabfrm.cxx |2 
 sw/source/core/ole/ndole.cxx |4 -
 sw/source/core/swg/SwXMLTextBlocks.cxx   |2 
 sw/source/core/swg/swblocks.cxx  |4 -
 sw/source/core/text/frmpaint.cxx |2 
 sw/source/core/text/inftxt.cxx   |2 
 sw/source/core/text/itrform2.cxx |2 
 sw/source/core/text/porfly.cxx   |2 
 sw/source/core/text/porlin.cxx   |2 
 sw/source/core/text/portxt.cxx   |2 
 sw/source/core/text/txtdrop.cxx  |2 
 sw/source/core/text/txttab.cxx   |2 
 sw/source/core/tox/tox.cxx   |2 
 sw/source/core/tox/txmsrt.cxx|4 -
 sw/source/core/txtnode/atrflyin.cxx  |4 -
 sw/source/core/txtnode/ndhints.cxx   |2 
 sw/source/core/undo/undobj.cxx   |2 
 sw/source/core/undo/untbl.cxx|   12 ++--
 sw/source/core/view/viewsh.cxx   |4 -
 sw/source/filter/ascii/parasc.cxx|4 -
 sw/source/filter/basflt/fltini.cxx   |4 -
 sw/source/filter/html/htmlcss1.cxx   |2 
 sw/source/filter/html/htmlgrin.cxx   |2 
 sw/source/filter/html/htmlsect.cxx   |2 
 sw/source/filter/html/swhtml.cxx |   18 +++
 sw/source/filter/rtf/rtffly.cxx  |2 
 sw/source/filter/rtf/swparrtf.cxx|6 +-
 sw/source/filter/writer/writer.cxx   |6 +-
 sw/source/filter/ww8/writerhelper.cxx|4 -
 sw/source/filter/ww8/wrtw8esh.cxx|6 +-
 sw/source/filter/ww8/wrtw8nds.cxx|6 +-
 sw/source/filter/ww8/wrtw8sty.cxx|2 
 sw/source/filter/ww8/wrtww8.cxx  |8 +--
 sw/source/filter/ww8/wrtww8gr.cxx|2 
 sw/source/fil

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

2018-05-02 Thread Noel Grandin
 svx/source/accessibility/AccessibleTextHelper.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 03a4b6eb58b29c0ab4bb85f756923c46618d02ff
Author: Noel Grandin 
Date:   Wed May 2 10:00:39 2018 +0200

tdf#117205 impress crash when moving an item in a list

regression from
   commit 891e41fac81fbd8d5cdb277b26639abfd25a7143 (patch)
   dead code in AccessibleTextHelper_Impl::UpdateVisibleChildren

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

diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx 
b/svx/source/accessibility/AccessibleTextHelper.cxx
index 9f1061bf0cac..2707d768c273 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -759,12 +759,15 @@ namespace accessibility
 SvxTextForwarder& rCacheTF = GetTextForwarder();
 sal_Int32 nParas=rCacheTF.GetParagraphCount();
 
-mnFirstVisibleChild = nParas ? 0 : -1;
+mnFirstVisibleChild = -1;
 mnLastVisibleChild = -2;
 
-if (mxFrontEnd.is() && bBroadcastEvents)
+for( sal_Int32 nCurrPara=0; nCurrParahttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - 2 commits - include/sfx2 sfx2/source vcl/Library_vclplug_kde5.mk vcl/unx

2018-05-02 Thread Katarina Behrens
 include/sfx2/infobar.hxx |4 ++
 include/sfx2/viewfrm.hxx |2 +
 sfx2/source/dialog/infobar.cxx   |   34 +-
 sfx2/source/doc/objserv.cxx  |   33 +
 sfx2/source/view/viewfrm.cxx |   21 +
 vcl/Library_vclplug_kde5.mk  |1 
 vcl/unx/kde5/KDE5SalData.cxx |   59 +++
 vcl/unx/kde5/KDE5SalData.hxx |   33 +
 vcl/unx/kde5/KDE5SalInstance.cxx |6 ++-
 9 files changed, 170 insertions(+), 23 deletions(-)

New commits:
commit 9cd8b3d2db27792673436ec0fdc6727b0b8e04fe
Author: Katarina Behrens 
Date:   Wed May 2 13:14:29 2018 +0200

KDE5SalData derives from Qt5Data

A step back since now mbNoFocusRects (= draw focus rectangle natively)
is set, but native drawing itself is not yet implemented and no focus
rectangles are draw

Change-Id: I4dde734d057f6c594eb11162990430697277f029

diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index f82227722c55..0f6cffad5d3c 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_Library_add_libs,vclplug_kde5,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,vclplug_kde5,\
+vcl/unx/kde5/KDE5SalData \
 vcl/unx/kde5/KDE5SalDisplay \
 vcl/unx/kde5/KDE5SalFrame \
 vcl/unx/kde5/KDE5SalGraphics \
diff --git a/vcl/unx/kde5/KDE5SalData.cxx b/vcl/unx/kde5/KDE5SalData.cxx
new file mode 100644
index ..f995fa549768
--- /dev/null
+++ b/vcl/unx/kde5/KDE5SalData.cxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+#include 
+
+#undef Region
+
+#include "KDE5SalData.hxx"
+
+KDE5SalData::KDE5SalData( SalInstance *pInstance )
+: Qt5Data( pInstance )
+{
+}
+
+KDE5SalData::~KDE5SalData()
+{
+}
+
+void KDE5SalData::initNWF()
+{
+ImplSVData *pSVData = ImplGetSVData();
+
+// draw toolbars on separate lines
+pSVData->maNWFData.mbDockingAreaSeparateTB = true;
+// no borders for menu, theming does that
+pSVData->maNWFData.mbFlatMenu = true;
+// Qt theme engines may support a rollover menubar
+pSVData->maNWFData.mbRolloverMenubar = true;
+
+pSVData->maNWFData.mbNoFocusRects = true;
+
+// Styled menus need additional space
+QStyle *style = QApplication::style();
+pSVData->maNWFData.mnMenuFormatBorderX =
+   style->pixelMetric( QStyle::PM_MenuPanelWidth ) +
+   style->pixelMetric( QStyle::PM_MenuHMargin );
+pSVData->maNWFData.mnMenuFormatBorderY =
+   style->pixelMetric( QStyle::PM_MenuPanelWidth ) +
+   style->pixelMetric( QStyle::PM_MenuVMargin );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde5/KDE5SalData.hxx b/vcl/unx/kde5/KDE5SalData.hxx
new file mode 100644
index ..a72180694d7b
--- /dev/null
+++ b/vcl/unx/kde5/KDE5SalData.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+
+class KDE5SalData : public Qt5Data
+{
+public:
+KDE5SalData( SalInstance *pInstance );
+virtual ~KDE5SalData();
+
+static void initNWF() ;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde5/KDE5SalIns

[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - 2 commits - vcl/Library_vclplug_kde5.mk vcl/unx

2018-05-02 Thread Katarina Behrens
Rebased ref, commits from common ancestor:
commit 6e0d7ce5c38cfab790b073c9e8ea5a7e08a8921d
Author: Katarina Behrens 
Date:   Wed May 2 13:25:43 2018 +0200

Native focus rectangles for checkboxes

done only half-way, they need to be made transparent

Change-Id: Id7b1ebce33ef6f8912ee5250c13e38592b383f81

diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 59cdd1347fb9..849865641fb1 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -82,12 +82,14 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType 
type, ControlPart pa
 {
 case ControlType::Pushbutton:
 case ControlType::Radiobutton:
-case ControlType::Checkbox:
 case ControlType::Tooltip:
 case ControlType::Progress:
 case ControlType::ListNode:
 return (part == ControlPart::Entire);
 
+case ControlType::Checkbox:
+return (part == ControlPart::Entire) || (part == 
ControlPart::Focus);
+
 case ControlType::Menubar:
 case ControlType::MenuPopup:
 case ControlType::Editbox:
@@ -419,10 +421,18 @@ bool KDE5SalGraphics::drawNativeControl( ControlType 
type, ControlPart part,
 }
 else if (type == ControlType::Checkbox)
 {
-QStyleOptionButton option;
-draw( QStyle::CE_CheckBox, &option, m_image.get(),
+if (part == ControlPart::Entire)
+{
+QStyleOptionButton option;
+draw( QStyle::CE_CheckBox, &option, m_image.get(),
vclStateValue2StateFlag(nControlState, value) );
-//m_image->save("/tmp/checkbox.png");
+}
+else if (part == ControlPart::Focus)
+{
+QStyleOptionFocusRect option;
+draw( QStyle::PE_FrameFocusRect, &option, m_image.get(),
+  vclStateValue2StateFlag(nControlState, value) );
+}
 }
 else if (type == ControlType::Scrollbar)
 {
commit d8cd9b1aeeaef8f4d071b88570885867ac81a54b
Author: Katarina Behrens 
Date:   Wed May 2 13:14:29 2018 +0200

KDE5SalData derives from Qt5Data

A step back since now mbNoFocusRects (= draw focus rectangle natively)
is set, but native drawing itself is not yet implemented and no focus
rectangles are drawn

Change-Id: I4dde734d057f6c594eb11162990430697277f029

diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index f82227722c55..0f6cffad5d3c 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_Library_add_libs,vclplug_kde5,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,vclplug_kde5,\
+vcl/unx/kde5/KDE5SalData \
 vcl/unx/kde5/KDE5SalDisplay \
 vcl/unx/kde5/KDE5SalFrame \
 vcl/unx/kde5/KDE5SalGraphics \
diff --git a/vcl/unx/kde5/KDE5SalData.cxx b/vcl/unx/kde5/KDE5SalData.cxx
new file mode 100644
index ..f995fa549768
--- /dev/null
+++ b/vcl/unx/kde5/KDE5SalData.cxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+#include 
+
+#undef Region
+
+#include "KDE5SalData.hxx"
+
+KDE5SalData::KDE5SalData( SalInstance *pInstance )
+: Qt5Data( pInstance )
+{
+}
+
+KDE5SalData::~KDE5SalData()
+{
+}
+
+void KDE5SalData::initNWF()
+{
+ImplSVData *pSVData = ImplGetSVData();
+
+// draw toolbars on separate lines
+pSVData->maNWFData.mbDockingAreaSeparateTB = true;
+// no borders for menu, theming does that
+pSVData->maNWFData.mbFlatMenu = true;
+// Qt theme engines may support a rollover menubar
+pSVData->maNWFData.mbRolloverMenubar = true;
+
+pSVData->maNWFData.mbNoFocusRects = true;
+
+// Styled menus need additional space
+QStyle *style = QApplication::style();
+pSVData->maNWFData.mnMenuFormatBorderX =
+   style->pixelMetric( QStyle::PM_MenuPanelWidth ) +
+   style->pixelMetric( QStyle::PM_MenuHMargin );
+pSVData->maNWFData.mnMenuFormatBorderY =
+   style->pixelMetric( QStyle::PM_MenuPanelWidth ) +
+   style->pixelMetric( QStyle::PM_MenuVMargin );
+}
+
+/* vim:set shiftwidth=4 softtabs

[Libreoffice-commits] core.git: filter/source include/editeng include/svtools qadevOOo/runner sc/source sfx2/source sw/qa sw/source

2018-05-02 Thread Andrea Gelmini
 filter/source/graphicfilter/idxf/dxfgrprd.hxx |6 +++---
 include/editeng/outliner.hxx  |2 +-
 include/svtools/calendar.hxx  |2 +-
 qadevOOo/runner/lib/MultiPropertyTest.java|2 +-
 sc/source/filter/inc/xiformula.hxx|2 +-
 sfx2/source/control/shell.cxx |2 +-
 sw/qa/python/check_index.py   |   12 ++--
 sw/source/core/table/swnewtable.cxx   |4 ++--
 8 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit f66edd357c4572fd69d42c2330f922ec2beaa415
Author: Andrea Gelmini 
Date:   Mon Apr 30 00:01:46 2018 +0200

Fix typos

Change-Id: I56477227bafdd7fdb29aa5a5c857cbfda110e395
Reviewed-on: https://gerrit.libreoffice.org/53643
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 

diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx 
b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
index 09bbcd3676e4..97a023420e74 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
@@ -47,17 +47,17 @@ public:
 long   GetI() const;
 // Returns the integer value of the group which was read earlier with 
Read().
 // This read must have returned a group code for datatype Integer.
-// If not 0 is returend
+// If not 0 is returned
 
 double GetF() const;
 // Returns the floating point value of the group which was read 
earlier with Read().
 // This read must have returned a group code for datatype 
Floatingpoint.
-// If not 0 is returend
+// If not 0 is returned
 
 const OString& GetS() const;
 // Returns the string of the group which was read earlier with Read().
 // This read must have returned a group code for datatype String.
-// If not NULL is returend
+// If not NULL is returned
 
 sal_uInt64 remainingSize() const;
 private:
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 6f9c67132c7c..a5f0d4b1b1e3 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -248,7 +248,7 @@ public:
 
 voidCreateSelectionList (std::vector &aSelList) ;
 
-// Retruns the number of selected paragraphs
+// Returns the number of selected paragraphs
 sal_Int32   Select( Paragraph const * pParagraph, bool bSelect = true);
 
 OUStringGetSelected() const;
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 753ecad1f606..7b5ae85a94e9 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -113,7 +113,7 @@ sal_False is a selection to the right or down
 --
 
 If the DateRange area changes and we want to take over the selection, we
-should only do this is if IsScrollDateRangeChanged() retruns sal_True.
+should only do this is if IsScrollDateRangeChanged() returns sal_True.
 This method returns sal_True if the area change was triggered by using the
 ScrollButtons and sal_False if it was triggered by Resize(), other method
 calls or by ending a selection.
diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index a9e49bed0475..75834fba631c 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -434,7 +434,7 @@ public class MultiPropertyTest extends MultiMethodTest
 
 /**
  * Overridden method of PropertyTester which
- * retruns new value from two values specified.
+ * returns new value from two values specified.
  *
  * @return The second value if old value is equal to the first
  * one, the first value otherwise.
diff --git a/sc/source/filter/inc/xiformula.hxx 
b/sc/source/filter/inc/xiformula.hxx
index 96968b34e061..a24c008d96fb 100644
--- a/sc/source/filter/inc/xiformula.hxx
+++ b/sc/source/filter/inc/xiformula.hxx
@@ -44,7 +44,7 @@ public:
 
 /**
  * Creates a formula token array from the Excel token array.  Note that
- * the caller must create a copy of the token array instance returend by
+ * the caller must create a copy of the token array instance returned by
  * this function if the caller needs to persistently store the array,
  * because the pointer points to an array instance on the stack.
  */
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index c89d162ebe9d..970ca26c3260 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -326,7 +326,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame const 
*pFrame, bool bMDI )
 << " bMDI " << (bMDI ? "MDI" : ""));
 
 // Only when it comes from a Frame
-// (not when for instance by poping BASIC-IDE from AppDisp)
+// (not when for instance by popping BASIC-IDE from AppDisp)
 if ( bMDI && pImpl->pFrame == pFrame )
 {

[Libreoffice-commits] core.git: include/svx sc/source sd/source svx/source sw/source

2018-05-02 Thread Noel Grandin
 include/svx/svdetc.hxx   |2 +-
 include/svx/svdmodel.hxx |2 +-
 sc/source/ui/drawfunc/futext.cxx |   14 --
 sc/source/ui/drawfunc/futext2.cxx|4 ++--
 sc/source/ui/inc/futext.hxx  |2 +-
 sd/source/ui/func/fuexpand.cxx   |7 +++
 sd/source/ui/func/futext.cxx |4 ++--
 sd/source/ui/view/sdview.cxx |2 +-
 svx/source/inc/svdoutlinercache.hxx  |2 +-
 svx/source/sdr/properties/textproperties.cxx |3 +--
 svx/source/svdraw/svdedxv.cxx|2 +-
 svx/source/svdraw/svdetc.cxx |4 ++--
 svx/source/svdraw/svdmodel.cxx   |8 
 svx/source/svdraw/svdoutlinercache.cxx   |   10 +-
 svx/source/table/tablecontroller.cxx |4 ++--
 svx/source/unodraw/unoshtxt.cxx  |2 +-
 sw/source/uibase/uiview/viewdraw.cxx |6 +++---
 17 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit be48eb2e82a3d8891ee84145567e2b89884f1fd6
Author: Noel Grandin 
Date:   Wed May 2 13:00:30 2018 +0200

return std::unique_ptr from SdrMakeOutliner

and some of its callers

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

diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index c39e77b7d174..abd5c886ef2b 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -55,7 +55,7 @@ namespace com { namespace sun { namespace star { namespace 
lang {
  * The resulting default font height, however, stays the same (the logical
  * font height is converted).
  */
-SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, 
SdrModel& rMod);
+SVX_DLLPUBLIC std::unique_ptr SdrMakeOutliner(OutlinerMode 
nOutlinerMode, SdrModel& rMod);
 
 /**
  * Global default settings for the DrawingEngine.
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index cd49212c3584..0b7b5ab5cc40 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -543,7 +543,7 @@ public:
 
 void ReformatAllTextObjects();
 
-SdrOutliner* createOutliner( OutlinerMode nOutlinerMode );
+std::unique_ptr createOutliner( OutlinerMode nOutlinerMode );
 void disposeOutliner( SdrOutliner* pOutliner );
 
 bool IsWriter() const { return !bMyPool; }
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 7914c87a7313..0152ba0084af 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -184,7 +184,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
 nullptr;
 if (pObj)
 {
-SdrOutliner* pO = MakeOutliner();
+std::unique_ptr pO = MakeOutliner();
 lcl_UpdateHyphenator( *pO, pObj );
 
 //  vertical flag:
@@ -197,10 +197,11 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
 pO->SetVertical( bVertical );
 
 //!?? the default values are not correct when result is 
without outliner ???!?
-if ( pView->SdrBeginTextEdit(pObj, pPV, pWindow, true, pO) )
+auto pUndoManager = &pO->GetUndoManager();
+if ( pView->SdrBeginTextEdit(pObj, pPV, pWindow, true, 
pO.release()) )
 {
 // subscribe EditEngine-UndoManager
-pViewShell->SetDrawTextUndo( &pO->GetUndoManager() );
+pViewShell->SetDrawTextUndo( pUndoManager );
 
 OutlinerView* pOLV = pView->GetTextEditOutlinerView();
 if ( pOLV->MouseButtonDown(rMEvt) )
@@ -578,7 +579,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* 
pMousePixel,
 
 if ( pObj->HasTextEdit() )
 {
-SdrOutliner* pO = MakeOutliner();
+std::unique_ptr pO = MakeOutliner();
 lcl_UpdateHyphenator( *pO, pObj );
 
 //  vertical flag:
@@ -592,7 +593,8 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* 
pMousePixel,
 pO->SetVertical( bVertical );
 
 //!??  without returned Outliner the defaults are not correct 
???!?
-if ( pView->SdrBeginTextEdit(pObj, pPV, pWindow, true, pO) )
+auto pUndoManager = &pO->GetUndoManager();
+if ( pView->SdrBeginTextEdit(pObj, pPV, pWindow, true, 
pO.release()) )
 {
 //  Toggle out of paste mode if we are in it, otherwise
 //  pressing return in this object will instead go to the
@@ -601,7 +603,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* 
pMousePixel,
 pViewShell->UpdateCopySourceOverlay();
 
 //  EditEngine-UndoManager anm

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

2018-05-02 Thread Tomaž Vajngerl
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit e148a58b6d60d2f2587ce264e0f5f1fb73879231
Author: Tomaž Vajngerl 
Date:   Thu Apr 26 15:54:58 2018 +0900

extend test, so it checks the retireved graphic is as expected

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index f51d918c721e..6232c9f8e7ee 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -183,6 +183,9 @@ DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, 
"textbox_picturefill.docx")
 CPPUNIT_ASSERT(xGraphic.is());
 Graphic aGraphic(xGraphic);
 CPPUNIT_ASSERT(aGraphic);
+CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0L);
+CPPUNIT_ASSERT_EQUAL(447L, aGraphic.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL(528L, aGraphic.GetSizePixel().Height());
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFDO73034, "FDO73034.docx")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Tamas Bunth
 dbaccess/source/filter/hsqldb/fbcreateparser.cxx |8 --
 dbaccess/source/filter/hsqldb/hsqlimport.cxx |   11 +++-
 dbaccess/source/filter/hsqldb/parseschema.cxx|   29 ---
 dbaccess/source/filter/hsqldb/parseschema.hxx|   15 ++-
 4 files changed, 44 insertions(+), 19 deletions(-)

New commits:
commit b18953565b68e46289ad85927d79f5978a51078b
Author: Tamas Bunth 
Date:   Tue Apr 24 19:10:24 2018 +0200

tdf#116980 Add constraints after data migration

So there won't be any violation problems while migrating data.

If there is a constraint created in a "CREATE TABLE..." statement, then
cut it off and move it to a separate "ALTER TABLE ... ADD CONSTRAINT"
statement.

Change-Id: I7245ba8b23a6239cd3b724815a6385b9e6c17a91
Reviewed-on: https://gerrit.libreoffice.org/53508
Tested-by: Jenkins 
Reviewed-by: Tamás Bunth 

diff --git a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx 
b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
index 3a16aab196a3..2208ce12d272 100644
--- a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
+++ b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
@@ -164,14 +164,6 @@ OUString FbCreateStmtParser::compose() const
 sSql.append(",");
 }
 
-// foreign keys
-const std::vector& sForeignParts = getForeignParts();
-for (const auto& sPart : sForeignParts)
-{
-sSql.append(",");
-sSql.append(sPart);
-}
-
 sSql.append(")"); // end of column declaration
 return sSql.makeStringAndClear();
 }
diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx 
b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
index c5f77cef12ef..409ad54447d1 100644
--- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx
+++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
@@ -291,7 +291,9 @@ void HsqlImporter::importHsqlDatabase()
 assert(m_xStorage);
 
 SchemaParser parser(m_xStorage);
-SqlStatementVector statements = parser.parseSchema();
+parser.parseSchema();
+
+auto statements = parser.getCreateStatements();
 
 if (statements.size() < 1)
 {
@@ -312,6 +314,13 @@ void HsqlImporter::importHsqlDatabase()
 std::vector aColTypes = 
parser.getTableColumnTypes(tableIndex.first);
 parseTableRows(tableIndex.second, aColTypes, tableIndex.first);
 }
+
+// alter stmts
+for (const auto& sSql : parser.getAlterStatements())
+{
+Reference statement = m_rConnection->createStatement();
+statement->executeQuery(sSql);
+}
 }
 }
 
diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx 
b/dbaccess/source/filter/hsqldb/parseschema.cxx
index 489f78a7d4b3..25f26ed7e626 100644
--- a/dbaccess/source/filter/hsqldb/parseschema.cxx
+++ b/dbaccess/source/filter/hsqldb/parseschema.cxx
@@ -76,6 +76,16 @@ public:
 return string::split(m_sql, u' ')[2];
 }
 };
+
+OUString lcl_createAlterForeign(const OUString& sForeignPart, const OUString& 
sTableName)
+{
+OUStringBuffer sBuff("ALTER TABLE ");
+sBuff.append(sTableName);
+sBuff.append(" ADD ");
+sBuff.append(sForeignPart);
+return sBuff.makeStringAndClear();
+}
+
 } // anonymous namespace
 
 namespace dbahsql
@@ -91,7 +101,7 @@ SchemaParser::SchemaParser(Reference& rStorage)
 {
 }
 
-SqlStatementVector SchemaParser::parseSchema()
+void SchemaParser::parseSchema()
 {
 assert(m_rStorage);
 
@@ -99,7 +109,7 @@ SqlStatementVector SchemaParser::parseSchema()
 if (!m_rStorage->hasByName(SCHEMA_FILENAME))
 {
 SAL_WARN("dbaccess", "script file does not exist in storage during 
hsqldb import");
-return SqlStatementVector{};
+return;
 }
 
 Reference xStream(m_rStorage->openStreamElement(SCHEMA_FILENAME, 
ElementModes::READ));
@@ -109,7 +119,6 @@ SqlStatementVector SchemaParser::parseSchema()
 xTextInput->setEncoding("UTF-8");
 xTextInput->setInputStream(xStream->getInputStream());
 
-SqlStatementVector parsedStatements;
 while (!xTextInput->isEOF())
 {
 // every line contains exactly one DDL statement
@@ -128,11 +137,17 @@ SqlStatementVector SchemaParser::parseSchema()
 FbCreateStmtParser aCreateParser;
 aCreateParser.parse(sSql);
 
+for (const auto& foreignParts : aCreateParser.getForeignParts())
+{
+m_sAlterStatements.push_back(
+lcl_createAlterForeign(foreignParts, 
aCreateParser.getTableName()));
+}
+
 sSql = aCreateParser.compose();
 
 // save column definitions
 m_ColumnTypes[aCreateParser.getTableName()] = 
aCreateParser.getColumnDef();
-parsedStatements.push_back(sSql);
+m_sCreateStatements.push_back(sSql);
 }
 else if (sSql.startsWith("ALTER"))
 {
@@ -141,13 +156,11 @@ SqlStatementVector SchemaParser::parseSchema()
 OUString parsedStmt = aAlterParser.compose();
 
 if (!parsedStmt

[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - translations

2018-05-02 Thread Christian Lohmaier
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d19a7bfe07fbabd70c15261c51d64a4fa39b3fbd
Author: Christian Lohmaier 
Date:   Wed May 2 14:07:15 2018 +0200

Updated core
Project: translations  d24e71f6acc00ebb9a66a1f6fd1624de744a6147

update translations for 5.4.7 rc2

and force-fix errors using pocheck

Change-Id: Iacb7e82d37fc9d872e71f0a4635afcd2e43fcd77

diff --git a/translations b/translations
index d331b47e97d6..d24e71f6acc0 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit d331b47e97d613ec56a681d0457f624b9f98d027
+Subproject commit d24e71f6acc00ebb9a66a1f6fd1624de744a6147
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4-7' - translations

2018-05-02 Thread Christian Lohmaier
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2a76476eed36dcdbfc0d4811eb43a685da99fe67
Author: Christian Lohmaier 
Date:   Wed May 2 14:07:15 2018 +0200

Updated core
Project: translations  cef244651470028feb94afa39f7533be206b2c28

update translations for 5.4.7 rc2

and force-fix errors using pocheck

Change-Id: Iacb7e82d37fc9d872e71f0a4635afcd2e43fcd77
(cherry picked from commit d24e71f6acc00ebb9a66a1f6fd1624de744a6147)

diff --git a/translations b/translations
index aa989295e043..cef244651470 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit aa989295e043dbb06e4d75751040a31d79407134
+Subproject commit cef244651470028feb94afa39f7533be206b2c28
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-2-1' - loolwsd.xml.in wsd/Admin.cpp wsd/Admin.hpp wsd/FileServer.cpp wsd/LOOLWSD.cpp wsd/LOOLWSD.hpp

2018-05-02 Thread Michael Meeks
 loolwsd.xml.in |1 +
 wsd/Admin.cpp  |   14 +-
 wsd/Admin.hpp  |6 +-
 wsd/FileServer.cpp |7 +++
 wsd/LOOLWSD.cpp|2 ++
 wsd/LOOLWSD.hpp|1 +
 6 files changed, 25 insertions(+), 6 deletions(-)

New commits:
commit de789c813bc377636005a541d31853d892f0e978
Author: Michael Meeks 
Date:   Tue Apr 17 20:47:17 2018 +0100

Allow the Admin console to be disabled in the configuration.

Change-Id: Iacde8e891f42e9ef9399ebbebbd2b2978188d4c4
Reviewed-on: https://gerrit.libreoffice.org/53533
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/53729
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 38e81a2b0..456790005 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -107,6 +107,7 @@
 true
 
 
+true
 true
 
 
diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index 0b904f82a..7645f74cd 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -291,7 +291,13 @@ bool AdminSocketHandler::handleInitialRequest(
 const std::weak_ptr &socketWeak,
 const Poco::Net::HTTPRequest& request)
 {
-auto socket = socketWeak.lock();
+if (!LOOLWSD::AdminEnabled)
+{
+LOG_ERR("Request for disabled admin console");
+return false;
+}
+
+std::shared_ptr socket = socketWeak.lock();
 
 // Different session id pool for admin sessions (?)
 const auto sessionId = Util::decodeId(LOOLWSD::GenSessionId());
@@ -606,4 +612,10 @@ void Admin::dumpState(std::ostream& os)
 SocketPoll::dumpState(os);
 }
 
+void Admin::start()
+{
+if (LOOLWSD::AdminEnabled)
+startThread();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/Admin.hpp b/wsd/Admin.hpp
index 0356018cc..39b73df17 100644
--- a/wsd/Admin.hpp
+++ b/wsd/Admin.hpp
@@ -60,11 +60,7 @@ public:
 return admin;
 }
 
-void start()
-{
-// FIXME: not if admin console is not enabled ?
-startThread();
-}
+void start();
 
 /// Custom poll thread function
 void pollingThread() override;
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index c0899ce88..c7dd9a884 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -113,6 +113,8 @@ bool isPamAuthOk(const std::string user, const std::string 
pass)
 bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
HTTPResponse &response)
 {
+assert(LOOLWSD::AdminEnabled);
+
 const auto& config = Application::instance().config();
 const auto sslKeyPath = config.getString("ssl.key_file_path", "");
 
@@ -250,11 +252,16 @@ void FileServerRequestHandler::handleRequest(const 
HTTPRequest& request, Poco::M
 if (request.getMethod() == HTTPRequest::HTTP_GET)
 {
 if (endPoint == "admin.html" ||
+endPoint == "admin-bundle.js" ||
+endPoint == "admin-localizations.js" ||
 endPoint == "adminSettings.html" ||
 endPoint == "adminAnalytics.html")
 {
 noCache = true;
 
+if (!LOOLWSD::AdminEnabled)
+throw Poco::FileAccessDeniedException("Admin console 
disabled");
+
 if (!FileServerRequestHandler::isAdminLoggedIn(request, 
response))
 throw Poco::Net::NotAuthenticatedException("Invalid admin 
login");
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 8d0668c18..28fcc0dd0 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -572,6 +572,7 @@ std::atomic LOOLWSD::ForKitProcId(-1);
 #endif
 bool LOOLWSD::NoSeccomp = false;
 bool LOOLWSD::NoCapsForKit = false;
+bool LOOLWSD::AdminEnabled = true;
 #ifdef FUZZER
 bool LOOLWSD::DummyLOK = false;
 std::string LOOLWSD::FuzzFileName;
@@ -850,6 +851,7 @@ void LOOLWSD::initialize(Application& self)
 
 NoSeccomp = !getConfigValue(conf, "security.seccomp", true);
 NoCapsForKit = !getConfigValue(conf, "security.capabilities", true);
+AdminEnabled = getConfigValue(conf, "admin_console.enable", true);
 
 #if ENABLE_SUPPORT_KEY
 const std::string supportKeyString = getConfigValue(conf, 
"support_key", "");
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 603e01ab4..0af68701f 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -44,6 +44,7 @@ public:
 static unsigned int NumPreSpawnedChildren;
 static bool NoCapsForKit;
 static bool NoSeccomp;
+static bool AdminEnabled;
 static std::atomic ForKitWritePipe;
 static std::atomic ForKitProcId;
 static bool DummyLOK;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-2-1' - loolwsd.xml.in wsd/FileServer.cpp wsd/LOOLWSD.cpp

2018-05-02 Thread Jan Holesovsky
 loolwsd.xml.in |6 +-
 wsd/FileServer.cpp |  158 -
 wsd/LOOLWSD.cpp|2 
 3 files changed, 101 insertions(+), 65 deletions(-)

New commits:
commit 8c976a01edf51cdced6190d4bc5c457ad8b9c005
Author: Jan Holesovsky 
Date:   Wed May 2 12:48:41 2018 +0200

Improve readability of the admin console password check.

Also disable PAM by default.

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

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 456790005..1d5ac8dc1 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -108,9 +108,9 @@
 
 
 true
-true
-
-
+false
+
+
 
 
 
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index c7dd9a884..db02203a2 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -66,15 +66,16 @@ int functionConversation(int /*num_msg*/, const struct 
pam_message** /*msg*/,
 return PAM_SUCCESS;
 }
 
-bool isPamAuthOk(const std::string user, const std::string pass)
+/// Use PAM to check for user / password.
+bool isPamAuthOk(const std::string& userProvidedUsr, const std::string& 
userProvidedPwd)
 {
 struct pam_conv localConversation { functionConversation, nullptr };
 pam_handle_t *localAuthHandle = NULL;
 int retval;
 
-localConversation.appdata_ptr = const_cast(pass.c_str());
+localConversation.appdata_ptr = const_cast(userProvidedPwd.c_str());
 
-retval = pam_start("loolwsd", user.c_str(), &localConversation, 
&localAuthHandle);
+retval = pam_start("loolwsd", userProvidedUsr.c_str(), &localConversation, 
&localAuthHandle);
 
 if (retval != PAM_SUCCESS)
 {
@@ -88,7 +89,7 @@ bool isPamAuthOk(const std::string user, const std::string 
pass)
 {
if (retval == PAM_AUTH_ERR)
{
-   LOG_ERR("PAM authentication failure for user \"" << user << "\".");
+   LOG_ERR("PAM authentication failure for user \"" << userProvidedUsr 
<< "\".");
}
else
{
@@ -97,7 +98,7 @@ bool isPamAuthOk(const std::string user, const std::string 
pass)
return false;
 }
 
-LOG_INF("PAM authentication success for user \"" << user << "\".");
+LOG_INF("PAM authentication success for user \"" << userProvidedUsr << 
"\".");
 
 retval = pam_end(localAuthHandle, retval);
 
@@ -108,59 +109,48 @@ bool isPamAuthOk(const std::string user, const 
std::string pass)
 
 return true;
 }
-}
 
-bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
-   HTTPResponse &response)
+/// Check for user / password set in loolwsd.xml.
+bool isConfigAuthOk(const std::string& userProvidedUsr, const std::string& 
userProvidedPwd)
 {
-assert(LOOLWSD::AdminEnabled);
-
 const auto& config = Application::instance().config();
-const auto sslKeyPath = config.getString("ssl.key_file_path", "");
+const std::string user = config.getString("admin_console.username", "");
 
-NameValueCollection cookies;
-request.getCookies(cookies);
-try
+// Check for the username
+if (user.empty())
 {
-const std::string jwtToken = cookies.get("jwt");
-LOG_INF("Verifying JWT token: " << jwtToken);
-JWTAuth authAgent(sslKeyPath, "admin", "admin", "admin");
-if (authAgent.verify(jwtToken))
-{
-LOG_TRC("JWT token is valid");
-return true;
-}
-
-LOG_INF("Invalid JWT token, let the administrator re-login");
+LOG_ERR("Admin Console username missing, admin console disabled.");
+return false;
 }
-catch (const Poco::Exception& exc)
+else if (user != userProvidedUsr)
 {
-LOG_INF("No existing JWT cookie found");
+LOG_ERR("Admin Console wrong username.");
+return false;
 }
 
-HTTPBasicCredentials credentials(request);
-std::string userProvidedPwd = credentials.getPassword();
-std::string userProvidedUsr = credentials.getUsername();
-
-// If no cookie found, or is invalid, let admin re-login
-const std::string user = config.getString("admin_console.username", "");
-std::string pass = config.getString("admin_console.password", "");
-const bool pam = config.getBool("admin_console.enable_pam", "true");
+const char useLoolconfig[] = " Use loolconfig to configure the admin 
password.";
 
+// do we have secure_password?
 if (config.has("admin_console.secure_password"))
 {
+const std::string securePass = 
config.getString("admin_console.secure_password", "");
+if (securePass.empty())
+{
+LOG_ERR("Admin Console secure password is empty, denying access." 
<< useLoolconfig);
+return false;
+}
+
 #if HAVE_PKCS5_PBKDF2_HMAC
-pass = config.getString("admin_console.secure_p

Crash test update

2018-05-02 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/23cf9370edf41c591ebb5acad372b5ce2395f68e/


exportCrashes.csv
Description: Binary data


importCrash.csv
Description: Binary data


validationErrors.csv
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: Changes to 'refs/tags/3.2.1-1'

2018-05-02 Thread Jan Holesovsky
Tag '3.2.1-1' created by Andras Timar  at 
2018-05-02 13:44 +

3.2.1-1

Changes since 3.2.0-final-2:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0-4' - solenv/flatpak-manifest.in

2018-05-02 Thread Stephan Bergmann
 solenv/flatpak-manifest.in |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 705cc3266e5662aa0b6cd752ae0b7fdda6c2da10
Author: Stephan Bergmann 
Date:   Fri Apr 20 08:56:47 2018 +0200

Merge in Flatpak improvements

...from :

commit 715fbcfb4e5c51d40387998932984e54639476a1
Author: Robert McQueen 
Date:   Tue Apr 17 10:26:32 2018 +0100

edit .desktop files to add X-Endless-Alias with original names

Endless OS uses this to update icon grids & taskbar pins if the 
original files
have been removed. (Happy to update this to a more standardised key if a
consensus emerges.)

Change-Id: I646350090c38d84d1930c5afbec0ee500b60d0fb
(cherry picked from commit a161e41439fc6f9093c212a523154e5146bb1502)
Reviewed-on: https://gerrit.libreoffice.org/53199
Reviewed-by: Michael Stahl 
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 679ffa773872..52b4c163c207 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -577,7 +577,9 @@
 "./autogen.sh --prefix=/run/build/libreoffice/inst 
--with-distro=LibreOfficeFlatpak --disable-symbols $(if test \"$(uname -m)\" = 
aarch64; then printf %s --disable-pdfium; fi)",
 "make $(if test \"$(uname -i)\" = i386; then printf 
build-nocheck; fi)",
 "make distro-pack-install",
-"make cmd cmd='$(SRCDIR)/solenv/bin/assemble-flatpak.sh'"
+"make cmd cmd='$(SRCDIR)/solenv/bin/assemble-flatpak.sh'",
+"desktop-file-edit --set-key=X-Endless-Alias 
--set-value=libreoffice-startcenter 
/app/share/applications/org.libreoffice.LibreOffice.desktop",
+"for i in base calc draw impress math writer xsltfilter; do 
desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-$i 
/app/share/applications/org.libreoffice.LibreOffice-$i.desktop; done"
 ]
 }
 ],
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-1' - loolwsd.xml.in wsd/Admin.cpp wsd/Admin.hpp wsd/FileServer.cpp wsd/LOOLWSD.cpp wsd/LOOLWSD.hpp

2018-05-02 Thread Michael Meeks
 loolwsd.xml.in |1 +
 wsd/Admin.cpp  |   14 +-
 wsd/Admin.hpp  |6 +-
 wsd/FileServer.cpp |7 +++
 wsd/LOOLWSD.cpp|3 +++
 wsd/LOOLWSD.hpp|1 +
 6 files changed, 26 insertions(+), 6 deletions(-)

New commits:
commit 63b562d5bdbed847c43d21226a53e2c6c07ac079
Author: Michael Meeks 
Date:   Tue Apr 17 20:47:17 2018 +0100

Allow the Admin console to be disabled in the configuration.

Change-Id: Iacde8e891f42e9ef9399ebbebbd2b2978188d4c4
Reviewed-on: https://gerrit.libreoffice.org/53533
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/53729
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/53734

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 9103395d8..2a93acc52 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -102,6 +102,7 @@
 true
 
 
+true
 true
 
 
diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index 0b904f82a..7645f74cd 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -291,7 +291,13 @@ bool AdminSocketHandler::handleInitialRequest(
 const std::weak_ptr &socketWeak,
 const Poco::Net::HTTPRequest& request)
 {
-auto socket = socketWeak.lock();
+if (!LOOLWSD::AdminEnabled)
+{
+LOG_ERR("Request for disabled admin console");
+return false;
+}
+
+std::shared_ptr socket = socketWeak.lock();
 
 // Different session id pool for admin sessions (?)
 const auto sessionId = Util::decodeId(LOOLWSD::GenSessionId());
@@ -606,4 +612,10 @@ void Admin::dumpState(std::ostream& os)
 SocketPoll::dumpState(os);
 }
 
+void Admin::start()
+{
+if (LOOLWSD::AdminEnabled)
+startThread();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/Admin.hpp b/wsd/Admin.hpp
index 0356018cc..39b73df17 100644
--- a/wsd/Admin.hpp
+++ b/wsd/Admin.hpp
@@ -60,11 +60,7 @@ public:
 return admin;
 }
 
-void start()
-{
-// FIXME: not if admin console is not enabled ?
-startThread();
-}
+void start();
 
 /// Custom poll thread function
 void pollingThread() override;
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index c0899ce88..c7dd9a884 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -113,6 +113,8 @@ bool isPamAuthOk(const std::string user, const std::string 
pass)
 bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
HTTPResponse &response)
 {
+assert(LOOLWSD::AdminEnabled);
+
 const auto& config = Application::instance().config();
 const auto sslKeyPath = config.getString("ssl.key_file_path", "");
 
@@ -250,11 +252,16 @@ void FileServerRequestHandler::handleRequest(const 
HTTPRequest& request, Poco::M
 if (request.getMethod() == HTTPRequest::HTTP_GET)
 {
 if (endPoint == "admin.html" ||
+endPoint == "admin-bundle.js" ||
+endPoint == "admin-localizations.js" ||
 endPoint == "adminSettings.html" ||
 endPoint == "adminAnalytics.html")
 {
 noCache = true;
 
+if (!LOOLWSD::AdminEnabled)
+throw Poco::FileAccessDeniedException("Admin console 
disabled");
+
 if (!FileServerRequestHandler::isAdminLoggedIn(request, 
response))
 throw Poco::Net::NotAuthenticatedException("Invalid admin 
login");
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 3425774a1..d34ae7f26 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -552,6 +552,7 @@ std::atomic LOOLWSD::ForKitWritePipe(-1);
 std::atomic LOOLWSD::ForKitProcId(-1);
 bool LOOLWSD::NoCapsForKit = false;
 #endif
+bool LOOLWSD::AdminEnabled = true;
 #ifdef FUZZER
 bool LOOLWSD::DummyLOK = false;
 std::string LOOLWSD::FuzzFileName;
@@ -826,6 +827,8 @@ void LOOLWSD::initialize(Application& self)
 LOOLWSD::MaxConnections = MAX_CONNECTIONS;
 LOOLWSD::MaxDocuments = MAX_DOCUMENTS;
 
+AdminEnabled = getConfigValue(conf, "admin_console.enable", true);
+
 #if ENABLE_SUPPORT_KEY
 const std::string supportKeyString = getConfigValue(conf, 
"support_key", "");
 
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index c16ecc37b..097c9ee52 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -43,6 +43,7 @@ public:
 static std::atomic NextSessionId;
 static unsigned int NumPreSpawnedChildren;
 static bool NoCapsForKit;
+static bool AdminEnabled;
 static std::atomic ForKitWritePipe;
 static std::atomic ForKitProcId;
 static bool DummyLOK;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-1' - loolwsd.xml.in wsd/FileServer.cpp wsd/LOOLWSD.cpp

2018-05-02 Thread Jan Holesovsky
 loolwsd.xml.in |6 +-
 wsd/FileServer.cpp |  158 -
 wsd/LOOLWSD.cpp|2 
 3 files changed, 101 insertions(+), 65 deletions(-)

New commits:
commit 76e12c76b670175a1933f61dff075e5456390268
Author: Jan Holesovsky 
Date:   Wed May 2 12:48:41 2018 +0200

Improve readability of the admin console password check.

Also disable PAM by default.

Change-Id: Id1197f0d049ce56f698952b87d2c4760412eb8ec
Reviewed-on: https://gerrit.libreoffice.org/53727
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/53735

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 2a93acc52..393dc2cf8 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -103,9 +103,9 @@
 
 
 true
-true
-
-
+false
+
+
 
 
 
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index c7dd9a884..db02203a2 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -66,15 +66,16 @@ int functionConversation(int /*num_msg*/, const struct 
pam_message** /*msg*/,
 return PAM_SUCCESS;
 }
 
-bool isPamAuthOk(const std::string user, const std::string pass)
+/// Use PAM to check for user / password.
+bool isPamAuthOk(const std::string& userProvidedUsr, const std::string& 
userProvidedPwd)
 {
 struct pam_conv localConversation { functionConversation, nullptr };
 pam_handle_t *localAuthHandle = NULL;
 int retval;
 
-localConversation.appdata_ptr = const_cast(pass.c_str());
+localConversation.appdata_ptr = const_cast(userProvidedPwd.c_str());
 
-retval = pam_start("loolwsd", user.c_str(), &localConversation, 
&localAuthHandle);
+retval = pam_start("loolwsd", userProvidedUsr.c_str(), &localConversation, 
&localAuthHandle);
 
 if (retval != PAM_SUCCESS)
 {
@@ -88,7 +89,7 @@ bool isPamAuthOk(const std::string user, const std::string 
pass)
 {
if (retval == PAM_AUTH_ERR)
{
-   LOG_ERR("PAM authentication failure for user \"" << user << "\".");
+   LOG_ERR("PAM authentication failure for user \"" << userProvidedUsr 
<< "\".");
}
else
{
@@ -97,7 +98,7 @@ bool isPamAuthOk(const std::string user, const std::string 
pass)
return false;
 }
 
-LOG_INF("PAM authentication success for user \"" << user << "\".");
+LOG_INF("PAM authentication success for user \"" << userProvidedUsr << 
"\".");
 
 retval = pam_end(localAuthHandle, retval);
 
@@ -108,59 +109,48 @@ bool isPamAuthOk(const std::string user, const 
std::string pass)
 
 return true;
 }
-}
 
-bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
-   HTTPResponse &response)
+/// Check for user / password set in loolwsd.xml.
+bool isConfigAuthOk(const std::string& userProvidedUsr, const std::string& 
userProvidedPwd)
 {
-assert(LOOLWSD::AdminEnabled);
-
 const auto& config = Application::instance().config();
-const auto sslKeyPath = config.getString("ssl.key_file_path", "");
+const std::string user = config.getString("admin_console.username", "");
 
-NameValueCollection cookies;
-request.getCookies(cookies);
-try
+// Check for the username
+if (user.empty())
 {
-const std::string jwtToken = cookies.get("jwt");
-LOG_INF("Verifying JWT token: " << jwtToken);
-JWTAuth authAgent(sslKeyPath, "admin", "admin", "admin");
-if (authAgent.verify(jwtToken))
-{
-LOG_TRC("JWT token is valid");
-return true;
-}
-
-LOG_INF("Invalid JWT token, let the administrator re-login");
+LOG_ERR("Admin Console username missing, admin console disabled.");
+return false;
 }
-catch (const Poco::Exception& exc)
+else if (user != userProvidedUsr)
 {
-LOG_INF("No existing JWT cookie found");
+LOG_ERR("Admin Console wrong username.");
+return false;
 }
 
-HTTPBasicCredentials credentials(request);
-std::string userProvidedPwd = credentials.getPassword();
-std::string userProvidedUsr = credentials.getUsername();
-
-// If no cookie found, or is invalid, let admin re-login
-const std::string user = config.getString("admin_console.username", "");
-std::string pass = config.getString("admin_console.password", "");
-const bool pam = config.getBool("admin_console.enable_pam", "true");
+const char useLoolconfig[] = " Use loolconfig to configure the admin 
password.";
 
+// do we have secure_password?
 if (config.has("admin_console.secure_password"))
 {
+const std::string securePass = 
config.getString("admin_console.secure_password", "");
+if (securePass.empty())
+{
+LOG_ERR("Admin Console secure password is empty, denying access." 
<< useLoolconfig);
+return false;
+}
+
 #if HAVE_PKCS5_PBKDF2_HMAC
- 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loolwsd.xml.in wsd/FileServer.cpp wsd/LOOLWSD.cpp

2018-05-02 Thread Jan Holesovsky
 loolwsd.xml.in |6 +-
 wsd/FileServer.cpp |  158 -
 wsd/LOOLWSD.cpp|2 
 3 files changed, 101 insertions(+), 65 deletions(-)

New commits:
commit f12049919764fe0af2563ba71ef4308b2a929e49
Author: Jan Holesovsky 
Date:   Wed May 2 12:48:41 2018 +0200

Improve readability of the admin console password check.

Also disable PAM by default.

Change-Id: Id1197f0d049ce56f698952b87d2c4760412eb8ec
Reviewed-on: https://gerrit.libreoffice.org/53727
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/53732

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 456790005..1d5ac8dc1 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -108,9 +108,9 @@
 
 
 true
-true
-
-
+false
+
+
 
 
 
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index c7dd9a884..db02203a2 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -66,15 +66,16 @@ int functionConversation(int /*num_msg*/, const struct 
pam_message** /*msg*/,
 return PAM_SUCCESS;
 }
 
-bool isPamAuthOk(const std::string user, const std::string pass)
+/// Use PAM to check for user / password.
+bool isPamAuthOk(const std::string& userProvidedUsr, const std::string& 
userProvidedPwd)
 {
 struct pam_conv localConversation { functionConversation, nullptr };
 pam_handle_t *localAuthHandle = NULL;
 int retval;
 
-localConversation.appdata_ptr = const_cast(pass.c_str());
+localConversation.appdata_ptr = const_cast(userProvidedPwd.c_str());
 
-retval = pam_start("loolwsd", user.c_str(), &localConversation, 
&localAuthHandle);
+retval = pam_start("loolwsd", userProvidedUsr.c_str(), &localConversation, 
&localAuthHandle);
 
 if (retval != PAM_SUCCESS)
 {
@@ -88,7 +89,7 @@ bool isPamAuthOk(const std::string user, const std::string 
pass)
 {
if (retval == PAM_AUTH_ERR)
{
-   LOG_ERR("PAM authentication failure for user \"" << user << "\".");
+   LOG_ERR("PAM authentication failure for user \"" << userProvidedUsr 
<< "\".");
}
else
{
@@ -97,7 +98,7 @@ bool isPamAuthOk(const std::string user, const std::string 
pass)
return false;
 }
 
-LOG_INF("PAM authentication success for user \"" << user << "\".");
+LOG_INF("PAM authentication success for user \"" << userProvidedUsr << 
"\".");
 
 retval = pam_end(localAuthHandle, retval);
 
@@ -108,59 +109,48 @@ bool isPamAuthOk(const std::string user, const 
std::string pass)
 
 return true;
 }
-}
 
-bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
-   HTTPResponse &response)
+/// Check for user / password set in loolwsd.xml.
+bool isConfigAuthOk(const std::string& userProvidedUsr, const std::string& 
userProvidedPwd)
 {
-assert(LOOLWSD::AdminEnabled);
-
 const auto& config = Application::instance().config();
-const auto sslKeyPath = config.getString("ssl.key_file_path", "");
+const std::string user = config.getString("admin_console.username", "");
 
-NameValueCollection cookies;
-request.getCookies(cookies);
-try
+// Check for the username
+if (user.empty())
 {
-const std::string jwtToken = cookies.get("jwt");
-LOG_INF("Verifying JWT token: " << jwtToken);
-JWTAuth authAgent(sslKeyPath, "admin", "admin", "admin");
-if (authAgent.verify(jwtToken))
-{
-LOG_TRC("JWT token is valid");
-return true;
-}
-
-LOG_INF("Invalid JWT token, let the administrator re-login");
+LOG_ERR("Admin Console username missing, admin console disabled.");
+return false;
 }
-catch (const Poco::Exception& exc)
+else if (user != userProvidedUsr)
 {
-LOG_INF("No existing JWT cookie found");
+LOG_ERR("Admin Console wrong username.");
+return false;
 }
 
-HTTPBasicCredentials credentials(request);
-std::string userProvidedPwd = credentials.getPassword();
-std::string userProvidedUsr = credentials.getUsername();
-
-// If no cookie found, or is invalid, let admin re-login
-const std::string user = config.getString("admin_console.username", "");
-std::string pass = config.getString("admin_console.password", "");
-const bool pam = config.getBool("admin_console.enable_pam", "true");
+const char useLoolconfig[] = " Use loolconfig to configure the admin 
password.";
 
+// do we have secure_password?
 if (config.has("admin_console.secure_password"))
 {
+const std::string securePass = 
config.getString("admin_console.secure_password", "");
+if (securePass.empty())
+{
+LOG_ERR("Admin Console secure password is empty, denying access." 
<< useLoolconfig);
+return false;
+}
+
 #if HAVE_PKCS5_PBKDF2_HMAC
- 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-1' - debian/changelog loolwsd.spec.in

2018-05-02 Thread Andras Timar
 debian/changelog |6 ++
 loolwsd.spec.in  |2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 3b62b4acd7575c90ae7cdd0df2ca9bc637605aa8
Author: Andras Timar 
Date:   Wed May 2 16:32:22 2018 +0200

Bump package version to 3.1.0-11

Change-Id: I15fb1af30a098b52f1b1b693bce36f5256e7e1f5

diff --git a/debian/changelog b/debian/changelog
index 14a90796e..3ef8dc4af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (3.1.0-11) unstable; urgency=medium
+
+  * see the git log: http://col.la/coolcd31
+
+ -- Andras Timar   Wed, 02 May 2018 16:30:00 +0200
+
 loolwsd (3.1.0-10) unstable; urgency=medium
 
   * see the git log: http://col.la/coolcd31
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index abd144fb4..832885ff8 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:10%{?dist}
+Release:11%{?dist}
 %if 0%{?suse_version} == 1110
 Group:  Productivity/Office/Suite
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gbuild-to-ide

2018-05-02 Thread Mike Kaganski
 bin/gbuild-to-ide |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit ea1f50894ac3e681213b874af08217ae25d0433a
Author: Mike Kaganski 
Date:   Wed May 2 13:29:21 2018 +0100

VS IDE integration: use full Windows include paths in VS projects

It turns out that VS IDE's "Peek definition" (and other functions that
navigate to sources) fail if the short ("DOS") path to the file is given
in project's includes: see issue at

https://developercommunity.visualstudio.com/content/problem/139659/vc-peek-definition-fails-to-navigate-to-windows-ki.html

This patch converts the include paths to full Windows paths, to avoid the
problem. Also, since IDE starts working correctly with this change, this
patch removes inclusion of "inherited" paths "$(IncludePath)", which are
the paths added by Visual Studio itself. Since we do specify all include
paths explicitly, that is not required, and avoids confusion.

Change-Id: Ide2d948f8c7b050b02f550342144fede4fcafb82
Reviewed-on: https://gerrit.libreoffice.org/53731
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 8507de280d83..90a732d7c614 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -19,6 +19,8 @@ import json
 import xml.etree.ElementTree as ET
 import xml.dom.minidom as minidom
 import traceback
+import subprocess
+from sys import platform
 
 
 class GbuildLinkTarget:
@@ -828,6 +830,13 @@ class 
VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
 print('')
 
 @staticmethod
+def to_long_names(shortnames):
+if platform == "cygwin":
+return (subprocess.check_output(["cygpath", "-wal"] + 
shortnames).decode("utf-8", "strict").rstrip()).split("\n")
+else:
+return shortnames
+
+@staticmethod
 def defs_list(defs):
 defines_list = []
 # List defines
@@ -888,6 +897,10 @@ class 
VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
   Label='LocalAppDataPlatform')
 
 ET.SubElement(proj_node, '{%s}PropertyGroup' % ns, Label='UserMacros')
+# VS IDE (at least "Peek definition") is allergic to paths like 
"C:/PROGRA~2/WI3CF2~1/10/Include/10.0.14393.0/um"; see
+# 
https://developercommunity.visualstudio.com/content/problem/139659/vc-peek-definition-fails-to-navigate-to-windows-ki.html
+# We need to convert to long paths here. Do this once, since it's 
time-consuming operation.
+include_path_node_text = ';'.join(self.to_long_names(target.include))
 for cfg_name, cfg_targets in self.configurations.items():
 conf_node = ET.SubElement(proj_node, '{%s}PropertyGroup' % ns,
   
Condition="'$(Configuration)|$(Platform)'=='%s|%s'" % (cfg_name, platform))
@@ -908,7 +921,7 @@ class 
VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
 nmake_defs_node = ET.SubElement(conf_node, 
'{%s}NMakePreprocessorDefinitions' % ns)
 nmake_defs_node.text = ';'.join(self.defs_list(target.defs) + 
['$(NMakePreprocessorDefinitions)'])
 include_path_node = ET.SubElement(conf_node, '{%s}IncludePath' % 
ns)
-include_path_node.text = ';'.join(target.include + 
['$(IncludePath)'])
+include_path_node.text = include_path_node_text
 
 ET.SubElement(proj_node, '{%s}ItemDefinitionGroup' % ns)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/3.1.0-11'

2018-05-02 Thread Andras Timar
Tag '3.1.0-11' created by Andras Timar  at 
2018-05-02 14:32 +

3.1.0-11

Changes since cd-3.1.0-10-2:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extensions/Library_WinUserInfoBe.mk extensions/Module_extensions.mk extensions/source officecfg/Package_misc.mk officecfg/registry postprocess/Rdb_services.mk Repositor

2018-05-02 Thread Mike Kaganski
 Repository.mk|1 
 extensions/Library_WinUserInfoBe.mk  |   38 
 extensions/Module_extensions.mk  |1 
 extensions/source/config/WinUserInfo/WinUserInfoBe.component |   15 
 extensions/source/config/WinUserInfo/WinUserInfoBe.cxx   |  479 +++
 extensions/source/config/WinUserInfo/WinUserInfoBe.hxx   |  115 ++
 extensions/source/config/WinUserInfo/componentdef.cxx|   35 
 officecfg/Package_misc.mk|3 
 officecfg/registry/schema/oo-winuser.xcd.sample  |   95 ++
 officecfg/registry/schema/org/openoffice/UserProfile.xcs |   11 
 postprocess/Rdb_services.mk  |3 
 11 files changed, 796 insertions(+)

New commits:
commit f154f63cb662f02415d5cb0051011bdb5d0d523c
Author: Mike Kaganski 
Date:   Sat Apr 28 09:16:15 2018 +0300

WinUserInfoBe: a new config backend for user data provided by Windows

This backend provides Active Directory details for current user. If
the system is not part of Active Directory domain, GetUserNameEx is
used instead, so at least user (given) name is configured.

Unlike ldap backend, this one doesn't need connection configuration,
as the used API works with current user security context.

Change-Id: I74bcc79591a658dc5121df1f09caa15d272fbe12
Reviewed-on: https://gerrit.libreoffice.org/53590
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/Repository.mk b/Repository.mk
index 6ef05911a1bd..e4a11d3d160f 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -391,6 +391,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 icg \
$(if $(ENABLE_JAVA),jdbc) \
ldapbe2 \
+   $(if $(filter WNT,$(OS)),WinUserInfoBe) \
localebe1 \
log \
lng \
diff --git a/extensions/Library_WinUserInfoBe.mk 
b/extensions/Library_WinUserInfoBe.mk
new file mode 100644
index ..6fdad389a480
--- /dev/null
+++ b/extensions/Library_WinUserInfoBe.mk
@@ -0,0 +1,38 @@
+# -*- 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_Library_Library,WinUserInfoBe))
+
+$(eval $(call 
gb_Library_set_componentfile,WinUserInfoBe,extensions/source/config/WinUserInfo/WinUserInfoBe))
+
+$(eval $(call gb_Library_use_sdk_api,WinUserInfoBe))
+
+$(eval $(call gb_Library_add_exception_objects,WinUserInfoBe,\
+   extensions/source/config/WinUserInfo/componentdef \
+   extensions/source/config/WinUserInfo/WinUserInfoBe \
+))
+
+$(eval $(call gb_Library_use_libraries,WinUserInfoBe,\
+   comphelper \
+   cppuhelper \
+   cppu \
+   sal \
+))
+
+$(eval $(call gb_Library_use_system_win32_libs,WinUserInfoBe,\
+   Ole32 \
+   OleAut32 \
+   Activeds \
+   Adsiid \
+   Secur32 \
+))
+
+# vim:set noet sw=4 ts=4:
diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk
index 3ab21f58a411..31512ff4045f 100644
--- a/extensions/Module_extensions.mk
+++ b/extensions/Module_extensions.mk
@@ -17,6 +17,7 @@ ifneq ($(filter-out IOS ANDROID,$(OS)),)
 $(eval $(call gb_Module_add_targets,extensions,\
Library_abp \
Library_ldapbe2 \
+   $(if $(filter WNT,$(OS)),Library_WinUserInfoBe) \
Library_log \
Library_scn \
UIConfig_sabpilot \
diff --git a/extensions/source/config/WinUserInfo/WinUserInfoBe.component 
b/extensions/source/config/WinUserInfo/WinUserInfoBe.component
new file mode 100644
index ..90c3e0060685
--- /dev/null
+++ b/extensions/source/config/WinUserInfo/WinUserInfoBe.component
@@ -0,0 +1,15 @@
+
+
+
+http://openoffice.org/2010/uno-components";>
+  
+
+  
+
diff --git a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx 
b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
new file mode 100644
index ..3e60716b5cdd
--- /dev/null
+++ b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
@@ -0,0 +1,479 @@
+/* -*- 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 "WinUserInfoBe.hxx"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#define SECURITY_WIN32
+#include 
+
+namespace extensions
+{
+namespace config
+{
+namespace WinUserInfo
+{
+class WinUserInfoBe_Impl
+{
+public:
+v

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

2018-05-02 Thread Rene Engelhard
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |   10 ++
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |4 
 2 files changed, 14 insertions(+)

New commits:
commit b7ef11a970b58624f0035af4b4f3bd77e11ff235
Author: Rene Engelhard 
Date:   Tue Apr 24 15:56:23 2018 +0200

fix build with poppler 0.64

GooString became const...

Change-Id: Icc95be2e8603a4e22c6a9ac2008986bacd0bfba5
Reviewed-on: https://gerrit.libreoffice.org/53423
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Michael Stahl 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 00fd56a226d1..9618e5b2a28f 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -446,6 +446,9 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* 
gfxFont, GfxState* state )
 FontAttributes aNewFont;
 int nSize = 0;
 
+#if POPPLER_CHECK_VERSION(0, 64, 0)
+const
+#endif
 GooString* pFamily = gfxFont->getName();
 if( pFamily )
 {
@@ -742,6 +745,9 @@ void PDFOutDev::updateFont(GfxState *state)
 FontAttributes aFont;
 int nEmbedSize=0;
 
+#if POPPLER_CHECK_VERSION(0, 64, 0)
+const
+#endif
 Ref* pID = gfxFont->getID();
 // TODO(Q3): Portability problem
 long long fontID = (long long)pID->gen << 32 | (long long)pID->num;
@@ -932,7 +938,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, double 
y,
 printf( "\n" );
 }
 
+#if POPPLER_CHECK_VERSION(0, 64, 0)
+void PDFOutDev::drawString(GfxState*, const GooString* /*s*/)
+#else
 void PDFOutDev::drawString(GfxState*, GooString* /*s*/)
+#endif
 {
 // TODO(F3): NYI
 }
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index 922c513ff86b..2a6268c0ba1d 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -223,7 +223,11 @@ namespace pdfi
   double dx, double dy,
   double originX, double originY,
   CharCode code, int nBytes, Unicode *u, int uLen) 
override;
+#if POPPLER_CHECK_VERSION(0, 64, 0)
+virtual void drawString(GfxState *state, const GooString *s) override;
+#else
 virtual void drawString(GfxState *state, GooString *s) override;
+#endif
 virtual void endTextObject(GfxState *state) override;
 
 //- image drawing
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - 2 commits - vcl/unx

2018-05-02 Thread Katarina Behrens
 vcl/unx/kde5/KDE5SalGraphics.cxx |   24 ++--
 1 file changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 4a04579cac010c1082ee368233be1bfb6722424a
Author: Katarina Behrens 
Date:   Wed May 2 16:42:56 2018 +0200

Native focus rectangles for push buttons

far from perfect, they also hide the button text (but at least focus
frame in contrast colour is visible)

Change-Id: I9a7c2b429ae14b8604f894de64a7328cde6cb270

diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index e110c0b04722..13b791943199 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -80,7 +80,6 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType 
type, ControlPart pa
 {
 switch (type)
 {
-case ControlType::Pushbutton:
 case ControlType::Tooltip:
 case ControlType::Progress:
 case ControlType::ListNode:
@@ -88,6 +87,7 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType 
type, ControlPart pa
 
 case ControlType::Radiobutton:
 case ControlType::Checkbox:
+case ControlType::Pushbutton:
 return (part == ControlPart::Entire) || (part == 
ControlPart::Focus);
 
 case ControlType::Menubar:
@@ -203,7 +203,10 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, 
ControlPart part,
 
m_image->fill(QApplication::palette().color(QPalette::ToolTipBase).rgb());
 break;
 case ControlType::Pushbutton:
-
m_image->fill(QApplication::palette().color(QPalette::Button).rgb());
+if ( nControlState & ControlState::FOCUSED )
+
m_image->fill(QApplication::palette().color(QPalette::Highlight).rgb());
+else
+
m_image->fill(QApplication::palette().color(QPalette::Button).rgb());
 break;
 case ControlType::Scrollbar:
 if ((part == ControlPart::DrawBackgroundVert)
commit 39ac3dc45013ef2c8397a208f0f37e794e8c57f3
Author: Katarina Behrens 
Date:   Wed May 2 14:00:01 2018 +0200

Native focus rectangles for radiobuttons

that suffer from the same problem (lack of transparency) as those
of checkboxes

Change-Id: I4bb81c5f95b07e57a7d6cdb86ba4e31ec7660f5a

diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 849865641fb1..e110c0b04722 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -81,12 +81,12 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType 
type, ControlPart pa
 switch (type)
 {
 case ControlType::Pushbutton:
-case ControlType::Radiobutton:
 case ControlType::Tooltip:
 case ControlType::Progress:
 case ControlType::ListNode:
 return (part == ControlPart::Entire);
 
+case ControlType::Radiobutton:
 case ControlType::Checkbox:
 return (part == ControlPart::Entire) || (part == 
ControlPart::Focus);
 
@@ -501,9 +501,18 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, 
ControlPart part,
 }
 else if (type == ControlType::Radiobutton)
 {
-QStyleOptionButton option;
-draw( QStyle::CE_RadioButton, &option, m_image.get(),
-  vclStateValue2StateFlag(nControlState, value) );
+if (part == ControlPart::Entire)
+{
+QStyleOptionButton option;
+draw( QStyle::CE_RadioButton, &option, m_image.get(),
+  vclStateValue2StateFlag(nControlState, value) );
+}
+else if (part == ControlPart::Focus)
+{
+QStyleOptionFocusRect option;
+draw( QStyle::PE_FrameFocusRect, &option, m_image.get(),
+  vclStateValue2StateFlag(nControlState, value) );
+}
 }
 else if (type == ControlType::Tooltip)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4-7' - sw/CppunitTest_sw_layoutwriter.mk sw/Module_sw.mk sw/qa sw/source

2018-05-02 Thread Miklos Vajna
 sw/CppunitTest_sw_layoutwriter.mk  |   72 +
 sw/Module_sw.mk|1 
 sw/qa/extras/layout/data/tdf116830.odt |binary
 sw/qa/extras/layout/layout.cxx |   68 +++
 sw/source/core/layout/paintfrm.cxx |4 +
 5 files changed, 144 insertions(+), 1 deletion(-)

New commits:
commit 9b893304850077d98be0b1ed7a9b280a06632e05
Author: Miklos Vajna 
Date:   Thu Apr 5 18:04:25 2018 +0200

tdf#116830 sw: handle cell background for BACKGROUND_PARA_OVER_DRAWINGS

Commit 18b3feb8bef06bf7b126fd0bc743e19479cb8026 (n#778133 sw: add
BackgroundParaOverDrawings compat flag, 2012-09-12) added a layout
compat flag that is meant to make Writer behave the same as Word when it
comes to the order of various backgrounds.

The original fix was that in case there are background shapes and also
paragraph backgrounds, then this flag can opt in to have the paragraph
backgrounds on top of background shapes.

Cell backgrounds behave the same way in Word, so extend the behavior of
the compat flag to cover not only the background of text frames but also
of cell frames.

(The test could be hacked into CppunitTest_sw_uiwriter, but 1) this is
layout, not UI and 2) that one started to get rather large.)

(cherry picked from commit 09954c381895f340c9b73af64b0833d8b4689c06)

Change-Id: Ifca1851217000f6daac50e6c9562c042aca6ff7d
Reviewed-on: https://gerrit.libreoffice.org/52982
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 05ed69af14af8f138f69941c7c6186b39c742eb4)
Reviewed-on: https://gerrit.libreoffice.org/53653
Reviewed-by: Thorsten Behrens 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/sw/CppunitTest_sw_layoutwriter.mk 
b/sw/CppunitTest_sw_layoutwriter.mk
new file mode 100644
index ..675299180e44
--- /dev/null
+++ b/sw/CppunitTest_sw_layoutwriter.mk
@@ -0,0 +1,72 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_layoutwriter))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_layoutwriter, \
+sw/qa/extras/layout/layout \
+))
+
+# note: this links msword only for the reason to have a order dependency,
+# because "make sw.check" will not see the dependency through services.rdb
+$(eval $(call gb_CppunitTest_use_libraries,sw_layoutwriter, \
+comphelper \
+cppu \
+cppuhelper \
+editeng \
+msword \
+sal \
+sfx \
+svl \
+svt \
+svxcore \
+sw \
+test \
+unotest \
+vcl \
+tl \
+utl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_layoutwriter,\
+boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_layoutwriter,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/qa/extras/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sw_layoutwriter))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_layoutwriter))
+$(eval $(call gb_CppunitTest_use_vcl,sw_layoutwriter))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_layoutwriter,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_layoutwriter))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_layoutwriter, \
+modules/swriter \
+))
+
+$(call gb_CppunitTest_get_target,sw_layoutwriter): \
+$(call gb_Library_get_target,textconv_dict)
+
+ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),)
+$(call gb_CppunitTest_get_target,sw_layoutwriter): \
+$(call gb_ExternalPackage_get_target,fonts_liberation)
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 0ab442fb3c7b..03d46c2799fa 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -76,6 +76,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_odfimport \
 CppunitTest_sw_txtexport \
 CppunitTest_sw_uiwriter \
+CppunitTest_sw_layoutwriter \
 CppunitTest_sw_mailmerge \
 CppunitTest_sw_globalfilter \
 ))
diff --git a/sw/qa/extras/layout/data/tdf116830.odt 
b/sw/qa/extras/layout/data/tdf116830.odt
new file mode 100644
index ..8faacc3ddaec
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf116830.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
new file mode 100644
index ..16efa14c5875
--- /dev/null
+++ b/sw/qa/extras/layout/layout.cxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basi

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

2018-05-02 Thread Miklos Vajna
 include/vcl/pdfextoutdevdata.hxx|4 ++
 vcl/qa/cppunit/pdfexport/data/tdf109143.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |   42 
 vcl/source/gdi/pdfextoutdevdata.cxx |   12 ++--
 4 files changed, 54 insertions(+), 4 deletions(-)

New commits:
commit be3ef7b0e5e51c1d97309ce3b6d5cac1fbd025d0
Author: Miklos Vajna 
Date:   Wed May 2 17:22:30 2018 +0200

tdf#109143 PDF export: don't reuse compressed bitmaps for cropped images

PDF wants to loose the pixels masked out by cropping, so the "reuse
original compressed image" optimization should not be used in that case.

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

diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx
index e9a2ad04fb04..c260f8461fa7 100644
--- a/include/vcl/pdfextoutdevdata.hxx
+++ b/include/vcl/pdfextoutdevdata.hxx
@@ -183,7 +183,9 @@ public:
   const tools::Rectangle&  rVisibleOutputRect );
 
 /// Detect if stream is compressed enough to avoid de-compress / scale & 
re-compress
-boolHasAdequateCompression( const Graphic &rGraphic ) const;
+boolHasAdequateCompression( const Graphic &rGraphic,
+const tools::Rectangle &rOutputRect,
+const tools::Rectangle 
&rVisibleOutputRect ) const;
 
 //--->i56629
 /** Create a new named destination to be used in a link to this document 
from another PDF document
diff --git a/vcl/qa/cppunit/pdfexport/data/tdf109143.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf109143.odt
new file mode 100644
index ..7d9afa3789e5
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf109143.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 1f527239dea7..62e1713a14cf 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -85,6 +85,7 @@ public:
 void testTdf66597_3();
 #endif
 #endif
+void testTdf109143();
 
 CPPUNIT_TEST_SUITE(PdfExportTest);
 #if HAVE_FEATURE_PDFIUM
@@ -112,6 +113,7 @@ public:
 CPPUNIT_TEST(testTdf66597_3);
 #endif
 #endif
+CPPUNIT_TEST(testTdf109143);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -436,6 +438,46 @@ void PdfExportTest::testTdf106206()
 CPPUNIT_ASSERT(bool(it == pEnd));
 }
 
+void PdfExportTest::testTdf109143()
+{
+// Import the bugdoc and export as PDF.
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf109143.odt";
+mxComponent = loadFromDesktop(aURL);
+CPPUNIT_ASSERT(mxComponent.is());
+
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+xStorable->storeToURL(aTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+// Parse the export result.
+vcl::filter::PDFDocument aDocument;
+SvFileStream aStream(aTempFile.GetURL(), StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+// The document has one page.
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+
+// Get access to the only image on the only page.
+vcl::filter::PDFObjectElement* pResources = 
aPages[0]->LookupObject("Resources");
+CPPUNIT_ASSERT(pResources);
+auto pXObjects = 
dynamic_cast(pResources->Lookup("XObject"));
+CPPUNIT_ASSERT(pXObjects);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pXObjects->GetItems().size());
+vcl::filter::PDFObjectElement* pXObject = 
pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+CPPUNIT_ASSERT(pXObject);
+
+// Make sure it's re-compressed.
+auto pLength = 
dynamic_cast(pXObject->Lookup("Length"));
+int nLength = pLength->GetValue();
+// This failed: cropped TIFF-in-JPEG wasn't re-compressed, so crop was
+// lost. Size was 59416, now is 11827.
+CPPUNIT_ASSERT(nLength < 5);
+}
+
 void PdfExportTest::testTdf106972()
 {
 // Import the bugdoc and export as PDF.
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx 
b/vcl/source/gdi/pdfextoutdevdata.cxx
index 013cca964441..2a7e7b1f0774 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -403,13 +403,13 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, 
sal_uInt32& rCurGDIMtfAc
 GfxLinkType eType = 
rGraphic.GetGfxLink().GetType();
 if ( eType == GfxLinkType::NativeJpg )
 {
-mbGroupIgnoreGDIMtfActions = 
rOutDevData.HasAdequateCompression(rGraphic);
+mbGroupIgnoreGDIMtfActi

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

2018-05-02 Thread Tamas Bunth
 dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx |6 --
 dbaccess/source/filter/hsqldb/hsqlbinarynode.hxx |3 ++-
 dbaccess/source/filter/hsqldb/hsqlimport.cxx |   16 +---
 dbaccess/source/filter/hsqldb/hsqlimport.hxx |3 ++-
 4 files changed, 17 insertions(+), 11 deletions(-)

New commits:
commit 04e564b8179cdfafc0f33233daae126e39f46e47
Author: Tamas Bunth 
Date:   Thu Apr 26 13:29:16 2018 +0200

tdf#116980 tdf#116986 Fix data migration in..

.. databases with relations.

There might be several nodes written in data file before the actual
row, each representing an index. We have to skip these.

Change-Id: I1556a8212b509c6cb63cb98fa0e9b7b8d3483004
Reviewed-on: https://gerrit.libreoffice.org/53507
Tested-by: Jenkins 
Reviewed-by: Tamás Bunth 

diff --git a/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx 
b/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx
index c7e07ec90b83..89371c735c44 100644
--- a/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx
+++ b/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx
@@ -48,9 +48,11 @@ void HsqlBinaryNode::readChildren(HsqlRowInputStream const& 
input)
 }
 
 std::vector HsqlBinaryNode::readRow(HsqlRowInputStream& input,
-   const ColumnTypeVector& 
aColTypes)
+   const ColumnTypeVector& 
aColTypes,
+   sal_Int32 nIndexCount)
 {
-input.seek(m_nPos + 20); // go to data
+// skip first 4 bytes (size), and index nodes, 16 bytes each
+input.seek(m_nPos + 4 + nIndexCount * 16);
 return input.readOneRow(aColTypes);
 }
 
diff --git a/dbaccess/source/filter/hsqldb/hsqlbinarynode.hxx 
b/dbaccess/source/filter/hsqldb/hsqlbinarynode.hxx
index 0f9271b8eef1..e03a88a72de8 100644
--- a/dbaccess/source/filter/hsqldb/hsqlbinarynode.hxx
+++ b/dbaccess/source/filter/hsqldb/hsqlbinarynode.hxx
@@ -57,7 +57,8 @@ public:
  * @param rInput input stream where the row should be read from.
  */
 std::vector readRow(HsqlRowInputStream& rInput,
-   const std::vector& 
aColTypes);
+   const std::vector& 
aColTypes,
+   sal_Int32 nIndexCount);
 };
 }
 
diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx 
b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
index 409ad54447d1..707e34eaaa6c 100644
--- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx
+++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
@@ -229,23 +229,24 @@ void HsqlImporter::insertRow(const RowVector& xRows, 
const OUString& sTableName,
 }
 
 void HsqlImporter::processTree(HsqlBinaryNode& rNode, HsqlRowInputStream& 
rStream,
-   const ColumnTypeVector& rColTypes, const 
OUString& sTableName)
+   const ColumnTypeVector& rColTypes, const 
OUString& sTableName,
+   sal_Int32 nIndexCount)
 {
 rNode.readChildren(rStream);
 sal_Int32 nNext = rNode.getLeft();
 if (nNext > 0)
 {
 HsqlBinaryNode aLeft{ nNext };
-processTree(aLeft, rStream, rColTypes, sTableName);
+processTree(aLeft, rStream, rColTypes, sTableName, nIndexCount);
 }
-std::vector row = rNode.readRow(rStream, rColTypes);
+std::vector row = rNode.readRow(rStream, rColTypes, nIndexCount);
 insertRow(row, sTableName, rColTypes);
 
 nNext = rNode.getRight();
 if (nNext > 0)
 {
 HsqlBinaryNode aRight{ nNext };
-processTree(aRight, rStream, rColTypes, sTableName);
+processTree(aRight, rStream, rColTypes, sTableName, nIndexCount);
 }
 }
 
@@ -278,11 +279,12 @@ void HsqlImporter::parseTableRows(const IndexVector& 
rIndexes,
 Reference xInput = xStream->getInputStream();
 rowInput.setInputStream(xInput);
 
-for (const auto& rIndex : rIndexes)
+if (rIndexes.size() > 0)
 {
-HsqlBinaryNode aNode{ rIndex };
-processTree(aNode, rowInput, rColTypes, sTableName);
+HsqlBinaryNode aPrimaryNode{ rIndexes.at(0) };
+processTree(aPrimaryNode, rowInput, rColTypes, sTableName, 
rIndexes.size());
 }
+
 xInput->closeInput();
 }
 
diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.hxx 
b/dbaccess/source/filter/hsqldb/hsqlimport.hxx
index 1df9ddbc3a10..12d0489cb852 100644
--- a/dbaccess/source/filter/hsqldb/hsqlimport.hxx
+++ b/dbaccess/source/filter/hsqldb/hsqlimport.hxx
@@ -29,7 +29,8 @@ protected:
 void insertRow(const std::vector& xRows, const OUString& 
sTable,
const std::vector& rColTypes);
 void processTree(HsqlBinaryNode& rNode, HsqlRowInputStream& rStream,
- const std::vector& rColTypes, const 
OUString& sTableName);
+ const std::vector& rColTypes, const 
OUString& sTableName,
+ sal_Int32 nIndexCount);
 void parseTableRows(const

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

2018-05-02 Thread Jan Holesovsky
 loolwsd.xml.in |6 +-
 wsd/FileServer.cpp |  158 -
 wsd/LOOLWSD.cpp|2 
 3 files changed, 101 insertions(+), 65 deletions(-)

New commits:
commit 88eefe75c5113e6c8ee9749ffb6cec0bebc42a74
Author: Jan Holesovsky 
Date:   Wed May 2 12:48:41 2018 +0200

Improve readability of the admin console password check.

Also disable PAM by default.

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

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 7a2bb7d9d..e291cc290 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -111,9 +111,9 @@
 
 
 true
-true
-
-
+false
+
+
 
 
 
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index c84859064..f8e62f4a5 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -66,15 +66,16 @@ int functionConversation(int /*num_msg*/, const struct 
pam_message** /*msg*/,
 return PAM_SUCCESS;
 }
 
-bool isPamAuthOk(const std::string& user, const std::string& pass)
+/// Use PAM to check for user / password.
+bool isPamAuthOk(const std::string& userProvidedUsr, const std::string& 
userProvidedPwd)
 {
 struct pam_conv localConversation { functionConversation, nullptr };
 pam_handle_t *localAuthHandle = NULL;
 int retval;
 
-localConversation.appdata_ptr = const_cast(pass.c_str());
+localConversation.appdata_ptr = const_cast(userProvidedPwd.c_str());
 
-retval = pam_start("loolwsd", user.c_str(), &localConversation, 
&localAuthHandle);
+retval = pam_start("loolwsd", userProvidedUsr.c_str(), &localConversation, 
&localAuthHandle);
 
 if (retval != PAM_SUCCESS)
 {
@@ -88,7 +89,7 @@ bool isPamAuthOk(const std::string& user, const std::string& 
pass)
 {
if (retval == PAM_AUTH_ERR)
{
-   LOG_ERR("PAM authentication failure for user \"" << user << "\".");
+   LOG_ERR("PAM authentication failure for user \"" << userProvidedUsr 
<< "\".");
}
else
{
@@ -97,7 +98,7 @@ bool isPamAuthOk(const std::string& user, const std::string& 
pass)
return false;
 }
 
-LOG_INF("PAM authentication success for user \"" << user << "\".");
+LOG_INF("PAM authentication success for user \"" << userProvidedUsr << 
"\".");
 
 retval = pam_end(localAuthHandle, retval);
 
@@ -108,59 +109,48 @@ bool isPamAuthOk(const std::string& user, const 
std::string& pass)
 
 return true;
 }
-}
 
-bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
-   HTTPResponse &response)
+/// Check for user / password set in loolwsd.xml.
+bool isConfigAuthOk(const std::string& userProvidedUsr, const std::string& 
userProvidedPwd)
 {
-assert(LOOLWSD::AdminEnabled);
-
 const auto& config = Application::instance().config();
-const std::string sslKeyPath = config.getString("ssl.key_file_path", "");
+const std::string& user = config.getString("admin_console.username", "");
 
-NameValueCollection cookies;
-request.getCookies(cookies);
-try
+// Check for the username
+if (user.empty())
 {
-const std::string jwtToken = cookies.get("jwt");
-LOG_INF("Verifying JWT token: " << jwtToken);
-JWTAuth authAgent(sslKeyPath, "admin", "admin", "admin");
-if (authAgent.verify(jwtToken))
-{
-LOG_TRC("JWT token is valid");
-return true;
-}
-
-LOG_INF("Invalid JWT token, let the administrator re-login");
+LOG_ERR("Admin Console username missing, admin console disabled.");
+return false;
 }
-catch (const Poco::Exception& exc)
+else if (user != userProvidedUsr)
 {
-LOG_INF("No existing JWT cookie found");
+LOG_ERR("Admin Console wrong username.");
+return false;
 }
 
-HTTPBasicCredentials credentials(request);
-std::string userProvidedPwd = credentials.getPassword();
-const std::string& userProvidedUsr = credentials.getUsername();
-
-// If no cookie found, or is invalid, let admin re-login
-const std::string user = config.getString("admin_console.username", "");
-std::string pass = config.getString("admin_console.password", "");
-const bool pam = config.getBool("admin_console.enable_pam", "true");
+const char useLoolconfig[] = " Use loolconfig to configure the admin 
password.";
 
+// do we have secure_password?
 if (config.has("admin_console.secure_password"))
 {
+const std::string securePass = 
config.getString("admin_console.secure_password", "");
+if (securePass.empty())
+{
+LOG_ERR("Admin Console secure password is empty, denying access." 
<< useLoolconfig);
+return false;
+}
+
 #if HAVE_PKCS5_PBKDF2_HMAC
-pass = config.getString(

tdf#117393

2018-05-02 Thread Chris Sherlock
I’m getting unit test failures on MacOS High Sierra for 
SdOOXMLExportTest2::testFontScale 

SdOOXMLExportTest2::testFontScale finished in: 3261ms
/Users/5K/lo/core/sd/qa/unit/export-tests-ooxml2.cxx:1455: Assertion
Test name: SdOOXMLExportTest2::testFontScale
equality assertion failed
- Expected: 73000
- Actual  : 55000

I opened the unit test file font-scale.pptx and I got some super-odd font sizes 
- it’s showing for me as font size 24.2

I’ve logged https://bugs.documentfoundation.org/show_bug.cgi?id=117393 


Is anyone else getting this on MacOS High Sierra? I seem to get failures on my 
iMac 4K retina that others don’t get though, so I’m wondering if my system 
might be a bit different to other Macs people use. 

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


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

2018-05-02 Thread Pranav Kant
 loleaflet/dist/menubar.css   |2 --
 loleaflet/dist/toolbar.css   |7 +++
 loleaflet/src/control/Control.Menubar.js |   12 
 3 files changed, 3 insertions(+), 18 deletions(-)

New commits:
commit 8f6df703334fe98daa2f8bcd4956690e85ccab02
Author: Pranav Kant 
Date:   Wed May 2 23:05:54 2018 +0530

Revert "loleaflet: move document-name-input in menubar"

The overflow: hidden is problematic here as popping out of menus from
the menubar also stops working due to this.

This reverts commit a9c053fba46ce026d8c06bf23ff9a2abcb1222ee.

Change-Id: I5d86a38ff48c7ceced56592ab32a2e554f4b2e4f

diff --git a/loleaflet/dist/menubar.css b/loleaflet/dist/menubar.css
index cfdb8baf1..f192eacbf 100644
--- a/loleaflet/dist/menubar.css
+++ b/loleaflet/dist/menubar.css
@@ -2,8 +2,6 @@
 top: 39px;
 height: 25px;
 padding-left: 125px;
-padding-right: 32px; /* for: the red close button on the right */
-overflow: hidden;
 z-index: 1000;
 outline: none;
 background-color: transparent;
diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index 0444312a2..d56b809a2 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -79,14 +79,13 @@ w2ui-toolbar {
 }
 
 #document-name-input {
+position: fixed;
 z-index: 1050;
+right: 35px;
 top: 2px;
 width: 200px;
-font-size: 14px;
+font-size: 16px;
 padding-right: 20px;
-padding-top: 6px;
-padding-bottom: 5px;
-padding-left: 5px;
 border: 1px solid transparent;
 background-color: transparent;
 }
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 86849ad11..d6ec74ca8 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -503,16 +503,6 @@ L.Control.Menubar = L.Control.extend({
}
},
 
-   _addAfterElements: function() {
-   var elemLi = L.DomUtil.create('li', '', this._menubarCont);
-   L.DomUtil.setStyle(elemLi, 'float', 'right');
-
-   // move document-name-input element to menubar
-   var elem = L.DomUtil.get('document-name-input');
-   L.DomUtil.remove(elem);
-   elemLi.appendChild(elem);
-   },
-
_onDocLayerInit: function() {
// clear initial menu
while (this._menubarCont.hasChildNodes()) {
@@ -529,8 +519,6 @@ L.Control.Menubar = L.Control.extend({
this._initializeMenu(this.options.presentation);
}
 
-   this._addAfterElements();
-
// initialize menubar plugin
$('#main-menu').smartmenus({
hideOnClick: true,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Pranav Kant
 loleaflet/src/core/Socket.js |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 088658807ac2340344ffdabaec42885b15b8f62b
Author: Pranav Kant 
Date:   Wed May 2 23:19:48 2018 +0530

loleaflet: close previous socket before connecting new one

It's possible otherwise in some scenarios that multiple sockets are
created in one browser tab while there should only be one for one
browser tab.

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

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 4275a3d7c..edb1c2435 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -34,6 +34,9 @@ L.Socket = L.Class.extend({
 
var websocketURI = map.options.server + '/lool/' + 
encodeURIComponent(map.options.doc + '?' + $.param(map.options.docParams)) + 
'/ws' + wopiSrc;
try {
+   if (this.socket) {
+   this.close();
+   }
this.socket = new WebSocket(websocketURI);
} catch (e) {
this._map.fire('error', {msg: _('Oops, there is a 
problem connecting to LibreOffice Online : ').replace('LibreOffice Online', 
(typeof brandProductName !== 'undefined' ? brandProductName : 'LibreOffice 
Online')) + _('Cannot create websocket, please restart your browser.'), cmd: 
'socket', kind: 'failed', id: 3});
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC Introduction - Vikas Mahato

2018-05-02 Thread Vikas Mahato
Hello Developers,

I am Vikas Prasad Mahato and I have been selected for GSoC to work on Calc
Data Import project where I'll be working on features to enable importing
data to Calc from external data sources (like HTML and CSV).

So far, I have set up my development environment, configured vim and did a
fresh build of libreoffice.

I am now reading though docs and tweaking bits of code to understand more
on how Calc works.

I feel really good being part of this community and am looking forward to
an exciting and code filled summer.

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


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

2018-05-02 Thread Eike Rathke
 include/svl/zforlist.hxx|4 
 svl/source/numbers/zforfind.cxx |  164 
 svl/source/numbers/zforfind.hxx |   19 +---
 3 files changed, 111 insertions(+), 76 deletions(-)

New commits:
commit dfb9138b8b5a239b46f189a717999bcaff19aa79
Author: Eike Rathke 
Date:   Wed May 2 22:10:05 2018 +0200

Resolves: tdf#116579 consider both work locale and format locale date 
patterns

If a format was set its locale's date acceptance patterns
overwrote the work locale's patterns for the current input. Take
both into account, with precedence depending on the
NfEvalDateFormat set at SvNumberFormatter.

Change-Id: Ie6e837447610d71eb9b8227e602d13d414cad612

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 536d6bdf1645..14aaf6a40940 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -882,6 +882,10 @@ public:
 /** Access for unit tests. */
 size_t GetMaxDefaultColors() const;
 
+struct InputScannerPrivateAccess { friend class ImpSvNumberInputScan; 
private: InputScannerPrivateAccess() {} };
+/** Access for input scanner to temporarily (!) switch locales. */
+OnDemandLocaleDataWrapper& GetOnDemandLocaleDataWrapper( const 
InputScannerPrivateAccess& ) { return xLocaleData; }
+
 private:
 mutable ::osl::Mutex m_aMutex;
 css::uno::Reference< css::uno::XComponentContext > m_xContext;
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 85b27797d204..e55786ea9d17 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include "zforscan.hxx"
@@ -98,6 +99,7 @@ ImpSvNumberInputScan::~ImpSvNumberInputScan()
 
 void ImpSvNumberInputScan::Reset()
 {
+mpFormat = nullptr;
 nMonth   = 0;
 nMonthPos= 0;
 nDayOfWeek   = 0;
@@ -702,14 +704,13 @@ int ImpSvNumberInputScan::GetDayOfWeek( const OUString& 
rString, sal_Int32& nPos
  * '$'   => true
  * else => false
  */
-bool ImpSvNumberInputScan::GetCurrency( const OUString& rString, sal_Int32& 
nPos,
-const SvNumberformat* pFormat )
+bool ImpSvNumberInputScan::GetCurrency( const OUString& rString, sal_Int32& 
nPos )
 {
 if ( rString.getLength() > nPos )
 {
 if ( !aUpperCurrSymbol.getLength() )
 {   // if no format specified the currency of the initialized formatter
-LanguageType eLang = (pFormat ? pFormat->GetLanguage() : 
pFormatter->GetLanguage());
+LanguageType eLang = (mpFormat ? mpFormat->GetLanguage() : 
pFormatter->GetLanguage());
 aUpperCurrSymbol = pFormatter->GetCharClass()->uppercase(
 SvNumberFormatter::GetCurrencyEntry( eLang ).GetSymbol() );
 }
@@ -718,10 +719,10 @@ bool ImpSvNumberInputScan::GetCurrency( const OUString& 
rString, sal_Int32& nPos
 nPos = nPos + aUpperCurrSymbol.getLength();
 return true;
 }
-if ( pFormat )
+if ( mpFormat )
 {
 OUString aSymbol, aExtension;
-if ( pFormat->GetNewCurrencySymbol( aSymbol, aExtension ) )
+if ( mpFormat->GetNewCurrencySymbol( aSymbol, aExtension ) )
 {
 if ( aSymbol.getLength() <= rString.getLength() - nPos )
 {
@@ -1100,18 +1101,18 @@ bool ImpSvNumberInputScan::CanForceToIso8601( DateOrder 
eDateOrder )
 }
 
 
-bool ImpSvNumberInputScan::IsAcceptableIso8601( const SvNumberformat* pFormat )
+bool ImpSvNumberInputScan::IsAcceptableIso8601()
 {
-if (pFormat && (pFormat->GetType() & SvNumFormatType::DATE))
+if (mpFormat && (mpFormat->GetType() & SvNumFormatType::DATE))
 {
 switch (pFormatter->GetEvalDateFormat())
 {
 case NF_EVALDATEFORMAT_INTL:
 return CanForceToIso8601( GetDateOrder());
 case NF_EVALDATEFORMAT_FORMAT:
-return CanForceToIso8601( pFormat->GetDateOrder());
+return CanForceToIso8601( mpFormat->GetDateOrder());
 default:
-return CanForceToIso8601( GetDateOrder()) || 
CanForceToIso8601( pFormat->GetDateOrder());
+return CanForceToIso8601( GetDateOrder()) || 
CanForceToIso8601( mpFormat->GetDateOrder());
 }
 }
 return CanForceToIso8601( GetDateOrder());
@@ -1191,7 +1192,46 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( 
sal_uInt16 nStartPatternAt )
 }
 else if (!sDateAcceptancePatterns.getLength())
 {
-sDateAcceptancePatterns = 
pFormatter->GetLocaleData()->getDateAcceptancePatterns();
+// The current locale is the format's locale, if a format is present.
+const NfEvalDateFormat eEDF = pFormatter->GetEvalDateFormat();
+if (!mpFormat || eEDF == NF_EVALDATEFORMAT_FORMAT || 
mpFormat->GetLanguage() == pFormatter->GetLanguage())
+{
+sDateAccep

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/vcl vcl/source vcl/unx

2018-05-02 Thread Caolán McNamara
 cui/source/inc/textanim.hxx|   63 ++---
 cui/source/tabpages/textanim.cxx   |  417 -
 cui/uiconfig/ui/textanimtabpage.ui |   30 +-
 include/vcl/weld.hxx   |   16 +
 vcl/source/app/salvtables.cxx  |   74 +-
 vcl/source/window/builder.cxx  |6 
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   15 -
 7 files changed, 328 insertions(+), 293 deletions(-)

New commits:
commit c7f9599f685a8e297be32fe6db5de04068b22d05
Author: Caolán McNamara 
Date:   Wed May 2 09:23:43 2018 +0100

weld SvxTextAnimationPage

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

diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx
index 0d568d7dd1f6..958b99841acc 100644
--- a/cui/source/inc/textanim.hxx
+++ b/cui/source/inc/textanim.hxx
@@ -39,50 +39,49 @@ class SvxTextAnimationPage : public SfxTabPage
 private:
 static const sal_uInt16 pRanges[];
 
-VclPtr m_pLbEffect;
-VclPtr  m_pBoxDirection;
-VclPtr  m_pBtnUp;
-VclPtr  m_pBtnLeft;
-VclPtr  m_pBtnRight;
-VclPtr  m_pBtnDown;
-
-VclPtrm_pFlProperties;
-VclPtr m_pTsbStartInside;
-VclPtr m_pTsbStopInside;
-
-VclPtr  m_pBoxCount;
-VclPtr m_pTsbEndless;
-VclPtrm_pNumFldCount;
-
-VclPtr m_pTsbPixel;
-VclPtr m_pMtrFldAmount;
-
-VclPtr m_pTsbAuto;
-VclPtr m_pMtrFldDelay;
-
 const SfxItemSet&   rOutAttrs;
 SdrTextAniKind  eAniKind;
 FieldUnit   eFUnit;
 MapUnit eUnit;
 
-DECL_LINK( SelectEffectHdl_Impl, ListBox&, void );
-DECL_LINK( ClickEndlessHdl_Impl, Button*, void );
-DECL_LINK( ClickAutoHdl_Impl, Button*, void );
-DECL_LINK( ClickPixelHdl_Impl, Button*, void );
-DECL_LINK( ClickDirectionHdl_Impl, Button*, void );
-
-voidSelectDirection( SdrTextAniDirection nValue );
-sal_uInt16  GetSelectedDirection();
-
 TriState m_aUpState;
 TriState m_aLeftState;
 TriState m_aRightState;
 TriState m_aDownState;
 
+std::unique_ptr m_xLbEffect;
+std::unique_ptr m_xBoxDirection;
+std::unique_ptr m_xBtnUp;
+std::unique_ptr m_xBtnLeft;
+std::unique_ptr m_xBtnRight;
+std::unique_ptr m_xBtnDown;
+
+std::unique_ptr m_xFlProperties;
+std::unique_ptr m_xTsbStartInside;
+std::unique_ptr m_xTsbStopInside;
+
+std::unique_ptr m_xBoxCount;
+std::unique_ptr m_xTsbEndless;
+std::unique_ptr m_xNumFldCount;
+
+std::unique_ptr m_xTsbPixel;
+std::unique_ptr m_xMtrFldAmount;
+
+std::unique_ptr m_xTsbAuto;
+std::unique_ptr m_xMtrFldDelay;
+
+DECL_LINK( SelectEffectHdl_Impl, weld::ComboBoxText&, void );
+DECL_LINK( ClickEndlessHdl_Impl, weld::Button&, void );
+DECL_LINK( ClickAutoHdl_Impl, weld::Button&, void );
+DECL_LINK( ClickPixelHdl_Impl, weld::Button&, void );
+DECL_LINK( ClickDirectionHdl_Impl, weld::Button&, void );
+
+void SelectDirection( SdrTextAniDirection nValue );
+sal_uInt16 GetSelectedDirection();
+
 public:
-SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
+SvxTextAnimationPage(TabPageParent pPage, const SfxItemSet& rInAttrs);
 virtual ~SvxTextAnimationPage() override;
-virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16* GetRanges() { return pRanges; }
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index cb8f10c9afb0..3a2ca39e625c 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -87,77 +87,50 @@ void SvxTextTabDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage &rPage )
 |*
 \/
 
-SvxTextAnimationPage::SvxTextAnimationPage(vcl::Window* pWindow, const 
SfxItemSet& rInAttrs)
-: SfxTabPage(pWindow, "TextAnimation", "cui/ui/textanimtabpage.ui", 
&rInAttrs)
+SvxTextAnimationPage::SvxTextAnimationPage(TabPageParent pPage, const 
SfxItemSet& rInAttrs)
+: SfxTabPage(pPage, "cui/ui/textanimtabpage.ui", "TextAnimation", 
&rInAttrs)
 , rOutAttrs(rInAttrs)
 , eAniKind(SdrTextAniKind::NONE)
 , m_aUpState(TRISTATE_INDET)
 , m_aLeftState(TRISTATE_INDET)
 , m_aRightState(TRISTATE_INDET)
 , m_aDownState(TRISTATE_INDET)
+, m_xLbEffect(m_xBuilder->weld_combo_box_text("LB_EFFECT"))
+, m_xBoxDirection(m_xBuilder->weld_widget("boxDIRECTION"))
+, m_xBtnUp(m_xBuilder->weld_toggle_button("BTN_UP"))
+, m_xBtnLeft(m_xBuilder->weld_toggle_button("BTN_LEFT"))
+, m_xBtnRight(m_xBuilder->weld_toggle_button("BTN_RIGHT"))
+, m_xBtnDown(m_xBuilder->weld_toggle_button("BTN_DOWN"))
+

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source

2018-05-02 Thread Eike Rathke
 sc/source/filter/oox/worksheethelper.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 8a9e5326e77e86de2962ee7569d883091f7fe4c7
Author: Eike Rathke 
Date:   Fri Apr 27 16:10:17 2018 +0200

Resolves: tdf#116939 cater for the last cols col incremented by Excel

Change-Id: I48c4b9afb4cf2cb826ae2bb52067256e7fcb2c83
(cherry picked from commit b78ab482911356ef282f7fd40a4509320608a203)
Reviewed-on: https://gerrit.libreoffice.org/53565
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/filter/oox/worksheethelper.cxx 
b/sc/source/filter/oox/worksheethelper.cxx
index aade8b4e88d0..6af0e32a1e80 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -770,6 +770,13 @@ void WorksheetGlobals::setColumnModel( const ColumnModel& 
rModel )
 // checkCol(). Cater for this oddity.
 if (nLastCol == mrMaxApiPos.Col() + 1)
 --nLastCol;
+// This is totally fouled up. If we saved 1025 and the file is saved
+// with Excel again, it increments the value to 1026.
+/* TODO: we may have to completely ignore the very last
+ *  value and use checkCol(...,false) on
+ * that, if it turns out that Excel stores arbitrary columns. */
+else if (nLastCol == mrMaxApiPos.Col() + 2)
+nLastCol -= 2;
 // Excel may add a column range for the remaining columns (with
 // ), even if not used or only used to grey out
 // columns in page break view. Don't let that trigger overflow warning,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-05-02 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 52b6e4c9e508af0db7f942b30735bec1bb184399
Author: Adolfo Jayme Barrientos 
Date:   Wed May 2 15:47:00 2018 -0500

Updated core
Project: help  e1bc9445a23c41a19ff529f3ed014eaace091d5e

Helponline: Provide a visual indicator for people to notice inputs

Otherwise, it’s impossible to know you can click one and have its text
copied into your clipboard.

Change-Id: I9243229c0e507f35b35768ec71473117c2c34a8d

diff --git a/helpcontent2 b/helpcontent2
index 09f72e64083e..e1bc9445a23c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 09f72e64083e9a6003e6c10fa26e1c5ca3c4d785
+Subproject commit e1bc9445a23c41a19ff529f3ed014eaace091d5e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/default.css

2018-05-02 Thread Adolfo Jayme Barrientos
 help3xsl/default.css |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e1bc9445a23c41a19ff529f3ed014eaace091d5e
Author: Adolfo Jayme Barrientos 
Date:   Wed May 2 15:47:00 2018 -0500

Helponline: Provide a visual indicator for people to notice inputs

Otherwise, it’s impossible to know you can click one and have its text
copied into your clipboard.

Change-Id: I9243229c0e507f35b35768ec71473117c2c34a8d

diff --git a/help3xsl/default.css b/help3xsl/default.css
index d56ecae71..b0a0834e6 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -46,6 +46,7 @@ h6,
 .input {
 transition-property: background-color;
 transition-duration: 150ms;
+border-bottom: 1px dashed #E8E8E8;
 }
 [data-tooltip]{
   position:relative;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Eike Rathke
 sc/source/filter/oox/worksheethelper.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 391920065873b3f74efae8c84b8997d27bce49d7
Author: Eike Rathke 
Date:   Fri Apr 27 16:10:17 2018 +0200

Resolves: tdf#116939 cater for the last cols col incremented by Excel

Change-Id: I48c4b9afb4cf2cb826ae2bb52067256e7fcb2c83
(cherry picked from commit b78ab482911356ef282f7fd40a4509320608a203)
Reviewed-on: https://gerrit.libreoffice.org/53566
Reviewed-by: Markus Mohrhard 
Reviewed-by: Kohei Yoshida 
Tested-by: Kohei Yoshida 

diff --git a/sc/source/filter/oox/worksheethelper.cxx 
b/sc/source/filter/oox/worksheethelper.cxx
index aade8b4e88d0..6af0e32a1e80 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -770,6 +770,13 @@ void WorksheetGlobals::setColumnModel( const ColumnModel& 
rModel )
 // checkCol(). Cater for this oddity.
 if (nLastCol == mrMaxApiPos.Col() + 1)
 --nLastCol;
+// This is totally fouled up. If we saved 1025 and the file is saved
+// with Excel again, it increments the value to 1026.
+/* TODO: we may have to completely ignore the very last
+ *  value and use checkCol(...,false) on
+ * that, if it turns out that Excel stores arbitrary columns. */
+else if (nLastCol == mrMaxApiPos.Col() + 2)
+nLastCol -= 2;
 // Excel may add a column range for the remaining columns (with
 // ), even if not used or only used to grey out
 // columns in page break view. Don't let that trigger overflow warning,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Serge Krot
 include/svx/svdobj.hxx   |3 -
 include/svx/unoshape.hxx |7 ++-
 sc/source/core/data/drwlayer.cxx |   30 +++--
 svx/source/svdraw/svddrgmt.cxx   |   15 +-
 svx/source/svdraw/svdoashp.cxx   |   50 ---
 svx/source/svdraw/svdobj.cxx |   55 -
 svx/source/svdraw/svdocapt.cxx   |   26 
 svx/source/svdraw/svdomeas.cxx   |   48 --
 svx/source/svdraw/svdopath.cxx   |   62 
 svx/source/svdraw/svdotext.cxx   |   50 ---
 svx/source/unodraw/unoshap2.cxx  |   24 ++-
 svx/source/unodraw/unoshape.cxx  |   84 +++
 sw/source/core/docnode/nodes.cxx |8 +--
 13 files changed, 126 insertions(+), 336 deletions(-)

New commits:
commit 5175e38d823ff11025d8f1df8f4f6ad9ed6b03e2
Author: Serge Krot 
Date:   Mon Apr 30 13:59:34 2018 +0200

Fix: nNodeCnt could be set to negative value

Change-Id: I82e9b150e97e733c4063f7498dc026e0c9f903c0
Reviewed-on: https://gerrit.libreoffice.org/53660
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/53667
Tested-by: Jenkins 

diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 0d1fba03e848..e23f6b549847 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1732,7 +1732,7 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange,
 SwNodeIndex aOrigInsPos( rIndex, -1 ); // original insertion position
 int nLevel = 0;// level counter
 
-for( sal_uLong nNodeCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
+for( long nNodeCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
 nNodeCnt > 0; --nNodeCnt )
 {
 pCurrentNode = &aRg.aStart.GetNode();
@@ -1744,7 +1744,7 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange,
 pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex()
 < aInsPos.GetIndex() )
 {
-sal_uLong nDistance =
+const long nDistance =
 ( pCurrentNode->EndOfSectionIndex() -
 aRg.aStart.GetIndex() );
 if (nDistance < nNodeCnt)
@@ -1785,7 +1785,7 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange,
 SwNodeIndex nStt( aInsPos, -1 );
 SwTableNode* pTableNd = 
static_cast(pCurrentNode)->
 MakeCopy( pDoc, aInsPos );
-sal_uLong nDistance = aInsPos.GetIndex() - nStt.GetIndex() - 2;
+const long nDistance = aInsPos.GetIndex() - nStt.GetIndex() - 
2;
 if (nDistance < nNodeCnt)
 nNodeCnt -= nDistance;
 else
@@ -1813,7 +1813,7 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange,
 SwSectionNode* pSectNd = 
static_cast(pCurrentNode)->
 MakeCopy( pDoc, aInsPos );
 
-sal_uLong nDistance = aInsPos.GetIndex() - nStt.GetIndex() - 2;
+const long nDistance = aInsPos.GetIndex() - nStt.GetIndex() - 
2;
 if (nDistance < nNodeCnt)
 nNodeCnt -= nDistance;
 else
commit d57033ddf8eaa2f6992ac7d89c33dc47c7293492
Author: Armin Le Grand 
Date:   Wed May 2 18:24:09 2018 +0200

tdf#117145 Cleanup MapMode handling between SdrModel/UNO API

In current versions MapMode handling is done in ::TRSet/Get-
BaseGeometry methods. These belong to SdrModel level and
should not do any MapMode conversions (else all geometry
and Rectangle setters/getters should have to do these, too).
Instead, the UNO API implementation should do these, there
are already some done there and this is the level which offers
pure 100ThMM handling to the caller, independent from the
used application.

Change-Id: I3d7781440fc0fc6a20b5d4e79c747c988677483d
Reviewed-on: https://gerrit.libreoffice.org/53748
Tested-by: Jenkins 
Reviewed-by: Armin Le Grand 

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index df6d42f2233f..c901dfa1416d 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -970,9 +970,6 @@ protected:
 return static_cast(GetObjectItem(sal_uInt16(nWhich)));
 }
 
-// get MapUnit the object is using
-MapUnit GetObjectMapUnit() const;
-
 /// Sets a new UNO shape
 ///
 /// The default implementation of this function sets the new UNO
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 422f6b13b446..d015d8f39820 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -148,10 +148,15 @@ protected:
 void ForceMetricTo100th_mm(Pair& rPoint) const throw();
 void ForceMetricTo100th_mm(Point& rPoint) const throw() { 
ForceMetricTo100th_mm(rPoint.toPair()); }
 

[Libreoffice-commits] core.git: 2 commits - chart2/source include/svx sd/source svx/source

2018-05-02 Thread Noel Grandin
 chart2/source/controller/main/DragMethod_PieSegment.cxx |2 
 include/svx/svdcrtv.hxx |3 
 include/svx/svddrgmt.hxx|5 -
 sd/source/ui/animations/motionpathtag.cxx   |6 -
 svx/source/svdraw/svdcrtv.cxx   |9 --
 svx/source/svdraw/svddrgmt.cxx  |   58 ++--
 6 files changed, 35 insertions(+), 48 deletions(-)

New commits:
commit 09cfe07c20636445c330e8a86b7e1bf9492144fb
Author: Noel Grandin 
Date:   Wed May 2 10:08:38 2018 +0200

loplugin:useuniqueptr in SdrDragMethod

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

diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx 
b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index e9fbde74357a..4731c8252ee7 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -142,7 +142,7 @@ void DragMethod_PieSegment::createSdrDragEntries()
 if( pObj && pPV )
 {
 const basegfx::B2DPolyPolygon aNewPolyPolygon(pObj->TakeXorPoly());
-addSdrDragEntry(new SdrDragEntryPolyPolygon(aNewPolyPolygon));
+addSdrDragEntry(std::unique_ptr(new 
SdrDragEntryPolyPolygon(aNewPolyPolygon)));
 }
 }
 } //namespace chart
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
index ab6a87344511..b51769d0e740 100644
--- a/include/svx/svddrgmt.hxx
+++ b/include/svx/svddrgmt.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SdrDragView;
 class SdrDragStat;
@@ -113,7 +114,7 @@ public:
 class SVX_DLLPUBLIC SdrDragMethod
 {
 private:
-std::vector< SdrDragEntry* >maSdrDragEntries;
+std::vector< std::unique_ptr > maSdrDragEntries;
 sdr::overlay::OverlayObjectList maOverlayObjectList;
 SdrDragView&mrSdrDragView;
 
@@ -124,7 +125,7 @@ private:
 protected:
 // access for derivated classes to maSdrDragEntries
 void clearSdrDragEntries();
-void addSdrDragEntry(SdrDragEntry* pNew);
+void addSdrDragEntry(std::unique_ptr pNew);
 virtual void createSdrDragEntries();
 virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, 
sdr::contact::ObjectContact& rObjectContact);
 
diff --git a/sd/source/ui/animations/motionpathtag.cxx 
b/sd/source/ui/animations/motionpathtag.cxx
index 165d67b87516..6699ade88ff7 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -106,7 +106,7 @@ void PathDragMove::createSdrDragEntries()
 
 if(maPathPolyPolygon.count())
 {
-addSdrDragEntry(new SdrDragEntryPolyPolygon(maPathPolyPolygon));
+addSdrDragEntry(std::unique_ptr(new 
SdrDragEntryPolyPolygon(maPathPolyPolygon)));
 }
 }
 
@@ -167,7 +167,7 @@ void PathDragResize::createSdrDragEntries()
 
 if(maPathPolyPolygon.count())
 {
-addSdrDragEntry(new SdrDragEntryPolyPolygon(maPathPolyPolygon));
+addSdrDragEntry(std::unique_ptr(new 
SdrDragEntryPolyPolygon(maPathPolyPolygon)));
 }
 }
 
@@ -221,7 +221,7 @@ void PathDragObjOwn::createSdrDragEntries()
 
 if(maPathPolyPolygon.count())
 {
-addSdrDragEntry(new SdrDragEntryPolyPolygon(maPathPolyPolygon));
+addSdrDragEntry(std::unique_ptr(new 
SdrDragEntryPolyPolygon(maPathPolyPolygon)));
 }
 }
 
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index be78cd90fc93..430d98006fa5 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -306,20 +306,13 @@ basegfx::B2DRange SdrDragMethod::getCurrentRange() const
 
 void SdrDragMethod::clearSdrDragEntries()
 {
-for(SdrDragEntry* p : maSdrDragEntries)
-{
-delete p;
-}
-
 maSdrDragEntries.clear();
 }
 
-void SdrDragMethod::addSdrDragEntry(SdrDragEntry* pNew)
+void SdrDragMethod::addSdrDragEntry(std::unique_ptr pNew)
 {
-if(pNew)
-{
-maSdrDragEntries.push_back(pNew);
-}
+assert(pNew);
+maSdrDragEntries.push_back(std::move(pNew));
 }
 
 void SdrDragMethod::createSdrDragEntries()
@@ -352,7 +345,7 @@ void SdrDragMethod::createSdrDragEntryForSdrObject(const 
SdrObject& rOriginal, s
 {
 // add full object drag; Clone() at the object has to work
 // for this
-addSdrDragEntry(new SdrDragEntrySdrObject(rOriginal, rObjectContact, 
true/*bModify*/));
+addSdrDragEntry(std::unique_ptr(new 
SdrDragEntrySdrObject(rOriginal, rObjectContact, true/*bModify*/)));
 }
 
 void SdrDragMethod::createSdrDragEntries_SolidDrag()
@@ -404,7 +397,7 @@ void SdrDragMethod::createSdrDragEntries_SolidDrag()
 // when dragging a 50% transparent copy of 
a filled or not filled object without
 // outline, this is normally hard to

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

2018-05-02 Thread Noel Grandin
 include/svx/svdpage.hxx   |2 +-
 svx/source/svdraw/svdpage.cxx |5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 2b2223730b680a006b3380d3d44d59548b7bce65
Author: Noel Grandin 
Date:   Wed May 2 10:21:22 2018 +0200

loplugin:useuniqueptr in SdrPage

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

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index f6899da1a86d..a4cc40feebd4 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -421,7 +421,7 @@ public:
 
 protected:
 // new MasterPageDescriptorVector
-sdr::MasterPageDescriptor*mpMasterPageDescriptor;
+std::unique_ptr mpMasterPageDescriptor;
 
 SdrLayerIDSet   aPrefVisiLayers;
 sal_uInt16  nPageNum;
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 71207b6d4f88..a5d16568e049 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1413,7 +1413,7 @@ void SdrPage::TRG_SetMasterPage(SdrPage& rNew)
 if(mpMasterPageDescriptor)
 TRG_ClearMasterPage();
 
-mpMasterPageDescriptor = new sdr::MasterPageDescriptor(*this, rNew);
+mpMasterPageDescriptor.reset(new sdr::MasterPageDescriptor(*this, rNew));
 GetViewContact().ActionChanged();
 }
 
@@ -1426,8 +1426,7 @@ void SdrPage::TRG_ClearMasterPage()
 // the flushViewObjectContacts() will do needed invalidates by 
deleting the involved VOCs
 
mpMasterPageDescriptor->GetUsedPage().GetViewContact().flushViewObjectContacts();
 
-delete mpMasterPageDescriptor;
-mpMasterPageDescriptor = nullptr;
+mpMasterPageDescriptor.reset();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Noel Grandin
 include/svx/svdpntv.hxx|5 +++--
 svx/source/svdraw/svdpntv.cxx  |   13 +
 svx/source/table/svdotable.cxx |   24 ++--
 3 files changed, 14 insertions(+), 28 deletions(-)

New commits:
commit c35f95b3ec48e6057d4ddafe688daff1cede59c0
Author: Noel Grandin 
Date:   Wed May 2 10:33:15 2018 +0200

loplugin:useuniqueptr in SdrTableObjImpl

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

diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 889dbccff77a..e90b0e8fbab0 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -191,7 +191,7 @@ public:
 CellRef mxActiveCell;
 TableModelRef mxTable;
 SdrTableObj* mpTableObj;
-TableLayouter* mpLayouter;
+std::unique_ptr mpLayouter;
 CellPos maEditPos;
 TableStyleSettings maTableStyle;
 Reference< XIndexAccess > mxTableStyle;
@@ -277,7 +277,7 @@ void SdrTableObjImpl::init( SdrTableObj* pTable, sal_Int32 
nColumns, sal_Int32 n
 mxTable->init( nColumns, nRows );
 Reference< XModifyListener > xListener( static_cast< 
css::util::XModifyListener* >(this) );
 mxTable->addModifyListener( xListener );
-mpLayouter = new TableLayouter( mxTable );
+mpLayouter.reset(new TableLayouter( mxTable ));
 LayoutTable( mpTableObj->maRect, true, true );
 mpTableObj->maLogicRect = mpTableObj->maRect;
 }
@@ -289,11 +289,7 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const 
SdrTableObjImpl& rSource )
 {
 disconnectTableStyle();
 
-if( mpLayouter )
-{
-delete mpLayouter;
-mpLayouter = nullptr;
-}
+mpLayouter.reset();
 
 if( mxTable.is() )
 {
@@ -306,7 +302,7 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const 
SdrTableObjImpl& rSource )
 maTableStyle = rSource.maTableStyle;
 
 mxTable = new TableModel( mpTableObj, rSource.mxTable );
-mpLayouter = new TableLayouter( mxTable );
+mpLayouter.reset(new TableLayouter( mxTable ));
 Reference< XModifyListener > xListener( static_cast< 
css::util::XModifyListener* >(this) );
 mxTable->addModifyListener( xListener );
 mxTableStyle = rSource.mxTableStyle;
@@ -456,11 +452,7 @@ void SdrTableObjImpl::dispose()
 disconnectTableStyle();
 mxTableStyle.clear();
 
-if( mpLayouter )
-{
-delete mpLayouter;
-mpLayouter = nullptr;
-}
+mpLayouter.reset();
 
 if( mxTable.is() )
 {
@@ -638,11 +630,7 @@ void SAL_CALL SdrTableObjImpl::disposing( const 
css::lang::EventObject& /*Source
 {
 mxActiveCell.clear();
 mxTable.clear();
-if( mpLayouter )
-{
-delete mpLayouter;
-mpLayouter = nullptr;
-}
+mpLayouter.reset();
 mpTableObj = nullptr;
 }
 
commit fef6c6cf67eab1b02a7761cedf6355e33804f6e2
Author: Noel Grandin 
Date:   Wed May 2 10:29:25 2018 +0200

loplugin:useuniqueptr in SdrPaintView

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

diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 2405ad9ca4b5..dc20ac774300 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 // Pre defines
@@ -133,7 +134,7 @@ private:
 // the SdrModel this view was created with, unchanged during lifetime
 SdrModel&   mrSdrModelFromSdrView;
 
-SdrPageView*mpPageView;
+std::unique_ptr mpPageView;
 protected:
 SdrModel*   mpModel;
 #ifdef DBG_UTIL
@@ -313,7 +314,7 @@ public:
 virtual void HideSdrPage();
 
 // Iterate over all registered PageViews
-SdrPageView* GetSdrPageView() const { return mpPageView; }
+SdrPageView* GetSdrPageView() const { return mpPageView.get(); }
 
 // A SdrView can be displayed on multiple Windows at the same time
 virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* 
pWindow);
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index ba0e252da346..f83f7fc9052b 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -185,7 +185,6 @@ SdrPaintView::SdrPaintView(
 SdrModel& rSdrModel,
 OutputDevice* pOut)
 :   mrSdrModelFromSdrView(rSdrModel),
-mpPageView(nullptr),
 maDefaultAttr(rSdrModel.GetItemPool()),
 mbBufferedOutputAllowed(false),
 mbBufferedOverlayAllowed(false),
@@ -394,8 +393,7 @@ void SdrPaintView::ClearPageView()
 if(mpPageView)
 {
 InvalidateAllWin();
-delete mpPageView;
-mpPageView = nullptr;
+mpPageView.reset();
 }
 }
 
@@ -406,14 +404,14 @@ SdrPageView* SdrPaintView::ShowSdrPage(SdrPage* pPage)
 if(mpPage

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

2018-05-02 Thread Noel Grandin
 svx/inc/svdibrow.hxx   |4 ++--
 svx/source/svdraw/svdibrow.cxx |7 +++
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit c3a8dc07be1beeccbefb9242a1fd1f270cb531ba
Author: Noel Grandin 
Date:   Wed May 2 10:36:41 2018 +0200

loplugin:useuniqueptr in SdrItemBrowserControl

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

diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 21104c99829d..e735cee9db59 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -39,7 +39,7 @@ friend class ImpItemEdit;
 OUString aWNameMemorized;
 Link aEntryChangedHdl;
 Link aSetDirtyHdl;
-ImpItemListRow* pCurrentChangeEntry;
+std::unique_ptr pCurrentChangeEntry;
 long   nLastWhichOfs;
 sal_uInt16 nLastWhich;
 bool bWhichesButNames;
@@ -83,7 +83,7 @@ public:
 */
 virtual OUString  GetCellText(long _nRow, sal_uInt16 _nColId) const 
override;
 
-const ImpItemListRow* GetCurrentChangeEntry() const { return 
pCurrentChangeEntry; }
+const ImpItemListRow* GetCurrentChangeEntry() const { return 
pCurrentChangeEntry.get(); }
 OUString GetNewEntryValue() const { return 
pEditControl->GetText(); }
 void SetEntryChangedHdl(const Link& rLink)
{ aEntryChangedHdl=rLink; }
 void SetSetDirtyHdl(const Link& rLink)
{ aSetDirtyHdl=rLink; }
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 0128792cfc4e..b8976cfa12c4 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -220,7 +220,7 @@ void SdrItemBrowserControl::dispose()
 {
 pEditControl.disposeAndClear();
 
-delete pCurrentChangeEntry;
+pCurrentChangeEntry.reset();
 
 Clear();
 BrowseBox::dispose();
@@ -501,7 +501,7 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t 
nPos)
 }
 aNewName += " - Type 'del' to reset to default.";
 pParent->SetText(aNewName);
-pCurrentChangeEntry=new ImpItemListRow(*pEntry);
+pCurrentChangeEntry.reset(new ImpItemListRow(*pEntry));
 bRet = true;
 }
 return bRet;
@@ -520,8 +520,7 @@ void SdrItemBrowserControl::BreakChangeEntry()
 {
 if (pEditControl!=nullptr) {
 pEditControl.disposeAndClear();
-delete pCurrentChangeEntry;
-pCurrentChangeEntry=nullptr;
+pCurrentChangeEntry.reset();
 vcl::Window* pParent=GetParent();
 pParent->SetText(aWNameMemorized);
 SetMode(MYBROWSEMODE);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-02 Thread Noel Grandin
 framework/source/uiconfiguration/imagemanagerimpl.cxx |   25 +++---
 framework/source/uiconfiguration/imagemanagerimpl.hxx |4 +-
 svx/source/inc/cell.hxx   |2 -
 svx/source/table/cell.cxx |   11 ++-
 svx/source/table/tableundo.cxx|5 +--
 5 files changed, 18 insertions(+), 29 deletions(-)

New commits:
commit ee3898f9a167a9d876b49d38f57f2b455cf28b48
Author: Noel Grandin 
Date:   Wed May 2 14:26:51 2018 +0200

loplugin:useuniqueptr in ImageManagerImpl

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

diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx 
b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 080ac0db8aa7..dfaf13572044 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -271,7 +271,7 @@ ImageList* ImageManagerImpl::implts_getUserImageList( 
vcl::ImageType nImageType
 if ( !m_pUserImageList[nImageType] )
 implts_loadUserImages( nImageType, m_xUserImageStorage, 
m_xUserBitmapsStorage );
 
-return m_pUserImageList[nImageType];
+return m_pUserImageList[nImageType].get();
 }
 
 void ImageManagerImpl::implts_initialize()
@@ -355,8 +355,7 @@ bool ImageManagerImpl::implts_loadUserImages(
 }
 
 // Delete old image list and create a new one from the 
read bitmap
-delete m_pUserImageList[nImageType];
-m_pUserImageList[nImageType] = new ImageList();
+m_pUserImageList[nImageType].reset(new ImageList());
 m_pUserImageList[nImageType]->InsertFromHorizontalStrip
 ( aUserBitmap, aUserImagesVector );
 return true;
@@ -381,8 +380,7 @@ bool ImageManagerImpl::implts_loadUserImages(
 }
 
 // Destroy old image list - create a new empty one
-delete m_pUserImageList[nImageType];
-m_pUserImageList[nImageType] = new ImageList;
+m_pUserImageList[nImageType].reset(new ImageList);
 
 return true;
 }
@@ -504,9 +502,9 @@ CmdImageList* ImageManagerImpl::implts_getDefaultImageList()
 SolarMutexGuard g;
 
 if ( !m_pDefaultImageList )
-m_pDefaultImageList = new CmdImageList( m_xContext, 
m_aModuleIdentifier );
+m_pDefaultImageList.reset(new CmdImageList( m_xContext, 
m_aModuleIdentifier ));
 
-return m_pDefaultImageList;
+return m_pDefaultImageList.get();
 }
 
 ImageManagerImpl::ImageManagerImpl( const uno::Reference< 
uno::XComponentContext >& rxContext,::cppu::OWeakObject* pOwner,bool 
_bUseGlobal ) :
@@ -548,13 +546,11 @@ void ImageManagerImpl::dispose()
 m_bDisposed = true;
 
 // delete user and default image list on dispose
-for (ImageList*& n : m_pUserImageList)
+for (auto& n : m_pUserImageList)
 {
-delete n;
-n = nullptr;
+n.reset();
 }
-delete m_pDefaultImageList;
-m_pDefaultImageList = nullptr;
+m_pDefaultImageList.reset();
 }
 
 }
@@ -1234,10 +1230,9 @@ void ImageManagerImpl::clear()
 {
 SolarMutexGuard g;
 
-for (ImageList* & n : m_pUserImageList)
+for (auto & n : m_pUserImageList)
 {
-delete n;
-n = nullptr;
+n.reset();
 }
 }
 } // namespace framework
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.hxx 
b/framework/source/uiconfiguration/imagemanagerimpl.hxx
index 34cc99dd2f53..21b4ac342a2d 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.hxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.hxx
@@ -177,12 +177,12 @@ namespace framework
 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
 ::cppu::OWeakObject*   
 m_pOwner;
 rtl::Reference< GlobalImageList >  
 m_pGlobalImageList;
-CmdImageList*  
 m_pDefaultImageList;
+std::unique_ptr  
 m_pDefaultImageList;
 OUString   
m_aModuleIdentifier;
 OUString   
m_aResourceString;
 osl::Mutex m_mutex;
 ::cppu::OMultiTypeInterfaceContainerHelper 
 m_aListenerContainer;   /// container for ALL Listener
-o3tl::enumarray 
 m_pUserImageList;
+o3tl::enumarray> 
 m_pUserImageList;
 o3tl::enumarray   
 m_bUse

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

2018-05-02 Thread Noel Grandin
 compilerplugins/clang/test/useuniqueptr.cxx|   10 ++
 compilerplugins/clang/useuniqueptr.cxx |   13 +++--
 connectivity/source/drivers/dbase/DIndex.cxx   |6 +-
 connectivity/source/drivers/dbase/DIndexes.cxx |4 ++--
 connectivity/source/drivers/dbase/DTable.cxx   |6 ++
 connectivity/source/drivers/file/FTable.cxx|   10 --
 connectivity/source/inc/dbase/DIndex.hxx   |2 +-
 connectivity/source/inc/dbase/DTable.hxx   |2 +-
 connectivity/source/inc/file/FTable.hxx|4 ++--
 9 files changed, 34 insertions(+), 23 deletions(-)

New commits:
commit b66ba0f0f297f7190f8d969486e07ede52987188
Author: Noel Grandin 
Date:   Wed May 2 15:42:39 2018 +0200

make createStream_simpleError return std::unique_ptr

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

diff --git a/connectivity/source/drivers/dbase/DIndex.cxx 
b/connectivity/source/drivers/dbase/DIndex.cxx
index e07402af2198..9468c3d3ad25 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -310,11 +310,7 @@ void ODbaseIndex::Release(bool bSave)
 
 void ODbaseIndex::closeImpl()
 {
-if(m_pFileStream)
-{
-delete m_pFileStream;
-m_pFileStream = nullptr;
-}
+m_pFileStream.reset();
 }
 
 ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, bool 
bLoad)
diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx 
b/connectivity/source/drivers/dbase/DIndexes.cxx
index ee6a12f1906d..643c6740 100644
--- a/connectivity/source/drivers/dbase/DIndexes.cxx
+++ b/connectivity/source/drivers/dbase/DIndexes.cxx
@@ -52,7 +52,7 @@ sdbcx::ObjectType ODbaseIndexes::createObject(const OUString& 
_rName)
 }
 
 sdbcx::ObjectType xRet;
-SvStream* pFileStream = 
::connectivity::file::OFileTable::createStream_simpleError(sFile, 
StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
+std::unique_ptr pFileStream = 
::connectivity::file::OFileTable::createStream_simpleError(sFile, 
StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
 if(pFileStream)
 {
 pFileStream->SetEndian(SvStreamEndian::LITTLE);
@@ -61,7 +61,7 @@ sdbcx::ObjectType ODbaseIndexes::createObject(const OUString& 
_rName)
 
 pFileStream->Seek(0);
 ReadHeader(*pFileStream, aHeader);
-delete pFileStream;
+pFileStream.reset();
 
 ODbaseIndex* pIndex = new ODbaseIndex(m_pTable,aHeader,_rName);
 xRet = pIndex;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index 9bcec1816b39..87be422f133c 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -978,8 +978,7 @@ void ODbaseTable::FileClose()
 if (m_pMemoStream && m_pMemoStream->IsWritable())
 m_pMemoStream->Flush();
 
-delete m_pMemoStream;
-m_pMemoStream = nullptr;
+m_pMemoStream.reset();
 
 ODbaseTable_BASE::FileClose();
 }
@@ -1383,8 +1382,7 @@ bool ODbaseTable::CreateMemoFile(const INetURLObject& 
aFile)
 (*m_pMemoStream).WriteUInt32( 1 );  // pointer to the 
first free block
 
 m_pMemoStream->Flush();
-delete m_pMemoStream;
-m_pMemoStream = nullptr;
+m_pMemoStream.reset();
 return true;
 }
 
diff --git a/connectivity/source/drivers/file/FTable.cxx 
b/connectivity/source/drivers/file/FTable.cxx
index 9ddadb19b86e..6358874f93f7 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -155,8 +155,7 @@ void OFileTable::FileClose()
 if (m_pFileStream && m_pFileStream->IsWritable())
 m_pFileStream->Flush();
 
-delete m_pFileStream;
-m_pFileStream = nullptr;
+m_pFileStream.reset();
 
 if (m_pBuffer)
 {
@@ -191,13 +190,12 @@ void OFileTable::dropColumn(sal_Int32 /*_nPos*/)
 }
 
 
-SvStream* OFileTable::createStream_simpleError( const OUString& _rFileName, 
StreamMode _eOpenMode)
+std::unique_ptr OFileTable::createStream_simpleError( const 
OUString& _rFileName, StreamMode _eOpenMode)
 {
-SvStream* pReturn = ::utl::UcbStreamHelper::CreateStream( _rFileName, 
_eOpenMode, bool(_eOpenMode & StreamMode::NOCREATE));
+std::unique_ptr pReturn(::utl::UcbStreamHelper::CreateStream( 
_rFileName, _eOpenMode, bool(_eOpenMode & StreamMode::NOCREATE)));
 if (pReturn && (ERRCODE_NONE != pReturn->GetErrorCode()))
 {
-delete pReturn;
-pReturn = nullptr;
+pReturn.reset();
 }
 return pReturn;
 }
diff --git a/connectivity/source/inc/dbase/DIndex.hxx 
b/connectivity/source/inc/dbase/DIndex.hxx
index 6e4356c4c3ee..bcb273aec506 100644
--- a/connectivity/source/inc/dbase/DIndex.hxx
+++ b/connectivity/source/inc/dbase/DIndex.hxx
@@ -68,7 +68,7 @@ namespace connectivit

[Libreoffice-commits] core.git: chart2/source offapi/com qadevOOo/objdsc qadevOOo/tests

2018-05-02 Thread Tomaž Vajngerl
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx  |2 
 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx |   51 
++
 offapi/com/sun/star/chart/ChartDataPointProperties.idl   |   12 ++
 offapi/com/sun/star/chart/LineDiagram.idl|   10 +
 qadevOOo/objdsc/sch/com.sun.star.comp.office.ChXDataPoint.csv|1 
 qadevOOo/objdsc/sch/com.sun.star.comp.office.ChXDataRow.csv  |1 
 qadevOOo/objdsc/sch/com.sun.star.comp.office.ChXDiagram.csv  |1 
 qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java |   22 

 qadevOOo/tests/java/ifc/chart/_LineDiagram.java  |   22 

 9 files changed, 116 insertions(+), 6 deletions(-)

New commits:
commit 7f580d4fba2da90da2ccfbad7f0e21c12e810a26
Author: Tomaž Vajngerl 
Date:   Thu Apr 26 17:03:55 2018 +0900

[API CHANGE] revert SymbolBitmapURL impl, add SymbolBitmap property

This adds back the implementation for setting the SymbolBitmapURL
property (getting returns an empty string) and adds SymbolBitmap
property to the UNO API (LineDiagram.idl).

SymbolBitmapURL property was already deprecated, but we still need
to add the SymbolBitmap for compatibility.

[ Miklos Vajna: updated qadevOOo tests to handle the new write-only
properties. ]

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

diff --git 
a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index f49bcb0d4fe5..31cf7ff0c9ba 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -591,7 +591,7 @@ beans::PropertyState SAL_CALL 
DataSeriesPointWrapper::getPropertyState( const OU
 beans::PropertyState aState( beans::PropertyState_DIRECT_VALUE );
 try
 {
-if (rPropertyName == "SymbolBitmap")
+if (rPropertyName == "SymbolBitmap" || rPropertyName == 
"SymbolBitmapURL")
 {
 uno::Any aAny = WrappedPropertySet::getPropertyValue("SymbolType");
 sal_Int32 nVal = css::chart::ChartSymbolType::NONE;
diff --git 
a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx 
b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index a0bd74b8c82b..10a756ef1f9c 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -58,6 +59,16 @@ public:
tSeriesOrDiagramPropertyType 
ePropertyType);
 };
 
+class WrappedSymbolBitmapURLProperty : public 
WrappedSeriesOrDiagramProperty
+{
+public:
+virtual OUString getValueFromSeries(const Reference& 
xSeriesPropertySet) const override;
+virtual void setValueToSeries(const Reference & 
xSeriesPropertySet, OUString const & xNewGraphicURL) const override;
+
+explicit WrappedSymbolBitmapURLProperty(const 
std::shared_ptr& spChart2ModelContact,
+tSeriesOrDiagramPropertyType 
ePropertyType);
+};
+
 class WrappedSymbolBitmapProperty : public 
WrappedSeriesOrDiagramProperty>
 {
 public:
@@ -96,6 +107,7 @@ enum
 {
 //symbol properties
 PROP_CHART_SYMBOL_TYPE = FAST_PROPERTY_ID_START_CHART_SYMBOL_PROP,
+PROP_CHART_SYMBOL_BITMAP_URL,
 PROP_CHART_SYMBOL_BITMAP,
 PROP_CHART_SYMBOL_SIZE,
 PROP_CHART_SYMBOL_AND_LINES
@@ -151,6 +163,7 @@ void lcl_addWrappedProperties( std::vector< 
WrappedProperty* >& rList
 , tSeriesOrDiagramPropertyType 
ePropertyType )
 {
 rList.push_back( new WrappedSymbolTypeProperty( spChart2ModelContact, 
ePropertyType ) );
+rList.push_back( new WrappedSymbolBitmapURLProperty( spChart2ModelContact, 
ePropertyType ) );
 rList.push_back( new WrappedSymbolBitmapProperty( spChart2ModelContact, 
ePropertyType ) );
 rList.push_back( new WrappedSymbolSizeProperty( spChart2ModelContact, 
ePropertyType  ) );
 rList.push_back( new WrappedSymbolAndLinesProperty( spChart2ModelContact, 
ePropertyType  ) );
@@ -166,6 +179,12 @@ void WrappedSymbolProperties::addProperties( std::vector< 
Property > & rOutPrope
   beans::PropertyAttribute::BOUND
   | beans::PropertyAttribute::MAYBEDEFAULT );
 
+rOutProperties.emplace_back( "SymbolBitmapURL",
+  PROP_CHART_SYMBOL_BITMAP_URL,
+  cppu::UnoType::get(),
+  beans::PropertyAttribute::BOUND
+  | beans::PropertyAttribute::MAYBEDEFAULT );
+
 rOutProperties.emplace_back( "SymbolBitmap",
   PROP_CHART_SYMBOL_BI

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

2018-05-02 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/tdf116801.docx|binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx  |   12 
 writerfilter/source/dmapper/StyleSheetTable.cxx |4 ++--
 3 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit ebcf27d419e41a497242c98fcfec08a2088c0720
Author: Miklos Vajna 
Date:   Wed May 2 22:04:08 2018 +0200

tdf#116801 DOCX import: char styles have no IsAutoUpdate property

See sw/source/core/unocore/unomapproperties.hxx:447,
UNO_NAME_IS_AUTO_UPDATE is part of the COMMON_PARA_STYLE_PROPERTIES
define. So it's not "list styles don't have this", but "only paragraph
styles have this".

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf116801.docx 
b/sw/qa/extras/ooxmlexport/data/tdf116801.docx
new file mode 100644
index ..f904546cf38b
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf116801.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 2fa19d54e65d..eb42cee254a2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -369,6 +369,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116985, "tdf116985.docx")
 CPPUNIT_ASSERT(nWidth > 4000);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf116801, "tdf116801.docx")
+{
+uno::Reference xTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTablesSupplier->getTextTables(),
+uno::UNO_QUERY);
+// This raised a lang::IndexOutOfBoundsException, table was missing from
+// the import result.
+uno::Reference xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xCell(xTable->getCellByName("D1"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("D1"), xCell->getString());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 3fe88227d92f..398a7ab0086f 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1200,8 +1200,8 @@ void StyleSheetTable::ApplyStyleSheets( const 
FontTablePtr& rFontTable )
 xPropertySet->setPropertyValue("StyleInteropGrabBag", 
uno::makeAny(aGrabBag));
 }
 
-// List styles don't support automatic update.
-if (pEntry->bAutoRedefine && !bListStyle)
+// Only paragraph styles support automatic updates.
+if (pEntry->bAutoRedefine && bParaStyle)
 xPropertySet->setPropertyValue("IsAutoUpdate", 
uno::makeAny(true));
 }
 else if(pEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits