[Libreoffice-commits] core.git: 10 commits - sfx2/source svl/source
Stephan Bergmann
sbergman at redhat.com
Wed Oct 7 07:36:03 PDT 2015
sfx2/source/appl/appopen.cxx | 2 --
sfx2/source/dialog/taskpane.cxx | 2 +-
sfx2/source/doc/doctempl.cxx | 10 +++-------
sfx2/source/doc/objstor.cxx | 4 +---
sfx2/source/view/viewprn.cxx | 1 -
svl/source/items/itemset.cxx | 12 +++---------
svl/source/numbers/zforscan.cxx | 2 --
svl/source/passwordcontainer/passwordcontainer.cxx | 2 +-
8 files changed, 9 insertions(+), 26 deletions(-)
New commits:
commit afc0b792b35f40dc1210eb63649c9b88b4496869
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:18:36 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I0c0475ea6a38ecfd72772d287b8217a0754238d6
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index a6e8a83..8aa6c2a 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -465,7 +465,7 @@ vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, co
::rtl::ByteSequence resSeq( aSeq.getLength() );
- result = rtl_cipher_decode ( aDecoder, aSeq.getArray(), aSeq.getLength(),
+ rtl_cipher_decode ( aDecoder, aSeq.getArray(), aSeq.getLength(),
reinterpret_cast<sal_uInt8*>(resSeq.getArray()), resSeq.getLength() );
OUString aPasswd( reinterpret_cast<char*>(resSeq.getArray()), resSeq.getLength(), RTL_TEXTENCODING_UTF8 );
commit 1526d788f58c7a6a1d0a58991c54b5080bfd70e4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:17:19 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I3659c9d7b0b88a59c60aaedc5305b354bb977768
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index cdbbb4ee..8950060 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1882,7 +1882,6 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
{
if ( bFirst )
{
- bFirst = false;
rStr = rSepF;
nTypeArray[i] = NF_SYMBOLTYPE_THSEP;
}
commit 8c03c10eee4ee026d8d4c688dae5cc74d5015095
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:17:13 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I95e230d3a16f742cf996beb3a93b2c0906cdd72a
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 2fd6aaa..cdbbb4ee 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -673,7 +673,6 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
{
sSymbol = rStr.copy( --nPos, sCurString.getLength() );
nPos = nPos + sSymbol.getLength();
- eState = SsStop;
eType = NF_SYMBOLTYPE_STRING;
return eType;
}
commit 91d2b58e759eadf7cbc360da829a3ffc8e1e7d2f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:15:27 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: If0d69a8d3bfaef732e436fad6a91851095fdb3be
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 2b6be17..d9363c1 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -941,7 +941,6 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
}
// Test whether the Which Ranges are different
- bool bEqual = true;
sal_uInt16* pWh1 = m_pWhichRanges;
sal_uInt16* pWh2 = rSet.m_pWhichRanges;
sal_uInt16 nSize = 0;
@@ -950,13 +949,12 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
{
if( *pWh1 != *pWh2 )
{
- bEqual = false;
break;
}
if( n & 1 )
nSize += ( *(pWh1) - *(pWh1-1) ) + 1;
}
- bEqual = *pWh1 == *pWh2; // Also check for 0
+ bool bEqual = *pWh1 == *pWh2; // Also check for 0
// If the Ranges are identical, we can easily process it
if( bEqual )
@@ -1009,7 +1007,6 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
return;
// Test whether the Which Ranges are different
- bool bEqual = true;
sal_uInt16* pWh1 = m_pWhichRanges;
sal_uInt16* pWh2 = rSet.m_pWhichRanges;
sal_uInt16 nSize = 0;
@@ -1018,13 +1015,12 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
{
if( *pWh1 != *pWh2 )
{
- bEqual = false;
break;
}
if( n & 1 )
nSize += ( *(pWh1) - *(pWh1-1) ) + 1;
}
- bEqual = *pWh1 == *pWh2; // Also test for 0
+ bool bEqual = *pWh1 == *pWh2; // Also test for 0
// If the Ranges are identical, we can easily process it
if( bEqual )
@@ -1221,7 +1217,6 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults )
assert( GetPool() == rSet.GetPool() && "MergeValues with different Pools" );
// Test if the which Ranges are different
- bool bEqual = true;
sal_uInt16* pWh1 = m_pWhichRanges;
sal_uInt16* pWh2 = rSet.m_pWhichRanges;
sal_uInt16 nSize = 0;
@@ -1230,13 +1225,12 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults )
{
if( *pWh1 != *pWh2 )
{
- bEqual = false;
break;
}
if( n & 1 )
nSize += ( *(pWh1) - *(pWh1-1) ) + 1;
}
- bEqual = *pWh1 == *pWh2; // Also check for 0
+ bool bEqual = *pWh1 == *pWh2; // Also check for 0
// If the Ranges match, they are easier to process!
if( bEqual )
commit bb36996c6eef24cc84cdf134957201e3a19d5c5a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:13:53 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I539f08ed94326d27c9ae8808d006c31d8403cd18
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index b932212..6a81669 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -815,7 +815,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
// PrinterDialog needs a temporary printer
VclPtr<SfxPrinter> pDlgPrinter = pPrinter->Clone();
- nDialogRet = 0;
// execute PrinterSetupDialog
VclPtrInstance<PrinterSetupDialog> pPrintSetupDlg( GetWindow() );
commit 10f5f6d480156bc528e774e8a934ffae88cc4da1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:12:26 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: Iaa340068ed1361e6bc0160ae9c44873c06085abf
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 7727ffc..5070994 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3328,7 +3328,7 @@ bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::XSto
}
uno::Reference< beans::XPropertySet > xProps( xSubStorage, uno::UNO_QUERY_THROW );
- bGotMediaType = ( xProps->getPropertyValue( aMediaTypePropName ) >>= aMediaType );
+ xProps->getPropertyValue( aMediaTypePropName ) >>= aMediaType;
}
// TODO/LATER: there should be a way to detect whether an object with such a MediaType can exist
commit 7f68a5b0f8ddcd7dd0afebb334f16f2d5b487bae
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:12:19 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: Iaacaa3767398cea4c7850c3a8d186cf3754c4736
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 9946b0a..7727ffc 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2848,8 +2848,6 @@ bool SfxObjectShell::PreDoSaveAs_Impl
bool bOk = false;
if ( !pNewFile->GetErrorCode() && SaveTo_Impl( *pNewFile, NULL ) )
{
- bOk = true;
-
// transfer a possible error from the medium to the document
SetError( pNewFile->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
commit 221c65af74d2008df9e7c1a5bb89e47caf27b6a1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:10:01 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I08c015da8f93b2c32c8c467ee633b4cd5a71a550
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index ade4fa4..a62ca78 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -1413,20 +1413,16 @@ void RegionData_Impl::AddEntry( const OUString& rTitle,
INetURLObject::ENCODE_ALL );
OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE );
- DocTempl_EntryData_Impl* pEntry;
bool bFound = false;
size_t nPos = GetEntryPos( rTitle, bFound );
- if ( bFound )
- {
- pEntry = maEntries[ nPos ];
- }
- else
+ if ( !bFound )
{
if ( pPos )
nPos = *pPos;
- pEntry = new DocTempl_EntryData_Impl( this, rTitle );
+ DocTempl_EntryData_Impl* pEntry = new DocTempl_EntryData_Impl(
+ this, rTitle );
pEntry->SetTargetURL( rTargetURL );
pEntry->SetHierarchyURL( aLinkURL );
if ( nPos < maEntries.size() ) {
commit 630f0a7f26e6440884dfbb24f186fe7b80d63132
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:08:11 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I30263e362a30f9b625d4e87f82c2ad2c403a1882
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 9358be4..df6b1a3 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -607,7 +607,7 @@ namespace sfx2
::svt::PToolPanel pCustomPanel( new CustomToolPanel( aResourceNode, m_xFrame ) );
size_t nPanelPos = m_aPanelDeck->GetPanelCount();
- nPanelPos = m_aPanelDeck->InsertPanel( pCustomPanel, nPanelPos );
+ m_aPanelDeck->InsertPanel( pCustomPanel, nPanelPos );
if ( ::comphelper::getBOOL( aResourceNode.getNodeValue( "Visible" ) ) )
sFirstVisiblePanelResource = *resource;
commit cecb901f6eea82cca2ecc7a8a66d0645ff1e9a7f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 7 16:08:08 2015 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I325b4c71507ca64a42d773cd4c66f936dfe09743
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 55b35b6..75bcfc4 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -739,7 +739,6 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
// SID_OPENURL does the same as SID_OPENDOC!
rReq.SetSlot( SID_OPENDOC );
- nSID = SID_OPENDOC;
}
else if ( nSID == SID_OPENTEMPLATE )
{
@@ -755,7 +754,6 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
else if ( nSID == SID_OPENHYPERLINK )
{
rReq.SetSlot( SID_OPENDOC );
- nSID = SID_OPENDOC;
bHyperlinkUsed = true;
}
More information about the Libreoffice-commits
mailing list