Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table cells become too wide when containing Br #194

Closed
iclukas opened this issue Aug 13, 2018 · 2 comments
Closed

Table cells become too wide when containing Br #194

iclukas opened this issue Aug 13, 2018 · 2 comments
Assignees
Labels

Comments

@iclukas
Copy link
Contributor

iclukas commented Aug 13, 2018

In table cells containing explicit line breaks (Br or HTML br), it seems the line width calculation is not reset at the breaks and thus gets too wide. It only works when the Paragraph is closed for every line.

sp-table-br-bug

<Layout xmlns="urn:speedata.de:2009/publisher/en"
  xmlns:sd="urn:speedata:2009/publisher/functions/en">
  <Trace grid="no" objects="yes"/>

  <Record element="data">
    <PlaceObject>
      <Table padding="2mm" stretch="no" >
        <Tr>
          <Td>
            <Paragraph><Value>Row 1 / Column 1</Value><Br/>
            <Value>Lorem ipsum dolor sit amet, consectetur</Value><Br/>
            <Value>adipisicing elit, sed do eiusmod</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>Row 1 / Column 2</Value></Paragraph>
          </Td>
        </Tr>
        <Tr>
          <Td>
            <Paragraph><Value>Row 2 / Column 1</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>Row 2 / Column 2</Value></Paragraph>
          </Td>
        </Tr>
      </Table>
    </PlaceObject>
    <PlaceObject>
      <Table padding="2mm" stretch="no" >
        <Tr>
          <Td>
            <Paragraph><Value>Row 1 / Column 1<br/>Lorem ipsum dolor sit amet, consectetur<br/>adipisicing elit, sed do eiusmod</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>Row 1 / Column 2</Value></Paragraph>
          </Td>
        </Tr>
        <Tr>
          <Td>
            <Paragraph><Value>Row 2 / Column 1</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>Row 2 / Column 2</Value></Paragraph>
          </Td>
        </Tr>
      </Table>
    </PlaceObject>
    <PlaceObject>
      <Table padding="2mm" stretch="no" >
        <Tr>
          <Td>
            <Paragraph><Value>Row 1 / Column 1
Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>Row 1 / Column 2</Value></Paragraph>
          </Td>
        </Tr>
        <Tr>
          <Td>
            <Paragraph><Value>Row 2 / Column 1</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>Row 2 / Column 2</Value></Paragraph>
          </Td>
        </Tr>
      </Table>
    </PlaceObject>
    <PlaceObject>
      <Table padding="2mm" stretch="no" >
        <Tr>
          <Td>
            <Paragraph><Value>Row 1 / Column 1</Value></Paragraph>
            <Paragraph><Value>Lorem ipsum dolor sit amet, consectetur</Value></Paragraph>
            <Paragraph><Value>adipisicing elit, sed do eiusmod</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>Row 1 / Column 2</Value></Paragraph>
          </Td>
        </Tr>
        <Tr>
          <Td>
            <Paragraph><Value>Row 2 / Column 1</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>Row 2 / Column 2</Value></Paragraph>
          </Td>
        </Tr>
      </Table>
    </PlaceObject>
  </Record>
</Layout>
@pgundlach pgundlach self-assigned this Aug 13, 2018
@pgundlach pgundlach added the Bug label Aug 13, 2018
@pgundlach
Copy link
Member

pgundlach commented Aug 13, 2018

This tries to be a minimal test case:

<Layout xmlns="urn:speedata.de:2009/publisher/en"
  xmlns:sd="urn:speedata:2009/publisher/functions/en">
  <Trace grid="no" objects="yes"/>

  <Record element="data">
    <PlaceObject>
      <Table>
        <Tr>
          <Td>
            <Paragraph><Value>text</Value></Paragraph>
          </Td>
          <Td>
            <Paragraph><Value>text<br/>text<br/>text</Value></Paragraph>
          </Td>
        </Tr>
      </Table>
    </PlaceObject>
  </Record>
</Layout>

texttexttext

@pgundlach
Copy link
Member

pgundlach commented Aug 13, 2018

Fixed in version 3.3.12 which is online now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants