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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/filter/excel/excrecds.cxx |9 +
 sc/source/filter/inc/excrecds.hxx   |2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit c135f51b050dfa7ef095fe8a5b73cde37219a8dd
Author: Noel Grandin 
AuthorDate: Wed Aug 15 14:36:48 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:58:39 2018 +0200

loplugin:returnconstant in XclExpAutofilter

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

diff --git a/sc/source/filter/excel/excrecds.cxx 
b/sc/source/filter/excel/excrecds.cxx
index af3a90b75f2d..804f815c59d1 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -702,7 +702,10 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& 
rEntry )
 return true;
 
 if (GetOutput() != EXC_OUTPUT_BINARY && rItems.size() > 1)
-return AddMultiValueEntry(rEntry);
+{
+AddMultiValueEntry(rEntry);
+return true;
+}
 
 bool bConflict = false;
 OUString  sText;
@@ -809,15 +812,13 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& 
rEntry )
 return bConflict;
 }
 
-bool XclExpAutofilter::AddMultiValueEntry( const ScQueryEntry& rEntry )
+void XclExpAutofilter::AddMultiValueEntry( const ScQueryEntry& rEntry )
 {
 meType = MultiValue;
 const ScQueryEntry::QueryItemsType& rItems = rEntry.GetQueryItems();
 ScQueryEntry::QueryItemsType::const_iterator itr = rItems.begin(), itrEnd 
= rItems.end();
 for (; itr != itrEnd; ++itr)
 maMultiValues.push_back(itr->maString.getString());
-
-return false;
 }
 
 void XclExpAutofilter::WriteBody( XclExpStream& rStrm )
diff --git a/sc/source/filter/inc/excrecds.hxx 
b/sc/source/filter/inc/excrecds.hxx
index f201a9578638..1364c678f609 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -393,7 +393,7 @@ public:
 
 boolHasCondition() const;
 boolAddEntry( const ScQueryEntry& rEntry );
-boolAddMultiValueEntry( const ScQueryEntry& rEntry );
+voidAddMultiValueEntry( const ScQueryEntry& rEntry );
 
 virtual voidSaveXml( XclExpXmlStream& rStrm ) override;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/inc/gridwin.hxx  |2 +-
 sc/source/ui/view/gridwin.cxx |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 9278de7a528052759bc3d94dcf6aba58ad6c17c6
Author: Noel Grandin 
AuthorDate: Wed Aug 15 14:34:35 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:58:17 2018 +0200

loplugin:returnconstant in ScGridWindow

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

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index ff0bd43ea955..b44976272721 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -235,7 +235,7 @@ class ScGridWindow : public vcl::Window, public 
DropTargetHelper, public DragSou
 
 boolHasScenarioButton( const Point& rPosPixel, ScRange& 
rScenRange );
 
-boolDropScroll( const Point& rMousePos );
+voidDropScroll( const Point& rMousePos );
 
 sal_Int8AcceptPrivateDrop( const AcceptDropEvent& rEvt );
 sal_Int8ExecutePrivateDrop( const ExecuteDropEvent& rEvt );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 21ca80104434..4bbdc97493e0 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3325,7 +3325,7 @@ void ScGridWindow::UpdateInputContext()
 // sensitive range (Pixel)
 #define SCROLL_SENSITIVE 20
 
-bool ScGridWindow::DropScroll( const Point& rMousePos )
+void ScGridWindow::DropScroll( const Point& rMousePos )
 {
 SCCOL nDx = 0;
 SCROW nDy = 0;
@@ -3355,8 +3355,6 @@ bool ScGridWindow::DropScroll( const Point& rMousePos )
 if ( nDy != 0 )
 pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
 }
-
-return false;
 }
 
 static bool lcl_TestScenarioRedliningDrop( const ScDocument* pDoc, const 
ScRange& aDragRange)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportController.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit c60ef370a39e91974a242c7f780d7d8725fea7da
Author: Julien Nabet 
AuthorDate: Thu Aug 16 07:30:39 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:57:57 2018 +0200

Related tdf#117795: comment fix

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

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 1a4964a2ed2c..57c38e54109a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4175,6 +4175,10 @@ bool 
OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,
 {
 const uno::Reference< beans::XPropertySet > 
xControlModel(*aIter,uno::UNO_QUERY);
 if ( xControlModel.is() )
+// tdf#117795: some elements may have not some property
+// eg class "OFixedLine" doesn't have property "CharFontName"
+// so in this case, instead of crashing when selecting all and 
changing font
+// just display a warning
 try
 {
 xControlModel->setPropertyValue(_sProperty,_aValue);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - reportdesign/source

2018-08-15 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportController.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 97af032407344766658608838ca1eb02ce72b46e
Author: Julien Nabet 
AuthorDate: Sun Aug 12 11:39:04 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:57:14 2018 +0200

tdf#117795: not all elements have ChartFontName property

See bt https://bugs.documentfoundation.org/attachment.cgi?id=144114
In this bugtracker we tried to apply a change of fontname on 
reportdesign::OFixedLine

Change-Id: I60ee5ca9f967fc71939e2f57ecd9de7edd680958
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit 3512079dc42a6472136f9c229fc9ea0b0033ebf9)
Reviewed-on: https://gerrit.libreoffice.org/59145
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 32898fcc74a6..973e036183ad 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4147,7 +4147,14 @@ bool 
OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,
 {
 const uno::Reference< beans::XPropertySet > 
xControlModel(*aIter,uno::UNO_QUERY);
 if ( xControlModel.is() )
-xControlModel->setPropertyValue(_sProperty,_aValue);
+try
+{
+xControlModel->setPropertyValue(_sProperty,_aValue);
+}
+catch(const UnknownPropertyException& e)
+{
+SAL_WARN("reportdesign", "UnknowPropertyException:" << e);
+}
 }
 
 return !aSelection.empty();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |   12 ++--
 sw/source/filter/ww8/docxattributeoutput.hxx |2 +-
 sw/source/filter/ww8/ww8toolbar.cxx  |2 +-
 3 files changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 4f286af9e85e979382e2c1cea7e0b80640044234
Author: Noel Grandin 
AuthorDate: Wed Aug 15 13:41:52 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:55:47 2018 +0200

fix bug in SwCTBWrapper::ImportCustomToolBar

the code structure here and at the callsite indicats that wants true to
mean "successfully imported"

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

diff --git a/sw/source/filter/ww8/ww8toolbar.cxx 
b/sw/source/filter/ww8/ww8toolbar.cxx
index a807a6b35489..fa868eda0350 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -205,7 +205,7 @@ bool SwCTBWrapper::ImportCustomToolBar( SfxObjectShell& 
rDocSh )
 continue;
 }
 }
-return false;
+return true;
 }
 
 Customization::Customization( SwCTBWrapper* wrapper )
commit 87b04949ee633c9bd8f1407394a104ec70e4031d
Author: Noel Grandin 
AuthorDate: Wed Aug 15 10:51:03 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:55:31 2018 +0200

loplugin:returnconstant in DocxAttributeOutput

It appears that the last code which returned something other than true
from PostponeOLE was removed in
commit 21d356f691a7c1859f85a19c79060a3d31cffc21
Date:   Fri Feb 28 10:44:53 2014 +0100
sw: export OLE objects outside run properties

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

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index f97ffe2645a6..3696f11070ef 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4756,14 +4756,7 @@ void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* 
pSdrObj, SwOLENode& rOL
 return;
 if( WriteOLEMath( rOLENode ))
 return;
-if( PostponeOLE( rOLENode, rSize, pFlyFrameFormat ))
-return;
-// Then we fall back to just export the object as a graphic.
-if( !m_pPostponedGraphic )
-FlyFrameGraphic( nullptr, rSize, pFlyFrameFormat, &rOLENode );
-else
-// w:drawing should not be inside w:rPr, so write it out later
-m_pPostponedGraphic->push_back(PostponedGraphic(nullptr, rSize, 
pFlyFrameFormat, &rOLENode, nullptr));
+PostponeOLE( rOLENode, rSize, pFlyFrameFormat );
 }
 
 bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& 
rSize )
@@ -5183,14 +5176,13 @@ bool DocxAttributeOutput::ExportAsActiveXControl(const 
SdrObject* pObject) const
 return true;
 }
 
-bool DocxAttributeOutput::PostponeOLE( SwOLENode& rNode, const Size& rSize, 
const SwFlyFrameFormat* pFlyFrameFormat )
+void DocxAttributeOutput::PostponeOLE( SwOLENode& rNode, const Size& rSize, 
const SwFlyFrameFormat* pFlyFrameFormat )
 {
 if( !m_pPostponedOLEs )
 //cannot be postponed, try to write now
 WriteOLE( rNode, rSize, pFlyFrameFormat );
 else
 m_pPostponedOLEs->push_back( PostponedOLE( &rNode, rSize, 
pFlyFrameFormat ) );
-return true;
 }
 
 /*
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index 4d380bf6e656..e4c331ad0dcc 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -392,7 +392,7 @@ private:
 void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& 
rSize, const SwFlyFrameFormat* pFlyFrameFormat);
 bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize );
 bool WriteOLEMath( const SwOLENode& rNode );
-bool PostponeOLE( SwOLENode& rNode, const Size& rSize, const 
SwFlyFrameFormat* pFlyFrameFormat );
+void PostponeOLE( SwOLENode& rNode, const Size& rSize, const 
SwFlyFrameFormat* pFlyFrameFormat );
 void WriteOLE( SwOLENode& rNode, const Size& rSize, const 
SwFlyFrameFormat* rFlyFrameFormat );
 
 void WriteActiveXControl(const SdrObject* pObject, const SwFrameFormat& 
rFrameFormat, bool bInsideRun);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/inc/viewutil.hxx  |2 +-
 sc/source/ui/view/viewutil.cxx |3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 01caa0ffbca6f1ee30cf0f25d2e462b12cb7535c
Author: Noel Grandin 
AuthorDate: Wed Aug 15 13:42:09 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:56:07 2018 +0200

loplugin:returnconstant in ScViewUtil

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

diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 5678033c969a..8d57370b950f 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -43,7 +43,7 @@ enum class ScUpdateMode { All, Marks };
 class SC_DLLPUBLIC ScViewUtil
 {
 public:
-static bool ExecuteCharMap( const SvxFontItem&  rOldFont,
+static void ExecuteCharMap( const SvxFontItem&  rOldFont,
 SfxViewFrame&   rFrame );
 
 static bool IsActionShown( const ScChangeAction& rAction,
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 60689970c0b4..c2150253e692 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -325,7 +325,7 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, 
SfxBindings& rBindings, sal
 rSet.DisableItem( nSlotId );
 }
 
-bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
+void ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
  SfxViewFrame& rFrame )
 {
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -334,7 +334,6 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& 
rOldFont,
 aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), 
rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), 
aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
 ScopedVclPtr 
pDlg(pFact->CreateCharMapDialog(rFrame.GetWindow().GetFrameWeld(), aSet, true));
 pDlg->Execute();
-return false;
 }
 
 bool ScViewUtil::IsFullScreen( const SfxViewShell& rViewShell )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/inc/content.hxx|2 +-
 sc/source/ui/navipi/content.cxx |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 4dc748525c5280b821ee07fbb82ac42147352d31
Author: Noel Grandin 
AuthorDate: Wed Aug 15 13:42:29 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:56:26 2018 +0200

loplugin:returnconstant in ScContentTree

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

diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 17f83be89d94..7aad4b005442 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -139,7 +139,7 @@ public:
 voidActiveDocChanged();
 voidResetManualDoc();
 voidSetManualDoc(const OUString& rName);
-boolLoadFile(const OUString& rUrl);
+voidLoadFile(const OUString& rUrl);
 voidSelectDoc(const OUString& rName);
 voidSelectEntryByName(const ScContentId nRoot, const OUString& rName);
 
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 9d811e341c50..f06dc527471b 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1462,7 +1462,7 @@ IMPL_LINK_NOARG(ScContentTree, ExecDragHdl, void*, void)
 DoDrag();
 }
 
-bool ScContentTree::LoadFile( const OUString& rUrl )
+void ScContentTree::LoadFile( const OUString& rUrl )
 {
 OUString aDocName = rUrl;
 sal_Int32 nPos = aDocName.indexOf('#');
@@ -1487,8 +1487,6 @@ bool ScContentTree::LoadFile( const OUString& rUrl )
 }
 
 //  document is closed again by ScDocumentLoader in dtor
-
-return false;
 }
 
 void ScContentTree::InitWindowBits( bool bButtons )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sdext/source/presenter/PresenterFrameworkObserver.cxx |   17 +++--
 sdext/source/presenter/PresenterFrameworkObserver.hxx |7 ---
 2 files changed, 3 insertions(+), 21 deletions(-)

New commits:
commit ef62f7bdfc5ff6e1a2c23f67a3339fd24608f4f5
Author: Noel Grandin 
AuthorDate: Wed Aug 15 11:05:29 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:55:08 2018 +0200

loplugin:returnconstant in PresenterFrameworkObserver

the Predicate stuff is effectively unused

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

diff --git a/sdext/source/presenter/PresenterFrameworkObserver.cxx 
b/sdext/source/presenter/PresenterFrameworkObserver.cxx
index b153f385acf8..55e0bf891da9 100644
--- a/sdext/source/presenter/PresenterFrameworkObserver.cxx
+++ b/sdext/source/presenter/PresenterFrameworkObserver.cxx
@@ -29,11 +29,9 @@ namespace sdext { namespace presenter {
 
 PresenterFrameworkObserver::PresenterFrameworkObserver (
 const 
css::uno::Reference&rxController,
-const Predicate& rPredicate,
 const Action& rAction)
 : PresenterFrameworkObserverInterfaceBase(m_aMutex),
   mxConfigurationController(rxController),
-  maPredicate(rPredicate),
   maAction(rAction)
 {
 if ( ! mxConfigurationController.is())
@@ -48,7 +46,7 @@ PresenterFrameworkObserver::PresenterFrameworkObserver (
 }
 else
 {
-rAction(maPredicate());
+rAction(true);
 }
 }
 
@@ -62,15 +60,9 @@ void PresenterFrameworkObserver::RunOnUpdateEnd (
 {
 new PresenterFrameworkObserver(
 rxController,
-&PresenterFrameworkObserver::True,
 rAction);
 }
 
-bool PresenterFrameworkObserver::True()
-{
-return true;
-}
-
 void SAL_CALL PresenterFrameworkObserver::disposing()
 {
 if (maAction)
@@ -81,8 +73,6 @@ void SAL_CALL PresenterFrameworkObserver::disposing()
 void PresenterFrameworkObserver::Shutdown()
 {
 maAction = Action();
-maPredicate = Predicate();
-
 if (mxConfigurationController != nullptr)
 {
 mxConfigurationController->removeConfigurationChangeListener(this);
@@ -109,14 +99,13 @@ void SAL_CALL 
PresenterFrameworkObserver::notifyConfigurationChange (
 bool bDispose(false);
 
 Action aAction (maAction);
-Predicate aPredicate (maPredicate);
 if (rEvent.Type == "ConfigurationUpdateEnd")
 {
 Shutdown();
-aAction(aPredicate());
+aAction(true);
 bDispose = true;
 }
-else if (aPredicate())
+else
 {
 Shutdown();
 aAction(true);
diff --git a/sdext/source/presenter/PresenterFrameworkObserver.hxx 
b/sdext/source/presenter/PresenterFrameworkObserver.hxx
index 33e8e4fff31d..c5614229adf3 100644
--- a/sdext/source/presenter/PresenterFrameworkObserver.hxx
+++ b/sdext/source/presenter/PresenterFrameworkObserver.hxx
@@ -41,7 +41,6 @@ class PresenterFrameworkObserver
   public PresenterFrameworkObserverInterfaceBase
 {
 public:
-typedef ::std::function Predicate;
 typedef ::std::function Action;
 
 PresenterFrameworkObserver(const PresenterFrameworkObserver&) = delete;
@@ -58,7 +57,6 @@ public:
 
 private:
 css::uno::Reference 
mxConfigurationController;
-Predicate maPredicate;
 Action maAction;
 
 /** Create a new PresenterFrameworkObserver object.
@@ -70,15 +68,10 @@ private:
 */
 PresenterFrameworkObserver (
 const 
css::uno::Reference&rxController,
-const Predicate& rPredicate,
 const Action& rAction);
 virtual ~PresenterFrameworkObserver() override;
 
 void Shutdown();
-
-/** Predicate that always returns true.
-*/
-static bool True();
 };
 
 } }  // end of namespace ::sdext::presenter
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/inc/tokenuno.hxx |2 +-
 sc/source/filter/oox/defnamesbuffer.cxx |2 +-
 sc/source/ui/unoobj/cellsuno.cxx|2 +-
 sc/source/ui/unoobj/nameuno.cxx |2 +-
 sc/source/ui/unoobj/tokenuno.cxx|6 ++
 sw/source/uibase/inc/wrtsh.hxx  |6 +++---
 sw/source/uibase/index/toxmgr.cxx   |3 ++-
 sw/source/uibase/wrtsh/wrtsh2.cxx   |4 +---
 sw/source/uibase/wrtsh/wrtsh4.cxx   |   10 --
 9 files changed, 16 insertions(+), 21 deletions(-)

New commits:
commit 0025cb72f2b6b19d63fb1393df910845f255a6d0
Author: Noel Grandin 
AuthorDate: Tue Aug 14 17:33:40 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:54:52 2018 +0200

loplugin:returnconstant in SwWrtShell

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

diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 797bd3e525da..95877cbfe9d9 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -310,7 +310,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
 
 // indexes
 voidInsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 
