[Libreoffice-commits] core.git: vcl/inc vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jul 24 20:09:05 UTC 2018
vcl/inc/sallayout.hxx | 2 +-
vcl/source/gdi/CommonSalLayout.cxx | 4 +---
vcl/source/gdi/sallayout.cxx | 8 +++-----
3 files changed, 5 insertions(+), 9 deletions(-)
New commits:
commit 2882c0fd4740e35f03e0a800b8f6b33fb06cf8f2
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 24 15:01:01 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jul 24 22:08:41 2018 +0200
GetCharWidths always returns true
Change-Id: I4a58b203a7c18484c3405f918e77297ac764725d
Reviewed-on: https://gerrit.libreoffice.org/57925
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 8daed9a01d09..b6fc7ed75a5c 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -344,7 +344,7 @@ private:
void Justify(DeviceCoordinate nNewWidth);
void ApplyAsianKerning(const OUString& rStr);
- bool GetCharWidths(DeviceCoordinate* pCharWidths) const;
+ void GetCharWidths(DeviceCoordinate* pCharWidths) const;
void SetNeedFallback(ImplLayoutArgs&, sal_Int32, bool);
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index 647788129d32..3d5d235fb601 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -572,7 +572,7 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs)
return true;
}
-bool GenericSalLayout::GetCharWidths(DeviceCoordinate* pCharWidths) const
+void GenericSalLayout::GetCharWidths(DeviceCoordinate* pCharWidths) const
{
const int nCharCount = mnEndCharPos - mnMinCharPos;
@@ -586,8 +586,6 @@ bool GenericSalLayout::GetCharWidths(DeviceCoordinate* pCharWidths) const
continue;
pCharWidths[nIndex] += aGlyphItem.mnNewWidth;
}
-
- return true;
}
// A note on how Kashida justification is implemented (because it took me 5
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index a738a1d5168b..d921354879fc 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -693,9 +693,8 @@ bool SalLayout::GetBoundRect( SalGraphics& rSalGraphics, tools::Rectangle& rRect
DeviceCoordinate GenericSalLayout::FillDXArray( DeviceCoordinate* pCharWidths ) const
{
- if( pCharWidths )
- if( !GetCharWidths( pCharWidths ) )
- return 0;
+ if (pCharWidths)
+ GetCharWidths(pCharWidths);
return GetTextWidth();
}
@@ -877,8 +876,7 @@ sal_Int32 GenericSalLayout::GetTextBreak( DeviceCoordinate nMaxWidth, DeviceCoor
{
int nCharCapacity = mnEndCharPos - mnMinCharPos;
std::unique_ptr<DeviceCoordinate[]> const pCharWidths(new DeviceCoordinate[nCharCapacity]);
- if (!GetCharWidths(pCharWidths.get()))
- return -1;
+ GetCharWidths(pCharWidths.get());
DeviceCoordinate nWidth = 0;
for( int i = mnMinCharPos; i < mnEndCharPos; ++i )
More information about the Libreoffice-commits
mailing list