[Libreoffice-commits] core.git: 11 commits - chart2/source cui/source filter/source fpicker/source sc/source stoc/test vcl/qa xmlhelp/source
Thomas Arnhold
thomas at arnhold.org
Sat May 24 06:47:45 PDT 2014
chart2/source/tools/AxisHelper.cxx | 6 ++----
cui/source/tabpages/numfmt.cxx | 8 +++-----
cui/source/tabpages/page.cxx | 8 ++------
filter/source/graphicfilter/ipbm/ipbm.cxx | 1 -
filter/source/msfilter/msdffimp.cxx | 12 ++++--------
fpicker/source/office/iodlg.cxx | 4 +---
sc/source/ui/pagedlg/areasdlg.cxx | 3 +--
sc/source/ui/view/gridwin.cxx | 3 +--
stoc/test/javavm/jvm_interaction/interactionhandler.cxx | 3 +--
vcl/qa/cppunit/app/test_IconThemeScanner.cxx | 3 +--
xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx | 3 +--
11 files changed, 17 insertions(+), 37 deletions(-)
New commits:
commit bfda48e498b9c25bdc1f34df9dd23f50e0ea0bf7
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat May 24 15:18:36 2014 +0200
cppcheck: redundantAssignment
Change-Id: I2e49ab5de06568544e0bd15fdf55fd0c2c37509a
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 60c0034..cbe92b5 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1195,9 +1195,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
if ( INET_PROT_FILE == aFileObj.GetProtocol( ) )
{
- bool bExists = false;
- bExists = pThis->m_aContent.is( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) );
-
+ bool bExists = pThis->m_aContent.is( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( !bExists )
{
commit 75648d6e9723987cab672dca89cf0e5e6cb8e9e9
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat May 24 15:16:38 2014 +0200
cppcheck: redundantAssignment
Change-Id: Icf71dc6735b9b60f6fea4dc8c78877bb652fbe95
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 6157fbb..df0baa4 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -88,11 +88,9 @@ void AxisHelper::removeExplicitScaling( ScaleData& rScaleData )
bool AxisHelper::isLogarithmic( const Reference< XScaling >& xScaling )
{
- bool bReturn = false;
Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY );
- bReturn =( xServiceName.is() && (xServiceName->getServiceName()).equals(
- "com.sun.star.chart2.LogarithmicScaling"));
- return bReturn;
+ return xServiceName.is() && (xServiceName->getServiceName()).equals(
+ "com.sun.star.chart2.LogarithmicScaling");
}
chart2::ScaleData AxisHelper::getDateCheckedScale( const Reference< chart2::XAxis >& xAxis, ChartModel& rModel )
commit 347c4f4355624bd820091d125c035dd7a501d018
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat May 24 15:14:06 2014 +0200
cppcheck: redundantAssignment
Change-Id: I433a4b39f6e0d2db135b998b4b4f1e9621e30659
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 57ad500..e9b4809 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -461,7 +461,6 @@ bool PBMReader::ImplReadBody()
mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( static_cast< sal_uInt8 >( ( nRGB[ 0 ] * 255 ) / mnMaxVal ),
static_cast< sal_uInt8 >( ( nRGB[ 1 ] * 255 ) / mnMaxVal ),
static_cast< sal_uInt8 >( ( nRGB[ 2 ] * 255 ) / mnMaxVal ) ) );
- nCount = 0;
nRGB[ 0 ] = nRGB[ 1 ] = nRGB[ 2 ] = 0;
if ( nWidth == mnWidth )
{
commit d5cbe627426cd28f48cdab9cdab5a33baeed4ed1
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat May 24 15:12:13 2014 +0200
cppcheck: redundantAssignment
Change-Id: I657ae67890a7266aa2655c366665ead61a744da6
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index dc72ec7..bb25efe 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4168,14 +4168,12 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aObjData.aChildAnchor = Rectangle( l, o, r, u );
if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() )
{
- double fl = l;
- double fo = o;
double fWidth = r - l;
double fHeight= u - o;
double fXScale = (double)rClientRect.GetWidth() / (double)rGlobalChildRect.GetWidth();
double fYScale = (double)rClientRect.GetHeight() / (double)rGlobalChildRect.GetHeight();
- fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left();
- fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
+ double fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left();
+ double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
fWidth *= fXScale;
fHeight *= fYScale;
aObjData.aChildAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) );
@@ -4857,14 +4855,12 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt
{
if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() )
{
- double fl = l;
- double fo = o;
double fWidth = r - l;
double fHeight= u - o;
double fXScale = (double)rClientRect.GetWidth() / (double)rGlobalChildRect.GetWidth();
double fYScale = (double)rClientRect.GetHeight() / (double)rGlobalChildRect.GetHeight();
- fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left();
- fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
+ double fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left();
+ double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
fWidth *= fXScale;
fHeight *= fYScale;
rGroupClientAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) );
commit f9b5115200123214a6922eb082f838ffe4d900be
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat May 24 15:10:32 2014 +0200
cppcheck: redundantAssignment
Change-Id: I1601d5b5dd2ba4ab2c3a0c9d70f337e98e4fe5c3
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 76a7743..ddc08da 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1173,13 +1173,11 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb )
if (pLb == m_pLbFormat)
{
sal_uLong nSelPos = m_pLbFormat->GetSelectEntryPos();
- OUString aFormat = m_pLbFormat->GetSelectEntry();
- OUString aComment;
-
short nFmtLbSelPos = static_cast<short>(nSelPos);
- aFormat=pNumFmtShell->GetFormat4Entry(nFmtLbSelPos);
- aComment=pNumFmtShell->GetComment4Entry(nFmtLbSelPos);
+ OUString aFormat = pNumFmtShell->GetFormat4Entry(nFmtLbSelPos);
+ OUString aComment = pNumFmtShell->GetComment4Entry(nFmtLbSelPos);
+
if(pNumFmtShell->GetUserDefined4Entry(nFmtLbSelPos))
{
if(aComment.isEmpty())
commit 3930127dfbf2a11830b5d35c1d88a7ecfe9f56d2
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat May 24 15:02:49 2014 +0200
cppcheck: redundantAssignment
Change-Id: I6fcece7f7a77060bfa3cd3d40db3fa4f253cf261
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index b362ee2..685525d 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -107,9 +107,8 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
vector< OUString > currentQuery;
OUString tmp(query.copy( 0,idx ));
- rtl:: OUString toliterate = tmp;
Sequence<sal_Int32> aSeq;
- toliterate = xTrans->transliterate(
+ OUString toliterate = xTrans->transliterate(
tmp,0,tmp.getLength(),aSeq);
currentQuery.push_back( toliterate );
commit ec1c2c566de1bede1ade93e1323def687209259a
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri May 23 17:29:52 2014 +0200
cppcheck: redundantAssignment
Change-Id: Ia53ac439c785e83de380fddd201ad4159f729cb2
diff --git a/vcl/qa/cppunit/app/test_IconThemeScanner.cxx b/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
index 63c5987..857f655 100644
--- a/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
@@ -48,8 +48,7 @@ IconThemeScannerTest::AddedThemeIsFoundById()
OUString theme("file:://images_katze.zip");
scanner.AddIconThemeByPath(theme);
OUString id = vcl::IconThemeInfo::FileNameToThemeId("images_katze.zip");
- bool found = false;
- found = scanner.IconThemeIsInstalled(id);
+ bool found = scanner.IconThemeIsInstalled(id);
CPPUNIT_ASSERT_EQUAL_MESSAGE("icon theme could be added by url", true, found);
}
commit f327480933f66e4e8ed64480ad178db98e7c8fb4
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri May 23 17:28:42 2014 +0200
cppcheck: redundantAssignment
Change-Id: I0eb832395f6a13ce1f372b6b67a1c178bc0dfa1a
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 9622108..1051d02 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1466,9 +1466,6 @@ IMPL_LINK_NOARG(SvxPageDescPage, RangeHdl_Impl)
(const SvxBoxItem&)_pSet->Get(GetWhich(SID_ATTR_BORDER_OUTER))));
}
- long nH = static_cast<long>(m_pPaperHeightEdit->Denormalize(m_pPaperHeightEdit->GetValue(FUNIT_TWIP)));
- long nW = static_cast<long>(m_pPaperWidthEdit->Denormalize(m_pPaperWidthEdit->GetValue(FUNIT_TWIP)));
-
// limits paper
// maximum is 54 cm
@@ -1479,9 +1476,8 @@ IMPL_LINK_NOARG(SvxPageDescPage, RangeHdl_Impl)
nMin = MINBODY + nBL + nBR + aBorder.Width();
m_pPaperWidthEdit->SetMin(m_pPaperWidthEdit->Normalize(nMin), FUNIT_TWIP);
- // if the paper size has been changed
- nH = static_cast<long>(m_pPaperHeightEdit->Denormalize(m_pPaperHeightEdit->GetValue(FUNIT_TWIP)));
- nW = static_cast<long>(m_pPaperWidthEdit->Denormalize(m_pPaperWidthEdit->GetValue(FUNIT_TWIP)));
+ long nH = static_cast<long>(m_pPaperHeightEdit->Denormalize(m_pPaperHeightEdit->GetValue(FUNIT_TWIP)));
+ long nW = static_cast<long>(m_pPaperWidthEdit->Denormalize(m_pPaperWidthEdit->GetValue(FUNIT_TWIP)));
// Top
long nMax = nH - nBB - aBorder.Height() - MINBODY -
commit 78608fc9325833e599d8a8c0e65ee1f2c3c69538
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri May 23 17:24:41 2014 +0200
cppcheck: redundantAssignment
Change-Id: I4c4be0b7eb8957e454ec5fc494cf5f6e29d1dbeb
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 4c408bd..d3d655f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5348,10 +5348,9 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
EditView aTempView(pEngine.get(), this);
aTempView.SetOutputArea( aLogicEdit );
- bool bRet = false;
MapMode aOld = GetMapMode();
SetMapMode(aEditMode); // kein return mehr
- bRet = extractURLInfo(aTempView.GetFieldUnderMousePointer(), pName, pUrl, pTarget);
+ bool bRet = extractURLInfo(aTempView.GetFieldUnderMousePointer(), pName, pUrl, pTarget);
SetMapMode(aOld);
return bRet;
commit 53fb95bf89dbfb0c54379fabbe1a98a542846ba8
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri May 23 17:16:21 2014 +0200
cppcheck: redundantAssignment
Change-Id: Ia073fff962e53b10a6c65c4898ba2883fa78dbbc
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 3a12f29..cde8be6 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -475,7 +475,6 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
{
if ( Impl_CheckRefStrings() )
{
- bool bDataChanged = false;
OUString aStr;
SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, aStr );
SfxStringItem aRepeatRow( FN_PARAM_2, aStr );
@@ -489,7 +488,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
bool bEntireSheet = (pLbPrintArea->GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
SfxBoolItem aEntireSheet( FN_PARAM_4, bEntireSheet );
- bDataChanged = bEntireSheet != pDoc->IsPrintEntireSheet( nCurTab );
+ bool bDataChanged = bEntireSheet != pDoc->IsPrintEntireSheet( nCurTab );
if( !bEntireSheet )
{
// if new list box selection is not "Entire sheet", get the edit field contents
commit 6da59e247a3b22853e479d059d7b4cc28d456f83
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri May 23 17:15:50 2014 +0200
cppcheck: redundantAssignment
Change-Id: Ic4a2738aeba8e0446ea2428d5adab3dd11f72928
diff --git a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
index b08349a..8bcc57b 100644
--- a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
+++ b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
@@ -178,8 +178,7 @@ SAL_IMPLEMENT_MAIN()
Reference<XMultiComponentFactory> fac= context->getServiceManager();
Reference<XMultiServiceFactory> xMgr( fac, UNO_QUERY);
- sal_Bool bSucc = sal_False;
- bSucc= test1(xMgr);
+ sal_Bool bSucc = test1(xMgr);
Reference< XComponent > xCompContext( context, UNO_QUERY );
xCompContext->dispose();
return (bSucc ? 0 : -1);
More information about the Libreoffice-commits
mailing list