nullptr);
-boolUpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 
nullptr);
+voidUpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 
nullptr);
 
 // numbering and bullets
 /**
@@ -539,8 +539,8 @@ private:
 SAL_DLLPRIVATE bool  PopCursor(bool bUpdate, bool bSelect = false);
 
 // take END cursor along when PageUp / -Down
-SAL_DLLPRIVATE bool SttWrd();
-SAL_DLLPRIVATE bool EndWrd();
+SAL_DLLPRIVATE void SttWrd();
+SAL_DLLPRIVATE void EndWrd();
 SAL_DLLPRIVATE bool NxtWrd_();
 SAL_DLLPRIVATE bool PrvWrd_();
 // #i92468#
diff --git a/sw/source/uibase/index/toxmgr.cxx 
b/sw/source/uibase/index/toxmgr.cxx
index b5b8b31e9198..d1b78368a7c3 100644
--- a/sw/source/uibase/index/toxmgr.cxx
+++ b/sw/source/uibase/index/toxmgr.cxx
@@ -443,7 +443,8 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& 
rDesc,
 pDoc->ChgTOX(*pTOX, *pNewTOX);
 
 pTOX->DisableKeepExpression();
-bRet = pSh->UpdateTableOf(*pTOX, pSet);
+pSh->UpdateTableOf(*pTOX, pSet);
+bRet = false;
 pTOX->EnableKeepExpression();
 
 if (pDoc->GetIDocumentUndoRedo().DoesUndo())
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx 
b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 1dfaa712ecfe..a00686c468da 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -318,7 +318,7 @@ void SwWrtShell::InsertTableOf(const SwTOXBase& rTOX, const 
SfxItemSet* pSet)
 
 // Update directory - remove selection
 
-bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
+void SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
 {
 if(CanInsert())
 {
@@ -333,8 +333,6 @@ bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const 
SfxItemSet* pSet)
 }
 }
 }
-
-return false;
 }
 
 // handler for click on the field given as parameter.
diff --git a/sw/source/uibase/wrtsh/wrtsh4.cxx 
b/sw/source/uibase/wrtsh/wrtsh4.cxx
index cabec2f89244..8009ce98037b 100644
--- a/sw/source/uibase/wrtsh/wrtsh4.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh4.cxx
@@ -27,10 +27,10 @@
 // non-sentence separators on sentence separator.
 // The begin of paragraph is also the word beginning.
 
-bool SwWrtShell::SttWrd()
+void SwWrtShell::SttWrd()
 {
 if ( IsSttPara() )
-return true;
+return;
 // Create temporary cursor without selection.
 Push();
 ClearMark();
@@ -40,7 +40,6 @@ bool SwWrtShell::SttWrd()
 ClearMark();
 // If Mark was previously set, summarize.
 Combine();
-return true;
 }
 
 // The end of a word is the follow of separator to nonseparator.
@@ -48,10 +47,10 @@ bool SwWrtShell::SttWrd()
 // punctuation marks.
 // The end of a paragraph is also the end of a word.
 
-bool SwWrtShell::EndWrd()
+void SwWrtShell::EndWrd()
 {
 if ( IsEndWrd() )
-return true;
+return;
 // Create temporary cursor without selection.
 Push();
 ClearMark();
@@ -61,7 +60,6 @@ bool SwWrtShell::EndWrd()
 ClearMark();
 // If Mark was previously set, summarize.
 Combine();
-return true;
 }
 
 bool SwWrtShell::NxtWrd_()
commit c5ff0696bddc6fdcdc92d7585c70e2b5e202d11b
Author: Noel Grandin 
AuthorDate: Tue Aug 14 17:14:18 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:54:42 2018 +0200

loplugin:returnconstant in ScTokenConversion

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

diff --git a/sc/inc/tokenuno.hxx b/sc/inc/tokenuno.hxx
index 2eab2a816f02..4946c5b8a536 100644
--

Re: error creating LO installation dmg file using make

2018-08-15 Thread Stephan Bergmann

On 16/08/18 05:50, Ch g wrote:

autogen.input:

--enable-dbgutil
#--enable-debug
--disable-ccache
#--disable-cve-tests
--with-jdk-home=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
--with-ant-home=/usr/local/Cellar/ant/1.10.5/libexec
--without-junit
--without-help
--without-myspell-dicts
--without-doxygen
--with-build-version=$(date +"Mac%Y-%m-%d")
--with-distro=LibreOfficeMacOSX
--with-package-format=dmg

command used:

make clean && ./autogen.sh && make -j 4 build-nocheck 2>&1

(I always get CppUnitTest errors without "build-nocheck" for both macos 
10.13 and ubuntu 16.04.5/18.04.1)



Is "make" with "--with-distro=LibreOfficeMacOSX" and 
"--with-package-format=dmg" the correct way to create LO installation 
dmg file?


Your setup looks correct; beats me why it's failing for you that way. 
(I haven't built macOS packages myself in a while, but can check tonight 
whether any general error has sneaked in there lately.)

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


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx   |3 +++
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx   |5 +
 writerfilter/source/dmapper/PropertyMap.cxx |2 ++
 3 files changed, 10 insertions(+)

New commits:
commit 9202597373f745b7b83dde1396636e1e619e4e81
Author: Justin Luth 
AuthorDate: Tue Aug 14 13:08:54 2018 +0300
Commit: Justin Luth 
CommitDate: Thu Aug 16 06:40:30 2018 +0200

tdf#106572 writerfilter: don't write to dummy paragraph

I found a few existing unit tests that this fixes, and
a few unit tests that already worked without this. So
something else is at play here, but it doesn't appear
to be hurt by this fix since each one still starts
with "First Page" style.

Change-Id: Idc61279fc5fddc9df62b6ab7a9bcd3822d52cbbb
Reviewed-on: https://gerrit.libreoffice.org/59033
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 04f393309ee0..beaa1b936cc4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -299,6 +299,9 @@ DECLARE_OOXMLEXPORT_TEST(testSegFaultWhileSave, 
"test_segfault_while_save.docx")
 if (!pXmlDoc)
 return;
 CPPUNIT_ASSERT_EQUAL(static_cast(6137), getXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tblGrid/w:gridCol[2]", "w").toInt32());
+
+// tdf#106572 - preventative test matching danger conditions, but imported 
OK anyway
+CPPUNIT_ASSERT_EQUAL(OUString("First Page"), 
getProperty(getParagraphOrTable(1), "PageDescName"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(fdo69656, "Table_cell_auto_width_fdo69656.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 404c40b1b149..040b4e4766ff 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -760,6 +760,11 @@ DECLARE_OOXMLEXPORT_TEST(testN779642, "n779642.docx")
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", 
text::VertOrientation::BOTTOM, nValue);
 xFrame->getPropertyValue("VertOrientRelation") >>= nValue;
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation relation", 
text::RelOrientation::PAGE_PRINT_AREA, nValue);
+
+// tdf#106572 - perhaps not the best test to hijack since this file
+// produces an error in Word, but it nicely matches danger points,
+// and has a different first footer, so nice visual confirmation.
+CPPUNIT_ASSERT_EQUAL(OUString("First Page"), 
getProperty(getParagraphOrTable(1), "PageDescName"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTbLrHeight, "tblr-height.docx")
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index 46b846289219..7ca56ed219a3 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1026,6 +1026,8 @@ uno::Reference< beans::XPropertySet > 
lcl_GetRangeProperties( bool bIsFirstSecti
 uno::Reference< container::XEnumerationAccess > xEnumAccess( 
rDM_Impl.GetBodyText(), uno::UNO_QUERY_THROW );
 uno::Reference< container::XEnumeration > xEnum = 
xEnumAccess->createEnumeration();
 xRangeProperties.set( xEnum->nextElement(), uno::UNO_QUERY_THROW );
+if ( rDM_Impl.GetIsDummyParaAddedForTableInSection() && 
xEnum->hasMoreElements() )
+xRangeProperties.set( xEnum->nextElement(), uno::UNO_QUERY_THROW );
 }
 else if ( xStartingRange.is() )
 xRangeProperties.set( xStartingRange, uno::UNO_QUERY_THROW );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 source/text/sbasic/shared/03120112.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0d068dc8d5cd64f89c8a8e3d0a6bef6ed9e1ee87
Author: Adolfo Jayme Barrientos 
AuthorDate: Wed Aug 15 22:58:04 2018 -0500
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Aug 15 22:58:04 2018 -0500

Horrible use of capitals here

Change-Id: Id38a238f97718e498bb65a450e6855070895

diff --git a/source/text/sbasic/shared/03120112.xhp 
b/source/text/sbasic/shared/03120112.xhp
index 209995589..cb3394dab 100644
--- a/source/text/sbasic/shared/03120112.xhp
+++ b/source/text/sbasic/shared/03120112.xhp
@@ -52,7 +52,7 @@
 
 
 Sub ExampleChrW
- ' This example 
inserts the greek letter Alpha and Omega in a string.
+ ' This example 
inserts the Greek letters alpha and omega in a string.
  MsgBox "From "+ 
ChrW(913)+" to " + ChrW(937)
  ' The printout 
appears in the dialog as: From Α to Ω
 End Sub
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-08-15 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0f369c16bd7443a5f5ac07aa5801d9e817963e5a
Author: Adolfo Jayme Barrientos 
AuthorDate: Wed Aug 15 22:58:04 2018 -0500
Commit: Gerrit Code Review 
CommitDate: Thu Aug 16 05:58:13 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Horrible use of capitals here

Change-Id: Id38a238f97718e498bb65a450e6855070895

diff --git a/helpcontent2 b/helpcontent2
index 049c187e0503..0d068dc8d5cd 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 049c187e0503bb1f527eebb3c9a5e0d5961ee947
+Subproject commit 0d068dc8d5cd64f89c8a8e3d0a6bef6ed9e1ee87
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


error creating LO installation dmg file using make

2018-08-15 Thread Ch g
I tried to create dmg installation file from a local branch in terminal getting 
following errors:

[build ALL] All modules but instset: UnoControls accessibility animations 
apple_remote avmedia basctl basegfx basic bean binaryurp bridges canvas chart2 
cli_ure codemaker comphelper configmgr connectivity cppcanvas cppu cppuhelper 
cpputools cui dbaccess desktop drawinglayer dtrans editeng embeddedobj 
embedserv emfio eventattacher extensions external apache-commons beanshell 
boost clew clucene coinmp cppunit curl epoxy expat firebird glm gpgmepp 
graphite harfbuzz hsqldb hunspell hyphen icu jfreereport lcms2 libabw libassuan 
libcdr libcmis libebook libepubgen libetonyek libexttextcat libfreehand 
libgpg-error libjpeg-turbo liblangtag libmspub libmwaw libnumbertext libodfgen 
liborcus libpagemaker libpng libqxp librevenge libstaroffice libtommath 
libvisio libwpd libwpg libwps libzmf lpsolve lxml mdds more_fonts mythes neon 
nss openldap openssl pdfium poppler postgresql redland rhino ucpp xmlsec extras 
filter forms formula fpicker framework helpcompiler hwpfilter i18nlangtag 
i18npool i18nutil idl idlc io javaunohelper jurt jvmaccess jvmfwk l10ntools 
librelogo libreofficekit lingucomponent linguistic lotuswordpro o3tl odk offapi 
officecfg onlineupdate oovbaapi oox opencl package postprocess pyuno 
readlicense_oo registry remotebridges reportbuilder reportdesign ridljar sal 
salhelper sax sc scaddins sccomp scp2 scripting sd sdext setup_native sfx2 
shell slideshow smoketest solenv soltools sot starmath stoc store svgio svl 
svtools svx sw swext sysui test testtools toolkit tools ucb ucbhelper udkapi 
uitest unodevtools unoidl unoil unotest unotools unoxml ure uui vbahelper vcl 
winaccessibility wizards writerfilter writerperfect xmerge xmlhelp xmloff 
xmlreader xmlscript xmlsecurity
[build PRL] CustomTarget/instsetoo_native/install/install.phony
... checking environment variables ...
ERROR: Failure in installer.pm
ERROR: ERROR: Missing files at 
/Users/dev/lode/dev/core/solenv/bin/modules/installer/scriptitems.pm line 1212.

ERROR: The following files could not be found:
ERROR: File not found: cppumaker
ERROR: File not found: idlc
ERROR: File not found: javamaker
ERROR: File not found: ucpp
ERROR: File not found: uno-skeletonmaker
ERROR: File not found: unoapploader
ERROR: File not found: unoidl-check
...

: *
: ERROR: ERROR: Missing files at 
/Users/dev/lode/dev/core/solenv/bin/modules/installer/scriptitems.pm line 1212.
: *

/Users/dev/lode/dev/core/instsetoo_native/CustomTarget_install.mk:99: recipe 
for target 
'/Users/dev/lode/dev/core/workdir/CustomTarget/instsetoo_native/install/install.phony'
 failed
make[1]: *** 
[/Users/dev/lode/dev/core/workdir/CustomTarget/instsetoo_native/install/install.phony]
 Error 1
Makefile:286: recipe for target 'build' failed
make: *** [build] Error 2


autogen.input:

--enable-dbgutil
#--enable-debug
--disable-ccache
#--disable-cve-tests
--with-jdk-home=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
--with-ant-home=/usr/local/Cellar/ant/1.10.5/libexec
--without-junit
--without-help
--without-myspell-dicts
--without-doxygen
--with-build-version=$(date +"Mac%Y-%m-%d")
--with-distro=LibreOfficeMacOSX
--with-package-format=dmg


command used:

make clean && ./autogen.sh && make -j 4 build-nocheck 2>&1

(I always get CppUnitTest errors without "build-nocheck" for both macos 10.13 
and ubuntu 16.04.5/18.04.1)


Is "make" with "--with-distro=LibreOfficeMacOSX" and 
"--with-package-format=dmg" the correct way to create LO installation dmg file?

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


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8scan.cxx |   39 +--
 sw/source/filter/ww8/ww8scan.hxx |2 +-
 2 files changed, 14 insertions(+), 27 deletions(-)

New commits:
commit 215780a7eca23c1bfcde74958e10ae84ea12d506
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 17:28:41 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 22:23:56 2018 +0200

ofz#9917 use a WW8SprmIter to find the sprm

extend WW8SprmIter to support the needed paramater match feature and
drop the custom WW8PLCFx_SEPX::HasSprm logic

Change-Id: I5893e04402ed03493add398f0939a578807561ef
Reviewed-on: https://gerrit.libreoffice.org/59118
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 98365bee136e..563f262d6b69 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -918,7 +918,7 @@ void WW8SprmIter::UpdateMyMembers()
 }
 }
 
-SprmResult WW8SprmIter::FindSprm(sal_uInt16 nId)
+SprmResult WW8SprmIter::FindSprm(sal_uInt16 nId, sal_uInt8* pNextByteMatch)
 {
 while (GetSprms())
 {
@@ -926,7 +926,13 @@ SprmResult WW8SprmIter::FindSprm(sal_uInt16 nId)
 {
 sal_uInt16 nFixedLen =  mrSprmParser.DistanceToData(nId);
 sal_uInt16 nL = mrSprmParser.GetSprmSize(nId, GetSprms(), 
GetRemLen());
-return SprmResult(GetCurrentParams(), nL - nFixedLen); // SPRM 
found!
+SprmResult aRet(GetCurrentParams(), nL - nFixedLen); // SPRM found!
+// typically pNextByteMatch is nullptr and we just return the 
first match
+if (!pNextByteMatch)
+return aRet;
+// very occasionally we want one with a specific following byte
+if (aRet.nRemainingData >= 1 && *aRet.pSprm == *pNextByteMatch)
+return aRet;
 }
 advance();
 }
@@ -3844,32 +3850,13 @@ bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 
nId1,sal_uInt16 nId2,sal_uInt16 nId3,s
 
 SprmResult WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
 {
-if (!pPLCF)
-return SprmResult();
-
-sal_uInt8* pSp = pSprms.get();
-size_t i = 0;
-while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
+SprmResult aRet;
+if (pPLCF)
 {
-// Sprm found?
-const sal_uInt16 nCurrentId = maSprmParser.GetSprmId(pSp);
-const sal_uInt16 x = maSprmParser.GetSprmSize(nCurrentId, pSp, 
nSprmSiz - i);
-if (nCurrentId == nId)
-{
-sal_uInt16 nFixedLen =  maSprmParser.DistanceToData(nId);
-const sal_uInt8 *pRet = pSp + nFixedLen;
-SprmResult aRet(pRet, x - nFixedLen);
-if (aRet.nRemainingData >= 1 && *aRet.pSprm == n2nd)
-{
-return aRet;
-}
-}
-// increment pointer so that it points to next SPRM
-i += x;
-pSp += x;
+WW8SprmIter aIter(pSprms.get(), nSprmSiz, maSprmParser);
+aRet = aIter.FindSprm(nId, &n2nd);
 }
-
-return SprmResult();   // Sprm not found
+return aRet;
 }
 
 WW8PLCFx_SubDoc::WW8PLCFx_SubDoc(SvStream* pSt, const WW8Fib& rFib,
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index dddc26a508a4..fefb240ed454 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -282,7 +282,7 @@ public:
 explicit WW8SprmIter(const sal_uInt8* pSprms_, sal_Int32 nLen_,
 const wwSprmParser &rSprmParser);
 void  SetSprms(const sal_uInt8* pSprms_, sal_Int32 nLen_);
-SprmResult FindSprm(sal_uInt16 nId);
+SprmResult FindSprm(sal_uInt16 nId, sal_uInt8* pNextByteMatch = nullptr);
 void  advance();
 const sal_uInt8* GetSprms() const
 { return ( pSprms && (0 < nRemLen) ) ? pSprms : nullptr; }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sd/source/filter/ppt/pptin.cxx|8 +++
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx |   41 --
 2 files changed, 27 insertions(+), 22 deletions(-)

New commits:
commit 307f561e8dce3c7a685de4af92563c9094925de6
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 11:37:54 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 22:22:57 2018 +0200

ofz#9821 Indirect-leak

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

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index c0f022282699..70a5ae3ee8ed 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2785,7 +2785,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool 
TestImportPPT(SvStream &rStream)
 ::sd::DrawDocShellRef xDocShRef = new 
::sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false, DocumentType::Impress);
 SdDrawDocument *pDoc = xDocShRef->GetDoc();
 
-bRet = ImportPPT(pDoc, *xDocStream, *xStorage, aSrcMed);
+try
+{
+bRet = ImportPPT(pDoc, *xDocStream, *xStorage, aSrcMed);
+}
+catch (...)
+{
+}
 
 xDocShRef->DoClose();
 }
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx 
b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index de998eb422e5..6a8dd7d3986e 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -298,29 +298,27 @@ Reference< drawing::XShape > SAL_CALL 
EnhancedCustomShapeEngine::render()
 bool bFlipH = aCustomShape2d.IsFlipHorz();
 bool bLineGeometryNeededOnly = bTextPathOn;
 
-SdrObject* pRenderedShape = aCustomShape2d.CreateObject( 
bLineGeometryNeededOnly );
-if ( pRenderedShape )
+std::unique_ptr 
xRenderedShape(aCustomShape2d.CreateObject(bLineGeometryNeededOnly));
+if (xRenderedShape)
 {
 if ( bTextPathOn )
 {
-SdrObject* pRenderedFontWork(
+std::unique_ptr xRenderedFontWork(
 EnhancedCustomShapeFontWork::CreateFontWork(
-pRenderedShape,
+xRenderedShape.get(),
 rSdrObjCustomShape));
 
-if ( pRenderedFontWork )
+if (xRenderedFontWork)
 {
-SdrObject::Free( pRenderedShape );
-pRenderedShape = pRenderedFontWork;
+xRenderedShape = std::move(xRenderedFontWork);
 }
 }
-SdrObject* pRenderedShape3d = 
EnhancedCustomShape3d::Create3DObject(pRenderedShape, rSdrObjCustomShape);
-if ( pRenderedShape3d )
+std::unique_ptr 
xRenderedShape3d(EnhancedCustomShape3d::Create3DObject(xRenderedShape.get(), 
rSdrObjCustomShape));
+if (xRenderedShape3d)
 {
 bFlipV = bFlipH = false;
 nRotateAngle = 0;
-SdrObject::Free( pRenderedShape );
-pRenderedShape = pRenderedShape3d;
+xRenderedShape = std::move(xRenderedShape3d);
 }
 
 tools::Rectangle aRect(rSdrObjCustomShape.GetSnapRect());
@@ -336,43 +334,44 @@ Reference< drawing::XShape > SAL_CALL 
EnhancedCustomShapeEngine::render()
 nTan = -nTan;
 }
 
-pRenderedShape->Shear(rSdrObjCustomShape.GetSnapRect().Center(), 
nShearAngle, nTan, false);
+xRenderedShape->Shear(rSdrObjCustomShape.GetSnapRect().Center(), 
nShearAngle, nTan, false);
 }
 if(nRotateAngle )
 {
 double a = nRotateAngle * F_PI18000;
 
-
pRenderedShape->NbcRotate(rSdrObjCustomShape.GetSnapRect().Center(), 
nRotateAngle, sin( a ), cos( a ));
+
xRenderedShape->NbcRotate(rSdrObjCustomShape.GetSnapRect().Center(), 
nRotateAngle, sin( a ), cos( a ));
 }
 if ( bFlipV )
 {
 Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) >> 1 );
 Point aRight( aLeft.X() + 1000, aLeft.Y() );
-pRenderedShape->NbcMirror( aLeft, aRight );
+xRenderedShape->NbcMirror( aLeft, aRight );
 }
 if ( bFlipH )
 {
 Point aTop( ( aRect.Left() + aRect.Right() ) >> 1, aRect.Top() );
 Point aBottom( aTop.X(), aTop.Y() + 1000 );
-pRenderedShape->NbcMirror( aTop, aBottom );
+xRenderedShape->NbcMirror( aTop, aBottom );
 }
 
-pRenderedShape->NbcSetStyleSheet(rSdrObjCustomShape.GetStyleSheet(), 
true);
-pRenderedShape->RecalcSnapRect();
+xRenderedShape->NbcSetStyleSheet(rSdrObjCustomShape.GetStyleSheet(), 
true);
+xRenderedShape->RecalcSnapRect();
 }
 
 if ( mbForceGroupWithText )
 {
-pRenderedShape = ImplForceGroupWithText(
+xRenderedShape.reset(ImplFo

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

2018-08-15 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportController.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 3512079dc42a6472136f9c229fc9ea0b0033ebf9
Author: Julien Nabet 
AuthorDate: Sun Aug 12 11:39:04 2018 +0200
Commit: Julien Nabet 
CommitDate: Wed Aug 15 21:23:39 2018 +0200

tdf#117795: not all elements have ChartFontName property

See bt https://bugs.documentfoundation.org/attachment.cgi?id=144114
In this bugtracker we tried to apply a change of fontname on 
reportdesign::OFixedLine

Change-Id: I60ee5ca9f967fc71939e2f57ecd9de7edd680958
Reviewed-on: https://gerrit.libreoffice.org/58895
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 64373669f9b4..1a4964a2ed2c 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4175,7 +4175,14 @@ bool 
OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,
 {
 const uno::Reference< beans::XPropertySet > 
xControlModel(*aIter,uno::UNO_QUERY);
 if ( xControlModel.is() )
-xControlModel->setPropertyValue(_sProperty,_aValue);
+try
+{
+xControlModel->setPropertyValue(_sProperty,_aValue);
+}
+catch(const UnknownPropertyException& e)
+{
+SAL_WARN("reportdesign", "UnknowPropertyException:" << e);
+}
 }
 
 return !aSelection.empty();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source editeng/source include/editeng sd/qa sd/source sw/inc sw/source

2018-08-15 Thread Libreoffice Gerrit user
 cui/source/tabpages/numpages.cxx|4 ++--
 editeng/source/editeng/editdbg.cxx  |2 +-
 editeng/source/items/numitem.cxx|   11 ---
 editeng/source/outliner/outliner.cxx|2 +-
 editeng/source/uno/unonrule.cxx |2 +-
 include/editeng/numitem.hxx |6 +++---
 sd/qa/unit/export-tests-ooxml1.cxx  |2 +-
 sd/source/core/drawdoc4.cxx |2 +-
 sd/source/core/stlpool.cxx  |4 ++--
 sd/source/ui/view/drviews3.cxx  |2 +-
 sw/inc/editsh.hxx   |2 +-
 sw/inc/numrule.hxx  |2 +-
 sw/source/core/doc/number.cxx   |9 -
 sw/source/core/edit/autofmt.cxx |4 ++--
 sw/source/core/edit/ednumber.cxx|2 +-
 sw/source/core/unocore/unosett.cxx  |2 +-
 sw/source/filter/html/htmlcss1.cxx  |2 +-
 sw/source/filter/html/htmlnumreader.cxx |2 +-
 sw/source/filter/ww8/wrtw8nds.cxx   |2 +-
 sw/source/filter/ww8/wrtw8num.cxx   |2 +-
 sw/source/filter/ww8/wrtww8.hxx |2 +-
 sw/source/filter/ww8/ww8atr.cxx |2 +-
 sw/source/filter/ww8/ww8par.cxx |2 +-
 sw/source/filter/ww8/ww8par3.cxx|2 +-
 sw/source/ui/misc/num.cxx   |4 ++--
 25 files changed, 41 insertions(+), 37 deletions(-)

New commits:
commit 0d227c96e11d7d03829144183bc66d229e059a4b
Author: Stephan Bergmann 
AuthorDate: Wed Aug 15 16:48:09 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 15 21:20:26 2018 +0200

SvxNumberFormat::nAbsLSpace should have a larger type

...as is seen when executing CppunitTest_sd_filters_test with Clang's new
-fsanitize=implicit-conversion (see below).  The next larger natural choice
after short is sal_Int32, and some of the code calling GetAbsLSpace actually
already supported the value to be as wide (but not wider than) sal_Int32; 
code
calling GetAbsLSpace that expected the value to be no wider than short has
either been adapted or at least been marked with a TODO.  (Other choices 
could
have been sal_Int64 or long.)

Some dependent function's parameter types have also been changed 
accordingly.

> Testing 
file:///home/sbergman/lo/core/sd/qa/unit/data/ppt/pass/hang-10.ppt:
[...]
> filter/source/msfilter/svdfppt.cxx:3792:33: runtime error: implicit 
conversion from type 'sal_uInt32' (aka 'unsigned int') of value 144780 (32-bit, 
unsigned) to type 'short' changed the value to 13708 (16-bit, signed)
>  #0 in PPTNumberFormatCreator::ImplGetNumberFormat(SdrPowerPointImport 
const&, SvxNumberFormat&) at filter/source/msfilter/svdfppt.cxx:3792:33 
(instdir/program/libmsfilterlo.so +0x7992cc)
>  #1 in PPTNumberFormatCreator::GetNumberFormat(SdrPowerPointImport 
const&, SvxNumberFormat&, unsigned int, PPTParaLevel const&, PPTCharLevel 
const&, TSS_Type) at filter/source/msfilter/svdfppt.cxx:3674:5 
(instdir/program/libmsfilterlo.so +0x797c6d)
>  #2 in PPTStyleSheet::PPTStyleSheet(DffRecordHeader const&, SvStream&, 
SdrPowerPointImport&, PPTTextParagraphStyleAtomInterpreter const&, 
PPTTextSpecInfo const&) at filter/source/msfilter/svdfppt.cxx:4395:13 
(instdir/program/libmsfilterlo.so +0x7ac38d)
>  #3 in SdrPowerPointImport::SdrPowerPointImport(PowerPointImportParam&, 
rtl::OUString const&) at filter/source/msfilter/svdfppt.cxx:1618:59 
(instdir/program/libmsfilterlo.so +0x74762f)
>  #4 in ImplSdPPTImport::ImplSdPPTImport(SdDrawDocument*, SotStorage&, 
SfxMedium&, PowerPointImportParam&) at sd/source/filter/ppt/pptin.cxx:175:7 
(instdir/program/libsdfiltlo.so +0x5f2be8)
>  #5 in SdPPTImport::SdPPTImport(SdDrawDocument*, SvStream&, SotStorage&, 
SfxMedium&) at sd/source/filter/ppt/pptin.cxx:162:23 
(instdir/program/libsdfiltlo.so +0x5ce2bb)
>  #6 in ImportPPT at sd/source/filter/ppt/pptin.cxx:2760:47 
(instdir/program/libsdfiltlo.so +0x617c79)
>  #7 in SdPPTFilter::Import() at sd/source/filter/sdpptwrp.cxx:106:32 
(instdir/program/libsdlo.so +0x2878413)
>  #8 in sd::DrawDocShell::ConvertFrom(SfxMedium&) at 
sd/source/ui/docshell/docshel4.cxx:474:46 (instdir/program/libsdlo.so 
+0x2e165bc)
>  #9 in SfxObjectShell::DoLoad(SfxMedium*) at 
sfx2/source/doc/objstor.cxx:786:23 (instdir/program/libsfxlo.so +0x2c8cb12)
>  #10 in SdFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at 
sd/qa/unit/filters-test.cxx:75:31 
(workdir/LinkTarget/CppunitTest/libtest_sd_filters_test.so +0x19771)
>  #11 in test::FiltersTest::recursiveScan(test::filterStatus, 
rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, 
SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at 
unotest/source/cpp/filters-test.cxx:130:20 
(workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x5724c)
>  #12 in test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString 
const&, rtl::O

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

2018-08-15 Thread Libreoffice Gerrit user
 android/source/res/menu/main.xml|5 
 android/source/res/values/strings.xml   |1 
 android/source/src/java/org/libreoffice/LOKitTileProvider.java  |   23 ++
 android/source/src/java/org/libreoffice/PDFDocumentAdapter.java |   86 
++
 android/source/src/java/org/libreoffice/ToolbarController.java  |3 
 5 files changed, 117 insertions(+), 1 deletion(-)

New commits:
commit 6ede90a790ce08330af58f81474c103ee1ca438f
Author: Mert Tumer 
AuthorDate: Sun Aug 12 05:58:38 2018 -0700
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 15 21:02:31 2018 +0200

tdf#89860 ability to print from Android Viewer

Change-Id: I13c7f3e085095f1c0d88ab3668557fcc1c4cb23a
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/58900
Reviewed-by: Tomaž Vajngerl 
Tested-by: Tomaž Vajngerl 

diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml
index 257a5844b3b3..d5f1ae8e4274 100644
--- a/android/source/res/menu/main.xml
+++ b/android/source/res/menu/main.xml
@@ -42,6 +42,11 @@
 android:visible="true"
 />
 
+
+
 
diff --git a/android/source/res/values/strings.xml 
b/android/source/res/values/strings.xml
index fa83cf4a74b3..17e52316bdb4 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -210,4 +210,5 @@
 Value
 Parent Value
 Export To PDF
+Print
 
diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java 
b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index 2815b839ad5c..7464f152698d 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -8,9 +8,14 @@
  */
 package org.libreoffice;
 
+import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.PointF;
+import android.os.Build;
 import android.os.Environment;
+import android.print.PrintAttributes;
+import android.print.PrintDocumentAdapter;
+import android.print.PrintManager;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.widget.Toast;
@@ -372,11 +377,27 @@ class LOKitTileProvider implements TileProvider {
 String cacheFile = mContext.getExternalCacheDir().getAbsolutePath()
 + "/" + file;
 mDocument.saveAs("file://"+cacheFile,"pdf","");
-//TODO PRINT
+printDocument(cacheFile);
 }else{
 saveDocumentAs(dir+"/"+file,"pdf");
 }
 }
