ASF Bugzilla – Attachment 29463 Details for
Bug 51585
[PATCH] WorkbookFactory.create() hangs when creating a workbook
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proxy for CTCols that maintains max and min values
CTColsProxy.java (text/plain), 1.27 KB, created by
val235
on 2012-10-08 18:49:13 UTC
(
hide
)
Description:
proxy for CTCols that maintains max and min values
Filename:
MIME Type:
Creator:
val235
Created:
2012-10-08 18:49:13 UTC
Size:
1.27 KB
patch
obsolete
>package org.apache.poi.xssf.usermodel.helpers; > >import java.lang.reflect.InvocationHandler; >import java.lang.reflect.Method; >import java.lang.reflect.Proxy; > >import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCol; >import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCols; > >public class CTColsProxy implements InvocationHandler{ > > > private Long min; > private Long max; > > private final CTCols proxied; > > public CTColsProxy(CTCols cols){ > this.proxied=cols; > } > > @Override > public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { > > if (method.getName().startsWith("addNewCol")) { > return addNewColProxy(); > } > > return method.invoke(proxied, args); > } > > > private Object addNewColProxy(){ > CTCol col = proxied.addNewCol(); > > CTCol proxyCol = (CTCol) Proxy.newProxyInstance( > CTColProxy.class.getClassLoader(), > new Class[] { CTCol.class }, > new CTColProxy(col, this)); > > > return proxyCol; > } > > > public Long getMin() { > return min; > } > > public void setMin(Long min) { > this.min = min; > } > > public Long getMax() { > return max; > } > > public void setMax(Long max) { > this.max = max; > } > > public CTCols getProxied(){ > return this.proxied; > } > >} > > > >
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 51585
:
27331
|
29462
|
29463
|
29464
|
30866
|
30867