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