+
+private void printDocument(String cacheFile) {
+if (Build.VERSION.SDK_INT >= 19) {
+try {
+PrintManager printManager = (PrintManager) 
mContext.getSystemService(Context.PRINT_SERVICE);
+PrintDocumentAdapter printAdapter = new 
PDFDocumentAdapter(mContext, cacheFile);
+printManager.print("Document", printAdapter, new 
PrintAttributes.Builder().build());
+
+} catch (Exception e) {
+e.printStackTrace();
+}
+} else {
+mContext.showCustomStatusMessage("Your device does not support 
printing");
+}
+}
+
 public boolean isDocumentCached(){
 File input = new File(mInputFile);
 final String cacheFile = 
mContext.getExternalCacheDir().getAbsolutePath() + "/lo_cached_" + 
input.getName();
diff --git a/android/source/src/java/org/libreoffice/PDFDocumentAdapter.java 
b/android/source/src/java/org/libreoffice/PDFDocumentAdapter.java
new file mode 100644
index ..2ce167ce3a32
--- /dev/null
+++ b/android/source/src/java/org/libreoffice/PDFDocumentAdapter.java
@@ -0,0 +1,86 @@
+package org.libreoffice;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.os.Bundle;
+import android.os.CancellationSignal;
+import android.os.ParcelFileDescriptor;
+import android.print.PageRange;
+import android.print.PrintAttributes;
+import android.print.PrintDocumentAdapter;
+import android.print.PrintDocumentInfo;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+@TargetApi(19)
+public class PDFDocumentAdapter extends PrintDocumentAdapter{
+Context mContext;
+String pdfFile;
+
+public PDFDocumentAdapter(Context mContext, String pdfFile) {
+this.mContext = mContext;
+this.pdfFile = pdfFile;
+}
+
+@Override
+public void onLayout(PrintAttributes oldAttributes, PrintAttributes 
newAttributes, CancellationSignal cancellationSignal, LayoutResultCallback 
callback, Bundle extras) {
+if (cancellationSignal.isCanceled()) {
+callback.onLayoutCancelled();
+}
+else {
+File f = new File(pdfFile);
+PrintDocumentInfo.Builder builder=
+

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

2018-08-15 Thread Libreoffice Gerrit user
 include/svtools/hyperlabel.hxx|4 -
 svtools/source/control/hyperlabel.cxx |   75 --
 svtools/source/control/roadmap.cxx|   34 +++
 3 files changed, 46 insertions(+), 67 deletions(-)

New commits:
commit a6a2cc8f0e6501b92988accee2c3674dcfb05a2f
Author: Jan-Marek Glogowski 
AuthorDate: Fri Aug 10 19:46:59 2018 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 15 21:00:29 2018 +0200

Fix wizard step text styling

Moves all the SetTextColor handing into ApplySettings and just
changes the ControlBackground depending on step state.

Change-Id: I96234b6353afada7bc77e2f641a160c1cf25f48d
Reviewed-on: https://gerrit.libreoffice.org/58857
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/svtools/hyperlabel.hxx b/include/svtools/hyperlabel.hxx
index e7bc9d6c30b5..bd86801724ae 100644
--- a/include/svtools/hyperlabel.hxx
+++ b/include/svtools/hyperlabel.hxx
@@ -42,9 +42,6 @@ namespace svt
 virtual voidGetFocus() override;
 virtual voidLoseFocus() override;
 
-voidDeactivateHyperMode(vcl::Font aFont, const Color 
aColor);
-voidActivateHyperMode(vcl::Font aFont, const Color 
aColor);
-
 voidimplInit();
 
 using FixedText::CalcMinimumSize;
@@ -55,6 +52,7 @@ namespace svt
 virtual void dispose() override;
 
 virtual voidDataChanged( const DataChangedEvent& rDCEvt ) override;
+virtual voidApplySettings(vcl::RenderContext& rRenderContext) 
override;
 
 voidSetID( sal_Int16 ID );
 sal_Int16   GetID() const;
diff --git a/svtools/source/control/hyperlabel.cxx 
b/svtools/source/control/hyperlabel.cxx
index 2cebdc20d27a..0552bdb54ea7 100644
--- a/svtools/source/control/hyperlabel.cxx
+++ b/svtools/source/control/hyperlabel.cxx
@@ -77,56 +77,33 @@ namespace svt
 
 void HyperLabel::ToggleBackgroundColor( const Color& _rGBColor )
 {
-const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
 SetControlBackground( _rGBColor );
-if (_rGBColor == COL_TRANSPARENT)
-SetTextColor( rStyleSettings.GetFieldTextColor( ) );
-else
-SetTextColor( rStyleSettings.GetHighlightTextColor( ) );
 }
 
-
 void HyperLabel::MouseMove( const MouseEvent& rMEvt )
 {
 vcl::Font aFont = GetControlFont( );
-const Color aColor = GetTextColor();
 
-if (rMEvt.IsLeaveWindow())
-{
-DeactivateHyperMode(aFont, aColor);
-}
-else
+bool bHyperMode = false;
+if (!rMEvt.IsLeaveWindow() && IsEnabled() && m_pImpl->bInteractive)
 {
 Point aPoint = GetPointerPosPixel();
 if (aPoint.X() < m_pImpl->m_aMinSize.Width())
-{
-if ( IsEnabled() && (m_pImpl->bInteractive) )
-{
-ActivateHyperMode( aFont, aColor);
-return;
-}
-}
-DeactivateHyperMode(aFont, aColor);
+bHyperMode = true;
 }
-}
 
-void HyperLabel::ActivateHyperMode(vcl::Font aFont, const Color aColor)
-{
-aFont.SetUnderline(LINESTYLE_SINGLE);
-m_pImpl->m_bHyperMode = true;
-SetPointer( PointerStyle::RefHand );
-SetControlFont( aFont);
-SetTextColor( aColor);
-
-}
-
-void HyperLabel::DeactivateHyperMode(vcl::Font aFont, const Color aColor)
-{
-m_pImpl->m_bHyperMode = false;
-aFont.SetUnderline(LINESTYLE_NONE);
-SetPointer( PointerStyle::Arrow );
-SetControlFont( aFont);
-SetTextColor( aColor);
+m_pImpl->m_bHyperMode = bHyperMode;
+if (bHyperMode)
+{
+aFont.SetUnderline(LINESTYLE_SINGLE);
+SetPointer(PointerStyle::RefHand);
+}
+else
+{
+aFont.SetUnderline(LINESTYLE_NONE);
+SetPointer(PointerStyle::Arrow);
+}
+SetControlFont(aFont);
 }
 
 void HyperLabel::MouseButtonDown( const MouseEvent& )
@@ -193,28 +170,32 @@ namespace svt
 SetText(_rText);
 }
 
+void HyperLabel::ApplySettings(vcl::RenderContext& rRenderContext)
+{
+FixedText::ApplySettings(rRenderContext);
+
+const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
+if (GetControlBackground() == COL_TRANSPARENT)
+rRenderContext.SetTextColor(rStyleSettings.GetFieldTextColor());
+else
+
rRenderContext.SetTextColor(rStyleSettings.GetHighlightTextColor());
+}
 
 void HyperLabel::DataChanged( const DataChangedEvent& rDCEvt )
 {
-const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
 FixedText::DataChanged( rDCEvt );
+
 if ((( rDCEvt.GetType() == DataChangedEve

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

2018-08-15 Thread Libreoffice Gerrit user
 xmloff/source/draw/sdxmlexp.cxx |   20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 757b2438b172b3ef4560e533b3ce2a10f699f2bd
Author: Tomaž Vajngerl 
AuthorDate: Wed Aug 15 18:32:17 2018 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 15 20:59:40 2018 +0200

tdf#118883 reinstate the try block to not throw on copy/paste

Seems the defnesive approach wasn't enough to ward against the
exception being thrown when creating a clipboard document when
copy/pasting between documents.

Change-Id: Iedcfbc6fe054b46fc26005b1ea0dbadbd21a08cb
Reviewed-on: https://gerrit.libreoffice.org/59121
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 29ce8b730135..d9eab3c6e21b 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2716,13 +2716,17 @@ XMLFontAutoStylePool* 
SdXMLExport::CreateFontAutoStylePool()
 
 if (getExportFlags() & SvXMLExportFlags::CONTENT)
 {
-Reference< lang::XMultiServiceFactory > xFac( GetModel(), UNO_QUERY );
-if( xFac.is() )
+try
 {
-Reference const 
xProps(xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY);
-Reference const 
xInfo(xProps->getPropertySetInfo(), uno::UNO_QUERY);
-
-if (xProps.is() && xInfo.is())
+Reference xFactory(GetModel(), 
UNO_QUERY);
+Reference xProps;
+Reference xInfo;
+
+if (xFactory.is())
+
xProps.set(xFactory->createInstance("com.sun.star.document.Settings"), 
UNO_QUERY);
+if (xProps.is())
+xInfo.set(xProps->getPropertySetInfo(), uno::UNO_QUERY);
+if (xInfo.is() && xProps.is())
 {
 if (xInfo->hasPropertyByName("EmbedFonts"))
 xProps->getPropertyValue("EmbedFonts") >>= bEmbedFonts;
@@ -2735,6 +2739,10 @@ XMLFontAutoStylePool* 
SdXMLExport::CreateFontAutoStylePool()
 if (xInfo->hasPropertyByName("EmbedComplexScriptFonts"))
 xProps->getPropertyValue("EmbedComplexScriptFonts") >>= 
bEmbedComplexScript;
 }
+} catch(...)
+{
+// clipboard document doesn't have shell so throws from 
getPropertyValue
+// gallery elements may not support com.sun.star.document.Settings 
so throws from createInstance
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sfx2/source/sidebar/Tools.cxx |8 +++-
 vcl/source/image/Image.cxx|5 ++---
 2 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 43b7aa5133ce3bfb44c5203aea37fa4474bc3a61
Author: Tomaž Vajngerl 
AuthorDate: Wed Aug 15 14:19:53 2018 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 15 20:58:28 2018 +0200

tdf#119276 Fix loading of images with internal LO URLs

Change-Id: I30556aba4490bef7f4a6e6b3899cc05f4b6a06d4
Reviewed-on: https://gerrit.libreoffice.org/59104
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sfx2/source/sidebar/Tools.cxx b/sfx2/source/sidebar/Tools.cxx
index 8571ec09d450..a21b7414c61a 100644
--- a/sfx2/source/sidebar/Tools.cxx
+++ b/sfx2/source/sidebar/Tools.cxx
@@ -55,13 +55,11 @@ Image Tools::GetImage (
 {
 if (rsURL.startsWith(".uno:"))
 {
-const Image 
aPanelImage(vcl::CommandInfoProvider::GetImageForCommand(rsURL, rxFrame));
-return aPanelImage;
+return vcl::CommandInfoProvider::GetImageForCommand(rsURL, 
rxFrame);
 }
-else if (rsURL.startsWith("private:graphicrepository"))
+else
 {
-const Image aPanelImage(rsURL);
-return aPanelImage;
+return Image(rsURL);
 }
 }
 return Image();
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index 7be04691603d..049e3bef5d0d 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -67,10 +67,9 @@ Image::Image(const OUString & rFileUrl)
 }
 else
 {
-OUString aPath;
-osl::FileBase::getSystemPathFromFileURL(rFileUrl, aPath);
 Graphic aGraphic;
-if (ERRCODE_NONE == GraphicFilter::LoadGraphic(aPath, IMP_PNG, 
aGraphic))
+
+if (ERRCODE_NONE == GraphicFilter::LoadGraphic(rFileUrl, IMP_PNG, 
aGraphic))
 {
 ImplInit(aGraphic.GetBitmapEx());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/txtnode/fntcache.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 950e84e4ca1896923b96eacc5e5aa461a0936e86
Author: Miklos Vajna 
AuthorDate: Wed Aug 15 15:35:25 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 20:27:20 2018 +0200

sw: nOffs is always 0 in SwFntObj::DrawText()

Since commit 95cb8d2ce96578e8968d4d74573fa528e226fac9 (Remove
FONT_TEST_DEBUG, COMING_SOON and some more dead code., 2011-01-24).

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

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index a0a38aa94364..4d0f59fcc56d 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1725,10 +1725,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 }
 }
 
-sal_Int32 nOffs = 0;
 sal_Int32 nLen = sal_Int32(rInf.GetLen());
 
-if( nOffs < nLen )
+if( nLen > 0 )
 {
 
 if ( bSwitchL2R )
@@ -1744,8 +1743,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 sal_Int32 nTmpIdx = bBullet
 ? (rInf.GetIdx() ? 1 : 0)
 : sal_Int32(rInf.GetIdx());
-rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, 
pKernArray.get() + nOffs,
- nTmpIdx + nOffs , nLen - nOffs );
+rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, 
pKernArray.get(),
+ nTmpIdx , nLen );
 if (bBullet)
 {
 rInf.GetOut().Push();
@@ -1782,8 +1781,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 pKernArray [ i - 1 ] -= nAdd;
 }
 }
-rInf.GetOut().DrawTextArray( aTextOriginPos, 
aBulletOverlay, pKernArray.get() + nOffs,
- nTmpIdx + nOffs , nLen - 
nOffs );
+rInf.GetOut().DrawTextArray( aTextOriginPos, 
aBulletOverlay, pKernArray.get(),
+ nTmpIdx , nLen );
 pTmpFont->SetColor( aPreviousColor );
 
 pTmpFont->SetUnderline(aPreviousUnderline);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Crash test update

2018-08-15 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/4338e2d6fbfa7f0cd468bad9bec6852ad7c43155/


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


Minutes from the design meeting 2018-Aug-08

2018-08-15 Thread Heiko Tietze
Present: Stuart, Nickson, Heiko

 * Heavy changes regarding menu; review needed
   + https://gerrit.libreoffice.org/#/c/56912/
   + https://gerrit.libreoffice.org/#/c/56980/
   => we need additional UX/dev eyes on these patches

 * Bundle the new "EB Garamond" font with LibreOffice
   + https://bugs.documentfoundation.org/show_bug.cgi?id=119085 
   + https://fonts.google.com/specimen/EB+Garamond
   + https://github.com/georgd/EB-Garamond
   + SIL Open Font License 1.1
   + packed 2.5MB incl. OTF and TTF
   + prefer an easy way to load fonts from extension site but for slightly now 
tend to agree (Heiko)
   + failing an extension, what to do now?
   Q. do we integrate and ship?
   https://bugs.documentfoundation.org/show_bug.cgi?id=115944 and similar
   + too many fonts that are not of common interest (Heiko)
   + language scope of EB Garamond is just too limited (Stuart)
   A. Keep the ticket open--but not bring it in yet. Need to wait for better 
font weight handling cross platform

 * Styles & Formatting deck is overpopulated with styles
   + https://bugs.documentfoundation.org/show_bug.cgi?id=69551 (and tdf#118664)
   + bad generic statement, disagree with the idea of "too many" styles
   + what is a "good number of styles"?, what should to be dropped exactly? 
(Heiko)
   + we have several options to filter/sort styles (Stuart)
   + we do not agree there is advantage to reducing the number of styles 
(Stuart, Heiko)
   + sorting of styles, move interesting to top of list
   + reorganization of the default and sorting
   + the GUI needs attention, reverse the toggle
   => AI Heiko: look for reference sidebar mockups for better style workflow...

 * Introduce more text box styles in Draw/Impress
   * https://bugs.documentfoundation.org/show_bug.cgi?id=94369
   + what exactly (these styles are hard-coded)
   + Text Body, Title, Heading 1, Heading2, eading 3, QuotationsP, 
PreformattedText, Bullet List, NumberList (Andreas)
   + different editengine between Writer and Draw/Impress, 
   + implementation issues aside, do we want to mix Writer styles and Draw 
styles?
   + nice to do, but would be better to be able to do it globally
   + meanwhile--matching the styles cross module requires each be duplicated, 
too much work!
   => maybe OK to do a few, 1 heading, 1 title, 1 text, etc.

 * Confusion with CALC: Show Comment on/off
   + https://bugs.documentfoundation.org/show_bug.cgi?id=107144
   + comment 4
   + need a new icon for the single show/hide comment for cell
   + make it clear the show all toggles all comments on off
   + iconography to show multiple cells/comments and another for single 
cell/comment

 * Autocomplete taking special characters
   + https://bugs.documentfoundation.org/show_bug.cgi?id=118399 
   + WFM (Heiko)
=> postpone






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


[Libreoffice-commits] core.git: reportbuilder/java reportdesign/qa reportdesign/source sal/osl sal/qa sc/qa sc/source

2018-08-15 Thread Libreoffice Gerrit user
 
reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
 |2 +-
 
reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
   |2 +-
 reportdesign/qa/complex/reportdesign/ReportDesignerTest.java   
  |2 +-
 reportdesign/source/ui/report/dlgedfunc.cxx
  |2 +-
 sal/osl/unx/process.cxx
  |2 +-
 sal/qa/rtl/ostring/rtl_str.cxx 
  |2 +-
 sal/qa/rtl/oustring/rtl_ustr.cxx   
  |2 +-
 sal/qa/rtl/random/rtl_random.cxx   
  |4 ++--
 sc/qa/unit/ucalc.cxx   
  |2 +-
 sc/source/filter/oox/pivottablebuffer.cxx  
  |2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 76532719505a3d9b495911ce7f86b8cda8412a00
Author: Andrea Gelmini 
AuthorDate: Wed Aug 15 14:19:08 2018 +0200
Commit: Jens Carl 
CommitDate: Wed Aug 15 19:04:41 2018 +0200

Fix typo: s/an other/another/g

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

diff --git 
a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
 
b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
index 3f23ab3b4f63..0a3f23c6986e 100644
--- 
a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
+++ 
b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
@@ -614,7 +614,7 @@ public abstract class OfficeDocumentReportTarget extends 
AbstractReportTarget
 }
 case OfficeDocumentReportTarget.STATE_IN_GROUP_BODY:
 {
-// We now expect either an other group or a detail band.
+// We now expect either another group or a detail band.
 
 if 
(ReportTargetUtil.isElementOfType(OfficeNamespaces.OOREPORT_NS, "group", attrs))
 {
diff --git 
a/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
 
b/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
index 469e5ef48268..96add59a59b6 100644
--- 
a/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
+++ 
b/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
@@ -99,7 +99,7 @@ public class TextRawReportTarget extends 
OfficeDocumentReportTarget
 private static final int DETAIL_SECTION_FIRST_STARTED = 1;
 // The first detail section has been printed.
 private static final int DETAIL_SECTION_FIRST_PRINTED = 2;
-// An other detail section has started
+// Another detail section has started
 private static final int DETAIL_SECTION_OTHER_STARTED = 3;
 // The other detail section has been printed.
 private static final int DETAIL_SECTION_OTHER_PRINTED = 4;
diff --git a/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java 
b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
index 7b86d15cc1f4..fef462031b69 100644
--- a/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
+++ b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
@@ -382,7 +382,7 @@ public class ReportDesignerTest
 aOverwrite.Value = Boolean.TRUE;
 aPropertyList.add(aOverwrite);
 
-// store the document in an other directory
+// store the document in another directory
 XStorable aStorable = UnoRuntime.queryInterface(XStorable.class, 
_xComponent);
 if (aStorable != null)
 {
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx 
b/reportdesign/source/ui/report/dlgedfunc.cxx
index 2d07356bb356..8226116cb32c 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -499,7 +499,7 @@ void DlgEdFunc::checkMovementAllowed(const MouseEvent& 
rMEvt)
 {
 if ( isRectangleHit(rMEvt) )
 {
-// there is an other component under use, break action
+// there is another component under use, break action
 m_pParent->getSectionWindow()->getViewsWindow()->BrkAction();
 }
 // object was dragged
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index d3c1e096d8a8..d52452cd5e38 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -303,7 +303,7 @@ static void ChildStatusProc(void *pData)
 SAL_WARN("sal.osl", "Failed to wait for child process, errno=" 
<< 

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

2018-08-15 Thread Libreoffice Gerrit user
 include/vcl/outdev.hxx |4 +++-
 vcl/source/outdev/text.cxx |   12 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 9aee1dd5c7a4799fa02f0f64e6f733029c47a21a
Author: Miklos Vajna 
AuthorDate: Wed Aug 15 14:41:28 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 18:59:14 2018 +0200

vcl: allow using pre-calculated layout in OutputDevice::DrawTextArray()

I plan to use this in SwFntObj::DrawText().

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e414121d4dcd..471d9a39fa0e 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1149,7 +1149,9 @@ public:
const long* pDXAry,
sal_Int32 nIndex = 0,
sal_Int32 nLen = -1,
-   SalLayoutFlags flags = 
SalLayoutFlags::NONE);
+   SalLayoutFlags flags = 
SalLayoutFlags::NONE,
+   vcl::TextLayoutCache const* = 
nullptr,
+   SalLayout* pLayoutCache = 
nullptr);
 longGetTextArray( const OUString& rStr, long* 
pDXAry,
   sal_Int32 nIndex = 0, sal_Int32 
nLen = -1,
   vcl::TextLayoutCache const* = 
nullptr,
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index fdcca1565731..659a9b6a82da 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -944,7 +944,9 @@ float OutputDevice::approximate_digit_width() const
 
 void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
   const long* pDXAry,
-  sal_Int32 nIndex, sal_Int32 nLen, 
SalLayoutFlags flags )
+  sal_Int32 nIndex, sal_Int32 nLen, 
SalLayoutFlags flags,
+  vcl::TextLayoutCache const*const 
pLayoutCache,
+  SalLayout* pSalLayoutCache )
 {
 assert(!is_double_buffered_window());
 
@@ -964,7 +966,13 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, 
const OUString& rStr,
 if( mbOutputClipped )
 return;
 
-std::unique_ptr pSalLayout = ImplLayout(rStr, nIndex, nLen, 
rStartPt, 0, pDXAry, flags);
+SalLayout* pSalLayout = pSalLayoutCache;
+std::unique_ptr pLayout;
+if (!pSalLayout)
+{
+pLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, 0, pDXAry, flags, 
pLayoutCache);
+pSalLayout = pLayout.get();
+}
 if( pSalLayout )
 {
 ImplDrawText( *pSalLayout );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/qa/unit/data/xlsx/tdf118990.xlsx   |binary
 sc/qa/unit/subsequent_export-test.cxx |   33 +
 sc/source/filter/excel/xecontent.cxx  |3 ++-
 3 files changed, 35 insertions(+), 1 deletion(-)

New commits:
commit f24b0ec13c5c8edda5ffb1336b0eb6da173dfc97
Author: Mike Kaganski 
AuthorDate: Wed Aug 15 12:35:30 2018 +0300
Commit: Mike Kaganski 
CommitDate: Wed Aug 15 18:56:50 2018 +0200

tdf#118990: use full URI for absolute references

Previously (since commit 7eb5e135422f1a5830a44d129300bc3fafb4627d)
only path relative to reference host was stored, and host itself
was dropped. That resulted in URIs like "/share/file.xlsx", even
without scheme. For Windows shares, this broke UNC paths like
"\\HOSTNAME\share\file.xlsx" (which are stored in XLSX by Excel as
"file:///\\HOSTNAME\share\file.xlsx"), and on subsequent import,
this resulted in paths on the same drive as the document (like
"C:\share\file.xlsx").

With this change, we will store "file://HOSTNAME/share/file.xlsx",
which is correctly processed by both LibreOffice and MS Excel.

Change-Id: I3f13aa0b3ae8dc41ec28eaa1416d536469c4562a
Reviewed-on: https://gerrit.libreoffice.org/59064
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/sc/qa/unit/data/xlsx/tdf118990.xlsx 
b/sc/qa/unit/data/xlsx/tdf118990.xlsx
new file mode 100644
index ..b680edceef0e
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf118990.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index bb134b0b1d1e..56546a588789 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -211,6 +211,8 @@ public:
 void testOpenDocumentAsReadOnly();
 void testKeepSettingsOfBlankRows();
 
+void testTdf118990();
+
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
 CPPUNIT_TEST(testTdf111876);
@@ -320,6 +322,8 @@ public:
 CPPUNIT_TEST(testOpenDocumentAsReadOnly);
 CPPUNIT_TEST(testKeepSettingsOfBlankRows);
 
+CPPUNIT_TEST(testTdf118990);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -4064,6 +4068,35 @@ void ScExportTest::testKeepSettingsOfBlankRows()
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 2);
 }
 
+void ScExportTest::testTdf118990()
+{
+ScDocShellRef xDocSh = loadDoc("tdf118990.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
+ScDocument& rDoc = xDocSh->GetDocument();
+
+// TODO: also test A1, which contains a UNC reference to 
\\localhost\share\lookupsource.xlsx,
+// but currently looses "localhost" part when normalized in INetURLObject, 
becoming
+// file:///share/lookupsource.xlsx - which is incorrect, since it points 
to local filesystem
+// and not to Windows network share.
+
+#if defined LINUX // following INetURLObject::setAbsURIRef
+#define TDF118990_SCHEME "smb:"
+#else // for Windows and macOS
+#define TDF118990_SCHEME "file:"
+#endif
+
+ASSERT_FORMULA_EQUAL(rDoc, ScAddress(0, 1, 0),
+ "VLOOKUP(B1,'" TDF118990_SCHEME 
"//192.168.1.1/share/lookupsource.xlsx'#$Sheet1.A1:B5,2)",
+ "Wrong Windows share (using host IP) URL in A2");
+
+ASSERT_FORMULA_EQUAL(rDoc, ScAddress(0, 2, 0),
+ "VLOOKUP(B1,'" TDF118990_SCHEME 
"//NETWORKHOST/share/lookupsource.xlsx'#$Sheet1.A1:B5,2)",
+ "Wrong Windows share (using hostname) URL in A3");
+
+xDocSh->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index cdc4269f144c..20217b48ef4e 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -459,7 +459,8 @@ OUString XclExpHyperlink::BuildFileName(
 sal_uInt16& rnLevel, bool& rbRel, const OUString& rUrl, const 
XclExpRoot& rRoot, bool bEncoded )
 {
 INetURLObject aURLObject( rUrl );
-OUString aDosName( bEncoded ? aURLObject.GetURLPath() : 
aURLObject.getFSysPath( FSysStyle::Dos ) );
+OUString aDosName(bEncoded ? 
aURLObject.GetMainURL(INetURLObject::DecodeMechanism::ToIUri)
+   : aURLObject.getFSysPath(FSysStyle::Dos));
 rnLevel = 0;
 rbRel = rRoot.IsRelUrl();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 loleaflet/src/layer/tile/GridLayer.js |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit eb448a6dd9b5d9f6558d2c3fd9510757ec77537e
Author: Tamás Zolnai 
AuthorDate: Wed Aug 15 18:41:46 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 15 18:42:35 2018 +0200

Update visibla area first before requesting new tiles

Change-Id: I379e4d92adf34bf16a1990123328b75c50f13df2

diff --git a/loleaflet/src/layer/tile/GridLayer.js 
b/loleaflet/src/layer/tile/GridLayer.js
index b7c451437..dc77255e9 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -541,6 +541,10 @@ L.GridLayer = L.Layer.extend({
}
}
 
+   this._sendClientVisibleArea();
+
+   this._sendClientZoom();
+
if (queue.length !== 0) {
if (newView) {
// we know that a new set of tiles that cover 
the whole view has been requested
@@ -558,10 +562,6 @@ L.GridLayer = L.Layer.extend({
this._addTiles(queue, fragment);
this._level.el.appendChild(fragment);
}
-
-   this._sendClientVisibleArea();
-
-   this._sendClientZoom();
},
 
_updateOnChangePart: function () {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unochart.cxx |   47 +---
 1 file changed, 17 insertions(+), 30 deletions(-)

New commits:
commit 20baed78792b39e43d1315552cc06b1fc29a45ba
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 14:13:02 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 18:32:10 2018 +0200

outer loop unrelated to inner loop

since original checkin of...

commit 9cddf9da7fb256418e1bc3b4719abb55e3b0604c
Date:   Tue May 22 15:33:44 2007 +

INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED
...
2006/12/13 12:31:03 tl 1.1.2.38: #i71244# update charts in writer

where I think this LockUnlockAllCharts chart2 loop was modelled on
the previous chart[1] styles loop of e.g. DoUpdateAllCharts which
loop over tables.

chart2 objects are unrelated to these tables, so remove the outer
loop, which then means the ofz#9689 ofz#9856 ofz9874 crashes that
made me look at it will get fixed

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

diff --git a/sw/source/core/unocore/unochart.cxx 
b/sw/source/core/unocore/unochart.cxx
index 130f0fa22181..442079fbee18 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -118,43 +118,30 @@ void SwChartLockController_Helper::LockUnlockAllCharts( 
bool bLock )
 if (!pDoc)
 return;
 
-const SwFrameFormats& rTableFormats = *pDoc->GetTableFrameFormats();
-for( size_t n = 0; n < rTableFormats.size(); ++n )
+uno::Reference< frame::XModel > xRes;
+SwOLENode *pONd;
+SwStartNode *pStNd;
+SwNodeIndex aIdx( 
*pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
+while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
 {
-SwTable* pTmpTable;
-const SwTableNode* pTableNd;
-const SwFrameFormat* pFormat = rTableFormats[ n ];
-
-if( nullptr != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
-nullptr != ( pTableNd = pTmpTable->GetTableNode() ) &&
-pTableNd->GetNodes().IsDocNodes() )
+++aIdx;
+if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+!pONd->GetChartTableName().isEmpty() /* is chart object? */)
 {
-uno::Reference< frame::XModel > xRes;
-SwOLENode *pONd;
-SwStartNode *pStNd;
-SwNodeIndex aIdx( 
*pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
-while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
+uno::Reference < embed::XEmbeddedObject > xIP = 
pONd->GetOLEObj().GetOleRef();
+if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
 {
-++aIdx;
-if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
-!pONd->GetChartTableName().isEmpty() /* is chart object? 
*/)
+xRes.set( xIP->getComponent(), uno::UNO_QUERY );
+if (xRes.is())
 {
-uno::Reference < embed::XEmbeddedObject > xIP = 
pONd->GetOLEObj().GetOleRef();
-if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
-{
-xRes.set( xIP->getComponent(), uno::UNO_QUERY );
-if (xRes.is())
-{
-if (bLock)
-xRes->lockControllers();
-else
-xRes->unlockControllers();
-}
-}
+if (bLock)
+xRes->lockControllers();
+else
+xRes->unlockControllers();
 }
-aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
 }
 }
+aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
 }
 
 bIsLocked = bLock;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 external/firebird/firebird-vs2017.patch.1 |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit b3b5abf3fdb0e088f6b902a22c3434e7176513c1
Author: Mike Kaganski 
AuthorDate: Wed Aug 15 14:00:56 2018 +0200
Commit: Mike Kaganski 
CommitDate: Wed Aug 15 18:20:57 2018 +0200

Allow all _MSC_VER up to (excluding) 2000 (Firebird)

(see 
https://blogs.msdn.microsoft.com/vcblog/2016/10/05/visual-c-compiler-version/)

Change-Id: I69133a3742f72c20daa0ad94e093e4fffbd5d8c2
Reviewed-on: https://gerrit.libreoffice.org/59097
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/external/firebird/firebird-vs2017.patch.1 
b/external/firebird/firebird-vs2017.patch.1
index a4dad62e34a9..609f380a3e46 100644
--- a/external/firebird/firebird-vs2017.patch.1
+++ b/external/firebird/firebird-vs2017.patch.1
@@ -4,9 +4,8 @@ diff -ru firebird.orig/src/common/os/win32/mod_loader.cpp 
firebird/src/common/os
 @@ -103,6 +103,6 @@
"msvcr120.dll",
 -#elif _MSC_VER == 1900
--  "vcruntime140.dll",
-+#elif _MSC_VER >= 1900 && _MSC_VER <= 1914
-+  "vcruntime140.dll",
++#elif _MSC_VER >= 1900 && _MSC_VER < 2000
+   "vcruntime140.dll",
  #else
  #error Specify CRT DLL name here !
  #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unochart.cxx |   48 
 1 file changed, 17 insertions(+), 31 deletions(-)

New commits:
commit 11c782a3bc70a6820334515002e9c5b849aa5025
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 14:31:39 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 18:11:40 2018 +0200

outer loop unrelated to inner loop

since original checkin of...

commit 9cddf9da7fb256418e1bc3b4719abb55e3b0604c
Date:   Tue May 22 15:33:44 2007 +

INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED
...
2006/12/13 12:31:03 tl 1.1.2.38: #i71244# update charts in writer

where I think this LockUnlockAllCharts chart2 loop was modelled on
the previous chart[1] styles loop of e.g. DoUpdateAllCharts which
loop over tables.

chart2 objects are unrelated to these tables, so remove the outer
loop, which then means the ofz#9689 ofz#9856 ofz9874 crashes that
made me look at it will get fixed

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

diff --git a/sw/source/core/unocore/unochart.cxx 
b/sw/source/core/unocore/unochart.cxx
index 8dcc9b13a670..89d331952654 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -117,44 +117,30 @@ void SwChartLockController_Helper::LockUnlockAllCharts( 
bool bLock )
 if (!pDoc)
 return;
 
-const SwFrameFormats& rTableFormats = *pDoc->GetTableFrameFormats();
-for( size_t n = 0; n < rTableFormats.size(); ++n )
+uno::Reference< frame::XModel > xRes;
+SwOLENode *pONd;
+SwStartNode *pStNd;
+SwNodeIndex aIdx( 
*pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
+while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
 {
-const SwFrameFormat* pFormat = rTableFormats[ n ];
-SwTable* pTmpTable = SwTable::FindTable(pFormat);
-if (!pTmpTable)
-continue;
-const SwTableNode* pTableNd = pTmpTable->GetTableNode();
-if (!pTableNd)
-continue;
-if (!pTableNd->GetNodes().IsDocNodes())
-continue;
-
-uno::Reference< frame::XModel > xRes;
-SwOLENode *pONd;
-SwStartNode *pStNd;
-SwNodeIndex aIdx( 
*pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
-while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
+++aIdx;
+if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+!pONd->GetChartTableName().isEmpty() /* is chart object? */)
 {
-++aIdx;
-if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
-!pONd->GetChartTableName().isEmpty() /* is chart object? */)
+uno::Reference < embed::XEmbeddedObject > xIP = 
pONd->GetOLEObj().GetOleRef();
+if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
 {
-uno::Reference < embed::XEmbeddedObject > xIP = 
pONd->GetOLEObj().GetOleRef();
-if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
+xRes.set( xIP->getComponent(), uno::UNO_QUERY );
+if (xRes.is())
 {
-xRes.set( xIP->getComponent(), uno::UNO_QUERY );
-if (xRes.is())
-{
-if (bLock)
-xRes->lockControllers();
-else
-xRes->unlockControllers();
-}
+if (bLock)
+xRes->lockControllers();
+else
+xRes->unlockControllers();
 }
 }
-aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
 }
+aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
 }
 
 bIsLocked = bLock;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-4-1-6+backports' - 23 commits - download.lst external/curl external/Module_external.mk external/openssl Makefile.fetch oox/Library_oox.mk

2018-08-15 Thread Libreoffice Gerrit user
Rebased ref, commits from common ancestor:
commit 6fc16ccc617ee01ca0382b4f8e8d5f13926888c8
Author: Thorsten Behrens 
AuthorDate: Wed Aug 15 17:47:23 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Aug 15 17:47:23 2018 +0200

oox: make linking work with TLS = openssl

Change-Id: I54b114235dbac276778776f5e08636c39ba3d0fb

diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 45f4b9cc494a..edea8d9e0282 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -288,4 +288,10 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,oox,\
 CustomTarget/oox/generated/misc/vmlexport-shape-types \
 ))
 
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_libs,oox,\
+   -ldl \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
commit 4252c16773848b972d51b4f80da6099790b5c138
Author: Michael Stahl 
AuthorDate: Mon Mar 7 23:04:37 2016 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Aug 15 17:05:47 2018 +0200

openssl: fix WNT build

For reasons beyond human understanding, the many-tentacled horror that
openssl calls its build system puts headers in "inc32" directory on
Windows and "include" on other platforms in 1.0.2g.

(cherry picked from commit a420a4346ec21ea561f1321767d6a5eed98df02b)

Conflicts:
external/openssl/ExternalProject_openssl.mk

Change-Id: If03c80f5a31bb6e378cd187051b020579af7f7bd

diff --git a/external/openssl/ExternalProject_openssl.mk 
b/external/openssl/ExternalProject_openssl.mk
index 4c2d305bbf47..68cd4df2f873 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -68,6 +68,7 @@ $(call gb_ExternalProject_get_state_target,openssl,build):
&& cmd /c "ms\do_ms.bat $(PERL) $(OPENSSL_PLATFORM)" \
&& unset MAKEFLAGS \
&& nmake -f "ms\ntdll.mak" \
+   && mv inc32/* include/ \
)
 
 else
@@ -90,4 +91,5 @@ $(call gb_ExternalProject_get_state_target,openssl,build):
-fvisibility=hidden))" \
)
 endif
+
 # vim: set noet sw=4 ts=4:
commit 97043b10778f73dac0d1c8a69201ce6e38bed7b1
Author: Thorsten Behrens 
AuthorDate: Tue May 22 15:59:20 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Aug 15 17:05:47 2018 +0200

fixup openssl build - no werror please for vs2012

Change-Id: If166da8874188218e7c055b6258f58f162a80bb0

diff --git a/external/openssl/opensslwnt.patch 
b/external/openssl/opensslwnt.patch
index 2d00736f1317..1dba3c6d3b07 100644
--- a/external/openssl/opensslwnt.patch
+++ b/external/openssl/opensslwnt.patch
@@ -175,3 +175,14 @@ diff -ru openssl.orig/ms/uplink.c openssl/ms/uplink.c
  #endif
  #if defined(UNICODE) && !defined(_UNICODE)
  # define _UNICODE
+--- a/openssl.orig/Configure   2018-05-22 15:30:56.614125400 +0200
 b/openssl/Configure2018-05-22 15:13:18.0 
+0200
+@@ -595,7 +595,7 @@
+ "debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 
-DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE 
-D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT 
EXPORT_VAR_AS_FN:".eval{my 
$asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32",
+ # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
+ # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE'
+-"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 
-DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE 
-D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN 
${x86_gcc_opts}:${x86_asm}:win32n:win32",
++"VC-WIN32","cl:-W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 
-DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE 
-D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN 
${x86_gcc_opts}:${x86_asm}:win32n:win32",
+ # Unified CE target
+ "debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 
-DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE 
-D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN 
${x86_gcc_opts}:${x86_asm}:win32n:win32",
+ "VC-CE","clWINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN 
${x86_gcc_opts}:${no_asm}:win32",
commit 4938e8f345540a6d7bdc057a59803ad2ceaee8af
Author: Thorsten Behrens 
AuthorDate: Mon Apr 30 14:33:09 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Aug 15 17:05:46 2018 +0200

update openssl to 1.0.2o

Change-Id: I6f7308e60ba74bbcec1719c9aeec8e6c21d24ecc

diff --git a/Makefile.fetch b/Makefile.fetch
index 1c0214242b1e..c3c471174b7d 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -81,6 +81,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk 
$(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
$(call fetch_Optional,MWAW,MWAW_TARBALL) \
$(call fetch_Optional,NSS,NSS_TARBALL) \
+   $(call fetch_Optional,OPEN

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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unochart.cxx |   47 +---
 1 file changed, 17 insertions(+), 30 deletions(-)

New commits:
commit eadf6f4551416430b58efc42a5756556df0a237d
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 14:13:02 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 17:46:19 2018 +0200

outer loop unrelated to inner loop

since original checkin of...

commit 9cddf9da7fb256418e1bc3b4719abb55e3b0604c
Date:   Tue May 22 15:33:44 2007 +

INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED
...
2006/12/13 12:31:03 tl 1.1.2.38: #i71244# update charts in writer

where I think this LockUnlockAllCharts chart2 loop was modelled on
the previous chart[1] styles loop of e.g. DoUpdateAllCharts which
loop over tables.

chart2 objects are unrelated to these tables, so remove the outer
loop, which then means the ofz#9689 ofz#9856 ofz9874 crashes that
made me look at it will get fixed

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

diff --git a/sw/source/core/unocore/unochart.cxx 
b/sw/source/core/unocore/unochart.cxx
index 1d06634c6950..0ffe06c6df05 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -117,43 +117,30 @@ void SwChartLockController_Helper::LockUnlockAllCharts( 
bool bLock )
 if (!pDoc)
 return;
 
-const SwFrameFormats& rTableFormats = *pDoc->GetTableFrameFormats();
-for( size_t n = 0; n < rTableFormats.size(); ++n )
+uno::Reference< frame::XModel > xRes;
+SwOLENode *pONd;
+SwStartNode *pStNd;
+SwNodeIndex aIdx( 
*pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
+while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
 {
-SwTable* pTmpTable;
-const SwTableNode* pTableNd;
-const SwFrameFormat* pFormat = rTableFormats[ n ];
-
-if( nullptr != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
-nullptr != ( pTableNd = pTmpTable->GetTableNode() ) &&
-pTableNd->GetNodes().IsDocNodes() )
+++aIdx;
+if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+!pONd->GetChartTableName().isEmpty() /* is chart object? */)
 {
-uno::Reference< frame::XModel > xRes;
-SwOLENode *pONd;
-SwStartNode *pStNd;
-SwNodeIndex aIdx( 
*pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
-while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
+uno::Reference < embed::XEmbeddedObject > xIP = 
pONd->GetOLEObj().GetOleRef();
+if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
 {
-++aIdx;
-if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
-!pONd->GetChartTableName().isEmpty() /* is chart object? 
*/)
+xRes.set( xIP->getComponent(), uno::UNO_QUERY );
+if (xRes.is())
 {
-uno::Reference < embed::XEmbeddedObject > xIP = 
pONd->GetOLEObj().GetOleRef();
-if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
-{
-xRes.set( xIP->getComponent(), uno::UNO_QUERY );
-if (xRes.is())
-{
-if (bLock)
-xRes->lockControllers();
-else
-xRes->unlockControllers();
-}
-}
+if (bLock)
+xRes->lockControllers();
+else
+xRes->unlockControllers();
 }
-aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
 }
 }
+aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
 }
 
 bIsLocked = bLock;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 svtools/inc/langtab.hrc |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 2f058c33c85958c77adf103da1865aae333126e9
Author: Eike Rathke 
AuthorDate: Wed Aug 15 17:36:23 2018 +0200
Commit: Eike Rathke 
CommitDate: Wed Aug 15 17:38:28 2018 +0200

Resolves: tdf#110751 add "Sindhi, Arabic" to language list

... to match our 'sd' translation and not display that as
"{sd-Arab-PK}" anymore.

Reword "Sindhi" to "Sindhi, Devanagari" to differentiate properly.

Change-Id: Ie2c532980eb7fe73e9130dfcf2ee1e3e39e216e2

diff --git a/svtools/inc/langtab.hrc b/svtools/inc/langtab.hrc
index ff23fc65f31c..0ff23912f9a1 100644
--- a/svtools/inc/langtab.hrc
+++ b/svtools/inc/langtab.hrc
@@ -158,7 +158,8 @@ const std::pair 
STR_ARR_SVT_LANGUAGE_TABLE[] =
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Serbian Latin (Montenegro)") , 
LANGUAGE_USER_SERBIAN_LATIN_MONTENEGRO },
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Serbian Latin") , 
LANGUAGE_SERBIAN_LATIN_LSO },
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Sidama") , LANGUAGE_USER_SIDAMA },
-{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Sindhi") , LANGUAGE_SINDHI },
+{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Sindhi, Devanagari") , 
LANGUAGE_SINDHI },
+{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Sindhi, Arabic") , 
LANGUAGE_SINDHI_PAKISTAN },
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Slovak") , LANGUAGE_SLOVAK },
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Slovenian") , LANGUAGE_SLOVENIAN },
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Spanish (Spain)") , LANGUAGE_SPANISH 
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unotbl.cxx |   22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 31374100da4062eab9cdd171cea27c0965ded5ac
Author: Caolán McNamara 
AuthorDate: Tue Aug 14 12:30:36 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 17:31:25 2018 +0200

tdf#117127 crash on inspecting value describing a table

since...

commit f86d0413f7cedf096b285c2eb6698653dd99c21e
Date:   Mon Mar 30 01:26:21 2015 +0200

SwXCellRange:: and SwXTextTable::getDataArray() do the same

which used to have more checks than its replacement

Change-Id: Id931882ef7c749ffa18ef3474e3e661ba8614ab0
Reviewed-on: https://gerrit.libreoffice.org/58977
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 1d28972928c2..be2b71758a61 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2313,7 +2313,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL 
SwXTextTable::getDataArray()
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 return xAllRange->getDataArray();
 }
 
@@ -2323,7 +2323,7 @@ void SAL_CALL SwXTextTable::setDataArray(const 
uno::Sequence< uno::Sequence< uno
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 return xAllRange->setDataArray(rArray);
 }
 
@@ -2333,7 +2333,7 @@ uno::Sequence< uno::Sequence< double > > 
SwXTextTable::getData()
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 return xAllRange->getData();
@@ -2345,7 +2345,7 @@ void SwXTextTable::setData(const uno::Sequence< 
uno::Sequence< double > >& rData
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 xAllRange->setData(rData);
@@ -2359,7 +2359,7 @@ uno::Sequence SwXTextTable::getRowDescriptions()
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 return xAllRange->getRowDescriptions();
@@ -2371,7 +2371,7 @@ void SwXTextTable::setRowDescriptions(const 
uno::Sequence& rRowDesc)
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 xAllRange->setRowDescriptions(rRowDesc);
@@ -2383,7 +2383,7 @@ uno::Sequence 
SwXTextTable::getColumnDescriptions()
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 return xAllRange->getColumnDescriptions();
@@ -2395,7 +2395,7 @@ void SwXTextTable::setColumnDescriptions(const 
uno::Sequence& rColumnD
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 return xAllRange->setColumnDescriptions(rCol

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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unotbl.cxx |   22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 30be37d5919024992a81603494a81f0fb1d8f775
Author: Caolán McNamara 
AuthorDate: Tue Aug 14 12:30:36 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 17:30:54 2018 +0200

tdf#117127 crash on inspecting value describing a table

since...

commit f86d0413f7cedf096b285c2eb6698653dd99c21e
Date:   Mon Mar 30 01:26:21 2015 +0200

SwXCellRange:: and SwXTextTable::getDataArray() do the same

which used to have more checks than its replacement

Change-Id: Id931882ef7c749ffa18ef3474e3e661ba8614ab0
Reviewed-on: https://gerrit.libreoffice.org/58978
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index de6adc6a2130..d16986b65248 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2316,7 +2316,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL 
SwXTextTable::getDataArray()
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 return xAllRange->getDataArray();
 }
 
@@ -2326,7 +2326,7 @@ void SAL_CALL SwXTextTable::setDataArray(const 
uno::Sequence< uno::Sequence< uno
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 return xAllRange->setDataArray(rArray);
 }
 
@@ -2336,7 +2336,7 @@ uno::Sequence< uno::Sequence< double > > 
SwXTextTable::getData()
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 return xAllRange->getData();
@@ -2348,7 +2348,7 @@ void SwXTextTable::setData(const uno::Sequence< 
uno::Sequence< double > >& rData
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 xAllRange->setData(rData);
@@ -2362,7 +2362,7 @@ uno::Sequence SwXTextTable::getRowDescriptions()
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 return xAllRange->getRowDescriptions();
@@ -2374,7 +2374,7 @@ void SwXTextTable::setRowDescriptions(const 
uno::Sequence& rRowDesc)
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 xAllRange->setRowDescriptions(rRowDesc);
@@ -2386,7 +2386,7 @@ uno::Sequence 
SwXTextTable::getColumnDescriptions()
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 return xAllRange->getColumnDescriptions();
@@ -2398,7 +2398,7 @@ void SwXTextTable::setColumnDescriptions(const 
uno::Sequence& rColumnD
 std::pair const 
RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this));
 uno::Reference const xAllRange(
 getCellRangeByPosition(0, 0, RowsAndColumns.second-1, 
RowsAndColumns.first-1),
-uno::UNO_QUERY);
+uno::UNO_QUERY_THROW);
 static_cast(xAllRange.get())->SetLabels(
 m_pImpl->m_bFirstRowAsLabel, m_pImpl->m_bFirstColumnAsLabel);
 return xAllRange->setColumnDescriptions(rCol

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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/core/data/documen4.cxx   |3 +++
 sc/source/core/data/documentimport.cxx |4 
 sc/source/ui/docshell/impex.cxx|8 
 3 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 1af7f19224f18e5025352339648db659575eae33
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 12:44:17 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 17:28:15 2018 +0200

ofz#9894 cut out slow paths

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

diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 873d980c53a7..136e34e27e74 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -273,6 +274,8 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW 
nRow1,
 SAL_WARN("sc", "ScDocument::InsertMatrixFormula: No table marked");
 return;
 }
+if (utl::ConfigManager::IsFuzzing()) //just too slow
+return;
 assert( ValidColRow( nCol1, nRow1) && ValidColRow( nCol2, nRow2));
 
 SCTAB nTab1 = *rMark.begin();
diff --git a/sc/source/core/data/documentimport.cxx 
b/sc/source/core/data/documentimport.cxx
index 1c0ce77c3102..8354d29ded68 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace {
 
@@ -385,6 +386,9 @@ void ScDocumentImport::setMatrixCells(
 if (!pBlockPos)
 return;
 
+if (utl::ConfigManager::IsFuzzing()) //just too slow
+return;
+
 sc::CellStoreType& rCells = pTab->aCol[rBasePos.Col()].maCells;
 
 // Set the master cell.
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index af2d363998c2..2fef2685f18e 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -97,7 +97,7 @@ enum class SylkVersion
 // Whole document without Undo
 ScImportExport::ScImportExport( ScDocument* p )
 : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
-  nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW 
: 4000),
+  nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW 
: SCROWS32K),
   cSep( '\t' ), cStr( '"' ),
   bFormulas( false ), bIncludeFiltered( true ),
   bAll( true ), bSingle( true ), bUndo( false ),
@@ -113,7 +113,7 @@ ScImportExport::ScImportExport( ScDocument* p )
 ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
 : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
   aRange( rPt ),
-  nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW 
: 4000),
+  nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW 
: SCROWS32K),
   cSep( '\t' ), cStr( '"' ),
   bFormulas( false ), bIncludeFiltered( true ),
   bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
@@ -130,7 +130,7 @@ ScImportExport::ScImportExport( ScDocument* p, const 
ScAddress& rPt )
 ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
 : pDocSh( dynamic_cast(p->GetDocumentShell()) ), pDoc( p ),
   aRange( r ),
-  nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW 
: 4000),
+  nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW 
: SCROWS32K),
   cSep( '\t' ), cStr( '"' ),
   bFormulas( false ), bIncludeFiltered( true ),
   bAll( false ), bSingle( false ), bUndo( pDocSh != nullptr ),
@@ -148,7 +148,7 @@ ScImportExport::ScImportExport( ScDocument* p, const 
ScRange& r )
 // If a View exists, the TabNo of the view will be used.
 ScImportExport::ScImportExport( ScDocument* p, const OUString& rPos )
 : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
-  nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW 
: 4000),
+  nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW 
: SCROWS32K),
   cSep( '\t' ), cStr( '"' ),
   bFormulas( false ), bIncludeFiltered( true ),
   bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unochart.cxx |   49 ++--
 1 file changed, 25 insertions(+), 24 deletions(-)

New commits:
commit c2db702ca3df56bd4a1c26d2171cd0ac5259b973
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 14:13:02 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 17:17:48 2018 +0200

unroll complex if statement assigns

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

diff --git a/sw/source/core/unocore/unochart.cxx 
b/sw/source/core/unocore/unochart.cxx
index 6c64ef2441ae..8dcc9b13a670 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -120,39 +120,40 @@ void SwChartLockController_Helper::LockUnlockAllCharts( 
bool bLock )
 const SwFrameFormats& rTableFormats = *pDoc->GetTableFrameFormats();
 for( size_t n = 0; n < rTableFormats.size(); ++n )
 {
-SwTable* pTmpTable;
-const SwTableNode* pTableNd;
 const SwFrameFormat* pFormat = rTableFormats[ n ];
+SwTable* pTmpTable = SwTable::FindTable(pFormat);
+if (!pTmpTable)
+continue;
+const SwTableNode* pTableNd = pTmpTable->GetTableNode();
+if (!pTableNd)
+continue;
+if (!pTableNd->GetNodes().IsDocNodes())
+continue;
 
-if( nullptr != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
-nullptr != ( pTableNd = pTmpTable->GetTableNode() ) &&
-pTableNd->GetNodes().IsDocNodes() )
+uno::Reference< frame::XModel > xRes;
+SwOLENode *pONd;
+SwStartNode *pStNd;
+SwNodeIndex aIdx( 
*pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
+while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
 {
-uno::Reference< frame::XModel > xRes;
-SwOLENode *pONd;
-SwStartNode *pStNd;
-SwNodeIndex aIdx( 
*pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
-while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
+++aIdx;
+if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+!pONd->GetChartTableName().isEmpty() /* is chart object? */)
 {
-++aIdx;
-if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
-!pONd->GetChartTableName().isEmpty() /* is chart object? 
*/)
+uno::Reference < embed::XEmbeddedObject > xIP = 
pONd->GetOLEObj().GetOleRef();
+if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
 {
-uno::Reference < embed::XEmbeddedObject > xIP = 
pONd->GetOLEObj().GetOleRef();
-if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
+xRes.set( xIP->getComponent(), uno::UNO_QUERY );
+if (xRes.is())
 {
-xRes.set( xIP->getComponent(), uno::UNO_QUERY );
-if (xRes.is())
-{
-if (bLock)
-xRes->lockControllers();
-else
-xRes->unlockControllers();
-}
+if (bLock)
+xRes->lockControllers();
+else
+xRes->unlockControllers();
 }
 }
-aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
 }
+aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sysui/desktop

2018-08-15 Thread Libreoffice Gerrit user
 sysui/desktop/apparmor/program.soffice.bin |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e83a535776f8337a09c8d582ac484b3b027728a3
Author: Vincas Dargis 
AuthorDate: Tue Aug 14 20:49:31 2018 +0300
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 16:40:16 2018 +0200

apparmor: fix access to /etc/xml/catalog

Exporting document to .xhtml produces AppArmor deny log entry. Add
AppArmor rule for accessing /etc/xml/catalog as it is needed by libxml2.

Change-Id: If62046059c4e1d458cca895f14f7d1e3f537c527
Reviewed-on: https://gerrit.libreoffice.org/59005
Tested-by: Jenkins
Reviewed-by: Rene Engelhard 
(cherry picked from commit a826cb4f9655ab8b994c4da258835f5f6ddb5a5f)
Reviewed-on: https://gerrit.libreoffice.org/59042
Reviewed-by: Vincas Dargis 
Reviewed-by: Miklos Vajna 

diff --git a/sysui/desktop/apparmor/program.soffice.bin 
b/sysui/desktop/apparmor/program.soffice.bin
index 56f4de4ef9af..82525d6cde7d 100644
--- a/sysui/desktop/apparmor/program.soffice.bin
+++ b/sysui/desktop/apparmor/program.soffice.bin
@@ -106,6 +106,7 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin {
   /etc/libreoffice/**   r,
 
   /etc/cups/ppd/*.ppd   r,
+  /etc/xml/catalog  r, #exporting to .xhtml, for libxml2
   /proc/*/statusr,
 
   owner @{HOME}/.config/libreoffice{,dev}/** rwk,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sysui/desktop

2018-08-15 Thread Libreoffice Gerrit user
 sysui/desktop/apparmor/program.soffice.bin |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 4b60e727cde70578d3cfed1971b8edf1e8b924d1
Author: Vincas Dargis 
AuthorDate: Tue Aug 14 20:19:00 2018 +0300
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 16:28:39 2018 +0200

apparmor: allow writing .epub files

Currently, exporting document to .epub fails if AppArmor profile is
enabled. This patch fixes it by registering .epub extension within
AppArmor profile.

Change-Id: I5075ac803ffd9157c2f2cc6546895149b0fdd5f2
Reviewed-on: https://gerrit.libreoffice.org/59004
Tested-by: Jenkins
Reviewed-by: Rene Engelhard 
(cherry picked from commit 8d1f307c2fb1fa6b0402b88954269a0b0442d02f)
Reviewed-on: https://gerrit.libreoffice.org/59043
Reviewed-by: Vincas Dargis 
Reviewed-by: Miklos Vajna 

diff --git a/sysui/desktop/apparmor/program.soffice.bin 
b/sysui/desktop/apparmor/program.soffice.bin
index a6802609dcfa..56f4de4ef9af 100644
--- a/sysui/desktop/apparmor/program.soffice.bin
+++ b/sysui/desktop/apparmor/program.soffice.bin
@@ -35,6 +35,8 @@
 @{libreoffice_ext} += [uU][oO][fFtTsSpP]
 #(x)htm(l)
 @{libreoffice_ext} += {,x,X}[hH][tT][mM]{,l,L}
+#.epub
+@{libreoffice_ext} += [eE][pP][uU][bB]
 
 #Images
 @{libreoffice_ext} += [jJ][pP][gG]
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 include/svx/svdmodel.hxx   |2 +-
 svx/source/inc/svdoutlinercache.hxx|2 +-
 svx/source/svdraw/svdmodel.cxx |   10 ++
 svx/source/svdraw/svdoutlinercache.cxx |9 -
 svx/source/unodraw/unoshtxt.cxx|9 -
 5 files changed, 12 insertions(+), 20 deletions(-)

New commits:
commit 9d31badc81c5044269a50ee2bc16f757f258d617
Author: Noel Grandin 
AuthorDate: Sat Aug 11 10:36:07 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 15:51:37 2018 +0200

loplugin:useuniqueptr in disposeOutliner

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

diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 62bb9dd51533..cfe5ffdd6fb6 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -594,7 +594,7 @@ public:
 void ReformatAllTextObjects();
 
 std::unique_ptr createOutliner( OutlinerMode nOutlinerMode );
-void disposeOutliner( SdrOutliner* pOutliner );
+void disposeOutliner( std::unique_ptr pOutliner );
 
 bool IsWriter() const { return !bMyPool; }
 
diff --git a/svx/source/inc/svdoutlinercache.hxx 
b/svx/source/inc/svdoutlinercache.hxx
index 9eba3da602c9..a919da2ab89d 100644
--- a/svx/source/inc/svdoutlinercache.hxx
+++ b/svx/source/inc/svdoutlinercache.hxx
@@ -42,7 +42,7 @@ public:
 ~SdrOutlinerCache();
 
 std::unique_ptr createOutliner( OutlinerMode nOutlinerMode );
-void disposeOutliner( SdrOutliner* pOutliner );
+void disposeOutliner( std::unique_ptr pOutliner );
 std::vector< SdrOutliner* > GetActiveOutliners() const;
 };
 
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 4889328cbf57..0677d4424593 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1885,16 +1885,10 @@ std::vector 
SdrModel::GetActiveOutliners() const
 return aRet;
 }
 
-void SdrModel::disposeOutliner( SdrOutliner* pOutliner )
+void SdrModel::disposeOutliner( std::unique_ptr pOutliner )
 {
 if( mpOutlinerCache )
-{
-mpOutlinerCache->disposeOutliner( pOutliner );
-}
-else
-{
-delete pOutliner;
-}
+mpOutlinerCache->disposeOutliner( std::move(pOutliner) );
 }
 
 SvxNumType SdrModel::GetPageNumType() const
diff --git a/svx/source/svdraw/svdoutlinercache.cxx 
b/svx/source/svdraw/svdoutlinercache.cxx
index fe66e5f0a42f..1d9d75d81f08 100644
--- a/svx/source/svdraw/svdoutlinercache.cxx
+++ b/svx/source/svdraw/svdoutlinercache.cxx
@@ -59,7 +59,7 @@ SdrOutlinerCache::~SdrOutlinerCache()
 {
 }
 
-void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
+void SdrOutlinerCache::disposeOutliner( std::unique_ptr pOutliner 
)
 {
 if( pOutliner )
 {
@@ -67,26 +67,25 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* 
pOutliner )
 
 if( OutlinerMode::OutlineObject == nOutlMode )
 {
-maModeOutline.emplace_back(pOutliner);
 pOutliner->Clear();
 pOutliner->SetVertical( false );
 
 // Deregister on outliner, might be reused from outliner cache
 pOutliner->SetNotifyHdl( Link() );
+maModeOutline.emplace_back(std::move(pOutliner));
 }
 else if( OutlinerMode::TextObject == nOutlMode )
 {
-maModeText.emplace_back(pOutliner);
 pOutliner->Clear();
 pOutliner->SetVertical( false );
 
 // Deregister on outliner, might be reused from outliner cache
 pOutliner->SetNotifyHdl( Link() );
+maModeText.emplace_back(std::move(pOutliner));
 }
 else
 {
-maActiveOutliners.erase(pOutliner);
-delete pOutliner;
+maActiveOutliners.erase(pOutliner.get());
 }
 }
 }
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 466f564602e1..52414fb67957 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -85,7 +85,7 @@ private:
 SdrView*mpView;
 VclPtr   mpWindow;
 SdrModel*   mpModel;//  probably not 
needed -> use SdrModel from SdrObject (?)
-SdrOutliner*mpOutliner;
+std::unique_ptrmpOutliner;
 std::unique_ptr mpTextForwarder;
 std::unique_ptr mpViewForwarder;// if 
non-NULL, use GetViewModeTextForwarder text forwarder
 css::uno::Reference< css::linguistic2::XLinguServiceManager2 > 
m_xLinguServiceManager;
@@ -406,13 +406,12 @@ void SvxTextEditSourceImpl::dispose()
 {
 if( mpModel )
 {
-mpModel->disposeOutliner( mpOutliner );
+mpModel->disposeOutliner( std::move(mpOutliner) );
 }
 else
 {
-delete mpOutliner;
+mpOutliner.reset();
 }
-mpOutliner = nullptr;
  

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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/layout/flowfrm.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit e4989ae8ca0d8b37e98caa5b68c164c79d27d574
Author: Caolán McNamara 
AuthorDate: Tue Aug 14 15:22:58 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 15:46:00 2018 +0200

tdf#117086 crash on deleted SwFootnoteBossFrame

use SwFrameDeleteGuard to lock pOldBoss to exist over the range
its directly accessed

Change-Id: I68af80114a380f68b86cbc78278fb9e5e87e
Reviewed-on: https://gerrit.libreoffice.org/58991
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index d53622754d69..90123ceadc0e 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1872,6 +1872,8 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool 
bPageBreak, bool bMoveAlways )
 }
 }
 
+std::unique_ptr xDeleteGuard(bMakePage ? new 
SwFrameDeleteGuard(pOldBoss) : nullptr);
+
 bool bSamePage = true;
 SwLayoutFrame *pNewUpper =
 m_rThis.GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, true 
);
@@ -1910,6 +1912,8 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool 
bPageBreak, bool bMoveAlways )
 pOldBoss = pOldBoss->FindFootnoteBossFrame( true );
 SwPageFrame* pNewPage = pOldPage;
 
+xDeleteGuard.reset();
+
 // First, we move the footnotes.
 bool bFootnoteMoved = false;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit c144dcbdb54cf657e21b0ba09ca8675246441519
Author: Mike Kaganski 
AuthorDate: Wed Aug 15 13:47:31 2018 +0200
Commit: Mike Kaganski 
CommitDate: Wed Aug 15 15:44:32 2018 +0200

Don't break on twain_dsm warnings

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

diff --git a/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch 
b/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch
index 86b87a4ff41b..40e131d2ad71 100644
--- a/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch
+++ b/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch
@@ -3,7 +3,7 @@ new file mode 100755
 index ..425c39966171
 --- /dev/null
 +++ b/visual_studio/TWAIN_DSM_VS2015.vcxproj
-@@ -0,0 +1,256 @@
+@@ -0,0 +1,258 @@
 +
 +http://schemas.microsoft.com/developer/msbuild/2003";>
 +  
@@ -122,7 +122,7 @@ index ..425c39966171
 +  
 +  
 +  Level4
-+  true
++  false
 +  ProgramDatabase
 +
 +
@@ -158,7 +158,7 @@ index ..425c39966171
 +  
 +  
 +  Level4
-+  true
++  false
 +  ProgramDatabase
 +
 +
@@ -191,6 +191,7 @@ index ..425c39966171
 +  
 +  
 +  Level3
++  false
 +  ProgramDatabase
 +
 +
@@ -223,6 +224,7 @@ index ..425c39966171
 +  
 +  
 +  Level3
++  false
 +  ProgramDatabase
 +
 +
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/unoobj/PivotTableDataProvider.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa89d83cdf29ea2dc33ed99aed67df5df5424036
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 10:42:33 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 15:00:56 2018 +0200

tdf#115086 crash in assignLabelsToDataSequence

since...

commit c45358e928b9b9419bba10a0fcb661696cb7647a
Date:   Mon Apr 24 00:09:08 2017 +0200

preserve "Total" label on round-trip, remove code duplication

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

diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx 
b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index b0a4fe18431a..277fd285684b 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -617,7 +617,7 @@ PivotTableDataProvider::assignLabelsToDataSequence(size_t 
nIndex)
 {
 aLabel = ScResId(STR_PIVOT_TOTAL);
 }
-else
+else if (nIndex < m_aLabels.size())
 {
 for (ValueAndFormat const & rItem : m_aLabels[nIndex])
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 lotuswordpro/source/filter/lwpgrfobj.cxx |   25 ++---
 1 file changed, 10 insertions(+), 15 deletions(-)

New commits:
commit aa7c6cccd896f4ad7357dc819c668983ffc979e6
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 11:44:05 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 14:59:50 2018 +0200

ofz#9910 Direct-leak

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

diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx 
b/lotuswordpro/source/filter/lwpgrfobj.cxx
index c732b611a0f1..26b3b8a52be5 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -112,7 +112,6 @@ void LwpGraphicObject::Read()
 m_sDataFormat[strsize] = '\0';
 }
 sal_uInt32 nServerContextSize = m_pObjStrm->QuickReaduInt32();
-unsigned char *pServerContext = nullptr;
 if (nServerContextSize > 0)
 {
 sal_uInt16 nMaxPossibleSize = m_pObjStrm->remainingSize();
@@ -123,16 +122,16 @@ void LwpGraphicObject::Read()
 nServerContextSize = nMaxPossibleSize;
 }
 
-pServerContext = new unsigned char[nServerContextSize];
-m_pObjStrm->QuickRead(pServerContext, 
static_cast(nServerContextSize));
+std::vector aServerContext(nServerContextSize);
+m_pObjStrm->QuickRead(aServerContext.data(), 
static_cast(nServerContextSize));
 if (nServerContextSize > 44)
 {
-m_aIPData.nBrightness = pServerContext[14];
-m_aIPData.nContrast = pServerContext[19];
-m_aIPData.nEdgeEnchancement = pServerContext[24];
-m_aIPData.nSmoothing = pServerContext[29];
-m_aIPData.bInvertImage = (pServerContext[34] == 0x01);
-m_aIPData.bAutoContrast = (pServerContext[44] == 0x00);
+m_aIPData.nBrightness = aServerContext[14];
+m_aIPData.nContrast = aServerContext[19];
+m_aIPData.nEdgeEnchancement = aServerContext[24];
+m_aIPData.nSmoothing = aServerContext[29];
+m_aIPData.bInvertImage = (aServerContext[34] == 0x01);
+m_aIPData.bAutoContrast = (aServerContext[44] == 0x00);
 }
 }
 m_pObjStrm->QuickReaduInt16(); //disksize
@@ -153,7 +152,6 @@ void LwpGraphicObject::Read()
 }
 m_nCachedBaseLine = m_pObjStrm->QuickReadInt32();
 m_bIsLinked = m_pObjStrm->QuickReadInt16();
-unsigned char * pFilterContext = nullptr;
 
 if (m_bIsLinked)
 {
@@ -170,8 +168,8 @@ void LwpGraphicObject::Read()
 nFilterContextSize = nMaxPossibleSize;
 }
 
-pFilterContext = new unsigned char[nFilterContextSize];
-m_pObjStrm->QuickRead(pFilterContext, 
static_cast(nFilterContextSize));
+std::vector aFilterContext(nFilterContextSize);
+m_pObjStrm->QuickRead(aFilterContext.data(), 
static_cast(nFilterContextSize));
 }
 if (LwpFileHeader::m_nFileRevision >= 0x000b)
 {
@@ -200,9 +198,6 @@ void LwpGraphicObject::Read()
 {
 m_WatermarkName = m_pObjStrm->QuickReadStringPtr();
 }
-
-delete[] pServerContext;
-delete[] pFilterContext;
 }
 
 void LwpGraphicObject::XFConvert (XFContentContainer* pCont)
___
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' - sc/qa sc/source

2018-08-15 Thread Libreoffice Gerrit user
 sc/qa/unit/subsequent_export-test.cxx |5 +++--
 sc/source/filter/html/htmlimp.cxx |2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8b2b2010f98e4e5997b3d4ecb83a1c5b0c9e49ab
Author: Justin Luth 
AuthorDate: Thu Aug 9 15:04:20 2018 +0300
Commit: Eike Rathke 
CommitDate: Wed Aug 15 14:58:49 2018 +0200

tdf#119141 Revert "sc htmlimp: non-global sheet range names"

This reverts commit 5720c85ccea9f1481bd604b806c5be728e59a13f,
which was made in response to the suggestion in
comment 6 of bug 114487 and backported to 6.0.6.

But ScAreaLink::FindExtRange doesn't bother to search the
local rangenames, and the Links to External Files dialog also
doesn't give non-global variables as options.

Since this was just a "logical" change, simply revert it
to repair the regression. Any attempt to support local rangenames
is something bigger that isn't appropriate for backport to stable.

Change-Id: I8bd4dcc6492da2712e13b2e54cf81609cdc5936e
Reviewed-on: https://gerrit.libreoffice.org/58761
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 
Reviewed-by: Eike Rathke 
(cherry picked from commit 1597dbb5ba5d68b5807236c1d045f5215f221c91)
Reviewed-on: https://gerrit.libreoffice.org/59065
Tested-by: Jenkins

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 168dc7f572d2..1444ebd39b5a 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3318,9 +3318,10 @@ void ScExportTest::testAbsNamedRangeHTML()
 xDocSh2->DoHardRecalc();
 
 ScDocument& rDoc = xDocSh2->GetDocument();
-ScRangeData* pRangeData = 
rDoc.GetRangeName(0)->findByUpperName(OUString("HTML_1"));
+ScRangeData* pRangeData = 
rDoc.GetRangeName()->findByUpperName(OUString("HTML_1"));
 ScSingleRefData* pRef = 
pRangeData->GetCode()->FirstToken()->GetSingleRef();
-CPPUNIT_ASSERT_MESSAGE("Sheet1.HTML_1 is an absolute 
reference",!pRef->IsTabRel());
+// see tdf#119141 for the reason why this isn't Sheet1.HTML_1
+CPPUNIT_ASSERT_MESSAGE("HTML_1 is an absolute 
reference",!pRef->IsTabRel());
 }
 
 void ScExportTest::testSheetLocalRangeNameXLS()
diff --git a/sc/source/filter/html/htmlimp.cxx 
b/sc/source/filter/html/htmlimp.cxx
index a4d79d21ae14..f601903bfde9 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -107,7 +107,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const 
OUString& rName, con
 ScTokenArray aTokArray;
 aTokArray.AddDoubleReference( aRefData );
 ScRangeData* pRangeData = new ScRangeData( pDoc, rName, aTokArray );
-pDoc->GetRangeName( rRange.aStart.Tab() )->insert( pRangeData );
+pDoc->GetRangeName()->insert( pRangeData );
 }
 
 void ScHTMLImport::WriteToDocument(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/app/inputhdl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 94f99ad38238f223b6fbed252e099581e0090e65
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 09:11:26 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 14:58:43 2018 +0200

Resolves: tdf#118609 crash in calc after some manipulation through basic

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

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 4c1f3a51e9d6..cc02c55468db 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1896,7 +1896,7 @@ void ScInputHandler::SetInputWindow(  ScInputWindow* pNew 
)
 
 void ScInputHandler::StopInputWinEngine( bool bAll )
 {
-if (pInputWin)
+if (pInputWin && !pInputWin->IsDisposed())
 pInputWin->StopEditEngine( bAll );
 
 pTopView = nullptr; // invalid now
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/qa/unit/subsequent_export-test.cxx |5 +++--
 sc/source/filter/html/htmlimp.cxx |2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit f4b83b45a43d635082f8b9d765f9522fad4e467f
Author: Justin Luth 
AuthorDate: Thu Aug 9 15:04:20 2018 +0300
Commit: Eike Rathke 
CommitDate: Wed Aug 15 14:59:00 2018 +0200

tdf#119141 Revert "sc htmlimp: non-global sheet range names"

This reverts commit 5720c85ccea9f1481bd604b806c5be728e59a13f,
which was made in response to the suggestion in
comment 6 of bug 114487 and backported to 6.0.6.

But ScAreaLink::FindExtRange doesn't bother to search the
local rangenames, and the Links to External Files dialog also
doesn't give non-global variables as options.

Since this was just a "logical" change, simply revert it
to repair the regression. Any attempt to support local rangenames
is something bigger that isn't appropriate for backport to stable.

Change-Id: I8bd4dcc6492da2712e13b2e54cf81609cdc5936e
Reviewed-on: https://gerrit.libreoffice.org/58761
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 
Reviewed-by: Eike Rathke 
(cherry picked from commit 1597dbb5ba5d68b5807236c1d045f5215f221c91)
Reviewed-on: https://gerrit.libreoffice.org/59066
Tested-by: Jenkins

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 6816e86fd2a4..f4a1dac54de2 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3340,9 +3340,10 @@ void ScExportTest::testAbsNamedRangeHTML()
 xDocSh2->DoHardRecalc();
 
 ScDocument& rDoc = xDocSh2->GetDocument();
-ScRangeData* pRangeData = 
rDoc.GetRangeName(0)->findByUpperName(OUString("HTML_1"));
+ScRangeData* pRangeData = 
rDoc.GetRangeName()->findByUpperName(OUString("HTML_1"));
 ScSingleRefData* pRef = 
pRangeData->GetCode()->FirstToken()->GetSingleRef();
-CPPUNIT_ASSERT_MESSAGE("Sheet1.HTML_1 is an absolute 
reference",!pRef->IsTabRel());
+// see tdf#119141 for the reason why this isn't Sheet1.HTML_1
+CPPUNIT_ASSERT_MESSAGE("HTML_1 is an absolute 
reference",!pRef->IsTabRel());
 }
 
 void ScExportTest::testSheetLocalRangeNameXLS()
diff --git a/sc/source/filter/html/htmlimp.cxx 
b/sc/source/filter/html/htmlimp.cxx
index 45b942ab1b98..4957b2d381ad 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -107,7 +107,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const 
OUString& rName, con
 ScTokenArray aTokArray;
 aTokArray.AddDoubleReference( aRefData );
 ScRangeData* pRangeData = new ScRangeData( pDoc, rName, aTokArray );
-pDoc->GetRangeName( rRange.aStart.Tab() )->insert( pRangeData );
+pDoc->GetRangeName()->insert( pRangeData );
 }
 
 void ScHTMLImport::WriteToDocument(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/inc/cellsuno.hxx  |2 +-
 sc/inc/document.hxx  |2 +-
 sc/source/core/data/document.cxx |4 ++--
 sc/source/ui/inc/undotab.hxx |3 ++-
 sc/source/ui/undo/refundo.cxx|3 +--
 sc/source/ui/undo/undotab.cxx|6 +++---
 sc/source/ui/unoobj/cellsuno.cxx |   30 --
 sc/source/ui/view/viewfun2.cxx   |8 
 8 files changed, 26 insertions(+), 32 deletions(-)

New commits:
commit 664b4f31e6bd609846fd4bb2a17730209fe73ae5
Author: Noel Grandin 
AuthorDate: Tue Aug 14 11:51:08 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 14:53:50 2018 +0200

pass ScPrintRangeSaver around by std::unique_ptr

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

diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index f36ec2a92573..625818ce5cfb 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -800,7 +800,7 @@ private:
 const SfxItemPropertySet*   pSheetPropSet;
 
 SCTAB   GetTab_Impl() const;
-voidPrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges 
);
+voidPrintAreaUndo_Impl( 
std::unique_ptr pOldRanges );
 
 protected:
 virtual const SfxItemPropertyMap& GetItemPropertyMap() override;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index ae159ac51495..74c5b65d3c34 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1945,7 +1945,7 @@ public:
 SC_DLLPUBLIC voidSetPrintEntireSheet( SCTAB nTab );
 SC_DLLPUBLIC voidSetRepeatColRange( SCTAB nTab, 
std::unique_ptr pNew );
 SC_DLLPUBLIC voidSetRepeatRowRange( SCTAB nTab, 
std::unique_ptr pNew );
-ScPrintRangeSaver*   CreatePrintRangeSaver() const;
+std::unique_ptr CreatePrintRangeSaver() const;
 void RestorePrintRanges( const ScPrintRangeSaver& 
rSaver );
 
 SC_DLLPUBLIC tools::Rectangle   GetMMRect( SCCOL nStartCol, SCROW 
nStartRow,
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index ad695bcb3a2c..55a660a4930d 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6252,10 +6252,10 @@ void ScDocument::SetRepeatRowRange( SCTAB nTab, 
std::unique_ptr pNew )
 maTabs[nTab]->SetRepeatRowRange( std::move(pNew) );
 }
 
-ScPrintRangeSaver* ScDocument::CreatePrintRangeSaver() const
+std::unique_ptr ScDocument::CreatePrintRangeSaver() const
 {
 const SCTAB nCount = static_cast(maTabs.size());
-ScPrintRangeSaver* pNew = new ScPrintRangeSaver( nCount );
+std::unique_ptr pNew(new ScPrintRangeSaver( nCount ));
 for (SCTAB i=0; iFillPrintSaver( pNew->GetTabData(i) );
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 06ad4eb87bac..621b94063d40 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -377,7 +377,8 @@ class ScUndoPrintRange : public ScSimpleUndo
 {
 public:
 ScUndoPrintRange( ScDocShell* pShell, SCTAB nNewTab,
-ScPrintRangeSaver* pOld, 
ScPrintRangeSaver* pNew );
+  std::unique_ptr pOld,
+  std::unique_ptr pNew 
);
 virtual ~ScUndoPrintRange() override;
 
 virtual voidUndo() override;
diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx
index d2a6c5cb2779..178b34ea8ba9 100644
--- a/sc/source/ui/undo/refundo.cxx
+++ b/sc/source/ui/undo/refundo.cxx
@@ -100,10 +100,9 @@ void ScRefUndoData::DeleteUnchanged( const ScDocument* 
pDoc )
 
 if (pPrintRanges)
 {
-ScPrintRangeSaver* pNewRanges = pDoc->CreatePrintRangeSaver();
+std::unique_ptr pNewRanges = 
pDoc->CreatePrintRangeSaver();
 if ( pNewRanges && *pPrintRanges == *pNewRanges )
 pPrintRanges.reset();
-delete pNewRanges;
 }
 
 if (pDPCollection)
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 0217d41f15fd..d9de877c2f36 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1296,11 +1296,11 @@ OUString ScUndoTabProtect::GetComment() const
 }
 
 ScUndoPrintRange::ScUndoPrintRange( ScDocShell* pShell, SCTAB nNewTab,
-ScPrintRangeSaver* pOld, 
ScPrintRangeSaver* pNew ) :
+std::unique_ptr pOld, 
std::unique_ptr pNew ) :
 ScSimpleUndo( pShell ),
 nTab( nNewTab ),
-pOldRanges( pOld ),
-pNewRanges( pNew )
+pOldRanges( std::move(pOld) ),
+pNewRanges( std::move(pNew) )
 {
 }
 
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 682d201556a4..4ede9777957f 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -7184,7 +7184,7 @@ v

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

2018-08-15 Thread Libreoffice Gerrit user
 svtools/source/contnr/svimpbox.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 2c16b803b681b1fab4ec337273fdbae36f9c79fe
Author: Stephan Bergmann 
AuthorDate: Wed Aug 15 12:18:30 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 15 14:35:46 2018 +0200

Avoid unsigned wrap-around when nVisibleViewCount is zero

...(and some more improvements to that code, like dropping the unnecessary
casting to sal_uInt16) as Clang's new -fsanitize=implicit-conversion flags
during CppunitTest_dbaccess_dialog_save:

> svtools/source/contnr/svimpbox.cxx:1317:26: runtime error: implicit 
conversion from type 'int' of value -1 (32-bit, signed) to type 'sal_uInt16' 
(aka 'unsigned short') changed the value to 65535 (16-bit, unsigned)
>  #0 in SvImpLBox::FillView() at 
svtools/source/contnr/svimpbox.cxx:1317:26 (instdir/program/libsvtlo.so 
+0x15e6edb)
>  #1 in SvImpLBox::UpdateAll(bool) at 
svtools/source/contnr/svimpbox.cxx:697:5 (instdir/program/libsvtlo.so 
+0x15e5151)
>  #2 in SvImpLBox::Resize() at svtools/source/contnr/svimpbox.cxx:1299:9 
(instdir/program/libsvtlo.so +0x1602c31)
>  #3 in SvTreeListBox::Resize() at 
svtools/source/contnr/treelistbox.cxx:1427:12 (instdir/program/libsvtlo.so 
+0x17282ee)
>  #4 in vcl::Window::ImplCallResize() at vcl/source/window/event.cxx:523:5 
(instdir/program/libvcllo.so +0x3196951)
>  #5 in vcl::Window::ImplPosSizeWindow(long, long, long, long, 
PosSizeFlags) at vcl/source/window/window.cxx:1603:17 
(instdir/program/libvcllo.so +0x374c602)
>  #6 in vcl::Window::setPosSizePixel(long, long, long, long, PosSizeFlags) 
at vcl/source/window/window.cxx:2828:18 (instdir/program/libvcllo.so +0x377e616)
>  #7 in vcl::Window::SetPosSizePixel(Point const&, Size const&) at 
vcl/source/window/window2.cxx:1300:5 (instdir/program/libvcllo.so +0x36deba1)
>  #8 in dbaui::OAppDetailPageHelper::Resize() at 
dbaccess/source/ui/app/AppDetailPageHelper.cxx:928:18 
(instdir/program/libdbulo.so +0x1733a91)
>  #9 in dbaui::OAppDetailPageHelper::switchPreview(dbaui::PreviewMode, 
bool) at dbaccess/source/ui/app/AppDetailPageHelper.cxx:988:9 
(instdir/program/libdbulo.so +0x172ce0e)
>  #10 in dbaui::OAppDetailPageHelper::setDetailPage(vcl::Window*) at 
dbaccess/source/ui/app/AppDetailPageHelper.cxx:657:5 
(instdir/program/libdbulo.so +0x1725e81)
>  #11 in dbaui::OAppDetailPageHelper::createPage(dbaui::ElementType, 
com::sun::star::uno::Reference const&) 
at dbaccess/source/ui/app/AppDetailPageHelper.cxx:637:9 
(instdir/program/libdbulo.so +0x172796e)
>  #12 in 
dbaui::OApplicationDetailView::impl_createPage(dbaui::ElementType, 
com::sun::star::uno::Reference const&, 
com::sun::star::uno::Reference const&) 
at dbaccess/source/ui/app/AppDetailView.cxx:647:27 (instdir/program/libdbulo.so 
+0x1780e95)
>  #13 in dbaui::OApplicationDetailView::createPage(dbaui::ElementType, 
com::sun::star::uno::Reference const&) 
at dbaccess/source/ui/app/AppDetailView.cxx:626:5 (instdir/program/libdbulo.so 
+0x17810c9)
>  #14 in 
dbaui::OApplicationController::onContainerSelect(dbaui::ElementType) at 
dbaccess/source/ui/app/AppController.cxx:1695:46 (instdir/program/libdbulo.so 
+0x161a37e)
>  #15 in 
dbaui::OApplicationSwapWindow::onContainerSelected(dbaui::ElementType) at 
dbaccess/source/ui/app/AppSwapWindow.cxx:139:53 (instdir/program/libdbulo.so 
+0x17c5310)
>  #16 in 
dbaui::OApplicationSwapWindow::OnContainerSelectHdl(SvtIconChoiceCtrl*) at 
dbaccess/source/ui/app/AppSwapWindow.cxx:157:9 (instdir/program/libdbulo.so 
+0x17c5908)
>  #17 in 
dbaui::OApplicationSwapWindow::LinkStubOnContainerSelectHdl(void*, 
SvtIconChoiceCtrl*) at dbaccess/source/ui/app/AppSwapWindow.cxx:150:1 
(instdir/program/libdbulo.so +0x17c0a90)
>  #18 in Link::Call(SvtIconChoiceCtrl*) const at 
include/tools/link.hxx:84:45 (instdir/program/libsvtlo.so +0x15a0863)
>  #19 in SvtIconChoiceCtrl::ClickIcon() at 
svtools/source/contnr/ivctrl.cxx:276:20 (instdir/program/libsvtlo.so +0x159c680)
>  #20 in SvxIconChoiceCtrl_Impl::CallSelectHandler() at 
svtools/source/contnr/imivctl1.cxx:3386:16 (instdir/program/libsvtlo.so 
+0x15194ef)
>  #21 in SvxIconChoiceCtrl_Impl::SelectEntry(SvxIconChoiceCtrlEntry*, 
bool, bool) at svtools/source/contnr/imivctl1.cxx:384:9 
(instdir/program/libsvtlo.so +0x1518f4d)
>  #22 in SvxIconChoiceCtrl_Impl::SetCursor(SvxIconChoiceCtrlEntry*) at 
svtools/source/contnr/imivctl1.cxx:2001:13 (instdir/program/libsvtlo.so 
+0x1519c69)
>  #23 in SvtIconChoiceCtrl::SetCursor(SvxIconChoiceCtrlEntry*) at 
svtools/source/contnr/ivctrl.cxx:310:13 (instdir/program/libsvtlo.so +0x159d140)
>  #24 in 
dbaui::OApplicationSwapWindow::selectContainer(dbaui::ElementType) at 
dbaccess/source/ui/app/AppSwapWindow.cxx:179:25 (instdir/program/libdbulo.so 
+0x17c6415)
>  #25 in dbaui::OApplicationView::selectContainer(dbaui::ElementType) at 
dbaccess/source/ui/app/AppView

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

2018-08-15 Thread Libreoffice Gerrit user
 include/svx/galtheme.hxx |8 --
 svx/source/gallery2/galtheme.cxx |  121 ++-
 2 files changed, 49 insertions(+), 80 deletions(-)

New commits:
commit 95fe8fa97a62ae90b6d092c52d2fc6fae198e011
Author: Noel Grandin 
AuthorDate: Mon Aug 13 15:31:04 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 14:31:57 2018 +0200

loplugin:useuniqueptr in GalleryTheme

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

diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 98bf45876bc0..c83ba9609565 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -53,8 +53,6 @@ struct GalleryObject
 };
 
 
-typedef ::std::vector< GalleryObject* > GalleryObjectList;
-
 class GalleryThemeEntry;
 class SgaObject;
 class FmFormModel;
@@ -78,7 +76,7 @@ class SVX_DLLPUBLIC GalleryTheme : public SfxBroadcaster
 
 private:
 
-GalleryObjectList   aObjectList;
+::std::vector< std::unique_ptr > aObjectList;
 OUStringm_aDestDir;
 boolm_bDestDirRelative;
 tools::SvRefaSvDrawStorageRef;
@@ -95,13 +93,13 @@ private:
 SAL_DLLPRIVATE bool ImplWriteSgaObject(const SgaObject& rObj, 
sal_uInt32 nPos, GalleryObject* pExistentEntry);
 SAL_DLLPRIVATE void ImplWrite();
 SAL_DLLPRIVATE const GalleryObject* ImplGetGalleryObject(sal_uInt32 nPos) 
const
-{ return ( nPos < aObjectList.size() ) ? 
aObjectList[ nPos ] : nullptr; }
+{ return aObjectList[ nPos ].get(); }
 const GalleryObject*ImplGetGalleryObject( const INetURLObject& 
rURL );
 
 SAL_DLLPRIVATE sal_uInt32   ImplGetGalleryObjectPos( const GalleryObject* 
pObj ) const
 {
 for (sal_uInt32 i = 0, n = 
aObjectList.size(); i < n; ++i)
-if ( pObj == aObjectList[ i ] )
+if ( pObj == aObjectList[ i ].get() )
 return i;
 return SAL_MAX_UINT32;
 }
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 31fac1269a4d..02d8d07a7236 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -79,11 +79,11 @@ GalleryTheme::~GalleryTheme()
 {
 ImplWrite();
 
-for (GalleryObject* pEntry : aObjectList)
+for (auto & pEntry : aObjectList)
 {
-Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), 
pEntry ) );
-Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), 
pEntry ) );
-delete pEntry;
+Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), 
pEntry.get() ) );
+Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), 
pEntry.get() ) );
+pEntry.reset();
 }
 aObjectList.clear();
 
@@ -126,12 +126,10 @@ bool GalleryTheme::ImplWriteSgaObject(const SgaObject& 
rObj, sal_uInt32 nPos, Ga
 pEntry = new GalleryObject;
 if ( nPos < aObjectList.size() )
 {
-GalleryObjectList::iterator it = aObjectList.begin();
-::std::advance( it, nPos );
-aObjectList.insert( it, pEntry );
+aObjectList.emplace( aObjectList.begin() + nPos, pEntry );
 }
 else
-aObjectList.push_back( pEntry );
+aObjectList.emplace_back( pEntry );
 }
 else
 pEntry = pExistentEntry;
@@ -222,9 +220,9 @@ void GalleryTheme::ImplWrite()
 
 const GalleryObject* GalleryTheme::ImplGetGalleryObject( const INetURLObject& 
rURL )
 {
-for (GalleryObject* i : aObjectList)
+for (auto const & i : aObjectList)
 if ( i->aURL == rURL )
-return i;
+return i.get();
 return nullptr;
 }
 
@@ -295,7 +293,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind 
eObjKind, ConvertDat
 
 bExists = false;
 
-for (GalleryObject* p : aObjectList)
+for (auto const & p : aObjectList)
 if ( p->aURL == aNewURL )
 {
 bExists = true;
@@ -375,7 +373,7 @@ bool GalleryTheme::InsertObject(const SgaObject& rObj, 
sal_uInt32 nInsertPos)
 {
 if (aObjectList[ iFoundPos ]->aURL == rObj.GetURL())
 {
-pFoundEntry = aObjectList[ iFoundPos ];
+pFoundEntry = aObjectList[ iFoundPos ].get();
 break;
 }
 }
@@ -416,64 +414,42 @@ std::unique_ptr 
GalleryTheme::AcquireObject(sal_uInt32 nPos)
 
 void GalleryTheme::GetPreviewBitmapExAndStrings(sal_uInt32 n

[Libreoffice-commits] online.git: wsd/ClientSession.cpp wsd/ClientSession.hpp wsd/LOOLWSD.cpp

2018-08-15 Thread Libreoffice Gerrit user
 wsd/ClientSession.cpp |   43 
 wsd/ClientSession.hpp |   12 
 wsd/LOOLWSD.cpp   |   67 +-
 3 files changed, 9 insertions(+), 113 deletions(-)

New commits:
commit 4dd62d4dd2d2b467a70c5735b91d691522769834
Author: Tor Lillqvist 
AuthorDate: Thu Jul 12 15:50:04 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Aug 15 15:01:03 2018 +0300

Revert "Add a cache of "thumbnails" (PNG images) generated using the 
convert-to API"

No need to keep such a cache here. The consumer of previews
(thumbnails) in question does it itself (Nextcloud).

This reverts commit 405b66c8db71c314c2d26c4b18e9d74806c76bf1

Change-Id: Iad16212ccbc875fe4f6d041e2fceef7eaea1d1bb

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index b11331dc8..90e099d38 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -14,7 +14,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -38,14 +37,10 @@ using Poco::StringTokenizer;
 ClientSession::ClientSession(const std::string& id,
  const std::shared_ptr& docBroker,
  const Poco::URI& uriPublic,
- const bool readOnly,
- const bool creatingPngThumbnail,
- const std::string& thumbnailFile) :
+ const bool readOnly) :
 Session("ToClient-" + id, id, readOnly),
 _docBroker(docBroker),
 _uriPublic(uriPublic),
-_creatingPngThumbnail(creatingPngThumbnail),
-_thumbnailFile(thumbnailFile),
 _isDocumentOwner(false),
 _isAttached(false),
 _isViewLoaded(false),
@@ -60,7 +55,6 @@ ClientSession::ClientSession(const std::string& id,
 _tilesOnFly(0),
 _tilesBeingRendered(0)
 {
-assert(!creatingPngThumbnail || thumbnailFile != "");
 const size_t curConnections = ++LOOLWSD::NumConnections;
 LOG_INF("ClientSession ctor [" << getName() << "], current number of 
connections: " << curConnections);
 }
@@ -840,41 +834,6 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 response.set("Content-Disposition", "attachment; 
filename=\"" + fileName + "\"");
 
 HttpHelper::sendFile(_saveAsSocket, encodedFilePath, mimeType, 
response);
-
-if (_creatingPngThumbnail)
-{
-// Save the created PNG "thumbnail" under a name 
constructed from the SHA1 of
-// the document contents.
-
-// FIXME: We could first try to simply hardlink the result 
as the thumbnail.
-
-
Poco::File(Poco::Path(_thumbnailFile).parent()).createDirectories();
-std::ofstream thumbnail(_thumbnailFile, std::ios::binary);
-
-if (thumbnail.is_open() && thumbnail.good())
-{
-std::ifstream result(resultURL.getPath(), 
std::ios::binary);
-if (result.is_open() && result.good())
-{
-Poco::StreamCopier::copyStream(result, thumbnail);
-if (!result.bad() && thumbnail.good())
-{
-LOG_TRC("Created cached thumbnail " << 
_thumbnailFile);
-}
-else
-{
-thumbnail.close();
-unlink(_thumbnailFile.c_str());
-}
-}
-}
-else
-{
-if (thumbnail.is_open())
-thumbnail.close();
-unlink(_thumbnailFile.c_str());
-}
-}
 }
 
 // Conversion is done, cleanup this fake session.
diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index ae8a6937d..997058f68 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -32,9 +32,7 @@ public:
 ClientSession(const std::string& id,
   const std::shared_ptr& docBroker,
   const Poco::URI& uriPublic,
-  const bool isReadOnly = false,
-  const bool creatingPngThumbnail = false,
-  const std::string& thumbnailFile = "");
+  const bool isReadOnly = false);
 
 virtual ~ClientSession();
 
@@ -199,14 +197,6 @@ private:
 /// URI with which client made request to us
 const Poco::URI _uriPublic;
 
-/// True iff this is a convert-to operation creating a PNG. We assume all 
such PNGs will be
-/// usable as "thumbnails" for the document.
-const bool _creatingPngThumbnail;
-
-/// The pathname of the thumbnail file being created. Valid only if 

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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/unoobj/PivotTableDataProvider.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ff16f75a474533187253a190557d6e2195a7e4cb
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 10:42:33 2018 +0100
Commit: Markus Mohrhard 
CommitDate: Wed Aug 15 14:10:37 2018 +0200

tdf#115086 crash in assignLabelsToDataSequence

since...

commit c45358e928b9b9419bba10a0fcb661696cb7647a
Date:   Mon Apr 24 00:09:08 2017 +0200

preserve "Total" label on round-trip, remove code duplication

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

diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx 
b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index cfdea1bed39e..12f432a19085 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -617,7 +617,7 @@ PivotTableDataProvider::assignLabelsToDataSequence(size_t 
nIndex)
 {
 aLabel = ScGlobal::GetRscString(STR_PIVOT_TOTAL);
 }
-else
+else if (nIndex < m_aLabels.size())
 {
 for (ValueAndFormat const & rItem : m_aLabels[nIndex])
 {
___
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' - sc/source

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/app/inputhdl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d1ce7f60c7ce7721a41093bebcbe7e87cb800688
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 09:11:26 2018 +0100
Commit: Markus Mohrhard 
CommitDate: Wed Aug 15 14:09:43 2018 +0200

Resolves: tdf#118609 crash in calc after some manipulation through basic

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

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index da4be2812150..90c1fbc59437 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1908,7 +1908,7 @@ void ScInputHandler::SetInputWindow(  ScInputWindow* pNew 
)
 
 void ScInputHandler::StopInputWinEngine( bool bAll )
 {
-if (pInputWin)
+if (pInputWin && !pInputWin->IsDisposed())
 pInputWin->StopEditEngine( bAll );
 
 pTopView = nullptr; // invalid now
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/app/inputhdl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 20b9dad2e881a743172559a29b66d30ca6ecbf6a
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 09:11:26 2018 +0100
Commit: Markus Mohrhard 
CommitDate: Wed Aug 15 14:09:52 2018 +0200

Resolves: tdf#118609 crash in calc after some manipulation through basic

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

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b572b9ac06dc..d3912f18c032 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1908,7 +1908,7 @@ void ScInputHandler::SetInputWindow(  ScInputWindow* pNew 
)
 
 void ScInputHandler::StopInputWinEngine( bool bAll )
 {
-if (pInputWin)
+if (pInputWin && !pInputWin->IsDisposed())
 pInputWin->StopEditEngine( bAll );
 
 pTopView = nullptr; // invalid now
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/unoobj/PivotTableDataProvider.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5779b4966954d845f3c526c340bdee8c6a92ef95
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 10:42:33 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 13:54:08 2018 +0200

tdf#115086 crash in assignLabelsToDataSequence

since...

commit c45358e928b9b9419bba10a0fcb661696cb7647a
Date:   Mon Apr 24 00:09:08 2017 +0200

preserve "Total" label on round-trip, remove code duplication

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

diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx 
b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index abbe7e2265fd..94bf491c2e13 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -618,7 +618,7 @@ PivotTableDataProvider::assignLabelsToDataSequence(size_t 
nIndex)
 {
 aLabel = ScResId(STR_PIVOT_TOTAL);
 }
-else
+else if (nIndex < m_aLabels.size())
 {
 for (ValueAndFormat const & rItem : m_aLabels[nIndex])
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8graf.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f93583f8694dbb626e511cf24ae366dce725e564
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 10:27:22 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 13:17:24 2018 +0200

ofz#9908 validate no negative editengine selection positions

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

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 7de545f1c975..55d57a77174f 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -582,7 +582,9 @@ namespace
 bool IsValidSel(const EditEngine& rEngine, const ESelection& rSel)
 {
 const auto nParaCount = rEngine.GetParagraphCount();
-return rSel.nStartPara < nParaCount && rSel.nEndPara < nParaCount;
+if (rSel.nStartPara < nParaCount && rSel.nEndPara < nParaCount)
+return rSel.nStartPos >= 0 && rSel.nEndPos >= 0;
+return false;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/qa/unit/data/functions/mathematical/fods/mod.fods |8 
 sc/source/core/tool/interpr2.cxx |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 992242a15c3f6cc6aed55fa2a4177d80d33a7277
Author: Takeshi Abe 
AuthorDate: Thu Jul 26 16:42:31 2018 +0900
Commit: Eike Rathke 
CommitDate: Wed Aug 15 13:11:17 2018 +0200

sc: Report #DIV/0! when MOD()'s divisor is 0

as Excel does [1], while ODF 1.2 does not specify which kind of
error should be assigned for that case.

[1] 
https://support.office.com/en-us/article/mod-function-9b6cd169-b6ee-406a-a97b-edf2a9dc24f3

Change-Id: Id6ebf790ac407f2a8b8769fc0518f136a1271a3d
Reviewed-on: https://gerrit.libreoffice.org/58351
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/sc/qa/unit/data/functions/mathematical/fods/mod.fods 
b/sc/qa/unit/data/functions/mathematical/fods/mod.fods
index 7148b59df4b7..262f4fff02f9 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/mod.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/mod.fods
@@ -3220,12 +3220,12 @@
 
 
  
-  Err:502
+  #DIV/0!
  
- 
-  Err502
+ 
+  #DIV/0!
  
- 
+ 
   TRUE
  
  
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index f6560dcb95ab..c185ecfe9223 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2368,7 +2368,7 @@ void ScInterpreter::ScMod()
 double fDenom   = GetDouble();   // Denominator
 if ( fDenom == 0.0 )
 {
-PushIllegalArgument();
+PushError(FormulaError::DivisionByZero);
 return;
 }
 double fNum = GetDouble();   // Numerator
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sw/source/core/layout/pagechg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64474264443a83a341c161bbcc6592073a1728f9
Author: Stephan Bergmann 
AuthorDate: Wed Aug 15 12:40:17 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 15 12:45:20 2018 +0200

Silence bogus -Werror,-Wsign-compare

...in some Android builds like , where USHRT_MAX is 
wrongly
of type unsigned int.  (Cf. similar comits like
f164c68296b66d534ed2c9de6da4c01e328959d9 "Introduce dedicated
SwXMLTableContext::MAX_WIDTH, replacing USHRT_MAX".)

So this was the reason for 4a61006255c67bb6f9ac99107093a424a9de441e "Remove 
<
USHRT_MAX check that is presumably no longer needed" that now had to be 
reverted
again with d9c312d1917bc039bb0354c8c3f5c9dbbb758cf1 "tdf#119252: Revert 
'Remove
< USHRT_MAX check that is presumably no longer".

Change-Id: I7ff4f6ab61adc2490bcab46ec5e5a65d9302141f

diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index 5f9bd2c5f01b..6d1bd3e0fa45 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1763,7 +1763,7 @@ void SwRootFrame::ImplCalcBrowseWidth()
 const SwBorderAttrs &rAttrs = *aAccess.Get();
 const SwFormatHoriOrient &rHori = 
rAttrs.GetAttrSet().GetHoriOrient();
 long nWidth = rAttrs.GetSize().Width();
-if ( nWidth < USHRT_MAX-2000 && //-2k, because USHRT_MAX gets 
missing while trying to resize!
+if ( nWidth < int(USHRT_MAX)-2000 && //-2k, because USHRT_MAX gets 
missing while trying to resize!  (and cast to int to avoid -Wsign-compare due 
to broken USHRT_MAX on Android)
  text::HoriOrientation::FULL != rHori.GetHoriOrient() )
 {
 const SwHTMLTableLayout *pLayoutInfo =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_2' - 34 commits - sw/inc sw/source

2018-08-15 Thread Libreoffice Gerrit user
Rebased ref, commits from common ancestor:
commit 0f5e41459c4ed1fa751dcee57e6eac3fbb97d7d4
Author: Michael Stahl 
AuthorDate: Tue Aug 14 15:58:35 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 15 11:50:43 2018 +0200

sw_redlinehide_2: move SwInsText/SwDelText hint in CutImpl before attributes

An unfortunate incident involving a footnote accessing its old anchor
node's layout frame during InsertHint and the MapModelToViewPos needing
to have a mapping for this index...

6  SwTextFrame::MapModelToViewPos(SwPosition const&) const (this=0x8937760, 
rPos=SwPosition (node 41, offset 4)) at sw/source/core/text/txtfrm.cxx:1005
7  SwTextFrame::GetFrameAtPos(SwPosition const&) (this=0x8937760, 
rPos=SwPosition (node 41, offset 4)) at sw/source/core/text/frmcrsr.cxx:153
8  GetFrameOfModify(SwRootFrame const*, SwModify const&, SwFrameType, Point 
const*, SwPosition const*, bool) (pLayout=0x6a0a240, rMod=..., 
nFrameType=(SwFrameType::Txt | SwFrameType::NoTxt), pPoint=0x0, 
pPos=0x7ffcfa9d70a0, bCalcFrame=false) at sw/source/core/layout/frmtool.cxx:3517
9  SwContentNode::getLayoutFrame(SwRootFrame const*, Point const*, 
SwPosition const*, bool) const (this=0x6a67e20, _pRoot=0x6a0a240, pPoint=0x0, 
pPos=0x7ffcfa9d70a0, bCalcFrame=false) at sw/source/core/docnode/node.cxx:1137
10 SwFootnoteFrame::GetRefFromAttr() (this=0x8970a30) at 
sw/source/core/layout/ftnfrm.cxx:2839
11 SwContentNode::DelFrames(SwRootFrame const*, bool) (this=0x897ead0, 
pLayout=0x0, fromDtor=false) at sw/source/core/docnode/node.cxx:1419
12 SwTextNode::InsertHint(SwTextAttr*, SetAttrMode) (this=0x89ac890, 
pAttr=0x6a3ff60, nMode=(SetAttrMode::DONTREPLACE | SetAttrMode::NOTXTATRCHR)) 
at sw/source/core/txtnode/thints.cxx:1408
13 SwTextNode::CutImpl(SwTextNode*, SwIndex const&, SwIndex const&, int, 
bool) (this=0x6a67e20, pDest=0x89ac890, rDestStart=SwIndex (offset 2), 
rStart=SwIndex (offset 0), nLen=3, bUpdate=false) at 
sw/source/core/txtnode/ndtxt.cxx:2374
14 SwTextNode::CutText(SwTextNode*, SwIndex const&, int) (this=0x6a67e20, 
pDest=0x89ac890, rStart=SwIndex (offset 0), nLen=3) at 
sw/source/core/txtnode/ndtxt.cxx:2199
15 SwTextNode::JoinNext() (this=0x89ac890) at 
sw/source/core/txtnode/ndtxt.cxx:812

Change-Id: If0dc0f16eb124dc8a070b84684ee9ec9ab0dc70f

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index d57b9b266a90..a77cfe42382e 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2306,6 +2306,13 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, 
const SwIndex & rDestStart,
 }
 }
 
+// notify frames - before moving hints, because footnotes
+// want to find their anchor text frame in the follow chain
+SwInsText aInsHint( nDestStart, nLen );
+pDest->ModifyNotification( nullptr, &aInsHint );
+SwDelText aDelHint( nTextStartIdx, nLen );
+ModifyNotification( nullptr, &aDelHint );
+
 // 2. move attributes
 // Iterate over attribute array until the start of the attribute
 // is behind the moved range
@@ -2441,12 +2448,6 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, 
const SwIndex & rDestStart,
 CHECK_SWPHINTS(this);
 
 TryDeleteSwpHints();
-
-// notify layout frames
-SwInsText aInsHint( nDestStart, nLen );
-pDest->ModifyNotification( nullptr, &aInsHint );
-SwDelText aDelHint( nTextStartIdx, nLen );
-ModifyNotification( nullptr, &aDelHint );
 }
 
 void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
commit f3a59cae32b851a41f0fba9575443f6e3cc04c90
Author: Michael Stahl 
AuthorDate: Tue Aug 14 15:48:31 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 15 11:50:43 2018 +0200

sw_redlinehide_2: fix SplitNode handling of merged frames

The first branch is a bit easier, because it always moves the existing
frame onto the first node of the split anyway; the second branch may or
may not need to do that, but it has to move it just to be sure if it
needs to move it, which is a bit annoying...

Change-Id: Ib2fc69c2bd99dffa958f1620211ec657a8cc1be8

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 6c7b07e4819b..d57b9b266a90 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -367,6 +367,7 @@ static void lcl_ChangeFootnoteRef( SwTextNode &rNode )
 SwTextNode *SwTextNode::SplitContentNode(const SwPosition & rPos,
 std::function const*const 
pContentIndexRestore)
 {
+SwNode::Merge const eOldMergeFlag(GetRedlineMergeFlag());
 bool parentIsOutline = IsOutline();
 
 // create a node "in front" of me
@@ -480,6 +481,10 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition 
& rPos,
 {   // call before making frames and before RegisterToNode
 (*pContentIndexRestore)(pNode, sw::mark::RestoreMode::NonFlys);
 }
+if (eOldMergeFlag != Sw

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

2018-08-15 Thread Libreoffice Gerrit user
 connectivity/source/drivers/postgresql/pq_connection.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4b84202e8e495ed2f658215357963f3d23e94528
Author: Lionel Elie Mamane 
AuthorDate: Wed Aug 15 12:30:50 2018 +0200
Commit: Lionel Elie Mamane 
CommitDate: Wed Aug 15 12:33:54 2018 +0200

pgsql-sdbc: better debug message

Change-Id: I28a218b39be6436bac3cbdaa9dd25385c7964d09

diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx 
b/connectivity/source/drivers/postgresql/pq_connection.cxx
index fa0627e8100d..fe113e0c0585 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -470,7 +470,7 @@ static void properties2arrays( const Sequence< 
PropertyValue > & args,
 else
 {
 // ignore for now
-SAL_WARN("connectivity.postgresql", "sdbc-postgresql: unknown 
argument " << args[i].Name );
+SAL_WARN("connectivity.postgresql", "sdbc-postgresql: unknown 
argument '" << args[i].Name << "' having value: " << args[i].Value );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 oox/source/drawingml/shapecontext.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 0bbf91e3cf43b8f2110db78e36e39d951b79a544
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 09:16:54 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 12:09:35 2018 +0200

ofz#9892 Null-dereference

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

diff --git a/oox/source/drawingml/shapecontext.cxx 
b/oox/source/drawingml/shapecontext.cxx
index 62e81dba5f58..decf063d9dd6 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -101,7 +101,9 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 
aElementToken, const
 }
 case XML_txXfrm:
 {
-mpShapePtr->getTextBody()->getTextProperties().moRotation = 
rAttribs.getInteger( XML_rot );
+const TextBodyPtr& rShapePtr = mpShapePtr->getTextBody();
+if (rShapePtr)
+rShapePtr->getTextProperties().moRotation = rAttribs.getInteger( 
XML_rot );
 return nullptr;
 }
 case XML_cNvSpPr:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/core/tool/interpr1.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0815f3460fa8a595a085d853e96b8ec0471f
Author: Eike Rathke 
AuthorDate: Wed Aug 15 10:52:38 2018 +0200
Commit: Eike Rathke 
CommitDate: Wed Aug 15 12:08:48 2018 +0200

Resolves: tdf#119034 do not floor() for Logical A1

Either it is 0.0 or it is not.

Change-Id: I8e170e08b7a26ade65ca3b8db26a2d8c581e444c
Reviewed-on: https://gerrit.libreoffice.org/59057
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 291aa746a75f..52155b79a4df 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8068,7 +8068,7 @@ void ScInterpreter::ScAddressFunc()
 sTabStr = GetString().getString();
 
 FormulaGrammar::AddressConvention eConv = FormulaGrammar::CONV_OOO;  
// default
-if( nParamCount >= 4 && 0.0 == ::rtl::math::approxFloor( 
GetDoubleWithDefault( 1.0)))
+if (nParamCount >= 4 && 0.0 == GetDoubleWithDefault( 1.0))
 eConv = FormulaGrammar::CONV_XL_R1C1;
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/qa/unit/subsequent_export-test.cxx |5 +++--
 sc/source/filter/html/htmlimp.cxx |2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 1597dbb5ba5d68b5807236c1d045f5215f221c91
Author: Justin Luth 
AuthorDate: Thu Aug 9 15:04:20 2018 +0300
Commit: Eike Rathke 
CommitDate: Wed Aug 15 12:02:07 2018 +0200

tdf#119141 Revert "sc htmlimp: non-global sheet range names"

This reverts commit 5720c85ccea9f1481bd604b806c5be728e59a13f,
which was made in response to the suggestion in
comment 6 of bug 114487 and backported to 6.0.6.

But ScAreaLink::FindExtRange doesn't bother to search the
local rangenames, and the Links to External Files dialog also
doesn't give non-global variables as options.

Since this was just a "logical" change, simply revert it
to repair the regression. Any attempt to support local rangenames
is something bigger that isn't appropriate for backport to stable.

Change-Id: I8bd4dcc6492da2712e13b2e54cf81609cdc5936e
Reviewed-on: https://gerrit.libreoffice.org/58761
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 
Reviewed-by: Eike Rathke 

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 4f30673e8c28..bb134b0b1d1e 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3343,9 +3343,10 @@ void ScExportTest::testAbsNamedRangeHTML()
 xDocSh2->DoHardRecalc();
 
 ScDocument& rDoc = xDocSh2->GetDocument();
-ScRangeData* pRangeData = 
rDoc.GetRangeName(0)->findByUpperName(OUString("HTML_1"));
+ScRangeData* pRangeData = 
rDoc.GetRangeName()->findByUpperName(OUString("HTML_1"));
 ScSingleRefData* pRef = 
pRangeData->GetCode()->FirstToken()->GetSingleRef();
-CPPUNIT_ASSERT_MESSAGE("Sheet1.HTML_1 is an absolute 
reference",!pRef->IsTabRel());
+// see tdf#119141 for the reason why this isn't Sheet1.HTML_1
+CPPUNIT_ASSERT_MESSAGE("HTML_1 is an absolute 
reference",!pRef->IsTabRel());
 }
 
 void ScExportTest::testSheetLocalRangeNameXLS()
diff --git a/sc/source/filter/html/htmlimp.cxx 
b/sc/source/filter/html/htmlimp.cxx
index 45b942ab1b98..4957b2d381ad 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -107,7 +107,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const 
OUString& rName, con
 ScTokenArray aTokArray;
 aTokArray.AddDoubleReference( aRefData );
 ScRangeData* pRangeData = new ScRangeData( pDoc, rName, aTokArray );
-pDoc->GetRangeName( rRange.aStart.Tab() )->insert( pRangeData );
+pDoc->GetRangeName()->insert( pRangeData );
 }
 
 void ScHTMLImport::WriteToDocument(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 dbaccess/source/ui/uno/dbinteraction.cxx |   10 +-
 dbaccess/source/ui/uno/dbinteraction.hxx |7 +++
 svx/source/form/formcontroller.cxx   |3 ++-
 3 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit d52f64b1ae7a95704ee9b17b034a43fcea05d1ea
Author: Maxim Monastirsky 
AuthorDate: Tue Aug 14 02:28:54 2018 +0300
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 11:57:45 2018 +0200

tdf#119245 Set a parent for OParameterDialog

Change-Id: I5a7f4b43027a72f049e12c06cd583c6545b028f5
Reviewed-on: https://gerrit.libreoffice.org/58952
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 
(cherry picked from commit ea77c31944c7ca8896e5e58f3f57d9a9cbe9b6bb)
Reviewed-on: https://gerrit.libreoffice.org/59001
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx 
b/dbaccess/source/ui/uno/dbinteraction.cxx
index 930dd4bb1386..b8c6ad061e18 100644
--- a/dbaccess/source/ui/uno/dbinteraction.cxx
+++ b/dbaccess/source/ui/uno/dbinteraction.cxx
@@ -37,6 +37,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 extern "C" void createRegistryInfo_OInteractionHandler()
 {
@@ -63,6 +65,12 @@ namespace dbaui
 "BasicInteractionHandler::BasicInteractionHandler: enabling legacy 
behavior, there should be no clients of this anymore!" );
 }
 
+void SAL_CALL BasicInteractionHandler::initialize(const Sequence& 
rArgs)
+{
+comphelper::SequenceAsHashMap aMap(rArgs);
+m_xParentWindow.set(aMap.getValue("Parent"), UNO_QUERY);
+}
+
 sal_Bool SAL_CALL BasicInteractionHandler::handleInteractionRequest( const 
Reference< XInteractionRequest >& i_rRequest )
 {
 return impl_handle_throw( i_rRequest );
@@ -124,7 +132,7 @@ namespace dbaui
 xParamCallback.set(_rContinuations[nParamPos], UNO_QUERY);
 OSL_ENSURE(xParamCallback.is(), 
"BasicInteractionHandler::implHandle(ParametersRequest): can't set the 
parameters without an appropriate interaction handler!s");
 
-ScopedVclPtrInstance< OParameterDialog > aDlg(nullptr, 
_rParamRequest.Parameters, _rParamRequest.Connection, m_xContext);
+ScopedVclPtrInstance< OParameterDialog > 
aDlg(VCLUnoHelper::GetWindow(m_xParentWindow), _rParamRequest.Parameters, 
_rParamRequest.Connection, m_xContext);
 sal_Int16 nResult = aDlg->Execute();
 try
 {
diff --git a/dbaccess/source/ui/uno/dbinteraction.hxx 
b/dbaccess/source/ui/uno/dbinteraction.hxx
index 9bc5f365799a..e0c510cbc11a 100644
--- a/dbaccess/source/ui/uno/dbinteraction.hxx
+++ b/dbaccess/source/ui/uno/dbinteraction.hxx
@@ -24,6 +24,8 @@
 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -45,6 +47,7 @@ namespace dbaui
 
 // BasicInteractionHandler
 typedef ::cppu::WeakImplHelper<   css::lang::XServiceInfo
+  ,   css::lang::XInitialization
   ,   css::task::XInteractionHandler2
   >   BasicInteractionHandler_Base;
 /** implements an XInteractionHandler for
@@ -61,6 +64,7 @@ namespace dbaui
 class BasicInteractionHandler
 :public BasicInteractionHandler_Base
 {
+css::uno::Reference< css::awt::XWindow > m_xParentWindow;
 const css::uno::Reference< css::uno::XComponentContext >
 m_xContext;
 const bool  m_bFallbackToGeneric;
@@ -71,6 +75,9 @@ namespace dbaui
 const bool i_bFallbackToGeneric
 );
 
+// XInitialization
+virtual void SAL_CALL initialize( const css::uno::Sequence< 
css::uno::Any >& rArgs ) override;
+
 // XInteractionHandler2
 virtual sal_Bool SAL_CALL handleInteractionRequest( const 
css::uno::Reference< css::task::XInteractionRequest >& Request ) override;
 
diff --git a/svx/source/form/formcontroller.cxx 
b/svx/source/form/formcontroller.cxx
index 4691584d8b24..19b11f16caa1 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -4204,7 +4204,8 @@ bool FormController::ensureInteractionHandler()
 return false;
 m_bAttemptedHandlerCreation = true;
 
-m_xInteractionHandler = 
InteractionHandler::createWithParent(m_xComponentContext, nullptr);
+m_xInteractionHandler = 
InteractionHandler::createWithParent(m_xComponentContext,
+ 
VCLUnoHelper::GetInterface(getDialogParentWindow()));
 return m_xInteractionHandler.is();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 svx/source/sidebar/line/LinePropertyPanel.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 24e3426546718a9df1c0066b1f955b1d0fe4d4ea
Author: Xisco Fauli 
AuthorDate: Wed Aug 8 19:07:06 2018 +0200
Commit: Xisco Faulí 
CommitDate: Wed Aug 15 11:57:20 2018 +0200

tdf#101254: Enable arrowheads in sidebar for draws

It's enabled in Line and Filling toolbar so do the same
in the sidebar

Change-Id: Icc64705268a9efb46ab463131ddf486dad12f085
Reviewed-on: https://gerrit.libreoffice.org/58747
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 
(cherry picked from commit ffc61735fe804913e55db45ae4d533c8980c2e6a)
Reviewed-on: https://gerrit.libreoffice.org/58754

diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx 
b/svx/source/sidebar/line/LinePropertyPanel.cxx
index d48dd7afac7e..1ea655b733a6 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -188,6 +188,7 @@ void LinePropertyPanel::HandleContextChange(
 {
 case CombinedEnumContext(Application::Calc, Context::DrawLine):
 case CombinedEnumContext(Application::DrawImpress, Context::DrawLine):
+case CombinedEnumContext(Application::DrawImpress, Context::Draw):
 case CombinedEnumContext(Application::WriterVariants, Context::Draw):
 // TODO : Implement DrawLine context in Writer
 bShowArrows = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 chart2/source/controller/main/DragMethod_RotateDiagram.cxx |6 
 include/svx/sdr/overlay/overlayobjectlist.hxx  |6 
 include/svx/svddrgmt.hxx   |2 
 sc/source/ui/view/gridwin.cxx  |   40 +++---
 sc/source/ui/view/tabview3.cxx |6 
 sd/source/ui/animations/motionpathtag.cxx  |4 
 sd/source/ui/annotations/annotationtag.cxx |8 -
 sd/source/ui/view/viewoverlaymanager.cxx   |7 -
 svx/source/engine3d/dragmt3d.cxx   |6 
 svx/source/engine3d/view3d.cxx |   10 -
 svx/source/sdr/overlay/overlayobjectlist.cxx   |   16 +-
 svx/source/svdraw/svdcrtv.cxx  |   24 +--
 svx/source/svdraw/svddrgmt.cxx |   14 +-
 svx/source/svdraw/svdedxv.cxx  |6 
 svx/source/svdraw/svdhdl.cxx   |   84 ++---
 svx/source/svdraw/svdmrkv.cxx  |6 
 svx/source/svdraw/svdsnpv.cxx  |   12 -
 svx/source/svdraw/svdview.cxx  |6 
 svx/source/table/tablecontroller.cxx   |4 
 svx/source/table/tablehandles.cxx  |   14 +-
 20 files changed, 139 insertions(+), 142 deletions(-)

New commits:
commit 18e20676024baecaf5719139f80f053f5f1e784a
Author: Noel Grandin 
AuthorDate: Mon Aug 13 16:16:12 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 11:27:20 2018 +0200

loplugin:useuniqueptr in OverlayObjectList

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

diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx 
b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index ccee914fdfbd..a2a46befe667 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -211,10 +211,10 @@ void 
DragMethod_RotateDiagram::CreateOverlayGeometry(sdr::overlay::OverlayManage
 // transform to 2D view coordinates
 aPolyPolygon.transform(rVCScene.getObjectTransformation());
 
-sdr::overlay::OverlayPolyPolygonStripedAndFilled* pNew = new 
sdr::overlay::OverlayPolyPolygonStripedAndFilled(
-aPolyPolygon);
+std::unique_ptr 
pNew(new sdr::overlay::OverlayPolyPolygonStripedAndFilled(
+aPolyPolygon));
 rOverlayManager.add(*pNew);
-addToOverlayObjectList(pNew);
+addToOverlayObjectList(std::move(pNew));
 }
 }
 } //namespace chart
diff --git a/include/svx/sdr/overlay/overlayobjectlist.hxx 
b/include/svx/sdr/overlay/overlayobjectlist.hxx
index 0774ac16e436..8044ae70147d 100644
--- a/include/svx/sdr/overlay/overlayobjectlist.hxx
+++ b/include/svx/sdr/overlay/overlayobjectlist.hxx
@@ -23,6 +23,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 
 class Point;
@@ -34,7 +36,7 @@ namespace sdr
 class SVX_DLLPUBLIC OverlayObjectList final
 {
 // the vector of OverlayObjects
-OverlayObjectVector maVector;
+::std::vector< std::unique_ptr > maVector;
 
 public:
 OverlayObjectList() {}
@@ -46,7 +48,7 @@ namespace sdr
 void clear();
 
 // append objects (takes ownership)
-void append(OverlayObject* pOverlayObject);
+void append(std::unique_ptr pOverlayObject);
 
 // access to objects
 sal_uInt32 count() const { return maVector.size(); }
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
index b51769d0e740..e4a501429c53 100644
--- a/include/svx/svddrgmt.hxx
+++ b/include/svx/svddrgmt.hxx
@@ -130,7 +130,7 @@ protected:
 virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, 
sdr::contact::ObjectContact& rObjectContact);
 
 // access for derivated classes to maOverlayObjectList (passes ownership)
-void addToOverlayObjectList(sdr::overlay::OverlayObject* pNew) { 
maOverlayObjectList.append(pNew); }
+void addToOverlayObjectList(std::unique_ptr 
pNew) { maOverlayObjectList.append(std::move(pNew)); }
 
 // access for derivated classes to mrSdrDragView
 SdrDragView& getSdrDragView() { return mrSdrDragView; }
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6106ca423a7f..21ca80104434 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5840,9 +5840,9 @@ void ScGridWindow::UpdateCopySourceOverlay()
 
 tools::Rectangle aLogic = PixelToLogic(aRect, aDrawMode);
 ::basegfx::B2DRange aRange(aLogic.Left(), aLogic.Top(), 
aLogic.Right(), aLogic.Bottom());
-ScOverlayDashedBorder* pDashedBorder = n

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

2018-08-15 Thread Libreoffice Gerrit user
 vcl/unx/gtk/a11y/atkwrapper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 82a7c54ad8b9b193e767fcafb5316d3f05e21001
Author: Samuel Thibault 
AuthorDate: Thu Aug 9 14:31:14 2018 +0200
Commit: Katarina Behrens 
CommitDate: Wed Aug 15 11:24:10 2018 +0200

a11y: Fix EDITBAR atk name

ATK_ROLE_EDITBAR's nick name is actually "edit bar" (special-cased in
atkobject.h)

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

diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 6a78dce933fb..7758f3317595 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -304,7 +304,7 @@ static AtkRole mapToAtkRole( sal_Int16 nRole )
 {
 // the accessible roles below were added to ATK in later versions,
 // with role_for_name we will know if they exist in runtime.
-roleMap[accessibility::AccessibleRole::EDIT_BAR] = 
getRoleForName("editbar");
+roleMap[accessibility::AccessibleRole::EDIT_BAR] = 
getRoleForName("edit bar");
 roleMap[accessibility::AccessibleRole::EMBEDDED_OBJECT] = 
getRoleForName("embedded");
 roleMap[accessibility::AccessibleRole::CHART] = 
getRoleForName("chart");
 roleMap[accessibility::AccessibleRole::CAPTION] = 
getRoleForName("caption");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - helpcontent2

2018-08-15 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64df7ae7b397e98cb450fdeb554997ecfe629791
Author: Jan Holesovsky 
AuthorDate: Wed Aug 15 10:02:35 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Aug 15 11:22:45 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'distro/collabora/cp-6.0'
  - Let's have Content-Type everywhere.

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

diff --git a/helpcontent2 b/helpcontent2
index 5301ace8b56e..d7b6f9c9a062 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5301ace8b56e7e32548366e4bf6883a2d964837b
+Subproject commit d7b6f9c9a06219723043210cba63e303ec067535
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'distro/collabora/cp-6.0' - help3xsl/help.html help3xsl/index2.html help3xsl/index.html help3xsl/online_transform.xsl

2018-08-15 Thread Libreoffice Gerrit user
 help3xsl/help.html|1 +
 help3xsl/index.html   |1 +
 help3xsl/index2.html  |1 +
 help3xsl/online_transform.xsl |2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit d7b6f9c9a06219723043210cba63e303ec067535
Author: Jan Holesovsky 
AuthorDate: Wed Aug 15 10:02:35 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 11:22:45 2018 +0200

Let's have Content-Type everywhere.

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

diff --git a/help3xsl/help.html b/help3xsl/help.html
index 21afd2ff4..cc22a2fdf 100644
--- a/help3xsl/help.html
+++ b/help3xsl/help.html
@@ -8,6 +8,7 @@
 -->
 
 
+
 
 
 
diff --git a/help3xsl/index.html b/help3xsl/index.html
index 9f4dae946..5a319fd04 100644
--- a/help3xsl/index.html
+++ b/help3xsl/index.html
@@ -8,6 +8,7 @@
 -->
 
 
+
 
 
 
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index e09b68e6f..12c7711c4 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -8,6 +8,7 @@
 -->
 
 
+
 
 
 
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index e93a90afa..23b72c8cd 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -142,7 +142,7 @@
 
 
 
-
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'distro/collabora/cp-6.0' - help3xsl/index2.html

2018-08-15 Thread Libreoffice Gerrit user
 help3xsl/index2.html |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 5301ace8b56e7e32548366e4bf6883a2d964837b
Author: Jan Holesovsky 
AuthorDate: Wed Aug 15 09:06:34 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 11:22:02 2018 +0200

Try to detect the system at least a bit.

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

diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index 8b58a4f6e..e09b68e6f 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -21,7 +21,7 @@
 // the URL came from LibreOffice help (F1)
 var target = getParameterByName("Target",url);
 var lang = existingLang(getParameterByName("Language", url));
-var system  = getParameterByName("System",url);
+var system = getParameterByName("System", url);
 var module;
 var defaultFile;
 var smodule = target.substr(0, target.indexOf('/'));
@@ -54,7 +54,10 @@
 window.location.href = newURL;
 } else {
 // URL came from elsewhere, direct access to webroot, we redirect to 
main Help page
-window.location.href = existingLang(navigator.language) + 
'/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
+var system = 'WIN';
+if (navigator.userAgent.indexOf("Mac") != -1) system = 'MAC';
+if (navigator.userAgent.indexOf("Linux") != -1) system = 'UNIX';
+window.location.href = existingLang(navigator.language) + 
'/text/shared/main0108.html?&DbPAR=WRITER&System=' + system;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - helpcontent2

2018-08-15 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ebee8dec9c751312c49a6881d1be8c0efacd75cb
Author: Jan Holesovsky 
AuthorDate: Wed Aug 15 09:06:34 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Aug 15 11:22:02 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'distro/collabora/cp-6.0'
  - Try to detect the system at least a bit.

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

diff --git a/helpcontent2 b/helpcontent2
index 77740035a0c9..5301ace8b56e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 77740035a0c95abac64eedd7eac54c210feaa447
+Subproject commit 5301ace8b56e7e32548366e4bf6883a2d964837b
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - helpcontent2

2018-08-15 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 25985f96dfbc41f55b19a269c1883eb8fafaba2c
Author: Jan Holesovsky 
AuthorDate: Wed Aug 15 08:54:28 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Aug 15 11:21:15 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'distro/collabora/cp-6.0'
  - The /index.html can default correctly, no need to do it in the 
root.

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

diff --git a/helpcontent2 b/helpcontent2
index 3b564bf5214e..77740035a0c9 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3b564bf5214e3b3a33ec93d9c1298aace161c37d
+Subproject commit 77740035a0c95abac64eedd7eac54c210feaa447
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'distro/collabora/cp-6.0' - help3xsl/help.html help3xsl/index2.html help3xsl/index.html

2018-08-15 Thread Libreoffice Gerrit user
 help3xsl/help.html   |4 +---
 help3xsl/index.html  |3 +--
 help3xsl/index2.html |1 -
 3 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 77740035a0c95abac64eedd7eac54c210feaa447
Author: Jan Holesovsky 
AuthorDate: Wed Aug 15 08:54:28 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 11:21:15 2018 +0200

The /index.html can default correctly, no need to do it in the 
root.

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

diff --git a/help3xsl/help.html b/help3xsl/help.html
index e63435b45..21afd2ff4 100644
--- a/help3xsl/help.html
+++ b/help3xsl/help.html
@@ -37,9 +37,7 @@
 var newURL = version + '/index.html?' + query;
 window.location.href = newURL;
 } else {
-// URL came from elsewhere, direct access to webroot, we redirect to 
main Help page
-var userLang = navigator.language || navigator.userLanguage;
-window.location.href = 'latest/' + userLang + 
'/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
+window.location.href = 'latest/index.html';
 }
 
 
diff --git a/help3xsl/index.html b/help3xsl/index.html
index fcaa9bdda..9f4dae946 100644
--- a/help3xsl/index.html
+++ b/help3xsl/index.html
@@ -12,8 +12,7 @@
 
 
 
-var userLang = navigator.language || navigator.userLanguage;
-
window.open('latest/'+userLang+'/text/shared/main0108.html?&DbPAR=WRITER&System=WIN','_self');
+window.location.href = 'latest/index.html';
 
 
 
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index ad1232043..8b58a4f6e 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -20,7 +20,6 @@
 if (n != -1) {
 // the URL came from LibreOffice help (F1)
 var target = getParameterByName("Target",url);
-var version = getParameterByName("Version",url);
 var lang = existingLang(getParameterByName("Language", url));
 var system  = getParameterByName("System",url);
 var module;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'distro/collabora/cp-6.0' - CustomTarget_html.mk help3xsl/help2.js help3xsl/index2.html Package_html_dynamic.mk

2018-08-15 Thread Libreoffice Gerrit user
 CustomTarget_html.mk|9 +
 Package_html_dynamic.mk |1 +
 help3xsl/help2.js   |   17 +
 help3xsl/index2.html|9 +++--
 4 files changed, 30 insertions(+), 6 deletions(-)

New commits:
commit 3b564bf5214e3b3a33ec93d9c1298aace161c37d
Author: Jan Holesovsky 
AuthorDate: Tue Aug 14 16:34:25 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 11:20:33 2018 +0200

Limit the online help only to the built languages.

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

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 58f7b7aaf..ad383a008 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -16,6 +16,7 @@ html_BMARK_MODULES := swriter:WRITER scalc:CALC 
simpress:IMPRESS sdraw:DRAW shar
 
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
hid2file.js \
+   languages.js \
$(foreach lang,$(gb_HELP_LANGS),\
$(lang)/bookmarks.js \
$(lang)/contents.js \
@@ -46,6 +47,14 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
) > $@ \
)
 
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/languages.js : \
+   $(SRCDIR)/helpcontent2/CustomTarget_html.mk
+   ( \
+   echo -n 'var languagesSet = new Set([' ; \
+   for lang in $(gb_HELP_LANGS) ; do echo -n "'$$lang', " ; done | 
sed 's/, $$//' ; \
+   echo ']);' \
+   ) > $@
+
 define html_gen_contents_html_dep
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
$(call gb_HelpTarget__get_treefile,$(1),$(3))
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
TREE_FILE := $(call gb_HelpTarget__get_treefile,$(1),$(3))
diff --git a/Package_html_dynamic.mk b/Package_html_dynamic.mk
index 6b42f56be..60ab2b39f 100644
--- a/Package_html_dynamic.mk
+++ b/Package_html_dynamic.mk
@@ -13,6 +13,7 @@ $(eval $(call 
gb_Package_use_customtarget,helpcontent2_html_dynamic,helpcontent2
 
 $(eval $(call 
gb_Package_add_files,helpcontent2_html_dynamic,$(LIBO_SHARE_HELP_FOLDER)/$(if 
$(HELP_ONLINE),/$(PRODUCTVERSION)), \
 hid2file.js \
+languages.js \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index 0e7b9d332..aed610371 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -120,4 +120,21 @@ function getParameterByName(name, url) {
 }
 return decodeURIComponent(results[2].replace(/\+/g, " "));
 }
+
+function existingLang(lang) {
+if (lang === undefined) {
+return 'en-US';
+}
+
+if (languagesSet.has(lang)) {
+return lang;
+}
+
+lang = lang.replace(/[-_].*/, '');
+if (languagesSet.has(lang)) {
+return lang;
+}
+
+return 'en-US';
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index 6a9a1a6c8..ad1232043 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -11,6 +11,7 @@
 
 
 
+
 
 
 
@@ -20,7 +21,7 @@
 // the URL came from LibreOffice help (F1)
 var target = getParameterByName("Target",url);
 var version = getParameterByName("Version",url);
-var lang = getParameterByName("Language",url);
+var lang = existingLang(getParameterByName("Language", url));
 var system  = getParameterByName("System",url);
 var module;
 var defaultFile;
@@ -54,11 +55,7 @@
 window.location.href = newURL;
 } else {
 // URL came from elsewhere, direct access to webroot, we redirect to 
main Help page
-var userLang = navigator.language;
-if (userLang === undefined) {
-userlang="en-US";
-}
-window.location.href = userLang + 
'/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
+window.location.href = existingLang(navigator.language) + 
'/text/shared/main0108.html?&DbPAR=WRITER&System=WIN';
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - helpcontent2

2018-08-15 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 93d71945738ac3b71bd6b4441fc06428ef7fbc93
Author: Jan Holesovsky 
AuthorDate: Tue Aug 14 16:34:25 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Aug 15 11:20:33 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'distro/collabora/cp-6.0'
  - Limit the online help only to the built languages.

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

diff --git a/helpcontent2 b/helpcontent2
index 682605ce9591..3b564bf5214e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 682605ce9591d0054ba0af0388714da6e7015b33
+Subproject commit 3b564bf5214e3b3a33ec93d9c1298aace161c37d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'distro/collabora/cp-6.0' - .gitreview

2018-08-15 Thread Libreoffice Gerrit user
 .gitreview |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 682605ce9591d0054ba0af0388714da6e7015b33
Author: Miklos Vajna 
AuthorDate: Wed Aug 15 11:17:14 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 11:19:16 2018 +0200

Add missing .gitreview file

This is a partial cherry-pick of commit
ccd8eddb836af16eeaee6bdc5d1c8e043eca82df (tdf#118771 EPUB export:
document that reflowable content has no page style, 2018-07-19).

Change-Id: Ib6b6535f95f645d20ed7f99b404f4c41488f236e

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0..79416c34c
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,7 @@
+[gerrit]
+host=logerrit
+port=29418
+project=help
+defaultremote=logerrit
+defaultbranch=distro/collabora/cp-6.0
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - helpcontent2

2018-08-15 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dcaaf25e74764c45f2fb80429b4abc7e56ca0263
Author: Miklos Vajna 
AuthorDate: Wed Aug 15 11:17:14 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Aug 15 11:19:47 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'distro/collabora/cp-6.0'
  - Add missing .gitreview file

This is a partial cherry-pick of commit
ccd8eddb836af16eeaee6bdc5d1c8e043eca82df (tdf#118771 EPUB export:
document that reflowable content has no page style, 2018-07-19).

Change-Id: Ib6b6535f95f645d20ed7f99b404f4c41488f236e

diff --git a/helpcontent2 b/helpcontent2
index db64016fc410..682605ce9591 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit db64016fc4100bf7cc88647560b1e3c5fcb53b4e
+Subproject commit 682605ce9591d0054ba0af0388714da6e7015b33
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-3' - 5 commits - download.lst external/curl external/nss xmlsecurity/source

2018-08-15 Thread Libreoffice Gerrit user
 download.lst |4 
 external/curl/ExternalProject_curl.mk|1 
 external/nss/UnpackedTarball_nss.mk  |1 
 external/nss/nss.patch   |  116 ++-
 external/nss/nss.vs2015.patch|   10 +
 external/nss/nss.windowbuild.patch.0 |   55 --
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |   14 ++
 7 files changed, 80 insertions(+), 121 deletions(-)

New commits:
commit 700df752fc831945e0f49bf3e6e2a52aeebefb0c
Author: Michael Stahl 
AuthorDate: Tue Aug 7 18:11:41 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 15 10:55:05 2018 +0200

nss: upgrade to release 3.38

Fixes CVE-2018-0495 and "the ASN.1 code".

(Remove one hunk of nss-android.patch.1 that should be obsolete with the
current Android toolchain baseline (but that hunk didn't exist in
libreoffice-6-0 or older anyway).)

Change-Id: I5516edec17b72f53acd2749e8840805eead077bc
Reviewed-on: https://gerrit.libreoffice.org/58697
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 3ef76067bfa1f9f60ec3989bd6b40a5760137903)
Reviewed-on: https://gerrit.libreoffice.org/58722
Reviewed-by: Miklos Vajna 
(cherry picked from commit e4874f777048535650a2bb1ce875e1a6e3e4b7ef)

diff --git a/download.lst b/download.lst
index b68cd8400d5a..df77a4016151 100644
--- a/download.lst
+++ b/download.lst
@@ -112,8 +112,8 @@ export MWAW_TARBALL := 
libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
 export MYSQLCPPCONN_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_MD5SUM := b47a61cb90571c0b88a531037114685a
-export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
+export NSS_MD5SUM := cd649be8ee61fe15d64d7bef361b37ba
+export NSS_TARBALL := nss-3.38-with-nspr-4.19.tar.gz
 export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.vs2015.patch b/external/nss/nss.vs2015.patch
index de4f8762fd5b..c3e6b5a5acaa 100644
--- a/external/nss/nss.vs2015.patch
+++ b/external/nss/nss.vs2015.patch
@@ -10,3 +10,13 @@ diff -ru nss.org/nss/coreconf/WIN32.mk 
nss/nss/coreconf/WIN32.mk
  ifeq ($(_MSC_VER_GE_12),1)
OS_CFLAGS += -FS
  endif
+--- a/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:42.922939267 +0200
 b/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:47.778929835 +0200
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
commit 052f2f25cc3500e84db644aa6e67fa2b1e9307c8
Author: Gautam Prajapati 
AuthorDate: Mon Aug 28 18:17:29 2017 +0530
Commit: Michael Stahl 
CommitDate: Wed Aug 15 10:55:04 2018 +0200

nss: Upgrade to release 3.31.1 and update patches

This commit updates the NSS to release 3.31.1 and NSPR
to 4.15. It also updates the external/nss/nss.patch and
external/nss/nss-android.patch to incorporate the
NSS source changes.

Change-Id: Icdd933b67e717f8d91622cd5f6001e34e261b746
Reviewed-on: https://gerrit.libreoffice.org/41636
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit c6df07f905cd9562132b06e44f90b0479b250f7a)

diff --git a/download.lst b/download.lst
index 9faf3b465130..b68cd8400d5a 100644
--- a/download.lst
+++ b/download.lst
@@ -112,8 +112,8 @@ export MWAW_TARBALL := 
libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
 export MYSQLCPPCONN_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_MD5SUM := e55ee06b22687df68fafc6a30c0554b2
-export NSS_TARBALL := nss-3.29.5-with-nspr-4.13.1.tar.gz
+export NSS_MD5SUM := b47a61cb90571c0b88a531037114685a
+export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
 export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index b3b932343d83..1eb0bf70d866 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -1,5 +1,16 @@
 a/nss.orig/nspr/pr/src/misc/prnetdb.c  2016-02-12 14:51:25.0 
+0100
-+++ b/nss/nspr/pr/src/misc/prnetdb.c   2016-03-04 19:23:00.462892600 +0100
+--- a/a/nspr/configure 2017-08-29 23:44:13.686045013 +0530
 b/b/nspr/configure 2017-08-29 23:46:53.774768655 +0530
+@@ -7034,7 +7034,7 @@
+ PR_MD_CSRCS=linux.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+-DSO_LDOPTS='-shared -Wl,-soname -

Re: Fwd: [PATCH] xmlsecurity: nsscrypto_initialize: try to avoid profile migr...

2018-08-15 Thread Michael Stahl

On 09.08.2018 13:16, Michael Stahl wrote:


hi,

anybody got an insight into NSS initialisation to tell me if this is a 
good fix?


it seems plausible to me, but i haven't tested it, and my OS is so new 
it creates the new SQL profiles by default anyway.


anybody got an old system and some time to test if it actually works?


Miklos pointed me to an "old" unit test profile in 
xmlsecurity/qa/unit/signing/data/ and the patch does appear to have the 
intended effect, so it's pushed now.


but i'm thinking we need some insight here before backporting the recent 
bundled NSS upgrade to release branches :)


backports of that are also pushed now.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-4' - 4 commits - download.lst external/curl external/nss xmlsecurity/source

2018-08-15 Thread Libreoffice Gerrit user
 download.lst |4 
 external/curl/ExternalProject_curl.mk|1 
 external/nss/nss.patch   |  116 ++-
 external/nss/nss.vs2015.patch|   10 +
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |   14 ++
 5 files changed, 80 insertions(+), 65 deletions(-)

New commits:
commit 92fbe703f9ca480d3a2b8610d87e991c729edf77
Author: Michael Stahl 
AuthorDate: Tue Aug 7 18:11:41 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 15 10:43:29 2018 +0200

nss: upgrade to release 3.38

Fixes CVE-2018-0495 and "the ASN.1 code".

(Remove one hunk of nss-android.patch.1 that should be obsolete with the
current Android toolchain baseline (but that hunk didn't exist in
libreoffice-6-0 or older anyway).)

Change-Id: I5516edec17b72f53acd2749e8840805eead077bc
Reviewed-on: https://gerrit.libreoffice.org/58697
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 3ef76067bfa1f9f60ec3989bd6b40a5760137903)
Reviewed-on: https://gerrit.libreoffice.org/58722
Reviewed-by: Miklos Vajna 
(cherry picked from commit e4874f777048535650a2bb1ce875e1a6e3e4b7ef)

diff --git a/download.lst b/download.lst
index eb284737b142..58617f6e8f3e 100644
--- a/download.lst
+++ b/download.lst
@@ -162,8 +162,8 @@ export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_SHA256SUM := 
00c626c0dc18d094ab374dbd9a354915bfe4776433289386ed489c2ec0845cdd
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_SHA256SUM := 
571ef672468d92808d5a4cd15ee17f914720fbe377eb40fe18e8b9a4f3da24ee
-export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
+export NSS_SHA256SUM := 
f271ec73291fa3e4bd4b59109f8035cc3a192fc33886f40ed4f9ee4b31c746e9
+export NSS_TARBALL := nss-3.38-with-nspr-4.19.tar.gz
 export ODFGEN_SHA256SUM := 
2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.vs2015.patch b/external/nss/nss.vs2015.patch
index de4f8762fd5b..c3e6b5a5acaa 100644
--- a/external/nss/nss.vs2015.patch
+++ b/external/nss/nss.vs2015.patch
@@ -10,3 +10,13 @@ diff -ru nss.org/nss/coreconf/WIN32.mk 
nss/nss/coreconf/WIN32.mk
  ifeq ($(_MSC_VER_GE_12),1)
OS_CFLAGS += -FS
  endif
+--- a/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:42.922939267 +0200
 b/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:47.778929835 +0200
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
commit bb76a4045e8526f71425d9ca8ac3bcdc4feaa057
Author: Gautam Prajapati 
AuthorDate: Mon Aug 28 18:17:29 2017 +0530
Commit: Michael Stahl 
CommitDate: Wed Aug 15 10:42:05 2018 +0200

nss: Upgrade to release 3.31.1 and update patches

This commit updates the NSS to release 3.31.1 and NSPR
to 4.15. It also updates the external/nss/nss.patch and
external/nss/nss-android.patch to incorporate the
NSS source changes.

Change-Id: Icdd933b67e717f8d91622cd5f6001e34e261b746
Reviewed-on: https://gerrit.libreoffice.org/41636
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit c6df07f905cd9562132b06e44f90b0479b250f7a)

diff --git a/download.lst b/download.lst
index 2b194a8cd40e..eb284737b142 100644
--- a/download.lst
+++ b/download.lst
@@ -162,8 +162,8 @@ export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_SHA256SUM := 
00c626c0dc18d094ab374dbd9a354915bfe4776433289386ed489c2ec0845cdd
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_SHA256SUM := 
8cb8624147737d1b4587c50bf058afbb6effc0f3c205d69b5ef4077b3bfed0e4
-export NSS_TARBALL := nss-3.29.5-with-nspr-4.13.1.tar.gz
+export NSS_SHA256SUM := 
571ef672468d92808d5a4cd15ee17f914720fbe377eb40fe18e8b9a4f3da24ee
+export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
 export ODFGEN_SHA256SUM := 
2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index b3b932343d83..1eb0bf70d866 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -1,5 +1,16 @@
 a/nss.orig/nspr/pr/src/misc/prnetdb.c  2016-02-12 14:51:25.0 
+0100
-+++ b/nss/nspr/pr/src/misc/prnetdb.c   2016-03-04 19:23:00.462892600 +0100
+--- a/a/nspr/configure 2017-08-29 23:44:13.686045013 +0530
 b/b/nspr/configure 2017-08-29 23:46:53.774768655 +0530
+@@ -7034,7 +7034,7 @@
+ PR_MD_CSRCS=linux

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-2' - 4 commits - download.lst external/nss xmlsecurity/source

2018-08-15 Thread Libreoffice Gerrit user
 download.lst |4 
 external/nss/UnpackedTarball_nss.mk  |1 
 external/nss/nss.patch   |  116 ++-
 external/nss/nss.vs2015.patch|   10 +
 external/nss/nss.windowbuild.patch.0 |   55 --
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |   14 ++
 6 files changed, 79 insertions(+), 121 deletions(-)

New commits:
commit 88c54effcdfa2fb044add69da3a47d06ef796271
Author: Michael Stahl 
AuthorDate: Tue Aug 7 18:11:41 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 15 11:11:06 2018 +0200

nss: upgrade to release 3.38

Fixes CVE-2018-0495 and "the ASN.1 code".

(Remove one hunk of nss-android.patch.1 that should be obsolete with the
current Android toolchain baseline (but that hunk didn't exist in
libreoffice-6-0 or older anyway).)

Change-Id: I5516edec17b72f53acd2749e8840805eead077bc
Reviewed-on: https://gerrit.libreoffice.org/58697
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 3ef76067bfa1f9f60ec3989bd6b40a5760137903)
Reviewed-on: https://gerrit.libreoffice.org/58722
Reviewed-by: Miklos Vajna 
(cherry picked from commit e4874f777048535650a2bb1ce875e1a6e3e4b7ef)

