[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 3 19:24:44 UTC 2018
sw/source/filter/ww8/ww8par2.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit b21c8faf6f54451d1f8cd08bca0359d62440bc3d
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/47328
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 0e70d550f67f..ef14cddc3787 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