diff options
author | Bisal Nayal <bisal.nayal@synerzip.com> | 2014-07-11 16:27:34 +0530 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-07-21 15:03:25 +0000 |
commit | 245df9b4b37e3b1a6863aec5802346999bd71477 (patch) | |
tree | 13f82da9dfc4b45b49fbda06e3215096de70ce9a /oox | |
parent | 8ed122f34275f4b4afd1a84d3b5254e4a814ba43 (diff) |
fdo#78663 : The File gets corrupted when saved in LO
Problem Description:
The docx file contains a word art inside a drawing tool.
After RT, nesting of <txbxContent> tag is happening which
is causing the corruption.
Solution: Created a service in util.cxx for checking
few shapetypes for which textbox with content is not
allowed. This check also helps to find that if we are
already inside a DML then we should purely read VML
Information.An existing UT testWordArtWithinDraingtool
was failing. The UT is related to same issue
(word art inside drawing tool) hence changed it
accordingly. Following is the commit id of the
UT-Change-Id: I00e94712e912ad1977fcb65a945fefb927795d77
Change-Id: I7e456c9f6a69af80da443e29eb02a64ba7d59468
Reviewed-on: https://gerrit.libreoffice.org/10229
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/vmlexport.cxx | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 039514d03c1e..a0a1ac7677db 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -31,6 +31,7 @@ #include <svx/svdotext.hxx> #include <vcl/cvtgrf.hxx> #include <filter/msfilter/msdffimp.hxx> +#include <filter/msfilter/util.hxx> #include <filter/msfilter/escherex.hxx> #include <com/sun/star/drawing/XShape.hpp> @@ -970,18 +971,6 @@ bool lcl_isTextBox(const SdrObject* pSdrObject) return false; } -bool lcl_hasTextBoxContent(sal_uInt32 nShapeType) -{ - switch (nShapeType) - { - case ESCHER_ShpInst_TextPlainText: - case ESCHER_ShpInst_TextSlantUp: - return false; - default: - return true; - } -} - OUString lcl_getAnchorIdFromGrabBag(const SdrObject* pSdrObject) { OUString aResult; @@ -1137,7 +1126,7 @@ sal_Int32 VMLExport::StartShape() // now check if we have some editeng text (not associated textbox) and we have a text exporter registered const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, m_pSdrObject); - if (pTxtObj && m_pTextExport && lcl_hasTextBoxContent(m_nShapeType) && !IsWaterMarkShape(m_pSdrObject->GetName()) && !lcl_isTextBox(m_pSdrObject)) + if (pTxtObj && m_pTextExport && msfilter::util::HasTextBoxContent(m_nShapeType) && !IsWaterMarkShape(m_pSdrObject->GetName()) && !lcl_isTextBox(m_pSdrObject)) { const OutlinerParaObject* pParaObj = 0; bool bOwnParaObj = false; |