diff --git a/download.lst b/download.lst
index 82edfc596493..36bf1e2b366a 100644
--- a/download.lst
+++ b/download.lst
@@ -110,8 +110,8 @@ export MWAW_TARBALL := 
libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
 export MYSQLCPPCONN_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_MD5SUM := b47a61cb90571c0b88a531037114685a
-export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
+export NSS_MD5SUM := cd649be8ee61fe15d64d7bef361b37ba
+export NSS_TARBALL := nss-3.38-with-nspr-4.19.tar.gz
 export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.vs2015.patch b/external/nss/nss.vs2015.patch
index de4f8762fd5b..c3e6b5a5acaa 100755
--- a/external/nss/nss.vs2015.patch
+++ b/external/nss/nss.vs2015.patch
@@ -10,3 +10,13 @@ diff -ru nss.org/nss/coreconf/WIN32.mk 
nss/nss/coreconf/WIN32.mk
  ifeq ($(_MSC_VER_GE_12),1)
OS_CFLAGS += -FS
  endif
+--- a/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:42.922939267 +0200
 b/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:47.778929835 +0200
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
commit fc5aafb1478affadce79a82c3504182e65e2525e
Author: Gautam Prajapati 
AuthorDate: Mon Aug 28 18:17:29 2017 +0530
Commit: Michael Stahl 
CommitDate: Wed Aug 15 11:10:58 2018 +0200

nss: Upgrade to release 3.31.1 and update patches

This commit updates the NSS to release 3.31.1 and NSPR
to 4.15. It also updates the external/nss/nss.patch and
external/nss/nss-android.patch to incorporate the
NSS source changes.

Change-Id: Icdd933b67e717f8d91622cd5f6001e34e261b746
Reviewed-on: https://gerrit.libreoffice.org/41636
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit c6df07f905cd9562132b06e44f90b0479b250f7a)

diff --git a/download.lst b/download.lst
index 49ed2b743f72..82edfc596493 100644
--- a/download.lst
+++ b/download.lst
@@ -110,8 +110,8 @@ export MWAW_TARBALL := 
libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
 export MYSQLCPPCONN_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_MD5SUM := e55ee06b22687df68fafc6a30c0554b2
-export NSS_TARBALL := nss-3.29.5-with-nspr-4.13.1.tar.gz
+export NSS_MD5SUM := b47a61cb90571c0b88a531037114685a
+export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
 export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index b3b932343d83..1eb0bf70d866 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -1,5 +1,16 @@
 a/nss.orig/nspr/pr/src/misc/prnetdb.c  2016-02-12 14:51:25.0 
+0100
-+++ b/nss/nspr/pr/src/misc/prnetdb.c   2016-03-04 19:23:00.462892600 +0100
+--- a/a/nspr/configure 2017-08-29 23:44:13.686045013 +0530
 b/b/nspr/configure 2017-08-29 23:46:53.774768655 +0530
