cid#1636582 Negative loop bound

Change-Id: Ib91ee62814837765f89f65a1204021e9d9610e53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178035
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-12-07 12:08:25 +00:00
parent c812bb3fe7
commit 88986086f9
4 changed files with 5 additions and 5 deletions

View file

@ -308,7 +308,7 @@ bool Outliner::IsInUndo() const
return pEditEngine->IsInUndo();
}
sal_uInt32 Outliner::GetLineCount( sal_Int32 nParagraph ) const
sal_Int32 Outliner::GetLineCount( sal_Int32 nParagraph ) const
{
return pEditEngine->GetLineCount( nParagraph );
}

View file

@ -866,7 +866,7 @@ public:
SAL_DLLPRIVATE const Link<Outliner*,void>& GetEndMovingHdl() const {return aEndMovingHdl;}
SAL_DLLPRIVATE void SetEndMovingHdl( const Link<Outliner*,void>& rLink){aEndMovingHdl=rLink;}
sal_uInt32 GetLineCount( sal_Int32 nParagraph ) const;
sal_Int32 GetLineCount( sal_Int32 nParagraph ) const;
sal_Int32 GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const;
sal_uInt32 GetLineHeight( sal_Int32 nParagraph, sal_Int32 nLine = 0 );

View file

@ -921,8 +921,8 @@ namespace {
for (sal_Int32 i = 0; i < nParaCount && !bExit; ++i)
{
sal_Int32 nActualLineLen = 0;
sal_uInt32 nLineCount = pOut->GetLineCount(i);
for (sal_uInt32 j = 0; j < nLineCount; ++j)
sal_Int32 nLineCount = pOut->GetLineCount(i);
for (sal_Int32 j = 0; j < nLineCount; ++j)
{
nActualLineLen += pOut->GetLineLen(i, j);
sal_Int32 nLineHeight = pOut->GetLineHeight(i, j);

View file

@ -1246,7 +1246,7 @@ OUString SdrView::GetStatusText()
// At the end of a line of any multi-line paragraph, we display the
// position of the next line of the same paragraph, if there is one.
sal_uInt16 nParaLine = 0;
sal_uInt32 nParaLineCount = mpTextEditOutliner->GetLineCount(aSel.end.nPara);
sal_Int32 nParaLineCount = mpTextEditOutliner->GetLineCount(aSel.end.nPara);
bool bBrk = false;
while (!bBrk)
{