ASF Bugzilla – Attachment 26825 Details for
Bug 51007
[PATCH] RTF tables do not support percent column-widths
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch proposal
TableColumnWidth.patch (text/plain), 1.68 KB, created by
Max Aster
on 2011-04-01 10:17:10 UTC
(
hide
)
Description:
Patch proposal
Filename:
MIME Type:
Creator:
Max Aster
Created:
2011-04-01 10:17:10 UTC
Size:
1.68 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P fop_trunk >Index: src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java >=================================================================== >--- src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java (revision 1087675) >+++ src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java (working copy) >@@ -66,12 +66,29 @@ > Object width = lengthMap.get(fobj); > if (width != null) { > return Integer.parseInt(width.toString()); >- } else { >- return -1; > } >+ //If the object itself has no width the parent width will be used >+ //because it is the base width of this object >+ else if (fobj.getParent() != null) { >+ width = lengthMap.get(fobj.getParent()); >+ if (width != null) { >+ return Integer.parseInt(width.toString()); >+ } >+ } >+ return 0; > case LengthBase.TABLE_UNITS: > Object unit = tableUnitMap.get(fobj); >- return (unit != null) ? ((Integer)unit).intValue() : 0; >+ if (unit != null) { >+ return ((Integer)unit).intValue(); >+ } >+ //If the object itself has no width the parent width will be used >+ else if (fobj.getParent() != null) { >+ unit = tableUnitMap.get(fobj.getParent()); >+ if (unit != null) { >+ return ((Integer)unit).intValue(); >+ } >+ } >+ return 0; > default: > log.error(new Exception("Unsupported base type for LengthBase:" + lengthBase)); > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51007
:
26823
|
26824
| 26825 |
26826