+@@ -7034,7 +7034,7 @@
+ PR_MD_CSRCS=linux.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+-DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
++DSO_LDOPTS='-shared -Wl,-z,origin -

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - 4 commits - download.lst external/nss xmlsecurity/source

2018-08-15 Thread Libreoffice Gerrit user
 download.lst |4 
 external/nss/UnpackedTarball_nss.mk  |1 
 external/nss/nss.patch   |  116 ++-
 external/nss/nss.vs2015.patch|   10 +
 external/nss/nss.windowbuild.patch.0 |   55 --
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |   14 ++
 6 files changed, 79 insertions(+), 121 deletions(-)

New commits:
commit 236e7adbd95ae15dc9f6f977ae58d01b25c34f54
Author: Michael Stahl 
AuthorDate: Tue Aug 7 18:11:41 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 15 10:52:36 2018 +0200

nss: upgrade to release 3.38

Fixes CVE-2018-0495 and "the ASN.1 code".

(Remove one hunk of nss-android.patch.1 that should be obsolete with the
current Android toolchain baseline (but that hunk didn't exist in
libreoffice-6-0 or older anyway).)

Change-Id: I5516edec17b72f53acd2749e8840805eead077bc
Reviewed-on: https://gerrit.libreoffice.org/58697
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 3ef76067bfa1f9f60ec3989bd6b40a5760137903)
Reviewed-on: https://gerrit.libreoffice.org/58722
Reviewed-by: Miklos Vajna 
(cherry picked from commit e4874f777048535650a2bb1ce875e1a6e3e4b7ef)

diff --git a/download.lst b/download.lst
index 82edfc596493..36bf1e2b366a 100644
--- a/download.lst
+++ b/download.lst
@@ -110,8 +110,8 @@ export MWAW_TARBALL := 
libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
 export MYSQLCPPCONN_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_MD5SUM := b47a61cb90571c0b88a531037114685a
-export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
+export NSS_MD5SUM := cd649be8ee61fe15d64d7bef361b37ba
+export NSS_TARBALL := nss-3.38-with-nspr-4.19.tar.gz
 export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.vs2015.patch b/external/nss/nss.vs2015.patch
index de4f8762fd5b..c3e6b5a5acaa 100755
--- a/external/nss/nss.vs2015.patch
+++ b/external/nss/nss.vs2015.patch
@@ -10,3 +10,13 @@ diff -ru nss.org/nss/coreconf/WIN32.mk 
nss/nss/coreconf/WIN32.mk
  ifeq ($(_MSC_VER_GE_12),1)
OS_CFLAGS += -FS
  endif
+--- a/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:42.922939267 +0200
 b/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:47.778929835 +0200
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
commit b2a2b2482a843bef31d6becfba7d7e8ad5936df1
Author: Gautam Prajapati 
AuthorDate: Mon Aug 28 18:17:29 2017 +0530
Commit: Michael Stahl 
CommitDate: Wed Aug 15 10:52:36 2018 +0200

nss: Upgrade to release 3.31.1 and update patches

This commit updates the NSS to release 3.31.1 and NSPR
to 4.15. It also updates the external/nss/nss.patch and
external/nss/nss-android.patch to incorporate the
NSS source changes.

Change-Id: Icdd933b67e717f8d91622cd5f6001e34e261b746
Reviewed-on: https://gerrit.libreoffice.org/41636
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit c6df07f905cd9562132b06e44f90b0479b250f7a)

diff --git a/download.lst b/download.lst
index 49ed2b743f72..82edfc596493 100644
--- a/download.lst
+++ b/download.lst
@@ -110,8 +110,8 @@ export MWAW_TARBALL := 
libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
 export MYSQLCPPCONN_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_MD5SUM := e55ee06b22687df68fafc6a30c0554b2
-export NSS_TARBALL := nss-3.29.5-with-nspr-4.13.1.tar.gz
+export NSS_MD5SUM := b47a61cb90571c0b88a531037114685a
+export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
 export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index b3b932343d83..1eb0bf70d866 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -1,5 +1,16 @@
 a/nss.orig/nspr/pr/src/misc/prnetdb.c  2016-02-12 14:51:25.0 
+0100
-+++ b/nss/nspr/pr/src/misc/prnetdb.c   2016-03-04 19:23:00.462892600 +0100
+--- a/a/nspr/configure 2017-08-29 23:44:13.686045013 +0530
 b/b/nspr/configure 2017-08-29 23:46:53.774768655 +0530
+@@ -7034,7 +7034,7 @@
+ PR_MD_CSRCS=linux.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+-DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
++DSO_LDOPTS='-shared -Wl,-z,origin -

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

2018-08-15 Thread Libreoffice Gerrit user
 include/o3tl/clamp.hxx |   43 +
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |9 -
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |8 ++--
 3 files changed, 54 insertions(+), 6 deletions(-)

New commits:
commit 2d2ccd18ead83d1589bc0d71c01d4d79f7ac8bbc
Author: Stephan Bergmann 
AuthorDate: Wed Aug 15 08:23:13 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 15 10:59:00 2018 +0200

RTF picture sizes are 32-bit signed

...not 16-bit unsigned.  Word2007RTFSpec9.docx states "A small number of 
control
words take values in the range −2,147,483,648 to 2,147,483,647 (32-bit 
signed
integer)." and for \picwN, \pichN, \picwgoalN, and \pichgoalN it states 
"The N
argument is a long integer."

This was found with Clang's new -fsanitize=implicit-conversion during
CppunitTest_writerfilter_rtftok, where
writerfilter/qa/cppunittests/rtftok/data/pass/TCI-TN65GP-DDRHDLL-partial.rtf
contains "\pich81306":

> Testing 
file:///home/sbergman/lo/core/writerfilter/qa/cppunittests/rtftok/data/pass/TCI-TN65GP-DDRHDLL-partial.rtf:
[...]
> writerfilter/source/rtftok/rtfdispatchvalue.cxx:770:48: runtime error: 
implicit conversion from type 'int' of value 81306 (32-bit, signed) to type 
'sal_uInt16' (aka 'unsigned short') changed the value to 15770 (16-bit, 
unsigned)
>  #0 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int) at writerfilter/source/rtftok/rtfdispatchvalue.cxx:770:48 
(instdir/program/libwriterfilterlo.so +0xb96f2f)
>  #1 in writerfilter::rtftok::RTFTokenizer::dispatchKeyword(rtl::OString 
const&, bool, int) at writerfilter/source/rtftok/rtftokenizer.cxx:311:29 
(instdir/program/libwriterfilterlo.so +0xd86c93)
>  #2 in writerfilter::rtftok::RTFTokenizer::resolveKeyword() at 
writerfilter/source/rtftok/rtftokenizer.cxx:243:12 
(instdir/program/libwriterfilterlo.so +0xd84b06)
>  #3 in writerfilter::rtftok::RTFTokenizer::resolveParse() at 
writerfilter/source/rtftok/rtftokenizer.cxx:123:27 
(instdir/program/libwriterfilterlo.so +0xd8299a)
>  #4 in 
writerfilter::rtftok::RTFDocumentImpl::resolve(writerfilter::Stream&) at 
writerfilter/source/rtftok/rtfdocumentimpl.cxx:786:27 
(instdir/program/libwriterfilterlo.so +0xbf03bd)
>  #5 in 
RtfFilter::filter(com::sun::star::uno::Sequence
 const&) at writerfilter/source/filter/RtfFilter.cxx:144:20 
(instdir/program/libwriterfilterlo.so +0x132d911)
>  #6 in RtfTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at 
writerfilter/qa/cppunittests/rtftok/testrtftok.cxx:58:27 
(workdir/LinkTarget/CppunitTest/libtest_writerfilter_rtftok.so +0x15c6e)
>  #7 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, 
SotClipboardFormatId, unsigned int, bool) at 
unotest/source/cpp/filters-test.cxx:130:20 
(workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x5724c)
>  #8 in test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString 
const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned 
int, bool) at unotest/source/cpp/filters-test.cxx:155:5 
(workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x57ec9)
>  #9 in RtfTest::test() at 
writerfilter/qa/cppunittests/rtftok/testrtftok.cxx:78:5 
(workdir/LinkTarget/CppunitTest/libtest_writerfilter_rtftok.so +0x16214)

(Needs to add o3tl::clamp as a compatibility wrapper for C++17 std::clamp.)

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

diff --git a/include/o3tl/clamp.hxx b/include/o3tl/clamp.hxx
new file mode 100644
index ..054de5e22517
--- /dev/null
+++ b/include/o3tl/clamp.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_O3TL_CLAMP_HXX
+#define INCLUDED_O3TL_CLAMP_HXX
+
+#include 
+
+#include 
+#include 
+
+#include 
+
+// C++17 std::clamp
+
+namespace o3tl
+{
+#if defined __cpp_lib_clamp
+
+using std::clamp;
+
+#else
+
+template  constexpr const T& clamp(const T& v, const T& lo, const 
T& hi)
+{
+#if HAVE_CXX14_CONSTEXPR
+assert(!(hi < lo));
+#endif
+return v < lo ? lo : (hi < v ? hi : v);
+}
+
+#endif
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 60c7b3a3

[Libreoffice-commits] online.git: configure.ac wsd/LOOLWSD.cpp

2018-08-15 Thread Libreoffice Gerrit user
 configure.ac|2 +-
 wsd/LOOLWSD.cpp |   51 +--
 2 files changed, 10 insertions(+), 43 deletions(-)

New commits:
commit b811f70492922ade05b1d0a30c71a7be22084c19
Author: Tor Lillqvist 
AuthorDate: Wed Aug 15 11:01:05 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Aug 15 11:36:20 2018 +0300

Revert "When asked to convert to PNG, look for an embedded ODF thumbnail 
first"

The embedded ODF thumbnail in documents produced by OOo or LO is too
small (max 256 pixels) to be useful in general, so let's not bother.

This reverts commit 3a9e536dfab71f6999a39d7371a9dd8844815ae7.

Change-Id: I503b61f85264b9be658064632ffd1f94518b2a3c

diff --git a/configure.ac b/configure.ac
index 823378d6e..421fdd686 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,7 +332,7 @@ else
 fi
 AC_SUBST(ENABLE_SUPPORT_KEY)
 
-LIBS="$LIBS -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} 
-lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} 
-lPocoXML${POCO_DEBUG_SUFFIX} -lPocoNetSSL${POCO_DEBUG_SUFFIX} 
-lPocoCrypto${POCO_DEBUG_SUFFIX} -lPocoZip${POCO_DEBUG_SUFFIX}"
+LIBS="$LIBS -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} 
-lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} 
-lPocoXML${POCO_DEBUG_SUFFIX} -lPocoNetSSL${POCO_DEBUG_SUFFIX} 
-lPocoCrypto${POCO_DEBUG_SUFFIX}"
 
 AC_CHECK_HEADERS([LibreOfficeKit/LibreOfficeKit.h],
  [],
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index fc1f83013..ae32cfb18 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -91,8 +91,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include "Admin.hpp"
 #include "Auth.hpp"
@@ -2065,49 +2063,18 @@ private:
 std::string thumbnailFile;
 if (format == "png")
 {
+// Check whether we already have a cached "thumbnail" for 
this document.
+
+// NOTE: We do *not* want to simply extract the embedded
+// Thumbnails/thumbnail.png from an ODF document, as that 
is typically too small
+// for many purposes (side is max 256 pixels in documents 
generated by
+// LibreOffice or its predecessor), and there is no way to 
pass in a requested
+// minimum pixel size of the result so we can't know 
whether the actual size of
+// the embedded thumbail is big enough.
+
 std::ifstream istr(fromPath, std::ios::binary);
 if (istr.is_open() && istr.good())
 {
-// Check whether it is an ODF document with an 
embedded PNG thumbnail.
-
-try
-{
-Poco::Zip::ZipArchive zip(istr);
-auto thumbnailHeader = 
zip.findHeader("Thumbnails/thumbnail.png");
-if (thumbnailHeader != zip.headerEnd() && 
thumbnailHeader->second.isFile())
-{
-Poco::Zip::ZipStreamBuf 
thumbnailStreamBuf(istr, thumbnailHeader->second, true);
-std::istream 
thumbnailStream(&thumbnailStreamBuf);
-if (thumbnailStream.good())
-{
-std::string png;
-
Poco::StreamCopier::copyToString(thumbnailStream, png);
-if (!thumbnailStream.bad())
-{
-LOG_TRC("Extracted thumbnail from ODF 
document");
-
-response.set("Content-Disposition", 
"attachment; filename=\"thumbnail.png\"");
-response.setContentType("image/png");
-response.setContentLength(png.size());
-socket->send(response);
-socket->send(png.data(), png.size(), 
true);
-
-return;
-}
-}
-}
-}
-catch (Poco::Exception&)
-{
-}
-
-// Close and re-open istr after the Zip stuff above to 
get it into a known
-// good state.
-istr.close();
-istr.open(fromPath, std::ios::binary);
-
-// Look for cached thumbnail.
-
 Poco::SHA1Engine sha1;
 Poco::DigestOutputStream dos(sha1);
 Poco::StreamCopier::copyStream(istr, dos);
___
Lib

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

2018-08-15 Thread Libreoffice Gerrit user
 include/svx/galtheme.hxx |6 +++---
 svx/source/gallery2/galbrws2.cxx |4 +---
 svx/source/gallery2/galctrl.cxx  |9 +++--
 svx/source/gallery2/galexpl.cxx  |3 +--
 svx/source/gallery2/galtheme.cxx |   27 ++-
 svx/source/unogallery/unogalitem.cxx |6 ++
 6 files changed, 20 insertions(+), 35 deletions(-)

New commits:
commit f71f16b742faa75fe0cab6b899b99ee42d5ec6c7
Author: Noel Grandin 
AuthorDate: Sat Aug 11 10:22:43 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 10:24:28 2018 +0200

loplugin:useuniqueptr pass SgaObject around by std::unique_ptr

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

diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index d967392fa3f6..98bf45876bc0 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 class SotStorage;
@@ -90,7 +91,7 @@ private:
 boolbAbortActualize;
 
 SAL_DLLPRIVATE void ImplCreateSvDrawStorage();
-SgaObject*  ImplReadSgaObject( GalleryObject const * 
pEntry );
+std::unique_ptr  ImplReadSgaObject( GalleryObject const * 
pEntry );
 SAL_DLLPRIVATE bool ImplWriteSgaObject(const SgaObject& rObj, 
sal_uInt32 nPos, GalleryObject* pExistentEntry);
 SAL_DLLPRIVATE void ImplWrite();
 SAL_DLLPRIVATE const GalleryObject* ImplGetGalleryObject(sal_uInt32 nPos) 
const
@@ -122,8 +123,7 @@ public:
 
 SAL_DLLPRIVATE sal_uInt32   GetObjectCount() const { return 
aObjectList.size(); }
 
-SgaObject*  AcquireObject(sal_uInt32 nPos);
-static void ReleaseObject(SgaObject* pObj);
+std::unique_ptr  AcquireObject(sal_uInt32 nPos);
 
 boolInsertObject(const SgaObject& rObj, sal_uInt32 
nPos = SAL_MAX_UINT32);
 voidRemoveObject(sal_uInt32 nPos);
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 920057674fd8..342d041d7643 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1110,7 +1110,7 @@ void GalleryBrowser2::Execute(const OString &rIdent)
 }
 else if (rIdent == "title")
 {
-SgaObject* pObj = mpCurTheme->AcquireObject( mnCurActionPos );
+std::unique_ptr pObj = mpCurTheme->AcquireObject( 
mnCurActionPos );
 
 if( pObj )
 {
@@ -1131,8 +1131,6 @@ void GalleryBrowser2::Execute(const OString &rIdent)
 mpCurTheme->InsertObject( *pObj );
 }
 }
-
-GalleryTheme::ReleaseObject( pObj );
 }
 }
 else if (rIdent == "copy")
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index aa7a7c807b41..a41d820da345 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -323,7 +323,7 @@ void GalleryIconView::UserDraw(const UserDrawEvent& rUDEvt)
 
 if (bNeedToCreate)
 {
-SgaObject* pObj = mpTheme->AcquireObject(nId - 1);
+std::unique_ptr pObj = mpTheme->AcquireObject(nId - 1);
 
 if(pObj)
 {
@@ -331,7 +331,6 @@ void GalleryIconView::UserDraw(const UserDrawEvent& rUDEvt)
 aItemTextTitle = GalleryBrowser2::GetItemText(*mpTheme, *pObj, 
GalleryItemFlags::Title);
 
 mpTheme->SetPreviewBitmapExAndStrings(nId - 1, aBitmapEx, aSize, 
aItemTextTitle, aItemTextPath);
-GalleryTheme::ReleaseObject(pObj);
 }
 }
 
@@ -441,12 +440,11 @@ OUString GalleryListView::GetCellText(long _nRow, 
sal_uInt16 /*nColumnId*/) cons
 OUString sRet;
 if( mpTheme && ( _nRow < static_cast< long >( mpTheme->GetObjectCount() ) 
) )
 {
-SgaObject* pObj = mpTheme->AcquireObject( _nRow );
+std::unique_ptr pObj = mpTheme->AcquireObject( _nRow );
 
 if( pObj )
 {
 sRet = GalleryBrowser2::GetItemText( *mpTheme, *pObj, 
GalleryItemFlags::Title );
-GalleryTheme::ReleaseObject( pObj );
 }
 }
 
@@ -505,7 +503,7 @@ void GalleryListView::PaintField(vcl::RenderContext& rDev, 
const tools::Rectangl
 
 if(bNeedToCreate)
 {
-SgaObject* pObj = mpTheme->AcquireObject(mnCurRow);
+std::unique_ptr pObj = mpTheme->AcquireObject(mnCurRow);
 
 if(pObj)
 {
@@ -514,7 +512,6 @@ void GalleryListView::PaintField(vcl::RenderContext& rDev, 
const tools::Rectangl
 aItemTextPath = GalleryBrowser2::GetItemText(*mpTheme, *pObj, 
GalleryItemFlags::Path);
 
 mpTheme->SetPreviewBitmapExAndStrings(mnCurRow, aBitmapEx, 
aSize, aItemTextTitle, aItemTextPath);
-GalleryTheme::ReleaseObject(pObj);

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

2018-08-15 Thread Libreoffice Gerrit user
 framework/inc/uielement/menubarmanager.hxx|6 +--
 framework/source/uielement/menubarmanager.cxx |   47 +-
 2 files changed, 20 insertions(+), 33 deletions(-)

New commits:
commit a84abd9e29b1920af87a1c7510bd92355594f9af
Author: Noel Grandin 
AuthorDate: Mon Aug 13 15:11:23 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 10:10:39 2018 +0200

loplugin:useuniqueptr in MenuBarManager

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

diff --git a/framework/inc/uielement/menubarmanager.hxx 
b/framework/inc/uielement/menubarmanager.hxx
index ba77df9457ab..a1fbdb82d0fe 100644
--- a/framework/inc/uielement/menubarmanager.hxx
+++ b/framework/inc/uielement/menubarmanager.hxx
@@ -167,12 +167,12 @@ class MenuBarManager final :
 vcl::KeyCode  
aKeyCode;
 };
 
-void RetrieveShortcuts( std::vector< MenuItemHandler* >& 
aMenuShortCuts );
+void RetrieveShortcuts( std::vector< 
std::unique_ptr >& aMenuShortCuts );
 static void  UpdateSpecialWindowMenu( Menu* pMenu, const 
css::uno::Reference< css::uno::XComponentContext >& xContext );
 static void  FillMenuImages( css::uno::Reference< 
css::frame::XFrame > const & xFrame, Menu* _pMenu, bool bShowMenuImages );
 static void  impl_RetrieveShortcutsFromConfiguration( const 
css::uno::Reference< css::ui::XAcceleratorConfiguration >& rAccelCfg,
   const 
css::uno::Sequence< OUString >& rCommands,
-  std::vector< 
MenuItemHandler* >& aMenuShortCuts );
+  std::vector< 
std::unique_ptr >& aMenuShortCuts );
 static void  MergeAddonMenus( Menu* pMenuBar, const 
MergeMenuInstructionContainer&, const OUString& aModuleIdentifier );
 
 MenuItemHandler* GetMenuItemHandler( sal_uInt16 nItemId );
@@ -195,7 +195,7 @@ class MenuBarManager final :
 VclPtr 
m_pVCLMenu;
 css::uno::Reference< css::frame::XFrame >m_xFrame;
 css::uno::Reference< css::frame::XUIControllerFactory >  
m_xPopupMenuControllerFactory;
-::std::vector< MenuItemHandler* >
m_aMenuItemHandlerVector;
+::std::vector< std::unique_ptr >
m_aMenuItemHandlerVector;
 css::uno::Reference< css::frame::XDispatchProvider > 
m_xDispatchProvider;
 css::uno::Reference< css::ui::XImageManager >
m_xDocImageManager;
 css::uno::Reference< css::ui::XImageManager >
m_xModuleImageManager;
diff --git a/framework/source/uielement/menubarmanager.cxx 
b/framework/source/uielement/menubarmanager.cxx
index a5b77e6e72f3..93c458ec15e3 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -184,13 +184,6 @@ void MenuBarManager::Destroy()
 m_xDeferedItemContainer.clear();
 RemoveListener();
 
-for (auto const& menuItemHandler : m_aMenuItemHandlerVector)
-{
-menuItemHandler->xMenuItemDispatch.clear();
-menuItemHandler->xSubMenuManager.clear();
-menuItemHandler->xPopupMenu.clear();
-delete menuItemHandler;
-}
 m_aMenuItemHandlerVector.clear();
 
 if ( m_bDeleteMenu )
@@ -420,7 +413,7 @@ MenuBarManager::MenuItemHandler* 
MenuBarManager::GetMenuItemHandler( sal_uInt16
 for (auto const& menuItemHandler : m_aMenuItemHandlerVector)
 {
 if ( menuItemHandler->nItemId == nItemId )
-return menuItemHandler;
+return menuItemHandler.get();
 }
 
 return nullptr;
@@ -527,7 +520,7 @@ void SAL_CALL MenuBarManager::disposing( const EventObject& 
Source )
  menuItemHandler->xMenuItemDispatch == Source.Source )
 {
 // disposing called from menu item dispatcher, remove listener
-pMenuItemDisposing = menuItemHandler;
+pMenuItemDisposing = menuItemHandler.get();
 break;
 }
 }
@@ -741,7 +734,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool )
  m_xPopupMenuControllerFactory->hasController( 
menuItemHandler->aMenuItemURL, m_aModuleIdentifier ) )
 {
 if( xMenuItemDispatch.is() || 
menuItemHandler->aMenuItemURL != ".uno:RecentFileList" )
-bPopupMenu = 
CreatePopupMenuController(menuItemHandler);
+bPopupMenu = 
CreatePopupMenuController(menuItemHandler.get());
 }
   

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - Module_ooo.mk postprocess/packcomponents Repository.mk solenv/ant xmlhelp/Ant_LuceneHelpWrapper.mk xmlhelp/inc xmlhelp/java xmlhelp/Library_tvhlp1.

