summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorAdam Co <rattles2013@gmail.com>2013-04-28 18:41:20 +0300
committerTor Lillqvist <tml@iki.fi>2013-04-29 10:28:19 +0000
commitbecb244b4974609b0570e8db27d74e7e1179181c (patch)
tree187d4628ecc7a236d3b80e3d92750abd43e218ac /writerfilter
parentb191f53860eebf12de6b7cf0a7ddea21a17382e8 (diff)
Fixing Indentation RTL bug
Change-Id: Ie8c3d30cb28afb97d4ded4ac67241ed18ab9e50c Reviewed-on: https://gerrit.libreoffice.org/3651 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 81ac2717b4a8..33ab0e5914ca 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -52,6 +52,8 @@ static const sal_uInt8 cFieldStart = 0x13;
static const sal_uInt8 cFieldSep = 0x14;
static const sal_uInt8 cFieldEnd = 0x15;
+static const sal_uInt16 paragraphProperties_sprmPFBiDi = 0x2441;
+
namespace writerfilter {
namespace ooxml
{
@@ -1596,7 +1598,19 @@ void OOXMLFastContextHandlerValue::setDefaultBooleanValue()
if (mpValue.get() == NULL)
{
- OOXMLValue::Pointer_t pValue(new OOXMLBooleanValue(true));
+ // Value should not always be 'true'
+ //OOXMLValue::Pointer_t pValue(new OOXMLBooleanValue(true));
+ bool bSet = true;
+
+ // Paragraph properties are not always 'true' by default
+ // For example - RTL layout of paragraph is by default 'false' (look in this link for 'sprmPFBiDi')
+ // http://msdn.microsoft.com/en-us/library/dd923496%28v=office.12%29.aspx
+ if (getId() == paragraphProperties_sprmPFBiDi)
+ {
+ bSet = false;
+ }
+
+ OOXMLValue::Pointer_t pValue(new OOXMLBooleanValue(bSet));
setValue(pValue);
}
}