You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "kleb-prog (via GitHub)" <gi...@apache.org> on 2023/08/05 18:34:58 UTC

[GitHub] [poi] kleb-prog opened a new pull request, #496: Bug 66855 Formula parser incorrectly handles sheet name containing multiple single quotes in a row

kleb-prog opened a new pull request, #496:
URL: https://github.com/apache/poi/pull/496

   Small fix for the bug
   
   https://bz.apache.org/bugzilla/show_bug.cgi?id=66855


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [poi] asfgit closed pull request #496: Bug 66855 Formula parser incorrectly handles sheet name containing multiple single quotes in a row

Posted by "asfgit (via GitHub)" <gi...@apache.org>.
asfgit closed pull request #496: Bug 66855 Formula parser incorrectly handles sheet name containing multiple single quotes in a row
URL: https://github.com/apache/poi/pull/496


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [poi] kleb-prog commented on a diff in pull request #496: Bug 66855 Formula parser incorrectly handles sheet name containing multiple single quotes in a row

Posted by "kleb-prog (via GitHub)" <gi...@apache.org>.
kleb-prog commented on code in PR #496:
URL: https://github.com/apache/poi/pull/496#discussion_r1285107535


##########
poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java:
##########
@@ -1182,8 +1182,6 @@ private SheetIdentifier parseSheetName(boolean isSndPartOfQuotedRange) {
                         if (look == '\''){
                             // Any single quotes which were already present in the sheet name will be converted to double single quotes ('')
                             // so switch back to single quote
-                            sb.appendCodePoint(look);
-                            nextChar();

Review Comment:
   It's not necessary to do it here because on this step variable "look" has second single quote of the pair of single quotes and will be appended to string builder on next iteration of the loop



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [poi] pjfanning commented on pull request #496: Bug 66855 Formula parser incorrectly handles sheet name containing multiple single quotes in a row

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #496:
URL: https://github.com/apache/poi/pull/496#issuecomment-1672956361

   thanks - merged with https://github.com/apache/poi/commit/d15286103648b5cbfadfc6eeec132f224b49e2ec


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [poi] kleb-prog commented on a diff in pull request #496: Bug 66855 Formula parser incorrectly handles sheet name containing multiple single quotes in a row

Posted by "kleb-prog (via GitHub)" <gi...@apache.org>.
kleb-prog commented on code in PR #496:
URL: https://github.com/apache/poi/pull/496#discussion_r1285108217


##########
poi/src/test/java/org/apache/poi/hssf/model/TestFormulaParser.java:
##########
@@ -1357,8 +1357,8 @@ void testUnionOfFullCollFullRowRef() throws IOException {
                 UnionPtg.class
         );
 
-        wb.createSheet("Sh't1");
-        ptgs = parse("'Sh''t1'!$A:$A,'Sh''t1'!$1:$4", wb);

Review Comment:
   Yes, I'll do it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [poi] kleb-prog commented on a diff in pull request #496: Bug 66855 Formula parser incorrectly handles sheet name containing multiple single quotes in a row

Posted by "kleb-prog (via GitHub)" <gi...@apache.org>.
kleb-prog commented on code in PR #496:
URL: https://github.com/apache/poi/pull/496#discussion_r1285110233


##########
poi/src/test/java/org/apache/poi/hssf/model/TestFormulaParser.java:
##########
@@ -1357,8 +1357,8 @@ void testUnionOfFullCollFullRowRef() throws IOException {
                 UnionPtg.class
         );
 
-        wb.createSheet("Sh't1");
-        ptgs = parse("'Sh''t1'!$A:$A,'Sh''t1'!$1:$4", wb);

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [poi] pjfanning commented on a diff in pull request #496: Bug 66855 Formula parser incorrectly handles sheet name containing multiple single quotes in a row

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #496:
URL: https://github.com/apache/poi/pull/496#discussion_r1285107778


##########
poi/src/test/java/org/apache/poi/hssf/model/TestFormulaParser.java:
##########
@@ -1357,8 +1357,8 @@ void testUnionOfFullCollFullRowRef() throws IOException {
                 UnionPtg.class
         );
 
-        wb.createSheet("Sh't1");
-        ptgs = parse("'Sh''t1'!$A:$A,'Sh''t1'!$1:$4", wb);

Review Comment:
   could you add a new test and leave this one as is? It must be useful to keep the test for `"Sh't1"`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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