[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source
Caolán McNamara
caolanm at redhat.com
Thu Jan 4 13:37:20 UTC 2018
sw/source/filter/ww8/ww8par2.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2b8d6961b9539353b1b70a35460d8690ea10821d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 3 15:59:42 2018 +0000
ofz#4921 limit column check to max legal column index
Reviewed-on: https://gerrit.libreoffice.org/47336
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit da866f69a19c0afac0dd202d854b0030d02deb3d)
Change-Id: I8ddc08aa951dfe9d5c5dd36c47a63c86a834588c
Reviewed-on: https://gerrit.libreoffice.org/47352
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 225f124bbfb7..a1239d2f8e4f 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2977,7 +2977,7 @@ bool WW8TabDesc::InFirstParaInCell() const
void WW8TabDesc::StartMiserableHackForUnsupportedDirection(short nWwCol)
{
OSL_ENSURE(m_pActBand, "Impossible");
- if (m_pActBand && m_pActBand->maDirections[nWwCol] == 3)
+ if (m_pActBand && nWwCol <= MAX_COL && m_pActBand->maDirections[nWwCol] == 3)
{
m_pIo->m_pCtrlStck->NewAttr(*m_pIo->m_pPaM->GetPoint(),
SvxCharRotateItem(900, false, RES_CHRATR_ROTATE));
@@ -2987,7 +2987,7 @@ void WW8TabDesc::StartMiserableHackForUnsupportedDirection(short nWwCol)
void WW8TabDesc::EndMiserableHackForUnsupportedDirection(short nWwCol)
{
OSL_ENSURE(m_pActBand, "Impossible");
- if (m_pActBand && m_pActBand->maDirections[nWwCol] == 3)
+ if (m_pActBand && nWwCol <= MAX_COL && m_pActBand->maDirections[nWwCol] == 3)
m_pIo->m_pCtrlStck->SetAttr(*m_pIo->m_pPaM->GetPoint(), RES_CHRATR_ROTATE);
}
More information about the Libreoffice-commits
mailing list