2018-08-15 Thread Libreoffice Gerrit user
 Module_ooo.mk  
|1 
 Repository.mk  
|2 
 postprocess/packcomponents/makefile.mk 
|6 
 solenv/ant/externals.xml   
|   12 +
 xmlhelp/Ant_LuceneHelpWrapper.mk   
|   23 --
 xmlhelp/Library_tvhlp1.mk  
|   61 ++
 xmlhelp/Library_ucpchelp1.mk   
|   81 +
 xmlhelp/Makefile   
|   32 +++
 xmlhelp/Module_xmlhelp.mk  
|   28 +--
 xmlhelp/Package_xml.mk 
|   26 ++
 xmlhelp/Package_xsl.mk 
|   29 +++
 xmlhelp/Zip_helpxsl.mk 
|   32 +++
 xmlhelp/java/LuceneHelpWrapper/build.xml   
|   56 ++
 xmlhelp/java/LuceneHelpWrapper/src/main/java/com/sun/star/help/HelpSearch.java 
|4 
 
xmlhelp/java/LuceneHelpWrapper/src/main/java/com/sun/star/help/LuceneHelpWrapper.component
 |   33 +++
 xmlhelp/java/LuceneHelpWrapper/src/main/java/com/sun/star/help/MANIFEST.MF 
|1 
 xmlhelp/prj/build.lst  
|9 -
 xmlhelp/prj/d.lst  
|   12 -
 xmlhelp/prj/makefile.mk
|   41 ++--
 xmlhelp/source/cxxhelp/provider/makefile.mk
|   89 --
 xmlhelp/source/cxxhelp/provider/services.cxx   
|4 
 xmlhelp/source/treeview/tvfactory.cxx  
|4 
 xmlhelp/util/makefile.mk   
|   87 -
 23 files changed, 410 insertions(+), 263 deletions(-)

New commits:
commit 2fa4d8e29facad1fef72835a81c1acb33592b8a0
Author: Damjan Jovanovic 
AuthorDate: Wed Aug 15 07:01:42 2018 +
Commit: Damjan Jovanovic 
CommitDate: Wed Aug 15 07:01:42 2018 +

Port main/xmlhelp to gbuild.

Patch by: me

diff --git a/Module_ooo.mk b/Module_ooo.mk
index 67cea532ba17..ff41468b3ef3 100644
--- a/Module_ooo.mk
+++ b/Module_ooo.mk
@@ -103,6 +103,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 writerfilter \
 x11_extensions \
 xml2cmp \
+xmlhelp \
 xmloff \
 xmlreader \
 xmlscript \
diff --git a/Repository.mk b/Repository.mk
index 066bd2f1b6ff..51efa03c0438 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -153,6 +153,8 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
 textconversiondlgs \
 ootk \
 tl \
+tvhlp1 \
+ucpchelp1 \
 utl \
 unordf \
 unoxml \
diff --git a/postprocess/packcomponents/makefile.mk 
b/postprocess/packcomponents/makefile.mk
index b8d543148c1a..4c0044c95c58 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -141,6 +141,8 @@ my_components = \
 component/unoxml/source/rdf/unordf \
 component/unoxml/source/service/unoxml \
 component/writerfilter/util/writerfilter \
+component/xmlhelp/source/treeview/tvhlp1 \
+component/xmlhelp/util/ucpchelp1 \
 component/xmloff/source/transform/xof \
 component/xmloff/util/xo \
 component/xmlscript/util/xcr \
@@ -184,8 +186,6 @@ my_components = \
 svgfilter \
 syssh \
 t602filter \
-tvhlp1 \
-ucpchelp1 \
 updatefeed \
 updchk \
 vbaevents \
@@ -275,7 +275,7 @@ my_components += 
component/slideshow/source/engine/OGLTrans/ogltrans
 
 .IF "$(SOLAR_JAVA)" == "TRUE"
 my_components += \
-LuceneHelpWrapper \
+component/xmlhelp/java/LuceneHelpWrapper/LuceneHelpWrapper \
 ScriptFramework \
 ScriptProviderForJava \
 XMergeBridge \
diff --git a/solenv/ant/externals.xml b/solenv/ant/externals.xml
index 8965778e6875..0dafa892159b 100644
--- a/solenv/ant/externals.xml
+++ b/solenv/ant/externals.xml
@@ -73,4 +73,16 @@
 system-path="${COMMONS_LOGGING_JAR}"
 internal-filename="commons-logging-1.1.3.jar"/>
 
+
+
+
+
 
diff --git a/xmlhelp/source/cxxhelp/util/makefile.mk 
b/xmlhelp/Ant_LuceneHelpWrapper.mk
similarity index 72%
rename from xmlhelp/source/cxxhelp/util/makefile.mk
rename to xmlhelp/Ant_LuceneHelpWrapper.mk
index e41bf2b105c8..565d77702552 100644
--- a/xmlhelp/source/cxxhelp/util/makefil

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

2018-08-15 Thread Libreoffice Gerrit user
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit dc5474b2e2f361eec981c6955630dbb020442eae
Author: Michael Stahl 
AuthorDate: Thu Aug 9 11:55:09 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 10:05:10 2018 +0200

xmlsecurity: nsscrypto_initialize: try to avoid profile migration


https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.35_release_notes

NSS 3.35 and later will automatically migrate migrate profiles from the
old "dbm:" BDB format to the new "sql:" SQLite format.

The new format can be read by NSS 3.12 and later, which is old enough that
it can be assumed to be available.

However LibreOffice still shouldn't migrate the profile on its own:
LO typically uses a Mozilla Firefox or Thunderbird profile, and if it is
a system Firefox with system NSS libraries, then it's probably a bad
idea for LO to migrate the profile under Firefox's nose, particularly
considering the "partial migration" scenario if the profile is
password-protected.

Try to avoid this by checking if the profile is the old format and
explicitly using the "dbm:" prefix to prevent the migration.

Change-Id: I06480522f830ce74e2fb7bf79fee84ad80979b82
Reviewed-on: https://gerrit.libreoffice.org/58756
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit 61688aa1abd9db9adbb8dc5d5aacc6269b21fd27)
Reviewed-on: https://gerrit.libreoffice.org/58974

diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx 
b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 14722cb8b474..575be2a2702c 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -253,6 +253,20 @@ bool nsscrypto_initialize( const css::uno::Reference< 
css::uno::XComponentContex
 // there might be no profile
 if ( !sCertDir.isEmpty() )
 {
+if (sCertDir.indexOf(':') == -1) //might be env var with explicit 
prefix
+{
+OUString sCertDirURL;
+osl::FileBase::getFileURLFromSystemPath(
+OStringToOUString(sCertDir, osl_getThreadTextEncoding()),
+sCertDirURL);
+osl::DirectoryItem item;
+if (osl::FileBase::E_NOENT != osl::DirectoryItem::get(sCertDirURL 
+ "/cert8.db", item) &&
+osl::FileBase::E_NOENT == osl::DirectoryItem::get(sCertDirURL 
+ "/cert9.db", item))
+{
+SAL_INFO("xmlsecurity.xmlsec", "nsscrypto_initialize: trying 
to avoid profile migration");
+sCertDir = "dbm:" + sCertDir;
+}
+}
 if( NSS_InitReadWrite( sCertDir.getStr() ) != SECSuccess )
 {
 SAL_INFO("xmlsecurity.xmlsec", "Initializing NSS with profile 
failed.");
___
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' - download.lst external/nss

2018-08-15 Thread Libreoffice Gerrit user
 download.lst  |4 ++--
 external/nss/nss.vs2015.patch |   10 ++
 2 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit e4874f777048535650a2bb1ce875e1a6e3e4b7ef
Author: Michael Stahl 
AuthorDate: Tue Aug 7 18:11:41 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 10:04:47 2018 +0200

nss: upgrade to release 3.38

Fixes CVE-2018-0495 and "the ASN.1 code".

(Remove one hunk of nss-android.patch.1 that should be obsolete with the
current Android toolchain baseline (but that hunk didn't exist in
libreoffice-6-0 or older anyway).)

Change-Id: I5516edec17b72f53acd2749e8840805eead077bc
Reviewed-on: https://gerrit.libreoffice.org/58697
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 3ef76067bfa1f9f60ec3989bd6b40a5760137903)
Reviewed-on: https://gerrit.libreoffice.org/58722
Reviewed-by: Miklos Vajna 

diff --git a/download.lst b/download.lst
index c188edb2b54e..2f2df1c2e01e 100644
--- a/download.lst
+++ b/download.lst
@@ -177,8 +177,8 @@ export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_SHA256SUM := 
db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca
 export NEON_TARBALL := neon-0.30.2.tar.gz
-export NSS_SHA256SUM := 
878d505ec0be577c45990c57eb5d2e5c8696bfa3412bd0fae193b275297bf5c4
-export NSS_TARBALL := nss-3.33-with-nspr-4.17.tar.gz
+export NSS_SHA256SUM := 
f271ec73291fa3e4bd4b59109f8035cc3a192fc33886f40ed4f9ee4b31c746e9
+export NSS_TARBALL := nss-3.38-with-nspr-4.19.tar.gz
 export ODFGEN_SHA256SUM := 
2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/nss.vs2015.patch b/external/nss/nss.vs2015.patch
index de4f8762fd5b..c3e6b5a5acaa 100644
--- a/external/nss/nss.vs2015.patch
+++ b/external/nss/nss.vs2015.patch
@@ -10,3 +10,13 @@ diff -ru nss.org/nss/coreconf/WIN32.mk 
nss/nss/coreconf/WIN32.mk
  ifeq ($(_MSC_VER_GE_12),1)
OS_CFLAGS += -FS
  endif
+--- a/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:42.922939267 +0200
 b/nss/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc2018-08-08 
11:08:47.778929835 +0200
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 linguistic/source/lngsvcmgr.cxx |   51 +++-
 linguistic/source/lngsvcmgr.hxx |   10 +++
 2 files changed, 24 insertions(+), 37 deletions(-)

New commits:
commit 9b9f60dd3adafe2364cb9f8122b430f729f0ad1c
Author: Noel Grandin 
AuthorDate: Sat Aug 11 10:23:31 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 10:03:52 2018 +0200

loplugin:useuniqueptr in LngSvcMgr

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

diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 83668cc06dfa..d106bf586934 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -417,11 +417,6 @@ LngSvcMgr::LngSvcMgr()
 {
 bDisposing = false;
 
-pAvailSpellSvcs = nullptr;
-pAvailGrammarSvcs   = nullptr;
-pAvailHyphSvcs  = nullptr;
-pAvailThesSvcs  = nullptr;
-
 // request notify events when properties (i.e. something in the subtree) 
changes
 uno::Sequence< OUString > aNames(4);
 OUString *pNames = aNames.getArray();
@@ -464,10 +459,10 @@ void LngSvcMgr::modified(const lang::EventObject&)
 //assume that if an extension has been added/removed that
 //it might be a dictionary extension, so drop our cache
 
-clearSvcInfoArray(pAvailSpellSvcs);
-clearSvcInfoArray(pAvailGrammarSvcs);
-clearSvcInfoArray(pAvailHyphSvcs);
-clearSvcInfoArray(pAvailThesSvcs);
+pAvailSpellSvcs.reset();
+pAvailGrammarSvcs.reset();
+pAvailHyphSvcs.reset();
+pAvailThesSvcs.reset();
 }
 
 {
@@ -521,12 +516,6 @@ void LngSvcMgr::disposing(const lang::EventObject&)
 stopListening();
 }
 
-void LngSvcMgr::clearSvcInfoArray(SvcInfoArray* &rpInfo)
-{
-delete rpInfo;
-rpInfo = nullptr;
-}
-
 LngSvcMgr::~LngSvcMgr()
 {
 stopListening();
@@ -535,10 +524,10 @@ LngSvcMgr::~LngSvcMgr()
 // will be freed in the destructor of the respective Reference's
 // xSpellDsp, xGrammarDsp, xHyphDsp, xThesDsp
 
-clearSvcInfoArray(pAvailSpellSvcs);
-clearSvcInfoArray(pAvailGrammarSvcs);
-clearSvcInfoArray(pAvailHyphSvcs);
-clearSvcInfoArray(pAvailThesSvcs);
+pAvailSpellSvcs.reset();
+pAvailGrammarSvcs.reset();
+pAvailHyphSvcs.reset();
+pAvailThesSvcs.reset();
 }
 
 namespace
@@ -801,7 +790,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > 
&rPropertyNames )
 osl::MutexGuard aGuard(GetLinguMutex());
 
 // delete old cached data, needs to be acquired new on demand
-clearSvcInfoArray(pAvailSpellSvcs);
+pAvailSpellSvcs.reset();
 
 if (lcl_SeqHasString( aSpellCheckerListEntries, aKeyText ))
 {
@@ -824,7 +813,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > 
&rPropertyNames )
 osl::MutexGuard aGuard(GetLinguMutex());
 
 // delete old cached data, needs to be acquired new on demand
-clearSvcInfoArray(pAvailGrammarSvcs);
+pAvailGrammarSvcs.reset();
 
 if (lcl_SeqHasString( aGrammarCheckerListEntries, aKeyText ))
 {
@@ -850,7 +839,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > 
&rPropertyNames )
 osl::MutexGuard aGuard(GetLinguMutex());
 
 // delete old cached data, needs to be acquired new on demand
-clearSvcInfoArray(pAvailHyphSvcs);
+pAvailHyphSvcs.reset();
 
 if (lcl_SeqHasString( aHyphenatorListEntries, aKeyText ))
 {
@@ -873,7 +862,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > 
&rPropertyNames )
 osl::MutexGuard aGuard(GetLinguMutex());
 
 // delete old cached data, needs to be acquired new on demand
-clearSvcInfoArray(pAvailThesSvcs);
+pAvailThesSvcs.reset();
 
 if (lcl_SeqHasString( aThesaurusListEntries, aKeyText ))
 {
@@ -980,7 +969,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
 {
 if (!pAvailSpellSvcs)
 {
-pAvailSpellSvcs = new SvcInfoArray;
+pAvailSpellSvcs.reset(new SvcInfoArray);
 
 uno::Reference< uno::XComponentContext > xContext( 
comphelper::getProcessComponentContext() );
 
@@ -1042,7 +1031,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
 {
 if (!pAvailGrammarSvcs)
 {
-pAvailGrammarSvcs = new SvcInfoArray;
+pAvailGrammarSvcs.reset(new SvcInfoArray);
 
 uno::Reference< uno::XComponentContext > xContext( 
comphelper::getProcessComponentContext() );
 
@@ -1105,7 +1094,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
 {
 if (!pAvailHyphSvcs)
 {
-pAvailHyphSvcs = new SvcInfoArray;
+pAvailHyphSvcs.reset(new SvcInfoArray);
 uno::Reference< uno::XComponentContext > xContext( 
comphelper::getProcessComponentContext() );
 
 uno::Refere

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - oox/source

2018-08-15 Thread Libreoffice Gerrit user
 oox/source/vml/vmlshape.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85c0eedf04a0b31b0896842bbdb240abb3389076
Author: Noel Grandin 
AuthorDate: Tue Aug 14 15:08:57 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 10:00:17 2018 +0200

tdf#119234 OOXML Shapes from Word fail to render

regression from
commit 65e4a776e8315fd61fd67ad00d28985b11f0b79e
simplify some OUString::copy calls
I got the params switched around

Change-Id: I68da0ae681f2b886e35f74bd72de0c482c843ae9
Reviewed-on: https://gerrit.libreoffice.org/58986
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit df71ea1b01c3fd35d959053c84f615f661b69f8a)
Reviewed-on: https://gerrit.libreoffice.org/58999

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 6b496b50e3a0..40a547a2efe2 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -1015,7 +1015,7 @@ Reference< XShape > BezierShape::implConvertAndInsert( 
const Reference< XShapes
 {
 // If we have an 'x' in the last part of the path it means it is closed...
 sal_Int32 nPos = maShapeModel.maVmlPath.lastIndexOf(',');
-if ( nPos != -1 && maShapeModel.maVmlPath.indexOf(nPos, 'x') != -1 )
+if ( nPos != -1 && maShapeModel.maVmlPath.indexOf('x', nPos) != -1 )
 {
 const_cast( this )->setService( 
"com.sun.star.drawing.ClosedBezierShape" );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 svx/source/unodraw/unoshape.cxx |   22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 17838c9c4279ab3e7932d4f383a8b1696491e622
Author: Caolán McNamara 
AuthorDate: Tue Aug 14 21:05:16 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 09:37:19 2018 +0200

Resolves: tdf#114427 crash when basic used to dispose shape

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

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 6ee4b2e9d97b..aea443acb6fa 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1357,39 +1357,43 @@ void SAL_CALL SvxShape::dispose()
 mpImpl->maDisposeListeners.disposeAndClear(aEvt);
 mpImpl->maPropertyNotifier.disposing();
 
+bool bFreeSdrObject = false;
 if ( HasSdrObject() )
 {
-EndListening( GetSdrObject()->getSdrModelFromSdrObject() );
-bool bFreeSdrObject = false;
-
-if ( GetSdrObject()->IsInserted() && 
GetSdrObject()->getSdrPageFromSdrObject() )
+SdrObject* pObject = GetSdrObject();
+EndListening( pObject->getSdrModelFromSdrObject() );
+if ( pObject->IsInserted() && pObject->getSdrPageFromSdrObject() )
 {
 OSL_ENSURE( HasSdrObjectOwnership(), "SvxShape::dispose: is the 
below code correct?" );
 // normally, we are allowed to free the SdrObject only if we 
have its ownership.
 // Why isn't this checked here?
 
-SdrPage* pPage = GetSdrObject()->getSdrPageFromSdrObject();
+SdrPage* pPage = pObject->getSdrPageFromSdrObject();
 // delete the SdrObject from the page
 const size_t nCount = pPage->GetObjCount();
 for ( size_t nNum = 0; nNum < nCount; ++nNum )
 {
-if ( pPage->GetObj( nNum ) == GetSdrObject() )
+if ( pPage->GetObj( nNum ) == pObject )
 {
-OSL_VERIFY( pPage->RemoveObject( nNum ) == GetSdrObject() 
);
+OSL_VERIFY( pPage->RemoveObject( nNum ) == pObject );
 bFreeSdrObject = true;
 break;
 }
 }
 }
+}
 
-GetSdrObject()->setUnoShape(nullptr);
+if ( HasSdrObject() ) //tdf#114427 refetch SdrObject in light of 
RemoveObject
+{
+SdrObject* pObject = GetSdrObject();
+
+pObject->setUnoShape(nullptr);
 
 if ( bFreeSdrObject )
 {
 // in case we have the ownership of the SdrObject, a Free
 // would do nothing. So ensure the ownership is reset.
 mpImpl->mbHasSdrObjectOwnership = false;
-SdrObject* pObject = GetSdrObject();
 SdrObject::Free( pObject );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sc/source/ui/view/viewfunc.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit d064ced9e9db3f924dd954b86c40f21addab1c68
Author: Julien Nabet 
AuthorDate: Tue Aug 14 22:01:42 2018 +0200
Commit: Julien Nabet 
CommitDate: Wed Aug 15 09:21:05 2018 +0200

Related tdf#118547: Lock mark on protected sheet tab

Fix opposite case, see 
https://bugs.documentfoundation.org/show_bug.cgi?id=118547#c10

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

diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 441364a8f971..3ac263c0165e 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2549,7 +2549,11 @@ bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& 
rPassword )
 bool bUndo (rDoc.IsUndoEnabled());
 
 if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
+{
 bChanged = rFunc.Unprotect( nTab, rPassword, false );
+if (bChanged)
+SetTabProtectionSymbol(nTab, false);
+}
 else
 {
 //  modifying several tabs is handled here
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 external/pdfium/0001-Add-FPDFFormObj_GetObject-API.patch.1 |  
108 ++
 external/pdfium/0002-svx-more-accurate-PDF-text-importing.patch.2  |   
 6 
 external/pdfium/0010-svx-support-importing-forms-from-PDFs.patch.2 |   
72 --
 external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.2 |   
28 ++
 external/pdfium/0012-svx-import-processed-PDF-text.patch.2 |   
14 -
 external/pdfium/0014-svx-update-PDFium-patch-and-code.patch.2  |   
 9 
 external/pdfium/0015-svx-set-the-font-name-of-imported-PDF-text.patch.2|   
 6 
 external/pdfium/UnpackedTarball_pdfium.mk  |   
 3 
 svx/source/svdraw/svdpdf.cxx   |   
 2 
 9 files changed, 146 insertions(+), 102 deletions(-)

New commits:
commit e264e31cd904d373f43240bb626b3a0d66f95d26
Author: Miklos Vajna 
AuthorDate: Tue Aug 14 21:01:28 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 15 09:06:22 2018 +0200

pdfium: replace FPDFFormObj_GetSubObject() with backport

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

diff --git a/external/pdfium/0001-Add-FPDFFormObj_GetObject-API.patch.1 
b/external/pdfium/0001-Add-FPDFFormObj_GetObject-API.patch.1
new file mode 100644
index ..8aec3cd21fa6
--- /dev/null
+++ b/external/pdfium/0001-Add-FPDFFormObj_GetObject-API.patch.1
@@ -0,0 +1,108 @@
+From 1d273f1cf00676725da6f0cd17e107f114030e87 Mon Sep 17 00:00:00 2001
+Date: Mon, 16 Jul 2018 19:20:36 +
+Subject: [PATCH] Add FPDFFormObj_GetObject() API
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+To be used together with the existing FPDFFormObj_CountObjects()
+function.
+
+Change-Id: I8ed69624e967708c8db7e8f135e28fbe6a52752f
+Reviewed-on: https://pdfium-review.googlesource.com/37890
+Reviewed-by: Nicolás Peña Moreno 
+Reviewed-by: Henrique Nakashima 
+Commit-Queue: Nicolás Peña Moreno 
+---
+ fpdfsdk/fpdf_edit_embeddertest.cpp | 20 +++
+ fpdfsdk/fpdf_editpage.cpp  | 41 +++---
+ fpdfsdk/fpdf_view_c_api_test.c |  1 +
+ public/fpdf_edit.h | 10 ++
+ 4 files changed, 60 insertions(+), 12 deletions(-)
+
+diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
+index ded55b9be..f1dbf7019 100644
+--- a/fpdfsdk/fpdf_editpage.cpp
 b/fpdfsdk/fpdf_editpage.cpp
+@@ -140,6 +140,23 @@ unsigned int GetUnsignedAlpha(float alpha) {
+   return static_cast(alpha * 255.f + 0.5f);
+ }
+ 
++const CPDF_PageObjectList* CPDFPageObjListFromFPDFFormObject(
++FPDF_PAGEOBJECT page_object) {
++  auto* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
++  if (!pPageObj)
++return nullptr;
++
++  CPDF_FormObject* pFormObject = pPageObj->AsForm();
++  if (!pFormObject)
++return nullptr;
++
++  const CPDF_Form* pForm = pFormObject->form();
++  if (!pForm)
++return nullptr;
++
++  return pForm->GetPageObjectList();
++}
++
+ }  // namespace
+ 
+ FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() {
+@@ -812,21 +829,21 @@ FPDFPageObj_SetLineCap(FPDF_PAGEOBJECT page_object, int 
line_cap) {
+ 
+ FPDF_EXPORT int FPDF_CALLCONV
+ FPDFFormObj_CountObjects(FPDF_PAGEOBJECT page_object) {
+-  auto* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
+-  if (!pPageObj)
+-return -1;
+-
+-  CPDF_FormObject* pFormObject = pPageObj->AsForm();
+-  if (!pFormObject)
++  const CPDF_PageObjectList* pObjectList =
++  CPDFPageObjListFromFPDFFormObject(page_object);
++  if (!pObjectList)
+ return -1;
+ 
+-  const CPDF_Form* pForm = pFormObject->form();
+-  if (!pForm)
+-return -1;
++  return pObjectList->size();
++}
+ 
+-  const CPDF_PageObjectList* pObjectList = pForm->GetPageObjectList();
++FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
++FPDFFormObj_GetObject(FPDF_PAGEOBJECT form_object, unsigned long index) {
++  const CPDF_PageObjectList* pObjectList =
++  CPDFPageObjListFromFPDFFormObject(form_object);
+   if (!pObjectList)
+-return -1;
++return nullptr;
+ 
+-  return pObjectList->size();
++  return FPDFPageObjectFromCPDFPageObject(
++  pObjectList->GetPageObjectByIndex(index));
+ }
+diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
+index fdd8c97d0..b97a7adbd 100644
+--- a/public/fpdf_edit.h
 b/public/fpdf_edit.h
+@@ -1265,6 +1265,16 @@ FPDF_EXPORT int FPDF_CALLCONV 
FPDFText_GetTextRenderMode(FPDF_PAGEOBJECT text);
+ FPDF_EXPORT int FPDF_CALLCONV
+ FPDFFormObj_CountObjects(FPDF_PAGEOBJECT form_object);
+ 
++// Experimental API.
++// Get page object in |form_object| at |index|.
++//
++//   form_object - handle to a form object.
++//   index   - the 0-based index of a page object.
++//
++// Returns the handle to the page object, or NULL on error.
++FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
++FPD

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

2018-08-15 Thread Libreoffice Gerrit user
 desktop/source/app/updater.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eb730584ee02f67c505fca5f7ee3f9e7e7dc6b41
Author: Stephan Bergmann 
AuthorDate: Wed Aug 15 09:03:55 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 15 09:03:55 2018 +0200

Revert broken part of cd66852f6dd08631a25d15a1527a647e69ab8ce3

"create appendCopy method in OUStringBuffer"; response_body is a std::string

Change-Id: I58ab982c87fa568fdac8e3c72fbcb0e071d73228

diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index ca62f4a8ae39..adcc130751e7 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -571,7 +571,7 @@ std::string download_content(const OString& rURL, bool 
bFile, OUString& rHash)
 {
 OUString aTempFileURL = aTempFile.GetURL();
 OString aTempFileURLOString = OUStringToOString(aTempFileURL, 
RTL_TEXTENCODING_UTF8);
-response_body.append(aTempFileURLOString);
+response_body.append(aTempFileURLOString.getStr(), 
aTempFileURLOString.getLength());
 
 aTempFile.EnableKillingFile(false);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits