You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2010/07/07 02:59:39 UTC
DO NOT REPLY [Bug 49564] New: getlocked return error value
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
Summary: getlocked return error value
Product: POI
Version: 3.6
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
AssignedTo: dev@poi.apache.org
ReportedBy: longxibo@sina.com
Created an attachment (id=25722)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25722)
upload xlsx file for test
@Test
public void testGetLockedFromXlsx(){
XSSFWorkbook wb;
XSSFSheet sheet;
FileInputStream finput=null;
File file;
String xlsSourceFile = "c:\\testgetcellstyle.xlsx";
file = new File(xlsSourceFile);
try {
finput = new FileInputStream(file);
wb = new XSSFWorkbook(finput);
sheet = wb.getSheetAt(0);
XSSFRow row = sheet.getRow(0);
XSSFCell cell = row.getCell(25);
XSSFCellStyle cellStyle = cell.getCellStyle();
assertTrue(cellStyle.getLocked());//CellStyle.getLocked() should will
return true,But really return false
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}finally{
try {
finput.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
alain.perry@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alain.perry@gmail.com
--- Comment #9 from alain.perry@gmail.com 2011-05-27 16:46:47 UTC ---
I'm using poi-3.7-20101029 by the way.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #10 from Yegor Kozlov <ye...@dinom.ru> 2011-06-24 13:06:32 UTC ---
XSSFCellStyle.getLocked() returned false if the "locked" value was not set. The
default value is true and I fixed it in r1139288
Yegor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Nick Burch <ni...@alfresco.com> 2010-07-07 09:47:00 EDT ---
I'd suggest that you unzip the file (.xlsx is actually a zip file of xml
files), and start poking around to see where the locked property is actually
set. Maybe it's not in the usual place?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
--- Comment #8 from alain.perry@gmail.com 2011-05-27 16:45:41 UTC ---
I'm being bit by this bug as well: getLocked() works perfectly fine with HSSF,
but returns false on locked cells with XSSF. It's quite a pity.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
--- Comment #1 from longxibo@sina.com 2010-07-06 21:05:05 EDT ---
Created an attachment (id=25723)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25723)
Screenshot for the cell property
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
--- Comment #3 from longxibo@sina.com 2010-07-09 04:54:26 EDT ---
(In reply to comment #2)
> I'd suggest that you unzip the file (.xlsx is actually a zip file of xml
> files), and start poking around to see where the locked property is actually
> set. Maybe it's not in the usual place?
Where is locked property in xml file? I can't found locked property in any xml
file.This property name is 'locked' or 'lock'?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
--- Comment #7 from longxibo@sina.com 2010-07-14 04:03:08 EDT ---
Created an attachment (id=25762)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25762)
locked property is false
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #4 from Nick Burch <ni...@alfresco.com> 2010-07-09 05:04:50 EDT ---
It could be in the cell styles file, or maybe in the sheet. I'd suggest you
create two files, both with one cell, one locked and one not. Diff those to
find out!
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
longxibo@sina.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #5 from longxibo@sina.com 2010-07-14 03:57:00 EDT ---
(In reply to comment #4)
> It could be in the cell styles file, or maybe in the sheet. I'd suggest you
> create two files, both with one cell, one locked and one not. Diff those to
> find out!
I change locked property and save file.Unzip two xlsx to diff directory.Compare
two directory.I found style.xml have little diff. New style.xml add
"<protection locked="0"/>" String,But old style.xml not "locked" property at
all!It is Strange! I upload two file to investigation for you.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
longxibo@sina.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 49564] getlocked return error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49564
--- Comment #6 from longxibo@sina.com 2010-07-14 04:01:29 EDT ---
Created an attachment (id=25761)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25761)
locked property is true
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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