<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- $Id$ -->
<testcase>
  <info>
    <p>
      Test fix for https://issues.apache.org/jira/browse/FOP-2258.
    </p>
  </info>
  <fo>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" writing-mode="rl">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="all">
          <fo:region-body region-name="body" margin="1in"/>
        </fo:simple-page-master >
      </fo:layout-master-set>
      <fo:page-sequence master-reference="all">
        <fo:flow flow-name="body" text-align="start" >
          <fo:block space-before="20mm">
            <fo:block space-after="10mm" end-indent="0cm" start-indent="2cm" text-indent="-1cm" border="1px solid red">
              وقالت الطبيبة ان "حالتها سهلة العلاج في الاحوال العادية. لكننا نفتقد الى الكورتيزون، كما انها بحاجة الى غذاء غني بالبروتينات لكن اهلها غير قادرين على تامين ذلك لها".وقالت الطبيبة ان "حالتها سهلة العلاج في الاحوال العادية. لكننا نفتقد الى الكورتيزون، كما انها بحاجة الى غذاء غني بالبروتينات لكن اهلها غير قادرين على تامين ذلك لها".
            </fo:block>
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>
    <eval expected="394028" xpath="(//lineArea)[1]/@ipd"/>
    <eval expected="-28346" xpath="(//lineArea)[1]/@start-indent"/>
    <eval expected="7786" xpath="(//lineArea)[1]/@end-indent"/>
    <eval expected="394028" xpath="(//lineArea)[2]/@ipd"/>
    <eval expected="" xpath="(//lineArea)[2]/@start-indent"/>
    <eval expected="30404" xpath="(//lineArea)[2]/@end-indent"/>
    <eval expected="394028" xpath="(//lineArea)[3]/@ipd"/>
    <eval expected="" xpath="(//lineArea)[3]/@start-indent"/>
    <eval expected="1868" xpath="(//lineArea)[3]/@end-indent"/>
    <eval expected="394028" xpath="(//lineArea)[4]/@ipd"/>
    <eval expected="" xpath="(//lineArea)[4]/@start-indent"/>
    <eval expected="7052" xpath="(//lineArea)[4]/@end-indent"/>
    <eval expected="394028" xpath="(//lineArea)[5]/@ipd"/>
    <eval expected="" xpath="(//lineArea)[5]/@start-indent"/>
    <eval expected="20396" xpath="(//lineArea)[5]/@end-indent"/>
    <eval expected="394028" xpath="(//lineArea)[6]/@ipd"/>
    <eval expected="" xpath="(//lineArea)[6]/@start-indent"/>
    <eval expected="343064" xpath="(//lineArea)[6]/@end-indent"/>
  </checks>
</testcase>
