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

2020-10-22 Thread Noel (via logerrit)
 forms/source/component/imgprod.cxx|   28 
+-
 forms/source/richtext/richtextimplcontrol.cxx |   20 
+++
 forms/source/runtime/formoperations.hxx   |3 -
 formula/source/ui/dlg/formula.cxx |6 +-
 formula/source/ui/dlg/funcutl.cxx |2 
 formula/source/ui/dlg/parawin.cxx |4 -
 fpicker/source/office/fileview.cxx|4 -
 framework/inc/uielement/fontsizemenucontroller.hxx|3 -
 framework/source/accelerators/acceleratorconfiguration.cxx|2 
 framework/source/dispatch/oxt_handler.cxx |3 -
 framework/source/layoutmanager/layoutmanager.cxx  |4 -
 framework/source/layoutmanager/toolbarlayoutmanager.cxx   |2 
 framework/source/uiconfiguration/imagemanagerimpl.cxx |6 +-
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |2 
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |4 -
 framework/source/uielement/fontsizemenucontroller.cxx |6 +-
 framework/source/uielement/spinfieldtoolbarcontroller.cxx |2 
 framework/source/uielement/toolbarmodemenucontroller.cxx  |4 -
 18 files changed, 54 insertions(+), 51 deletions(-)

New commits:
commit 700a833520396604b10c713c478d5138578a60b6
Author: Noel 
AuthorDate: Wed Oct 21 15:27:33 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Oct 22 08:06:43 2020 +0200

long->tools::Long in forms..framework

Change-Id: I4cb29aade5ad1d3c3588b9437197e8493292872e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104625
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/forms/source/component/imgprod.cxx 
b/forms/source/component/imgprod.cxx
index 9bd74f9f4792..3e79596bb07f 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -365,14 +365,14 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& 
rGraphic )
 
 Bitmap  aMask( aBmpEx.GetMask() );
 BitmapReadAccess*   pMskAcc = !!aMask ? aMask.AcquireReadAccess() : 
nullptr;
-const long  nWidth = pBmpAcc->Width();
-const long  nHeight = pBmpAcc->Height();
-const long  nStartX = 0;
-const long  nEndX = nWidth - 1;
-const long  nStartY = 0;
-const long  nEndY = nHeight - 1;
-const long  nPartWidth = nEndX - nStartX + 1;
-const long  nPartHeight = nEndY - nStartY + 1;
+const tools::Long  nWidth = pBmpAcc->Width();
+const tools::Long  nHeight = pBmpAcc->Height();
+const tools::Long  nStartX = 0;
+const tools::Long  nEndX = nWidth - 1;
+const tools::Long  nStartY = 0;
+const tools::Long  nEndY = nHeight - 1;
+const tools::Long  nPartWidth = nEndX - nStartX + 1;
+const tools::Long  nPartHeight = nEndY - nStartY + 1;
 
 if( !pMskAcc )
 {
@@ -393,11 +393,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& 
rGraphic )
 css::uno::Sequence   aData( nPartWidth * nPartHeight );
 sal_Int8*   pTmp = 
aData.getArray();
 
