[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 3 19:27:11 UTC 2018
sw/source/filter/ww8/ww8par2.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit da866f69a19c0afac0dd202d854b0030d02deb3d
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
Change-Id: I8ddc08aa951dfe9d5c5dd36c47a63c86a834588c
Reviewed-on: https://gerrit.libreoffice.org/47336
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 a517dffe03ea..54498ea7cc04 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2970,7 +2970,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_xCtrlStck->NewAttr(*m_pIo->m_pPaM->GetPoint(),
SvxCharRotateItem(900, false, RES_CHRATR_ROTATE));
@@ -2980,7 +2980,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_xCtrlStck->SetAttr(*m_pIo->m_pPaM->GetPoint(), RES_CHRATR_ROTATE);
}
More information about the Libreoffice-commits
mailing list