poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55568] New: Failed to create a tab in *.docx with standard means
Date Thu, 19 Sep 2013 07:52:22 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55568

            Bug ID: 55568
           Summary: Failed to create a tab in *.docx with standard means
           Product: POI
           Version: 3.10-dev
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
          Assignee: dev@poi.apache.org
          Reporter: sergei.tsypanov@yandex.ua

Hi everyone,

I use POI for generating reports and have recently run into the following
issue:

I need to set a tab for a header paragraph and used the following code:

CTTabs ctTabs = paragraph.getCTP().addNewPPr().addNewTabs();
CTTabStop ctTabStop = ctTabs.addNewTab();
ctTabStop.setPos(BigInteger.valueOf(1200));

First I was sure the reason is the use of wrong means, however when I opened
test.docx with some tabbed text as zip archive and parsed document.xml I found
the following element:

<w:pPr>
    <w:tabs>
        <w:tab w:val="left" w:pos="1985"/>
    </w:tabs>
    <w:rPr>
        <w:lang w:val="en-US"/>
    </w:rPr>
</w:pPr>

So the code seems to be correct comparing with actual xml markup.

Why then I fail to create the same with my code?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message