loplugin:buriedassign in sfx2..sot
Change-Id: I917752edb50020f9acb203038ce65f1ea25afa64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -476,15 +476,16 @@ void LinkManager::InsertFileLink(
|
||||
// (for now this is only of interest for the file links!)
|
||||
void LinkManager::CancelTransfers()
|
||||
{
|
||||
SvFileObject* pFileObj;
|
||||
|
||||
const sfx2::SvBaseLinks& rLnks = GetLinks();
|
||||
for( size_t n = rLnks.size(); n; )
|
||||
{
|
||||
const sfx2::SvBaseLink& rLnk = *rLnks[--n];
|
||||
if (isClientFileType(rLnk.GetObjType())
|
||||
&& nullptr != (pFileObj = static_cast<SvFileObject*>(rLnk.GetObj())))
|
||||
pFileObj->CancelTransfers();
|
||||
if (isClientFileType(rLnk.GetObjType()))
|
||||
{
|
||||
if (SvFileObject* pFileObj = static_cast<SvFileObject*>(rLnk.GetObj()))
|
||||
pFileObj->CancelTransfers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -138,7 +138,8 @@ ErrCode SvxOpenGraphicDialog::Execute()
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (nImpRet=rFilter.CanImportGraphic( aObj, nFormatNum, &nRetFormat )) != ERRCODE_NONE )
|
||||
nImpRet = rFilter.CanImportGraphic( aObj, nFormatNum, &nRetFormat );
|
||||
if( nImpRet != ERRCODE_NONE )
|
||||
nImpRet = rFilter.CanImportGraphic( aObj, GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
|
||||
}
|
||||
|
||||
|
@@ -498,8 +498,8 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
|
||||
xPrepareDispatch.set( xDispatchProvider->queryDispatch( aPrepareURL, OUString(), 0 ));
|
||||
if ( xPrepareDispatch.is() )
|
||||
{
|
||||
PrepareListener_Impl* pPrepareListener;
|
||||
uno::Reference< css::frame::XStatusListener > xStatusListener = pPrepareListener = new PrepareListener_Impl;
|
||||
PrepareListener_Impl* pPrepareListener = new PrepareListener_Impl;
|
||||
uno::Reference< css::frame::XStatusListener > xStatusListener = pPrepareListener;
|
||||
xPrepareDispatch->addStatusListener( xStatusListener, aPrepareURL );
|
||||
bNeedsPreparation = pPrepareListener->IsSet();
|
||||
xPrepareDispatch->removeStatusListener( xStatusListener, aPrepareURL );
|
||||
|
@@ -129,7 +129,8 @@ void
|
||||
error(ERROR, "Unidentifiable control line");
|
||||
return; /* else empty line */
|
||||
}
|
||||
if ((np = lookup(tp, 0)) == NULL || ((np->flag & ISKW) == 0 && !skipping))
|
||||
np = lookup(tp, 0);
|
||||
if (np == NULL || ((np->flag & ISKW) == 0 && !skipping))
|
||||
{
|
||||
error(WARNING, "Unknown preprocessor control %t", tp);
|
||||
return;
|
||||
|
@@ -633,12 +633,14 @@ struct value
|
||||
break;
|
||||
|
||||
case NAME1:
|
||||
if ((np = lookup(tp, 0)) != NULL && np->flag & (ISDEFINED | ISMAC))
|
||||
np = lookup(tp, 0);
|
||||
if (np != NULL && np->flag & (ISDEFINED | ISMAC))
|
||||
v.val = 1;
|
||||
break;
|
||||
|
||||
case NAME2:
|
||||
if ((np = lookup(tp, 0)) != NULL && np->flag & (ISARCHITECTURE))
|
||||
np = lookup(tp, 0);
|
||||
if (np != NULL && np->flag & (ISARCHITECTURE))
|
||||
v.val = 1;
|
||||
break;
|
||||
|
||||
@@ -700,16 +702,19 @@ struct value
|
||||
if (*p == '\\')
|
||||
{
|
||||
p += 1;
|
||||
if ((i = digit(*p)) >= 0 && i <= 7)
|
||||
i = digit(*p);
|
||||
if (i >= 0 && i <= 7)
|
||||
{
|
||||
n = i;
|
||||
p += 1;
|
||||
if ((i = digit(*p)) >= 0 && i <= 7)
|
||||
i = digit(*p);
|
||||
if (i >= 0 && i <= 7)
|
||||
{
|
||||
p += 1;
|
||||
n <<= 3;
|
||||
n += i;
|
||||
if ((i = digit(*p)) >= 0 && i <= 7)
|
||||
i = digit(*p);
|
||||
if (i >= 0 && i <= 7)
|
||||
{
|
||||
p += 1;
|
||||
n <<= 3;
|
||||
@@ -721,7 +726,8 @@ struct value
|
||||
if (*p == 'x')
|
||||
{
|
||||
p += 1;
|
||||
while ((i = digit(*p)) >= 0 && i <= 15)
|
||||
i = digit(*p);
|
||||
while (i >= 0 && i <= 15)
|
||||
{
|
||||
p += 1;
|
||||
n <<= 4;
|
||||
|
@@ -624,10 +624,14 @@ int
|
||||
int
|
||||
fillbuf(Source * s)
|
||||
{
|
||||
int n;
|
||||
int n = 0;
|
||||
|
||||
if (s->fd < 0 || (n = read(s->fd, (char *) s->inl, INS / 8)) <= 0)
|
||||
n = 0;
|
||||
if (s->fd >= 0)
|
||||
{
|
||||
n = read(s->fd, (char *) s->inl, INS / 8);
|
||||
if (n <= 0)
|
||||
n = 0;
|
||||
}
|
||||
s->inl += n;
|
||||
s->inl[0] = s->inl[1] = s->inl[2] = s->inl[3] = EOB;
|
||||
if (n == 0)
|
||||
|
@@ -99,7 +99,11 @@ void
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
for (n = 0; (c = optarg[n]) != '\0'; n++)
|
||||
for (n = 0;; n++)
|
||||
{
|
||||
c = optarg[n];
|
||||
if (c == '\0')
|
||||
break;
|
||||
switch (c)
|
||||
{
|
||||
case 'i':
|
||||
@@ -125,10 +129,15 @@ void
|
||||
default:
|
||||
error(WARNING, "Unknown verbose option %c", c);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
for (n = 0; (c = optarg[n]) != '\0'; n++)
|
||||
for (n = 0;; n++)
|
||||
{
|
||||
c = optarg[n];
|
||||
if (c == '\0')
|
||||
break;
|
||||
switch (c)
|
||||
{
|
||||
case 'a':
|
||||
@@ -167,6 +176,7 @@ void
|
||||
default:
|
||||
error(WARNING, "Unknown extension option %c", c);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case '+':
|
||||
|
@@ -211,7 +211,10 @@ sal_uLong StorageStream::Write( const void* pData, sal_uLong nSize )
|
||||
sal_uInt64 StorageStream::Seek( sal_uInt64 n )
|
||||
{
|
||||
if( Validate() )
|
||||
return nPos = pEntry->Seek( n );
|
||||
{
|
||||
nPos = pEntry->Seek( n );
|
||||
return nPos;
|
||||
}
|
||||
else
|
||||
return n;
|
||||
}
|
||||
|
@@ -423,7 +423,8 @@ sal_Int32 StgDirEntry::Seek( sal_Int32 nNew )
|
||||
nNew = m_pStgStrm->GetPos();
|
||||
}
|
||||
|
||||
return m_nPos = nNew;
|
||||
m_nPos = nNew;
|
||||
return m_nPos;
|
||||
}
|
||||
|
||||
// Read
|
||||
|
Reference in New Issue
Block a user