diff options
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index a46d44d1e51f..2dc4d5cdee9c 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1094,6 +1094,9 @@ rtl::Reference<XFFrame> LwpDrawTextBox::CreateDrawObj(const OUString& rStyleName aEncoding = LwpCharSetMgr::GetTextCharEncoding(); } + if (TextLength < 2) + throw BadRead(); + XFParagraph* pXFPara = new XFParagraph(); pXFPara->Add(OUString(reinterpret_cast<char*>(m_aTextRec.pTextString), (TextLength-2), aEncoding)); pXFPara->SetStyleName(rStyleName); @@ -1107,13 +1110,6 @@ rtl::Reference<XFFrame> LwpDrawTextBox::CreateDrawObj(const OUString& rStyleName OUString sName = pXFStyleManager->AddStyle(std::move(pBoxStyle)).m_pStyle->GetStyleName(); xTextBox->SetStyleName(sName); - //todo: add the interface for rotating textbox -// if (m_aTextRec.nTextRotation) -// { -// double fAngle = double(3600-m_aTextRec.nTextRotation)/10; -// xTextBox->SetRotate(fAngle); -// } - return xTextBox; } |