[Libreoffice-commits] core.git: vcl/inc vcl/qt5

2018-06-09 Thread Kacper Kasper
 vcl/inc/qt5/Qt5FontFace.hxx  |3 ++-
 vcl/inc/qt5/Qt5Graphics.hxx  |2 +-
 vcl/qt5/Qt5Font.hxx  |3 ++-
 vcl/qt5/Qt5FontFace.cxx  |3 ++-
 vcl/qt5/Qt5Graphics.cxx  |2 +-
 vcl/qt5/Qt5Graphics_Text.cxx |8 +++-
 6 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 812cae2f0b96c3d95d267b83727dd5a2114e611a
Author: Kacper Kasper 
Date:   Sun Jun 10 05:59:31 2018 +0200

qt5: hold LogicalFontInstance with rtl::Reference

Build fix after c4c56de1b0e62ec866b519b2b24c5e805f0a86d3.

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

diff --git a/vcl/inc/qt5/Qt5FontFace.hxx b/vcl/inc/qt5/Qt5FontFace.hxx
index 4cc21010a8b7..0e1a359acbb5 100644
--- a/vcl/inc/qt5/Qt5FontFace.hxx
+++ b/vcl/inc/qt5/Qt5FontFace.hxx
@@ -47,7 +47,8 @@ public:
 bool GetFontCapabilities(vcl::FontCapabilities& rFontCapabilities) const;
 bool HasChar(sal_uInt32 cChar) const;
 
-LogicalFontInstance* CreateFontInstance(const FontSelectPattern& rFSD) 
const override;
+rtl::Reference
+CreateFontInstance(const FontSelectPattern& rFSD) const override;
 
 protected:
 Qt5FontFace(const Qt5FontFace&);
diff --git a/vcl/inc/qt5/Qt5Graphics.hxx b/vcl/inc/qt5/Qt5Graphics.hxx
index af21ee462b18..40284db9f33a 100644
--- a/vcl/inc/qt5/Qt5Graphics.hxx
+++ b/vcl/inc/qt5/Qt5Graphics.hxx
@@ -48,7 +48,7 @@ class Qt5Graphics : public SalGraphics
 QPainter::CompositionMode m_eCompositionMode;
 
 PhysicalFontCollection* m_pFontCollection;
-Qt5Font* m_pTextStyle[MAX_FALLBACK];
+rtl::Reference m_pTextStyle[MAX_FALLBACK];
 Color m_aTextColor;
 
 Qt5Graphics(Qt5Frame* pFrame, QImage* pQImage);
diff --git a/vcl/qt5/Qt5Font.hxx b/vcl/qt5/Qt5Font.hxx
index 4e37f7d28bdd..81bd723c1ab6 100644
--- a/vcl/qt5/Qt5Font.hxx
+++ b/vcl/qt5/Qt5Font.hxx
@@ -27,7 +27,8 @@
 
 class Qt5Font final : public QFont, public LogicalFontInstance
 {
-friend LogicalFontInstance* Qt5FontFace::CreateFontInstance(const 
FontSelectPattern&) const;
+friend rtl::Reference
+Qt5FontFace::CreateFontInstance(const FontSelectPattern&) const;
 
 virtual hb_font_t* ImplInitHbFont() override;
 
diff --git a/vcl/qt5/Qt5FontFace.cxx b/vcl/qt5/Qt5FontFace.cxx
index bd3994a721ee..d0efb488d57c 100644
--- a/vcl/qt5/Qt5FontFace.cxx
+++ b/vcl/qt5/Qt5FontFace.cxx
@@ -62,7 +62,8 @@ Qt5FontFace::~Qt5FontFace() {}
 
 sal_IntPtr Qt5FontFace::GetFontId() const { return 
reinterpret_cast(&m_aFontId); }
 
-LogicalFontInstance* Qt5FontFace::CreateFontInstance(const FontSelectPattern& 
rFSD) const
+rtl::Reference
+Qt5FontFace::CreateFontInstance(const FontSelectPattern& rFSD) const
 {
 return new Qt5Font(*this, rFSD);
 }
diff --git a/vcl/qt5/Qt5Graphics.cxx b/vcl/qt5/Qt5Graphics.cxx
index c7ca69a8a606..7257b8059926 100644
--- a/vcl/qt5/Qt5Graphics.cxx
+++ b/vcl/qt5/Qt5Graphics.cxx
@@ -47,7 +47,7 @@ Qt5Graphics::~Qt5Graphics()
 {
 if (!m_pTextStyle[i])
 break;
-m_pTextStyle[i]->Release();
+m_pTextStyle[i].clear();
 }
 }
 
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index cf244d3f4d78..cb7bef853ba8 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -41,8 +41,7 @@ void Qt5Graphics::SetFont(const FontSelectPattern* pReqFont, 
int nFallbackLevel)
 {
 if (!m_pTextStyle[i])
 break;
-m_pTextStyle[i]->Release();
-m_pTextStyle[i] = nullptr;
+m_pTextStyle[i].clear();
 }
 
 if (!pReqFont)
@@ -51,8 +50,7 @@ void Qt5Graphics::SetFont(const FontSelectPattern* pReqFont, 
int nFallbackLevel)
 if (!pReqFont->mpFontInstance)
 return;
 