-for( long nY = nStartY; nY <= nEndY; nY++ )
+for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
 {
 Scanline pScanlineMask = pMskAcc->GetScanline( nY );
 Scanline pScanline = pBmpAcc->GetScanline( nY );
-for( long nX = nStartX; nX <= nEndX; nX++ )
+for( tools::Long nX = nStartX; nX <= nEndX; nX++ )
 {
 if( pMskAcc->GetPixelFromData( pScanlineMask, nX ) == 
aWhite )
 *pTmp++ = sal::static_int_cast< sal_Int8 >(
@@ -416,11 +416,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& 
rGraphic )
 css::uno::Sequence  aData( nPartWidth * nPartHeight );
 sal_Int32*  pTmp = 
aData.getArray();
 
-for( long nY = nStartY; nY <= nEndY; nY++ )
+for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
 {
 Scanline pScanlineMask = pMskAcc->GetScanline( nY );
 Scanline pScanline = pBmpAcc->GetScanline( nY );
-for( long nX = nStartX; nX <= nEndX; nX++ )
+for( tools::Long nX = nStartX; nX <= nEndX; nX++ )
 {
 if( pMskAcc->GetPixelFromData( pScanlineMask, nX ) == 
aWhite )
 *pTmp++ = mnTransIndex;
@@ -440,11 +440,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& 
rGraphic )
 const BitmapColor   aWhite( 
pMskAcc->GetBestMatchingColor( COL_WHITE ) );
 sal_Int32*   

[Libreoffice-commits] core.git: forms/source formula/source fpicker/source framework/inc framework/source include/formula

2017-01-17 Thread Noel Grandin
 forms/source/component/GroupManager.cxx   |4 +---
 forms/source/component/GroupManager.hxx   |4 +++-
 forms/source/richtext/richtextunowrapper.cxx  |3 +--
 forms/source/richtext/richtextunowrapper.hxx  |3 ++-
 formula/source/core/api/token.cxx |5 ++---
 formula/source/ui/resource/ModuleHelper.cxx   |8 +++-
 fpicker/source/office/fpsmartcontent.cxx  |5 ++---
 fpicker/source/office/fpsmartcontent.hxx  |3 ++-
 framework/inc/uielement/fontsizemenucontroller.hxx|4 +++-
 framework/inc/xml/imagesconfiguration.hxx |8 
 framework/source/layoutmanager/layoutmanager.cxx  |5 ++---
 framework/source/uiconfiguration/imagemanagerimpl.cxx |2 +-
 framework/source/uielement/fontsizemenucontroller.cxx |8 +++-
 framework/source/xml/imagesdocumenthandler.cxx|4 ++--
 include/formula/token.hxx |   11 ++-
 15 files changed, 37 insertions(+), 40 deletions(-)

New commits:
commit 70fed865df7655a7ee65fa6cde51bbf93182dbbb
Author: Noel Grandin 
Date:   Mon Jan 16 14:13:31 2017 +0200

new loplugin: useuniqueptr: forms..framework

Change-Id: I4300a13f455148b7156ac3f444c7102d63ae6db3
Reviewed-on: https://gerrit.libreoffice.org/33164
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/forms/source/component/GroupManager.cxx 
b/forms/source/component/GroupManager.cxx
index e90de94..615c055 100644
--- a/forms/source/component/GroupManager.cxx
+++ b/forms/source/component/GroupManager.cxx
@@ -205,8 +205,6 @@ OGroupManager::OGroupManager(const Reference< XContainer >& 
_rxContainer)
 
 OGroupManager::~OGroupManager()
 {
-// delete all Components and CompGroup
-delete m_pCompGroup;
 }
 
 // XPropertyChangeListener
@@ -215,7 +213,7 @@ void OGroupManager::disposing(const EventObject& evt) 
throw( RuntimeException, s
 Reference  xContainer(evt.Source, UNO_QUERY);
 if (xContainer.get() == m_xContainer.get())
 {
-DELETEZ(m_pCompGroup);
+m_pCompGroup.reset();
 
 // delete group
 m_aGroupArr.clear();
diff --git a/forms/source/component/GroupManager.hxx 
b/forms/source/component/GroupManager.hxx
index 3ede11f..ec68930 100644
--- a/forms/source/component/GroupManager.hxx
+++ b/forms/source/component/GroupManager.hxx
@@ -31,6 +31,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 using namespace comphelper;
@@ -159,7 +160,8 @@ typedef std::vector OActiveGroups;
 
 class OGroupManager : public ::cppu::WeakImplHelper< 
css::beans::XPropertyChangeListener, css::container::XContainerListener>
 {
-OGroup* m_pCompGroup;   // Sort all Components by 
TabIndices
+std::unique_ptr
+m_pCompGroup;   // Sort all Components by 
TabIndices
 OGroupArr   m_aGroupArr;// Sort all Components by group
 OActiveGroups   m_aActiveGroupMap;  // This map contains all indices 
of all groups with more than 1 element
 
diff --git a/forms/source/richtext/richtextunowrapper.cxx 
b/forms/source/richtext/richtextunowrapper.cxx
index d6ab326..bbc64fd 100644
--- a/forms/source/richtext/richtextunowrapper.cxx
+++ b/forms/source/richtext/richtextunowrapper.cxx
@@ -79,7 +79,6 @@ namespace frm
 
 RichTextEditSource::~RichTextEditSource()
 {
-delete m_pTextForwarder;
 }
 
 
@@ -91,7 +90,7 @@ namespace frm
 
 SvxTextForwarder* RichTextEditSource::GetTextForwarder()
 {
-return m_pTextForwarder;
+return m_pTextForwarder.get();
 }
 
 
diff --git a/forms/source/richtext/richtextunowrapper.hxx 
b/forms/source/richtext/richtextunowrapper.hxx
index 7f2fba8c..3b2ca0c 100644
--- a/forms/source/richtext/richtextunowrapper.hxx
+++ b/forms/source/richtext/richtextunowrapper.hxx
@@ -54,7 +54,8 @@ namespace frm
 {
 private:
 EditEngine& m_rEngine;
-SvxTextForwarder*   m_pTextForwarder;
+std::unique_ptr
+m_pTextForwarder;
 IEngineTextChangeListener*  m_pTextChangeListener;
 
 public:
diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index f910d71..45031ef 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -365,18 +365,17 @@ bool FormulaFAPToken::operator==( const FormulaToken& r ) 
const
 }
 
 
-short*  FormulaJumpToken::GetJump() const   { return pJump; }
+short*  FormulaJumpToken::GetJump() const   { return pJump.get(); }
 boolFormulaJumpToken::IsInForceArray() const{ return 
bIsInForceArray; }
 voidFormulaJumpToken::SetInForceArray( bool b ) { bIsInForceArray = b; 
}
 bool FormulaJumpToken::operator==( const FormulaToken& r ) const
 {
 return