summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-07-21 09:04:44 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:56:53 +0200
commitfc980f0198ed1e979b14438939c668afc2d272ad (patch)
tree12249610718c3a5643953ef6b60a294064db6cf2 /writerfilter
parent36506702c2a5cfe6b17811b3a3cba826a0cf728e (diff)
tdf#89702 DOCX import: fix too large bullet character
Commit c1f8437dbed0e8b989e41a345ef7e658a6e8a4cd (fdo#83465 RTF import: handle font of numbering, 2014-09-25), changed the "get the me character style of the current numbering's current level" member function to be successfull even in case we're inside a DOCX run, not when we're inside a DOCX paragraph, but outside runs. While this is necessary for RTF, the side effect of this was that unwanted run properties started to affect the above mentioned character style in case of DOCX. Fix the problem by enabling the "in paragraph and run" looking for RTF only. Change-Id: I610bfce6cec15b918fe547402360f5a894401f7e (cherry picked from commit fc7c1a07d0d5e21a4e1533a0e5b0ac256763f973) Reviewed-on: https://gerrit.libreoffice.org/17323 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 5ff66e97ac26..515d6fe0514c 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5042,12 +5042,16 @@ uno::Reference<beans::XPropertySet> DomainMapper_Impl::GetCurrentNumberingCharSt
uno::Reference<container::XIndexAccess> xLevels = GetCurrentNumberingRules(&nListLevel);
if (!xLevels.is())
{
- // Looking up the paragraph context explicitly (and not just taking
- // the top context) is necessary for RTF, where formatting of a run
- // and of the paragraph mark is not separated.
- PropertyMapPtr pContext = GetTopContextOfType(CONTEXT_PARAGRAPH);
- if (!pContext)
- return xRet;
+ PropertyMapPtr pContext = m_pTopContext;
+ if (IsRTFImport())
+ {
+ // Looking up the paragraph context explicitly (and not just taking
+ // the top context) is necessary for RTF, where formatting of a run
+ // and of the paragraph mark is not separated.
+ pContext = GetTopContextOfType(CONTEXT_PARAGRAPH);
+ if (!pContext)
+ return xRet;
+ }
// In case numbering rules is not found via a style, try the direct formatting instead.
boost::optional<PropertyMap::Property> oProp = pContext->getProperty(PROP_NUMBERING_RULES);