-m_pTextStyle[nFallbackLevel] = 
static_cast(pReqFont->mpFontInstance);
-m_pTextStyle[nFallbackLevel]->Acquire();
+m_pTextStyle[nFallbackLevel] = 
static_cast(pReqFont->mpFontInstance.get());
 }
 
 void Qt5Graphics::GetFontMetric(ImplFontMetricDataRef& rFMD, int 
nFallbackLevel)
@@ -137,7 +135,7 @@ bool Qt5Graphics::GetGlyphBoundRect(const GlyphItem& 
rGlyph, tools::Rectangle& r
 if (nLevel >= MAX_FALLBACK)
 return false;
 
-Qt5Font* pFont = m_pTextStyle[nLevel];
+Qt5Font* pFont = m_pTextStyle[nLevel].get();
 if (!pFont)
 return false;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


CppCheck Report Update

2018-06-09 Thread cppcheck.libreoff...@gmail.com

A new cppcheck report is available at : 
http://dev-builds.libreoffice.org/cppcheck_reports/master/


Note:
The script generating this report was run at :
2018-10-06 03:07:09 with user buildslave at host vm140 as 
/home/buildslave/source/dev-tools/cppcheck/cppcheck-report.sh -s 
/home/buildslave/source/libo-core -c /home/buildslave/source/cppcheck -w 
/home/buildslave/tmp/www

It can be found and improved here:

https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=cppcheck/cppcheck-report.sh


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


[Libreoffice-commits] online.git: Branch 'feature/latency' - 3 commits - common/Rectangle.hpp loleaflet/src wsd/ClientSession.cpp wsd/ClientSession.hpp

2018-06-09 Thread Tamás Zolnai
 common/Rectangle.hpp  |5 +++
 loleaflet/src/layer/tile/GridLayer.js |   13 ++
 loleaflet/src/layer/tile/TileLayer.js |   28 +++--
 wsd/ClientSession.cpp |   44 ++
 wsd/ClientSession.hpp |5 +++
 5 files changed, 76 insertions(+), 19 deletions(-)

New commits:
commit 415d35a71c8133b489042ce1a14f35987c5747fd
Author: Tamás Zolnai 
Date:   Sat Jun 9 21:33:44 2018 +0200

Send the right visible area to the server

Change-Id: I036dfaa566fa7d4e370386d839bd2397cbf929f8

diff --git a/loleaflet/src/layer/tile/GridLayer.js 
b/loleaflet/src/layer/tile/GridLayer.js
index 8a37a04dd..c61c6bb05 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -572,6 +572,7 @@ L.GridLayer = L.Layer.extend({
this._addTiles(queue, fragment);
this._level.el.appendChild(fragment);
}
+   this._invalidateClientVisibleArea();
},
 
_updateOnChangePart: function () {
@@ -719,6 +720,18 @@ L.GridLayer = L.Layer.extend({
}
},
 
+
+   _invalidateClientVisibleArea: function() {
+   if (this._debug) {
+   this._debugInfo.clearLayers();
+   for (var key in this._tiles) {
+   this._tiles[key]._debugPopup = null;
+   this._tiles[key]._debugTile = null;
+   }
+   }
+   this._clientVisibleArea = true;
+   },
+
_isValidTile: function (coords) {
if (coords.x < 0 || coords.y < 0) {
return false;
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 0ad81644c..6aec6514b 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1479,10 +1479,11 @@ L.TileLayer = L.GridLayer.extend({
 
if (this._clientVisibleArea) {
// Visible area is dirty, update it on the server.
-   var visibleArea = 
this._map._container.getBoundingClientRect();
-   var pos = this._pixelsToTwips(new 
L.Point(visibleArea.left, visibleArea.top));
-   var size = this._pixelsToTwips(new 
L.Point(visibleArea.width, visibleArea.height));
-   var payload = 'clientvisiblearea x=' + 
Math.round(pos.x) + ' y=' + Math.round(pos.y) +
+   var visibleTopLeft = 
this._latLngToTwips(this._map.getBounds().getNorthWest());
+   var visibleBottomRight = 
this._latLngToTwips(this._map.getBounds().getSouthEast());
+   var visibleArea = new L.Bounds(visibleTopLeft, 
visibleBottomRight);
+   var size = new L.Point(visibleArea.getSize().x, 
visibleArea.getSize().y);
+   var payload = 'clientvisiblearea x=' + 
Math.round(visibleTopLeft.x) + ' y=' + Math.round(visibleTopLeft.y) +
' width=' + Math.round(size.x) + ' height=' + 
Math.round(size.y);
this._map._socket.sendMessage(payload);
this._clientVisibleArea = false;
@@ -1520,10 +1521,11 @@ L.TileLayer = L.GridLayer.extend({
}
if (this._clientVisibleArea) {
// Visible area is dirty, update it on the server.
-   var visibleArea = 
this._map._container.getBoundingClientRect();
-   var pos = this._pixelsToTwips(new 
L.Point(visibleArea.left, visibleArea.top));
-   var size = this._pixelsToTwips(new 
L.Point(visibleArea.width, visibleArea.height));
-   var payload = 'clientvisiblearea x=' + 
Math.round(pos.x) + ' y=' + Math.round(pos.y) +
+   var visibleTopLeft = 
this._latLngToTwips(this._map.getBounds().getNorthWest());
+   var visibleBottomRight = 
this._latLngToTwips(this._map.getBounds().getSouthEast());
+   var visibleArea = new L.Bounds(visibleTopLeft, 
visibleBottomRight);
+   var size = new L.Point(visibleArea.getSize().x, 
visibleArea.getSize().y);
+   var payload = 'clientvisiblearea x=' + 
Math.round(visibleTopLeft.x) + ' y=' + Math.round(visibleTopLeft.y) +
' width=' + Math.round(size.x) + ' height=' + 
Math.round(size.y);
this._map._socket.sendMessage(payload);
this._clientVisibleArea = false;
@@ -2281,16 +2283,6 @@ L.TileLayer = L.GridLayer.extend({
'tiletwipheight=' + this._tileHeightTwips;
},
 
-   _invalidateClientVisibleArea: function() {
-   if (this._debug) {
-   this._debugInfo.clearLayers();
-   

[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/osx vcl/qt5 vcl/source vcl/unx vcl/win

2018-06-09 Thread Noel Grandin
 vcl/headless/svpprn.cxx |1 -
 vcl/inc/salprn.hxx  |2 +-
 vcl/osx/salinst.cxx |1 -
 vcl/qt5/Qt5Instance_Print.cxx   |1 -
 vcl/source/gdi/print.cxx|1 -
 vcl/unx/generic/print/genprnpsp.cxx |1 -
 vcl/win/gdi/salprn.cxx  |   12 
 7 files changed, 5 insertions(+), 14 deletions(-)

New commits:
commit 7e45b80b7a0c83b7d6e8dab39dfbfe05012e145d
Author: Noel Grandin 
Date:   Fri Jun 8 13:40:33 2018 +0200

rename SalPrinterQueueInfo::mpSysData to mpPortName

and simplify, most places can just leave it alone

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

diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index 7b661c1d58e0..fd325227e1f7 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -218,7 +218,6 @@ void SvpSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* 
pList )
 pInfo->maDriver = rInfo.m_aDriverName;
 pInfo->maLocation   = rInfo.m_aLocation;
 pInfo->maComment= rInfo.m_aComment;
-pInfo->mpSysData= nullptr;
 
 sal_Int32 nIndex = 0;
 while( nIndex != -1 )
diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx
index 780217d33ae1..014f61179b47 100644
--- a/vcl/inc/salprn.hxx
+++ b/vcl/inc/salprn.hxx
@@ -41,7 +41,7 @@ struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo
 OUString   maComment;
 PrintQueueFlagsmnStatus;
 sal_uLong  mnJobs;
-OUString*  mpSysData;
+std::unique_ptr mpPortName; // only used by Windows backend
 
 SalPrinterQueueInfo();
 ~SalPrinterQueueInfo();
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 08302f8150ed..03d3f7a2663f 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -819,7 +819,6 @@ void AquaSalInstance::GetPrinterQueueInfo( 
ImplPrnQueueList* pList )
 pInfo->maDriver = GetOUString( pType );
 pInfo->mnStatus = PrintQueueFlags::NONE;
 pInfo->mnJobs   = 0;
-pInfo->mpSysData= nullptr;
 
 pList->Add( pInfo );
 }
diff --git a/vcl/qt5/Qt5Instance_Print.cxx b/vcl/qt5/Qt5Instance_Print.cxx
index e1b6bdc158c3..bc236fc746af 100644
--- a/vcl/qt5/Qt5Instance_Print.cxx
+++ b/vcl/qt5/Qt5Instance_Print.cxx
@@ -216,7 +216,6 @@ void Qt5Instance::GetPrinterQueueInfo(ImplPrnQueueList* 
pList)
 pInfo->maDriver = rInfo.m_aDriverName;
 pInfo->maLocation = rInfo.m_aLocation;
 pInfo->maComment = rInfo.m_aComment;
-pInfo->mpSysData = nullptr;
 
 sal_Int32 nIndex = 0;
 while (nIndex != -1)
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index aeed0625d7fa..a98d26589c8b 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -344,7 +344,6 @@ SalPrinterQueueInfo::SalPrinterQueueInfo()
 {
 mnStatus= PrintQueueFlags::NONE;
 mnJobs  = QUEUE_JOBS_DONTKNOW;
-mpSysData   = nullptr;
 }
 
 SalPrinterQueueInfo::~SalPrinterQueueInfo()
diff --git a/vcl/unx/generic/print/genprnpsp.cxx 
b/vcl/unx/generic/print/genprnpsp.cxx
index 7a36e3196b9a..d30a518457b5 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -424,7 +424,6 @@ void SalGenericInstance::GetPrinterQueueInfo( 
ImplPrnQueueList* pList )
 pInfo->maDriver = rInfo.m_aDriverName;
 pInfo->maLocation   = rInfo.m_aLocation;
 pInfo->maComment= rInfo.m_aComment;
-pInfo->mpSysData= nullptr;
 
 sal_Int32 nIndex = 0;
 while( nIndex != -1 )
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 0027263b5af9..0f16b32ab530 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -166,7 +166,6 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* 
pList )
 pInfo->maPrinterName = o3tl::toU(pWinInfo4[i].pPrinterName);
 pInfo->mnStatus  = PrintQueueFlags::NONE;
 pInfo->mnJobs= 0;
-pInfo->mpSysData = nullptr;
 pList->Add( pInfo );
 }
 }
@@ -202,8 +201,8 @@ void WinSalInstance::GetPrinterQueueState( 
SalPrinterQueueInfo* pInfo )
 pInfo->maComment = o3tl::toU(pWinInfo2->pComment);
 pInfo->mnStatus  = ImplWinQueueStatusToSal( 
pWinInfo2->Status );
 pInfo->mnJobs= pWinInfo2->cJobs;
-if( ! pInfo->mpSysData )
-pInfo->mpSysData = new OUString(aPortName);
+if( ! pInfo->mpPortName )
+pInfo->mpPortName.reset(new OUString(aPortName));
 }
 rtl_freeMemory(pWinInfo2);
 }
@@ -213,7 +212,6 @@ void WinSa

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

2018-06-09 Thread Michael Stahl
 sw/source/core/text/txtfrm.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 751308c234f78cc3ff3a282cef4be9747def59ec
Author: Michael Stahl 
Date:   Sat Jun 9 19:14:56 2018 +0200

coverity#1436017 DEADCODE

Ass-umption is that nLen == 0 requires no changes here.

Change-Id: I9af1110aed7998fdf0247c1fa8473f0180e8774e

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 52f5139cebb5..9ea7968f402a 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1630,10 +1630,7 @@ void SwTextFrame::SwClientNotify(SwModify const& 
rModify, SfxHint const& rHint)
 const sal_Int32 m = -nNLen;
 if (nLen && IsIdxInside(nPos, nLen))
 {
-if (!nLen)
-InvalidateSize();
-else
-InvalidateRange( SwCharRange(nPos, TextFrameIndex(1)), m );
+InvalidateRange( SwCharRange(nPos, TextFrameIndex(1)), m );
 }
 lcl_SetWrong( *this, rNode, nNPos, m, true );
 if (nLen)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Tinderbox #71 failing on ScFiltersTest::testTdf62268

2018-06-09 Thread thb
Luke Benes wrote:
> Both the x86 and x86_64 tinderboxes are failing with this error message:
> 
Yep, noticed as well; hopefully fixed with
47cd12eba409ba08c041b5405a3f606102848365

Cheers,

-- Thorsten


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


New Defects reported by Coverity Scan for LibreOffice

2018-06-09 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

7 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 7 of 7 defect(s)


** CID 1436018:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1436018:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/text/txtfrm.cxx: 1991 in SwTextFrame::SwClientNotify(const 
SwModify &, const SfxHint &)()
1985 }
1986 
1987 if (nClear || (m_pMergedPara &&
1988 (m_pMergedPara->pParaPropsNode != &rModify ||
1989  m_pMergedPara->pFirstNode != &rModify)))
1990 {
>>> CID 1436018:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pOld" to "SwAttrSetChg", which dereferences it.
1991 SwAttrSetChg aOldSet( *static_cast(pOld) );
1992 SwAttrSetChg aNewSet( *static_cast(pNew) );
1993 
1994 if (m_pMergedPara && m_pMergedPara->pParaPropsNode 
!= &rModify)
1995 {
1996 for (sal_uInt16 i = RES_PARATR_BEGIN; i != 
RES_FRMATR_END; ++i)

** CID 1436017:  Control flow issues  (DEADCODE)
/sw/source/core/text/txtfrm.cxx: 1634 in SwTextFrame::SwClientNotify(const 
SwModify &, const SfxHint &)()



*** CID 1436017:  Control flow issues  (DEADCODE)
/sw/source/core/text/txtfrm.cxx: 1634 in SwTextFrame::SwClientNotify(const 
SwModify &, const SfxHint &)()
1628 // update merged before doing anything else
1629 nLen = UpdateMergedParaForDelete(*m_pMergedPara, false, 
rNode, nNPos, nNLen);
1630 const sal_Int32 m = -nNLen;
1631 if (nLen && IsIdxInside(nPos, nLen))
1632 {
1633 if (!nLen)
>>> CID 1436017:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "this->InvalidateSize();".
1634 InvalidateSize();
1635 else
1636 InvalidateRange( SwCharRange(nPos, 
TextFrameIndex(1)), m );
1637 }
1638 lcl_SetWrong( *this, rNode, nNPos, m, true );
1639 if (nLen)

** CID 1436016:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1436016:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/crsr/crsrsh.cxx: 967 in SwCursorShell::TestCurrPam(const Point 
&, bool)()
961 do {
962 if( pCmp && pCmp->HasMark() &&
963 *pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos )
964 {
965 return true;   // return without update
966 }
>>> CID 1436016:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pCmp" to "GetNext", which dereferences it.
967 } while( m_pCurrentCursor != ( pCmp = pCmp->GetNext() ) );
968 return false;
969 }
970 
971 void SwCursorShell::KillPams()
972 {

** CID 1436015:  Code maintainability issues  (UNUSED_VALUE)
/oox/source/drawingml/diagram/diagramlayoutatoms.cxx: 373 in 
oox::drawingml::AlgAtom::layoutShape(const 
std::shared_ptr &, const 
std::vector> &) const()



*** CID 1436015:  Code maintainability issues  (UNUSED_VALUE)
/oox/source/drawingml/diagram/diagramlayoutatoms.cxx: 373 in 
oox::drawingml::AlgAtom::layoutShape(const 
std::shared_ptr &, const 
std::vector> &) const()
367 aChildSize.Height /= (nCount+1);
368 
369 awt::Point aCurrPos(0, 0);
370 if (nIncX == -1)
371 aCurrPos.X = rShape->getSize().Width - aChildSize.Width;
372 if (nIncY == -1)
>>> CID 1436015:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value from "rShape->getSize().Height - aChildSize.Height" to 
>>> "aCurrPos.Y" here, but that stored value is overwritten before it can be 
>>> used.
373 aCurrPos.Y = rShape->getSize().Height - 
aChildSize.Height;
374 
375 if(nCount <= 2 && nIncY == -1)
376 aCurrPos.Y = rShape->getSize().Height - 
aChildSize.Height*2;
377 else
378 aCurrPos.Y = rShape->getSize().Height - 
aChildSize.Height*(nCount+1);

** CID 1436014:  Null pointer dereferences  (NULL_RETURNS)



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

2018-06-09 Thread Thorsten Behrens
 sc/qa/unit/subsequent_filters-test.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 47cd12eba409ba08c041b5405a3f606102848365
Author: Thorsten Behrens 
Date:   Sat Jun 9 15:21:40 2018 +0200

adding some fuzz to row height tolerance tests

Expanding on a4ab0c08e74746a96dcf23c3d50cd2e65ee31342 there's
another test that on some tinderboxes was a few permille off.

Adding 1% fuzz in comparison, seems we've now aquired some font
layout instabilities across platforms.

Change-Id: I7b068105c6ffad44b055e4dc37deb03c6040ab09
Reviewed-on: https://gerrit.libreoffice.org/55509
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 264040beb49a..ab3b6165a9c6 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -4067,9 +4067,9 @@ void ScFiltersTest::testTdf62268()
 
 SCTAB nTab = 0;
 nHeight = rDoc.GetRowHeight(0, nTab, false);
-CPPUNIT_ASSERT_EQUAL(256, nHeight);
+CPPUNIT_ASSERT_LESSEQUAL( 3, abs( 256 - nHeight ) );
 nHeight = rDoc.GetRowHeight(1, nTab, false);
-CPPUNIT_ASSERT_EQUAL(1905, nHeight);
+CPPUNIT_ASSERT_LESSEQUAL( 19, abs( 1905 - nHeight ) );
 
 xDocSh->DoClose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-06-09 Thread Andrea Gelmini
 include/drawinglayer/processor3d/shadow3dextractor.hxx |2 +-
 sc/source/filter/xcl97/xcl97rec.cxx|2 +-
 svx/source/sdr/contact/viewobjectcontactofgraphic.cxx  |2 +-
 svx/source/svdraw/svdobj.cxx   |2 +-
 svx/source/svdraw/svdogrp.cxx  |2 +-
 svx/source/svdraw/svdpoev.cxx  |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a98618e37b91950750d10fa14d2c28539d7c67f2
Author: Andrea Gelmini 
Date:   Fri May 25 16:06:05 2018 +0200

Fix typos

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

diff --git a/include/drawinglayer/processor3d/shadow3dextractor.hxx 
b/include/drawinglayer/processor3d/shadow3dextractor.hxx
index e336b487e7e4..6606eae3a14e 100644
--- a/include/drawinglayer/processor3d/shadow3dextractor.hxx
+++ b/include/drawinglayer/processor3d/shadow3dextractor.hxx
@@ -62,7 +62,7 @@ namespace drawinglayer
 basegfx::B3DPoint   maPlanePoint;
 double  mfLightPlaneScalar;
 
-/// flag if shadow plane projection preparation leaded to valid 
results
+/// flag if shadow plane projection preparation led to valid 
results
 bool
mbShadowProjectionIsValid : 1;
 
 /// flag if conversion is switched on
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx 
b/sc/source/filter/xcl97/xcl97rec.cxx
index f71e23599e2a..54b1e358cb44 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -507,7 +507,7 @@ XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, 
const tools::Rectang
 // Problem with creating a Clone here is that it gets cloned, but 
not inserted to a
 // SdrPage. In deeper export layers this then goes wrong since 
without being inserted
 // to a Page, no SvxPage/UnoApiPage can be accessed. This was 
different in previous
-// revisions of the code in that a SdrObject could be *not* 
insterted, but have a
+// revisions of the code in that a SdrObject could be *not* 
inserted, but have a
 // SdrPage*. That again was redundant, wrong and inconsequent.
 , mpCaption( pCaption )
 
diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx 
b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index db34c85e2c14..8f2902bf5ac5 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -206,7 +206,7 @@ namespace sdr
 
 // #i103720# forget event to avoid possible deletion by the 
following ActionChanged call
 // which may use 
createPrimitive2DSequence/impPrepareGraphicWithAsynchroniousLoading again.
-// Deletion is actually done by the scheduler who leaded to coming 
here
+// Deletion is actually done by the scheduler who led to coming 
here
 mpAsynchLoadEvent.release();
 
 // Invalidate all paint areas and check existing animation (which 
may have changed).
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 5b313c907358..91e405dc497f 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -466,7 +466,7 @@ void SdrObject::handlePageChange(SdrPage* pOldPage, 
SdrPage* pNewPage)
 // good to think about if this is really needed - it *seems* to be intended
 // for a xShape being a on-demand-creatable resource - wit hthe argument 
that
 // the SdrPage/UnoPage used influences the SvxShape creation. This uses
-// ressources and would be nice to get rid of anyways.
+// resources and would be nice to get rid of anyways.
 if(nullptr == pOldPage || nullptr == pNewPage)
 {
 SvxShape* const pShape(getSvxShape());
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 919909fc3888..c0e6ae0b468d 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -178,7 +178,7 @@ void SdrObjGroup::NbcSetLayer(SdrLayerID nLayer)
 
 void SdrObjGroup::handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage)
 {
-// call patrent
+// call parent
 SdrObject::handlePageChange(pOldPage, pNewPage);
 
 for(size_t i(0); i < GetObjCount(); i++)
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 064aa07bb650..ec4a09e88506 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -556,7 +556,7 @@ void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc 
pTrFunc, const void*
 if(PolyPolygonEditor::GetRelativePolyPoint(aXPP, nPt, nPolyNum, 
nPointNum))
 {
 //#i83671# used nLocalPointNum (which was the polyg

Tinderbox #71 failing on ScFiltersTest::testTdf62268

2018-06-09 Thread Luke Benes
After commit:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=1e55a47e

tdf#62268: allow row height recalculation on document load

Both the x86 and x86_64 tinderboxes are failing with this error message:

https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&full-log=1528422001.29528

ScFiltersTest::testCondFormatFormulaListenerXLSX finished in: 313ms
24879 NEXT
warn:sc:22455:22455:sc/source/filter/orcus/orcusfiltersimpl.cxx:151: Unable to 
load styles from xml file! failed to load 
24880 
/tinderbox/buildslave/source/libo-master/sc/qa/unit/subsequent_filters-test.cxx:4072:ScFiltersTest::testTdf62268
24881 NEXTequality assertion failed
24882 - Expected: 1905
24883 - Actual  : 1904
24884 
24885 warn:sfx.doc:22455:22455:sfx2/source/doc/objxtor.cxx:708: 
DBG_UNHANDLED_EXCEPTION in const 
com::sun::star::uno::Reference& 
{anonymous}::lcl_getOrCreateLibraryContainer(bool, 
com::sun::star::uno::Reference&, 
const com::sun::star::uno::Reference&)
24886 type: com.sun.star.lang.IllegalArgumentException
24887 
24888 ScFiltersTest::testTdf62268 finished in: 551ms
24889 NEXTsubsequent_filters-test.cxx:4072:Assertion
24890 Test name: ScFiltersTest::testTdf62268
24891 NEXTequality assertion failed
24892 - Expected: 1905
24893 - Actual  : 1904
24894 
24895 Failures !!!
24896 Run: 110   Failure total: 1   Failures: 1   Errors: 0
24897 
warn:vcl.schedule.deinit:22455:22455:vcl/source/app/scheduler.cxx:166: DeInit 
task: Timer a: 1 p: 1 drawinglayer ImpTimedRefDev destroy mpVirDev 18ms 
(0x9afb2a8)
24898 
warn:vcl.schedule.deinit:22455:22455:vcl/source/app/scheduler.cxx:166: DeInit 
task: Timer a: 1 p: 1 graphic::Manager maSwapOutTimer 1ms (0x95eae84)
24899 
warn:vcl.schedule.deinit:22455:22455:vcl/source/app/scheduler.cxx:166: DeInit 
task: Timer a: 1 p: 1 sc ScModule IdleTimer 150ms (0x9326864) (ignored)
24900 
warn:vcl.schedule.deinit:22455:22455:vcl/source/app/scheduler.cxx:182: DeInit 
active tasks: 3 (ignored: 1)
24901 
warn:fwk.desktop:22455:22455:framework/source/services/desktop.cxx:1068: 
Desktop disposed before terminating it
24902 
warn:unotools.config:22455:22455:unotools/source/config/configmgr.cxx:168: 
ConfigManager not empty
24903 warn:svl.items:22455:22455:svl/source/items/style.cxx:52: 
SfxStyleSheetBase left 19; SfxStyleSheetBasePool left 1
24904 
24905 NEXTError: a unit test failed, please do one of:

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


[Libreoffice-commits] core.git: vcl/inc vcl/osx vcl/qt5 vcl/source vcl/unx vcl/win

2018-06-09 Thread Noel Grandin
 vcl/inc/osx/salinst.h|3 +--
 vcl/inc/qt5/Qt5Instance.hxx  |3 +--
 vcl/inc/salinst.hxx  |3 +--
 vcl/inc/unx/gtk/gtkinst.hxx  |3 +--
 vcl/inc/win/salinst.h|3 +--
 vcl/osx/salmenu.cxx  |   14 +++---
 vcl/qt5/Qt5Instance.cxx  |6 ++
 vcl/source/app/salvtables.cxx|7 +--
 vcl/source/window/menu.cxx   |   14 +++---
 vcl/source/window/menufloatingwindow.cxx |1 +
 vcl/source/window/menuitemlist.cxx   |7 +++
 vcl/source/window/menuitemlist.hxx   |4 +---
 vcl/source/window/menuwindow.cxx |1 +
 vcl/unx/gtk/gtkinst.cxx  |   13 +++--
 vcl/win/window/salmenu.cxx   |   24 
 15 files changed, 35 insertions(+), 71 deletions(-)

New commits:
commit b7abdafcfc42722ab060529864a2109d1e4198c0
Author: Noel Grandin 
Date:   Fri Jun 8 14:27:50 2018 +0200

return and hold SalMenuItem by std::unique_ptr

and drop DestroyMenuItem, all the implementations were just deleting the
pointer

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

diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 18f8630b0f27..a19e9e423f9b 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -120,8 +120,7 @@ public:
 virtual boolAnyInput( VclInputFlags nType ) override;
 virtual SalMenu*CreateMenu( bool bMenuBar, Menu* pVCLMenu ) 
override;
 virtual voidDestroyMenu( SalMenu* ) override;
-virtual SalMenuItem*CreateMenuItem( const SalItemParams* pItemData ) 
override;
-virtual voidDestroyMenuItem( SalMenuItem* ) override;
+virtual std::unique_ptr CreateMenuItem( const SalItemParams & 
rItemData ) override;
 virtual OpenGLContext*  CreateOpenGLContext() override;
 virtual OUStringGetConnectionIdentifier() override;
 virtual voidAddToRecentDocumentList(const OUString& rFileUrl, 
const OUString& rMimeType,
diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx
index aea3e792bfa0..16e22098cd09 100644
--- a/vcl/inc/qt5/Qt5Instance.hxx
+++ b/vcl/inc/qt5/Qt5Instance.hxx
@@ -82,8 +82,7 @@ public:
 
 virtual SalMenu* CreateMenu(bool, Menu*) override;
 virtual void DestroyMenu(SalMenu* pMenu) override;
-virtual SalMenuItem* CreateMenuItem(const SalItemParams*) override;
-virtual void DestroyMenuItem(SalMenuItem* pItem) override;
+virtual std::unique_ptr CreateMenuItem(const SalItemParams&) 
override;
 
 virtual SalTimer* CreateSalTimer() override;
 virtual SalSystem* CreateSalSystem() override;
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index c8f330350ad4..3924ee3d497f 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -154,8 +154,7 @@ public:
 // menus
 virtual SalMenu*CreateMenu( bool bMenuBar, Menu* pMenu );
 virtual voidDestroyMenu( SalMenu* pMenu);
-virtual SalMenuItem*CreateMenuItem( const SalItemParams* pItemData );
-virtual voidDestroyMenuItem( SalMenuItem* pItem );
+virtual std::unique_ptr CreateMenuItem( const SalItemParams& 
pItemData );
 
 // may return NULL to disable session management, only used by X11 backend
 virtual std::unique_ptr CreateSalSession();
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 25d3ff020886..499bacadd5b4 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -200,8 +200,7 @@ public:
 virtual std::unique_ptr CreatePrinter( SalInfoPrinter* 
pInfoPrinter ) override;
 virtual SalMenu*CreateMenu( bool, Menu* ) override;
 virtual voidDestroyMenu( SalMenu* pMenu ) override;
-virtual SalMenuItem*CreateMenuItem( const SalItemParams* ) 
override;
-virtual voidDestroyMenuItem( SalMenuItem* pItem ) override;
+virtual std::unique_ptr CreateMenuItem( const SalItemParams& 
) override;
 virtual SalTimer*   CreateSalTimer() override;
 virtual voidAddToRecentDocumentList(const OUString& 
rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
 virtual std::unique_ptr
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index 4274f731ee2b..e96fbc5b56b0 100644
--- a/vcl/inc/win/salinst.h
+++ b/vcl/inc/win/salinst.h
@@ -74,8 +74,7 @@ public:
 virtual boolAnyInput( VclInputFlags nType ) override;
 virtual SalMenu*CreateMenu( bool bMenuBar, Menu* ) override;
 virtual voidDestroyMenu( SalMenu* ) override;
-virtual SalMenuItem*CreateMenuItem( const SalItemParams* pItemData 
) override;
-virtual voidDes

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/osx vcl/qt5 vcl/source vcl/unx vcl/win

2018-06-09 Thread Noel Grandin
 include/vcl/menu.hxx  |4 ++--
 vcl/inc/osx/salinst.h |3 +--
 vcl/inc/qt5/Qt5Instance.hxx   |3 +--
 vcl/inc/salinst.hxx   |3 +--
 vcl/inc/unx/gtk/gtkinst.hxx   |3 +--
 vcl/inc/win/salinst.h |3 +--
 vcl/osx/salmenu.cxx   |9 ++---
 vcl/qt5/Qt5Instance.cxx   |6 ++
 vcl/source/app/salvtables.cxx |7 +--
 vcl/source/window/menu.cxx|4 +---
 vcl/unx/gtk/gtkinst.cxx   |   13 +++--
 vcl/win/window/salmenu.cxx|9 ++---
 12 files changed, 18 insertions(+), 49 deletions(-)

New commits:
commit 7d521a85858bacdb7b5db359036ccf6f01b709c3
Author: Noel Grandin 
Date:   Fri Jun 8 14:41:16 2018 +0200

hold and return SalMenu by std::unique_ptr

and drop DestroyMenu, all the implementations just delete the object

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

diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 6c73d802802f..705486ab7356 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -157,7 +157,7 @@ private:
 
 css::uno::Reference mxAccessible;
 mutable std::unique_ptr mpLayoutData;
-SalMenu* mpSalMenu;
+std::unique_ptr mpSalMenu;
 
 protected:
 SAL_DLLPRIVATE Menu* ImplGetStartMenu();
@@ -181,7 +181,7 @@ protected:
 DECL_DLLPRIVATE_LINK(ImplCallSelect, void*, void );
 
 SAL_DLLPRIVATE void ImplFillLayoutData() const;
-SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; }
+SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu.get(); }
 SAL_DLLPRIVATE void ImplClearSalMenu();
 SAL_DLLPRIVATE OUString ImplGetHelpText( sal_uInt16 nItemId ) const;
 
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index a19e9e423f9b..fa15a5cb7bca 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -118,8 +118,7 @@ public:
 virtual voidAcquireYieldMutex( sal_uInt32 nCount = 1 ) 
override;
 virtual boolDoYield(bool bWait, bool bHandleAllCurrentEvents) 
override;
 virtual boolAnyInput( VclInputFlags nType ) override;
-virtual SalMenu*CreateMenu( bool bMenuBar, Menu* pVCLMenu ) 
override;
-virtual voidDestroyMenu( SalMenu* ) override;
+virtual std::unique_ptr CreateMenu( bool bMenuBar, Menu* 
pVCLMenu ) override;
 virtual std::unique_ptr CreateMenuItem( const SalItemParams & 
rItemData ) override;
 virtual OpenGLContext*  CreateOpenGLContext() override;
 virtual OUStringGetConnectionIdentifier() override;
diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx
index 16e22098cd09..06f9c7d4102c 100644
--- a/vcl/inc/qt5/Qt5Instance.hxx
+++ b/vcl/inc/qt5/Qt5Instance.hxx
@@ -80,8 +80,7 @@ public:
 virtual OUString GetDefaultPrinter() override;
 virtual void PostPrintersChanged() override;
 
-virtual SalMenu* CreateMenu(bool, Menu*) override;
-virtual void DestroyMenu(SalMenu* pMenu) override;
+virtual std::unique_ptr CreateMenu(bool, Menu*) override;
 virtual std::unique_ptr CreateMenuItem(const SalItemParams&) 
override;
 
 virtual SalTimer* CreateSalTimer() override;
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 3924ee3d497f..fa4fa92d3289 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -152,8 +152,7 @@ public:
 virtual bool   AnyInput( VclInputFlags nType ) = 0;
 
 // menus
-virtual SalMenu*CreateMenu( bool bMenuBar, Menu* pMenu );
-virtual voidDestroyMenu( SalMenu* pMenu);
+virtual std::unique_ptr CreateMenu( bool bMenuBar, Menu* 
pMenu );
 virtual std::unique_ptr CreateMenuItem( const SalItemParams& 
pItemData );
 
 // may return NULL to disable session management, only used by X11 backend
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 499bacadd5b4..5f8534ae262f 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -198,8 +198,7 @@ public:
 virtual SalSystem*  CreateSalSystem() override;
 virtual SalInfoPrinter* CreateInfoPrinter(SalPrinterQueueInfo* 
pPrinterQueueInfo, ImplJobSetup* pJobSetup) override;
 virtual std::unique_ptr CreatePrinter( SalInfoPrinter* 
pInfoPrinter ) override;
-virtual SalMenu*CreateMenu( bool, Menu* ) override;
-virtual voidDestroyMenu( SalMenu* pMenu ) override;
+virtual std::unique_ptr CreateMenu( bool, Menu* ) override;
 virtual std::unique_ptr CreateMenuItem( const SalItemParams& 
) override;
 virtual SalTimer*   CreateSalTimer() override;
 virtual voidAddToRecentDocumentList(const OUString& 
rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index e96fbc5b56b0..f0df23433d10 100644
--- 

[Libreoffice-commits] core.git: include/vcl vcl/headless vcl/inc vcl/ios vcl/osx vcl/qt5 vcl/source vcl/unx vcl/win

2018-06-09 Thread Noel Grandin
 include/vcl/print.hxx   |2 +-
 vcl/headless/svpprn.cxx |9 ++---
 vcl/inc/headless/svpinst.hxx|3 +--
 vcl/inc/osx/salinst.h   |3 +--
 vcl/inc/qt5/Qt5Instance.hxx |3 +--
 vcl/inc/salinst.hxx |3 +--
 vcl/inc/unx/geninst.h   |3 +--
 vcl/inc/unx/gtk/gtkinst.hxx |2 +-
 vcl/inc/win/salinst.h   |3 +--
 vcl/ios/dummies.cxx |   18 --
 vcl/osx/salinst.cxx |9 ++---
 vcl/qt5/Qt5Instance_Print.cxx   |6 ++
 vcl/source/gdi/print.cxx|3 +--
 vcl/source/gdi/print3.cxx   |   11 ---
 vcl/unx/generic/print/genprnpsp.cxx |9 ++---
 vcl/unx/gtk/gtkinst.cxx |4 ++--
 vcl/win/gdi/salprn.cxx  |9 ++---
 17 files changed, 29 insertions(+), 71 deletions(-)

New commits:
commit 6d008c9e1dbe4240a10c8789860dc30b0cb0b2d5
Author: Noel Grandin 
Date:   Fri Jun 8 13:32:57 2018 +0200

hold and return SalPrinter with std::unique_ptr

and remove DestroyPrinter, doesn't not anything beyond delete'ing the
object

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

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index c80b514b05df..2fe921ee1870 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -182,7 +182,7 @@ class VCL_DLLPUBLIC Printer : public OutputDevice
 
 private:
 SalInfoPrinter* mpInfoPrinter;
-SalPrinter* mpPrinter;
+std::unique_ptr mpPrinter;
 SalGraphics*mpJobGraphics;
 VclPtr mpPrev;
 VclPtr mpNext;
diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index e54c01a4c437..7b661c1d58e0 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -188,18 +188,13 @@ void SvpSalInstance::DestroyInfoPrinter( SalInfoPrinter* 
pPrinter )
 delete pPrinter;
 }
 
-SalPrinter* SvpSalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter )
+std::unique_ptr SvpSalInstance::CreatePrinter( SalInfoPrinter* 
pInfoPrinter )
 {
 // create and initialize SalPrinter
 SvpSalPrinter* pPrinter = new SvpSalPrinter( pInfoPrinter );
 pPrinter->m_aJobData = 
static_cast(pInfoPrinter)->m_aJobData;
 
-return pPrinter;
-}
-
-void SvpSalInstance::DestroyPrinter( SalPrinter* pPrinter )
-{
-delete pPrinter;
+return std::unique_ptr(pPrinter);
 }
 
 void SvpSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index cf9ced053c8a..a56aa408f601 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -151,8 +151,7 @@ public:
 virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
ImplJobSetup* pSetupData ) 
override;
 virtual voidDestroyInfoPrinter( SalInfoPrinter* pPrinter ) 
override;
-virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) 
override;
-virtual voidDestroyPrinter( SalPrinter* pPrinter ) override;
+virtual std::unique_ptr CreatePrinter( SalInfoPrinter* 
pInfoPrinter ) override;
 
 virtual voidGetPrinterQueueInfo( ImplPrnQueueList* pList ) 
override;
 virtual voidGetPrinterQueueState( SalPrinterQueueInfo* pInfo ) 
override;
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 27d6266501f7..18f8630b0f27 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -105,8 +105,7 @@ public:
 virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
ImplJobSetup* pSetupData ) 
override;
 virtual voidDestroyInfoPrinter( SalInfoPrinter* pPrinter ) 
override;
-virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) 
override;
-virtual voidDestroyPrinter( SalPrinter* pPrinter ) override;
+virtual std::unique_ptr CreatePrinter( SalInfoPrinter* 
pInfoPrinter ) override;
 virtual voidGetPrinterQueueInfo( ImplPrnQueueList* pList ) 
override;
 virtual voidGetPrinterQueueState( SalPrinterQueueInfo* pInfo ) 
override;
 virtual voidDeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo 
) override;
diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx
index 84eff744d32b..aea3e792bfa0 100644
--- a/vcl/inc/qt5/Qt5Instance.hxx
+++ b/vcl/inc/qt5/Qt5Instance.hxx
@@ -73,8 +73,7 @@ public:
 virtual SalInfoPrinter* CreateInfoPrinter(SalPrinterQueueInfo* pQueueInfo,
   ImplJobSetup* pSetupData) 
override;
 virtual void DestroyInfoPrinter(SalInfoPrinter* pPrinter) override;
-virtual SalPrinter* CreatePri

[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/osx vcl/qt5 vcl/source vcl/unx vcl/win

2018-06-09 Thread Noel Grandin
 vcl/headless/svpinst.cxx  |5 -
 vcl/inc/headless/svpinst.hxx  |3 ---
 vcl/inc/osx/salinst.h |1 -
 vcl/inc/qt5/Qt5Instance.hxx   |2 --
 vcl/inc/salinst.hxx   |4 ++--
 vcl/inc/unx/salinst.h |2 +-
 vcl/inc/win/salinst.h |1 -
 vcl/osx/salinst.cxx   |5 -
 vcl/qt5/Qt5Instance.cxx   |2 --
 vcl/source/app/salvtables.cxx |6 ++
 vcl/unx/generic/app/sm.cxx|6 +++---
 vcl/win/app/salinst.cxx   |5 -
 12 files changed, 12 insertions(+), 30 deletions(-)

New commits:
commit 84efebb5304b2ebbc03e7743b131ce4d5ad10c03
Author: Noel Grandin 
Date:   Fri Jun 8 13:16:50 2018 +0200

return SalSession with std::unique_ptr

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

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 1128f0d61ee6..ad265e335265 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -491,11 +491,6 @@ bool SvpSalInstance::AnyInput( VclInputFlags nType )
 return false;
 }
 
-SalSession* SvpSalInstance::CreateSalSession()
-{
-return nullptr;
-}
-
 OUString SvpSalInstance::GetConnectionIdentifier()
 {
 return OUString();
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index 9eef8cdae6f3..cf9ced053c8a 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -175,9 +175,6 @@ public:
 virtual boolIsMainThread() const override;
 virtual voidupdateMainThread() override;
 
-// may return NULL to disable session management
-virtual SalSession* CreateSalSession() override;
-
 virtual OpenGLContext*  CreateOpenGLContext() override;
 
 virtual OUStringGetConnectionIdentifier() override;
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 6fcb76aec1a7..27d6266501f7 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -123,7 +123,6 @@ public:
 virtual voidDestroyMenu( SalMenu* ) override;
 virtual SalMenuItem*CreateMenuItem( const SalItemParams* pItemData ) 
override;
 virtual voidDestroyMenuItem( SalMenuItem* ) override;
-virtual SalSession* CreateSalSession() override;
 virtual OpenGLContext*  CreateOpenGLContext() override;
 virtual OUStringGetConnectionIdentifier() override;
 virtual voidAddToRecentDocumentList(const OUString& rFileUrl, 
const OUString& rMimeType,
diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx
index cd0e91124412..84eff744d32b 100644
--- a/vcl/inc/qt5/Qt5Instance.hxx
+++ b/vcl/inc/qt5/Qt5Instance.hxx
@@ -93,8 +93,6 @@ public:
 virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override;
 virtual bool AnyInput(VclInputFlags nType) override;
 
-virtual SalSession* CreateSalSession() override;
-
 virtual OpenGLContext* CreateOpenGLContext() override;
 
 virtual OUString GetConnectionIdentifier() override;
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 346352486b30..e04d849e4169 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -158,8 +158,8 @@ public:
 virtual SalMenuItem*CreateMenuItem( const SalItemParams* pItemData );
 virtual voidDestroyMenuItem( SalMenuItem* pItem );
 
-// may return NULL to disable session management
-virtual SalSession* CreateSalSession() = 0;
+// may return NULL to disable session management, only used by X11 backend
+virtual std::unique_ptr CreateSalSession();
 
 virtual OpenGLContext*  CreateOpenGLContext() = 0;
 
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index 2e404dbe76e8..d61995f14d23 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -72,7 +72,7 @@ public:
 virtual std::unique_ptr CreateI18NImeStatus() override;
 virtual SalSystem*  CreateSalSystem() override;
 virtual SalBitmap*  CreateSalBitmap() override;
-virtual SalSession* CreateSalSession() override;
+virtual std::unique_ptr CreateSalSession() override;
 virtual OpenGLContext*  CreateOpenGLContext() override;
 
 virtual boolDoYield(bool bWait, bool 
bHandleAllCurrentEvents) override;
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index 43902c065324..77e14012b220 100644
--- a/vcl/inc/win/salinst.h
+++ b/vcl/inc/win/salinst.h
@@ -77,7 +77,6 @@ public:
 virtual voidDestroyMenu( SalMenu* ) override;
 virtual SalMenuItem*CreateMenuItem( const SalItemParams* pItemData 
) override;
 virtual voidDestroyMenuItem( SalMenuItem* ) override;
-virtual SalSession* CreateSalSession() override;
 virtual OpenGLContext*  CreateOpenGLContext() override;
 virtual OUStringGetConnectionIdentifier() override;
 virtua

[Libreoffice-commits] core.git: chart2/IwyuFilter_chart2.yaml chart2/source

2018-06-09 Thread Gabor Kelemen
 chart2/IwyuFilter_chart2.yaml   |   32 +++
 chart2/source/controller/accessibility/AccessibleBase.cxx   |2 
 chart2/source/controller/accessibility/AccessibleChartView.cxx  |1 
 chart2/source/controller/dialogs/dlg_DataEditor.cxx |1 
 chart2/source/controller/dialogs/dlg_DataSource.cxx |1 
 chart2/source/controller/inc/AccessibleBase.hxx |   12 +-
 chart2/source/controller/inc/AccessibleChartView.hxx|   14 +--
 chart2/source/controller/inc/AxisItemConverter.hxx  |   12 +-
 chart2/source/controller/inc/CharacterPropertyItemConverter.hxx |1 
 chart2/source/controller/inc/ChartController.hxx|   42 
+-
 chart2/source/controller/inc/ChartToolbarController.hxx |5 -
 chart2/source/controller/inc/CommandDispatchContainer.hxx   |   14 +--
 chart2/source/controller/inc/DataPointItemConverter.hxx |9 +-
 chart2/source/controller/inc/DrawViewWrapper.hxx|5 -
 chart2/source/controller/inc/ErrorBarItemConverter.hxx  |9 --
 chart2/source/controller/inc/GraphicPropertyItemConverter.hxx   |4 
 chart2/source/controller/inc/dlg_ChartType.hxx  |6 -
 chart2/source/controller/inc/dlg_ChartType_UNO.hxx  |8 -
 chart2/source/controller/inc/dlg_CreationWizard.hxx |6 -
 chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx |   11 +-
 chart2/source/controller/inc/dlg_DataEditor.hxx |6 -
 chart2/source/controller/inc/dlg_DataSource.hxx |9 +-
 chart2/source/controller/inc/dlg_InsertDataLabel.hxx|1 
 chart2/source/controller/inc/dlg_InsertErrorBars.hxx|4 
 chart2/source/controller/inc/dlg_InsertLegend.hxx   |6 -
 chart2/source/controller/inc/dlg_InsertTitle.hxx|1 
 chart2/source/controller/inc/dlg_ObjectProperties.hxx   |4 
 chart2/source/controller/inc/dlg_View3D.hxx |6 -
 chart2/source/controller/main/ChartController.cxx   |1 
 29 files changed, 135 insertions(+), 98 deletions(-)

New commits:
commit fa9d10e3350b84c3a249294cad650188dce39538
Author: Gabor Kelemen 
Date:   Mon May 28 01:10:13 2018 +0200

tdf#42949 Fix IWYU warnings in chart2/source/controller/inc/[A-G]*

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
A bit of fallout management was needed.

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

diff --git a/chart2/IwyuFilter_chart2.yaml b/chart2/IwyuFilter_chart2.yaml
index ac219664f71c..1fcf186531a9 100644
--- a/chart2/IwyuFilter_chart2.yaml
+++ b/chart2/IwyuFilter_chart2.yaml
@@ -285,3 +285,35 @@ blacklist:
 chart2/source/view/inc/VPolarTransformation.hxx:
 # base class has to be a complete type
 - com/sun/star/chart2/XTransformation.hpp
+chart2/source/controller/inc/AccessibleTextHelper.hxx:
+# base class has to be a complete type
+- com/sun/star/accessibility/XAccessibleContext.hpp
+- com/sun/star/lang/XInitialization.hpp
+chart2/source/controller/inc/AccessibleChartView.hxx:
+# base class has to be a complete type
+- com/sun/star/lang/XInitialization.hpp
+- com/sun/star/view/XSelectionChangeListener.hpp
+chart2/source/controller/inc/AccessibleBase.hxx:
+# base class has to be a complete type
+- com/sun/star/accessibility/XAccessible.hpp
+- com/sun/star/accessibility/XAccessibleContext.hpp
+- com/sun/star/accessibility/XAccessibleComponent.hpp
+- com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp
+- com/sun/star/lang/XServiceInfo.hpp
+- com/sun/star/lang/XEventListener.hpp
+chart2/source/controller/inc/CharacterPropertyItemConverter.hxx:
+# has to be a complete type
+- com/sun/star/awt/Size.hpp
+chart2/source/controller/inc/ChartToolbarController.hxx:
+# base class has to be a complete type
+- com/sun/star/frame/XStatusListener.hpp
+- com/sun/star/frame/XToolbarController.hpp
+- com/sun/star/lang/XInitialization.hpp
+- com/sun/star/lang/XServiceInfo.hpp
+- com/sun/star/util/XUpdatable.hpp
+chart2/source/controller/inc/ChartController.hxx:
+# base class has to be a complete type
+- com/sun/star/frame/XDispatchProvider.hpp
+- com/sun/star/frame/XLayoutManagerListener.hpp
+- com/sun/star/ui/XContextMenuInterception.hpp
+- com/sun/star/util/XModeChangeListener.hpp
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx 
b/chart2/source/controller/accessibility/AccessibleBase.cxx
index cac25182d8e1..a93ac3af7d2a 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -31,6 +31,7 @@
 #incl

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

2018-06-09 Thread Michael Stahl
 sw/source/core/text/txtfrm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2f0263c76cacdb04a914cf7c72ea949bd62282ce
Author: Michael Stahl 
Date:   Sat Jun 9 09:31:06 2018 +0200

sw_redlinehide: old GCC needs a cast here

Change-Id: I45f340fff2d3285e1af6f6448c807d4997e5a42b

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 39a0c8262925..52f5139cebb5 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -867,7 +867,7 @@ MapViewToModel(MergedPara const& rMerged, TextFrameIndex 
const i_nIndex)
 assert(nIndex == 0 && "view index out of bounds");
 return pExtent
 ? std::make_pair(pExtent->pNode, pExtent->nEnd) //1-past-the-end index
-: std::make_pair(rMerged.pFirstNode, 0);
+: std::make_pair(rMerged.pFirstNode, sal_Int32(0));
 }
 
 TextFrameIndex MapModelToView(MergedPara const& rMerged, SwTextNode 
const*const pNode, sal_Int32 const nIndex)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-06-09 Thread Noel Grandin
 vcl/inc/salinst.hxx |4 ++--
 vcl/inc/svdata.hxx  |2 +-
 vcl/inc/unx/gtk/gtkinst.hxx |2 +-
 vcl/inc/unx/salinst.h   |2 +-
 vcl/source/app/salvtables.cxx   |4 ++--
 vcl/source/app/svmain.cxx   |3 +--
 vcl/unx/generic/app/i18n_status.cxx |4 ++--
 vcl/unx/gtk/gtkinst.cxx |3 ++-
 8 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 382aab381b3fbb97e64e5010fbce7f3793ff703a
Author: Noel Grandin 
Date:   Fri Jun 8 13:05:49 2018 +0200

hold and return SalI18NImeStatus using std::unique_ptr

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

diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index b4e8ed85e4d8..346352486b30 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -127,8 +127,8 @@ public:
 
 // SalTimer
 virtual SalTimer*   CreateSalTimer() = 0;
-// SalI18NImeStatus
-virtual SalI18NImeStatus*
+// interface to ime status window, only used by the X11 backend
+virtual std::unique_ptr
 CreateI18NImeStatus();
 // SalSystem
 virtual SalSystem*  CreateSalSystem() = 0;
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 09cd76695b62..233ff8add528 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -340,7 +340,7 @@ struct ImplSVData
 Application*mpApp = nullptr;// pApp
 VclPtr  mpDefaultWin;   // Default-Window
 boolmbDeInit = false;   // Is VCL 
deinitializing
-SalI18NImeStatus*   mpImeStatus = nullptr;  // interface to 
ime status window
+std::unique_ptr mpImeStatus;  // interface to 
ime status window, only used by the X11 backend
 SalSystem*  mpSalSystem = nullptr;  // SalSystem 
interface
 boolmbResLocaleSet = false; // 
SV-Resource-Manager
 std::locale maResLocale;// Resource locale
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 41ba5675df0b..aea9e0223fe6 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -193,7 +193,7 @@ public:
 virtual SalFrame*   CreateChildFrame( SystemParentData* pParent, 
SalFrameStyleFlags nStyle ) override;
 virtual SalObject*  CreateObject( SalFrame* pParent, 
SystemWindowData* pWindowData, bool bShow ) override;
 #if !GTK_CHECK_VERSION(3,0,0)
-virtual SalI18NImeStatus*   CreateI18NImeStatus() override;
+virtual std::unique_ptr CreateI18NImeStatus() override;
 #endif
 virtual SalSystem*  CreateSalSystem() override;
 virtual SalInfoPrinter* CreateInfoPrinter(SalPrinterQueueInfo* 
pPrinterQueueInfo, ImplJobSetup* pJobSetup) override;
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index a35c2755b5d8..2e404dbe76e8 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -69,7 +69,7 @@ public:
 virtual GenPspGraphics *CreatePrintGraphics() override;
 
 virtual SalTimer*   CreateSalTimer() override;
-virtual SalI18NImeStatus*   CreateI18NImeStatus() override;
+virtual std::unique_ptr CreateI18NImeStatus() override;
 virtual SalSystem*  CreateSalSystem() override;
 virtual SalBitmap*  CreateSalBitmap() override;
 virtual SalSession* CreateSalSession() override;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 0772b53943ee..ca3b6fb3aa00 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -107,9 +107,9 @@ bool SalInstance::CallEventCallback( void const * pEvent, 
int nBytes )
 return m_pEventInst.is() && m_pEventInst->dispatchEvent( pEvent, nBytes );
 }
 
-SalI18NImeStatus* SalInstance::CreateI18NImeStatus()
+std::unique_ptr SalInstance::CreateI18NImeStatus()
 {
-return new SalI18NImeStatus;
+return std::unique_ptr(new SalI18NImeStatus);
 }
 
 SalTimer::~SalTimer() COVERITY_NOEXCEPT_FALSE
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index bd7a4d6890ea..c2de4819b541 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -433,8 +433,7 @@ void DeInitVCL()
 vcl::DeleteOnDeinitBase::ImplDeleteOnDeInit();
 
 // give ime status a chance to destroy its own windows
-delete pSVData->mpImeStatus;
-pSVData->mpImeStatus = nullptr;
+pSVData->mpImeStatus.reset();
 
 #if OSL_DEBUG_LEVEL > 0
 OStringBuffer aBuf( 256 );
diff --git a/vcl/unx/generic/app/i18n_status.cxx 
b/vcl/unx/generic/app/i18n_status.cxx
index c80846e621ca..6a27ed8ac6c7 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -431,9 +431,9 @@ void X11ImeStatus::toggle()
 vcl::I18NStatus::get().toggleStatusWindow();
 }
 
-S

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

2018-06-09 Thread Zdeněk Crhonek
 sc/Module_sc.mk |1 
 sc/UITest_statistics.mk |   20 ++
 sc/qa/uitest/statistics/sampling.py |  110 
 3 files changed, 131 insertions(+)

New commits:
commit 508175a8af0da217a4670558a2ef6b52a3f71ccb
Author: Zdeněk Crhonek 
Date:   Sat Jun 9 08:09:25 2018 +0200

uitest Calc - statistics - sampling

Change-Id: I6339cab59ea26ad624237f6bd2e001ff7e01ac51
Reviewed-on: https://gerrit.libreoffice.org/55495
Tested-by: Jenkins 
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index ee30a84469e5..b85622c0cdd3 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -188,6 +188,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\
UITest_calc_tests2 \
UITest_calc_tests3 \
UITest_calc_tests4 \
+   UITest_statistics \
 ))
 endif
 
diff --git a/sc/UITest_statistics.mk b/sc/UITest_statistics.mk
new file mode 100644
index ..4e668f425e94
--- /dev/null
+++ b/sc/UITest_statistics.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UITest_UITest,statistics))
+
+$(eval $(call gb_UITest_add_modules,statistics,$(SRCDIR)/sc/qa/uitest,\
+   statistics/ \
+))
+
+$(eval $(call gb_UITest_set_defs,statistics, \
+TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/qa/uitest/statistics/sampling.py 
b/sc/qa/uitest/statistics/sampling.py
new file mode 100644
index ..cf084b50dde4
--- /dev/null
+++ b/sc/qa/uitest/statistics/sampling.py
@@ -0,0 +1,110 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_sheet_from_doc
+from libreoffice.calc.conditional_format import 
get_conditional_format_from_sheet
+from uitest.debug import sleep
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class sampling(UITestCase):
+def test_statistic_sampling(self):
+calc_doc = self.ui_test.create_doc_in_start_center("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+#fill data
+enter_text_to_cell(gridwin, "A1", "11")
+enter_text_to_cell(gridwin, "A2", "12")
+enter_text_to_cell(gridwin, "A3", "13")
+enter_text_to_cell(gridwin, "A4", "14")
+enter_text_to_cell(gridwin, "A5", "15")
+enter_text_to_cell(gridwin, "A6", "16")
+enter_text_to_cell(gridwin, "A7", "17")
+enter_text_to_cell(gridwin, "A8", "18")
+enter_text_to_cell(gridwin, "A9", "19")
+
+enter_text_to_cell(gridwin, "B1", "21")
+enter_text_to_cell(gridwin, "B2", "22")
+enter_text_to_cell(gridwin, "B3", "23")
+enter_text_to_cell(gridwin, "B4", "24")
+enter_text_to_cell(gridwin, "B5", "25")
+enter_text_to_cell(gridwin, "B6", "26")
+enter_text_to_cell(gridwin, "B7", "27")
+enter_text_to_cell(gridwin, "B8", "28")
+enter_text_to_cell(gridwin, "B9", "29")
+
+enter_text_to_cell(gridwin, "C1", "31")
+enter_text_to_cell(gridwin, "C2", "32")
+enter_text_to_cell(gridwin, "C3", "33")
+enter_text_to_cell(gridwin, "C4", "34")
+enter_text_to_cell(gridwin, "C5", "35")
+enter_text_to_cell(gridwin, "C6", "36")
+enter_text_to_cell(gridwin, "C7", "37")
+enter_text_to_cell(gridwin, "C8", "38")
+enter_text_to_cell(gridwin, "C9", "39")
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C9"}))
+
self.ui_test.execute_modeless_dialog_through_command(".uno:SamplingDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+xinputrangeedit = xDialog.getChild("input-range-edit")
+xoutputrangeedit = xDialog.getChild("output-range-edit")
+xrandommethodradio = xDialog.getChild("random-method-radio")
+xsamplesizespin = xDialog.getChild("sample-size-spin")
+xperiodicmethodradio = xDialog.getChild("periodic-method-radio")
+xperiodspin = xDialog.getChild("period-spin")
+
+xinputrangeedit.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+   

[Libreoffice-commits] core.git: cui/source editeng/source reportdesign/source sc/source sd/source svx/source sw/source

2018-06-09 Thread Noel Grandin
 cui/source/dialogs/cuifmsearch.cxx |1 
 cui/source/options/optcolor.cxx|2 -
 cui/source/options/optlingu.cxx|2 -
 cui/source/options/optpath.cxx |1 
 cui/source/tabpages/tpbitmap.cxx   |4 --
 cui/source/tabpages/tpgradnt.cxx   |2 -
 cui/source/tabpages/tphatch.cxx|4 --
 cui/source/tabpages/tplnedef.cxx   |4 --
 cui/source/tabpages/tplneend.cxx   |4 --
 cui/source/tabpages/tppattern.cxx  |4 --
 editeng/source/misc/hangulhanja.cxx|1 
 reportdesign/source/ui/dlg/dlgpage.cxx |1 
 sc/source/ui/app/scmod.cxx |1 
 sc/source/ui/attrdlg/attrdlg.cxx   |1 
 sc/source/ui/docshell/arealink.cxx |2 -
 sc/source/ui/docshell/docsh.cxx|1 
 sc/source/ui/docshell/docsh4.cxx   |8 
 sc/source/ui/drawfunc/drawsh.cxx   |3 -
 sc/source/ui/drawfunc/drawsh5.cxx  |4 --
 sc/source/ui/drawfunc/drtxtob1.cxx |2 -
 sc/source/ui/miscdlgs/redcom.cxx   |1 
 sc/source/ui/pagedlg/tphf.cxx  |2 -
 sc/source/ui/pagedlg/tphfedit.cxx  |2 -
 sc/source/ui/styleui/styledlg.cxx  |1 
 sc/source/ui/unoobj/filtuno.cxx|3 -
 sc/source/ui/vba/vbaworksheet.cxx  |2 -
 sc/source/ui/view/cellsh1.cxx  |   29 -
 sc/source/ui/view/cellsh2.cxx  |6 ---
 sc/source/ui/view/cellsh3.cxx  |4 --
 sc/source/ui/view/editsh.cxx   |4 --
 sc/source/ui/view/formatsh.cxx |2 -
 sc/source/ui/view/gridwin2.cxx |2 -
 sc/source/ui/view/pivotsh.cxx  |2 -
 sc/source/ui/view/prevwsh.cxx  |2 -
 sc/source/ui/view/tabvwsh3.cxx |3 -
 sc/source/ui/view/tabvwsh4.cxx |1 
 sc/source/ui/view/tabvwsha.cxx |1 
 sc/source/ui/view/tabvwshf.cxx |9 -
 sd/source/ui/dlg/dlgchar.cxx   |1 
 sd/source/ui/dlg/dlgpage.cxx   |1 
 sd/source/ui/dlg/prltempl.cxx  |1 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |2 -
 sd/source/ui/view/drviews2.cxx |6 ---
 svx/source/dialog/grfflt.cxx   |6 ---
 svx/source/dialog/hdft.cxx |2 -
 svx/source/dialog/hyperdlg.cxx |2 -
 svx/source/dialog/imapwnd.cxx  |1 
 svx/source/dialog/srchdlg.cxx  |4 --
 svx/source/fmcomp/fmgridcl.cxx |1 
 svx/source/form/fmshell.cxx|1 
 svx/source/gallery2/galbrws1.cxx   |4 --
 svx/source/gallery2/galbrws2.cxx   |1 
 svx/source/svdraw/svdedtv2.cxx |1 
 svx/source/tbxctrls/grafctrl.cxx   |2 -
 sw/source/ui/chrdlg/chardlg.cxx|1 
 sw/source/ui/chrdlg/tblnumfm.cxx   |1 
 sw/source/ui/dbui/dbinsdlg.cxx |2 -
 sw/source/ui/dialog/addrdlg.cxx|1 
 sw/source/ui/dialog/uiregionsw.cxx |2 -
 sw/source/ui/envelp/envfmt.cxx |1 
 sw/source/ui/fldui/fldedt.cxx  |1 
 sw/source/ui/fmtui/tmpdlg.cxx  |1 
 sw/source/ui/frmdlg/frmdlg.cxx |1 
 sw/source/ui/frmdlg/pattern.cxx|1 
 sw/source/ui/frmdlg/uiborder.cxx   |1 
 sw/source/ui/index/cnttab.cxx  |1 
 sw/source/ui/misc/bookmark.cxx |1 
 sw/source/ui/misc/glossary.cxx |1 
 sw/source/ui/table/convert.cxx |1 
 sw/source/ui/table/tabledlg.cxx|1 
 sw/source/uibase/app/appenv.cxx|1 
 sw/source/uibase/app/applab.cxx|2 -
 sw/source/uibase/app/docsh2.cxx|1 
 sw/source/uibase/dbui/dbmgr.cxx|2 -
 sw/source/uibase/dialog/regionsw.cxx   |6 ---
 sw/source/uibase/dochdl/gloshdl.cxx|5 --
 sw/source/uibase/fldui/fldwrap.cxx 

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

2018-06-09 Thread Luboš Luňák
 sc/source/core/data/column.cxx  |2 +-
 sc/source/core/data/column2.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1e42a970c582b1ecfb652559c90a027554984ab7
Author: Luboš Luňák 
Date:   Fri Jun 8 21:14:19 2018 +0200

properly go to next row when walking mdds container

Since only elements from nOffset up to nEnd are iterated, then the 
difference
is not just nEnd but (nEnd-nOffset).
Without this, ScColumn::HandleRefArrayForParallelism() skips some cells
and e.g. fdo#77750-1 asserts in ScFormulaCell::MaybeInterpret().

Change-Id: I4d595e9faff51f08bf074d549185c24aa00d8a45
Reviewed-on: https://gerrit.libreoffice.org/55488
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 
Tested-by: Kohei Yoshida 
(cherry picked from commit cbe3ae1894800a5fddbd598403be54f9495cc964)
Reviewed-on: https://gerrit.libreoffice.org/55502
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index ae6813988293..d7c25de498de 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -184,7 +184,7 @@ sc::MatrixEdge ScColumn::GetBlockMatrixEdges( SCROW nRow1, 
SCROW nRow2, sc::Matr
 bOpen = false;  // bottom edge closes
 }
 
-nRow += nEnd;
+nRow += nEnd - nOffset;
 }
 if (bOpen)
 nEdges |= MatrixEdge::Open; // not closed, matrix continues
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 3c856fd161cd..6eb7697d074f 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2841,7 +2841,7 @@ bool ScColumn::HandleRefArrayForParallelism( SCROW nRow1, 
SCROW nRow2 )
 // Loop inside the formula block.
 (*itCell)->MaybeInterpret();
 }
-nRow += nEnd;
+nRow += nEnd - nOffset;
 break;
 }
 default:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits