Build failed in Jenkins: POI » POI-DSL-1.22 #9

2023-10-14 Thread Apache Jenkins Server
See 


Changes:

[PJ Fanning] update changes

[PJ Fanning] [bug-67475] better support for edge cases in TEXT function. Thanks 
to Jakub Vojtisek

[PJ Fanning] [github-505] DrawTextFragment height should include leading space. 
This closes #505

[PJ Fanning] update gradle plugins

[PJ Fanning] add back leading len into slideshow DrawTextFragment height

[PJ Fanning] [bug-67735] Add Complex scripts support in XWPFRun. Thanks to 
Mohammed Alhaddar. This closes #536

[PJ Fanning] extra classes in poi-ooxml-lite

[PJ Fanning] extra classes in poi-ooxml-lite

[PJ Fanning] [bug-67735] Add Complex scripts support in XWPFRun. Thanks to 
Mohammed Alhaddar. This closes #536

[Dominik Stadler] Fix job "no-scratchpad" after adding some more broken 
test-data

[Dominik Stadler] integration-tests: Enable testing extracting for 
OPCFileHandler and fix single test

Enable running "extract" also for OPCFileHandler
Add additional expected failures in stress.xls

[Dominik Stadler] Bug 66425: Avoid exceptions found via poi-fuzz

Fix one expected exception-text which is different
on newer Java versions


--
Started by an SCM change
Running as SYSTEM
ERROR: Not all environment variables could be successfully injected. Check for 
similarly-named environment variables.
[EnvInject] - Loading node environment variables.
[EnvInject] - Preparing an environment for the build.
[EnvInject] - Keeping Jenkins system variables.
[EnvInject] - Keeping Jenkins build variables.
[EnvInject] - Injecting as environment variables the properties content 
FORREST_HOME=/home/jenkins/tools/forrest/latest
LANG=en_US.UTF-8
CI_BUILD=TRUE

[EnvInject] - Variables injected successfully.
[EnvInject] - Injecting contributions.
Building remotely on builds26 (ubuntu) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
ERROR: Not all environment variables could be successfully injected. Check for 
similarly-named environment variables.
Updating https://svn.apache.org/repos/asf/poi/trunk at revision 
'2023-10-15T03:36:14.034 +'
U 
poi/src/main/java/org/apache/poi/ss/formula/functions/TextFunction.java
U poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java
U poi/src/test/java/org/apache/poi/ss/formula/functions/TestText.java
U build.gradle
U 
poi-ooxml/src/test/java/org/apache/poi/xwpf/TestNecessaryOOXMLClasses.java
U poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFRun.java
U poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
U poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
U 
poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
U test-data/spreadsheet/stress.xls

<-- Got one external: forrest.properties, svn url: 
https://svn.apache.org/repos/asf/poi/site/forrest.properties -->
Fetching 'https://svn.apache.org/repos/asf/poi/site/forrest.properties' at -1 
into 
'
At revision 1912975


<-- Got one external: documentation, svn url: 
https://svn.apache.org/repos/asf/poi/site/src/documentation -->
Fetching 'https://svn.apache.org/repos/asf/poi/site/src/documentation' at -1 
into 
'
U src/documentation/content/xdocs/changes.xml
At revision 1912975

At revision 1912975

No changes for https://svn.apache.org/repos/asf/poi/site/forrest.properties 
since the previous build
ERROR: Not all environment variables could be successfully injected. Check for 
similarly-named environment variables.
[POI-DSL-1.22] $ /bin/sh -xe /tmp/jenkins15951507419814351278.sh
+ rm -rf examples excelant integrationtest main ooxml ooxml-schema scratchpad 
build.javacheck.xml
+ svn status
X   forrest.properties
X   src/documentation

Performing status on external item at 'src/documentation':
+ svn revert poi-examples/src/main/java9/module-info.java 
poi-excelant/src/main/java9/module-info.java 
poi-excelant/src/test/java9/module-info.java 
poi-integration/src/test/java9/module-info.java 
poi-ooxml-full/src/main/java9/module-info.java 
poi-ooxml-lite-agent/src/main/java9/module-info.java 
poi-ooxml-lite/src/main/java9/module-info.java 
poi-ooxml/src/main/java9/module-info.java 
poi-ooxml/src/test/java9/module-info.java 
poi-scratchpad/src/main/java9/module-info.java 
poi-scratchpad/src/test/java9/module-info.java 
poi/src/main/java9/module-info.java poi/src/test/java9/module-info.java
+ svn revert src/resources/ooxml-lite-report.clazz 
src/resources/ooxml-lite-report.xsb
+ echo Java-Home: /home/jenkins/tools/java/latest22
Java-Home: /home/jenkins/tools/java/latest22
+ ls -al /home/jenkins/tools/java/latest22/
total 36
drwxr-xr-x  8 root root 4096 Jun 14 05:58 .

Build failed in Jenkins: POI » POI-DSL-OpenJDK #846

2023-10-14 Thread Apache Jenkins Server
See 


Changes:

[PJ Fanning] update changes

[PJ Fanning] [bug-67475] better support for edge cases in TEXT function. Thanks 
to Jakub Vojtisek

[PJ Fanning] [github-505] DrawTextFragment height should include leading space. 
This closes #505

[PJ Fanning] update gradle plugins

[PJ Fanning] add back leading len into slideshow DrawTextFragment height

[PJ Fanning] [bug-67735] Add Complex scripts support in XWPFRun. Thanks to 
Mohammed Alhaddar. This closes #536

[PJ Fanning] extra classes in poi-ooxml-lite

[PJ Fanning] extra classes in poi-ooxml-lite

[PJ Fanning] [bug-67735] Add Complex scripts support in XWPFRun. Thanks to 
Mohammed Alhaddar. This closes #536


--
[...truncated 4.07 MB...]
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2650 
spreadsheet/ole2-embedding.xls HPSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2638 
spreadsheet/named-cell-in-formula-test.xls HPSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2651 
spreadsheet/overlapSharedFormula.xls HSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2654 
spreadsheet/password.xls HPSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2652 
spreadsheet/overlapSharedFormula.xls HPSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2637 
spreadsheet/named-cell-in-formula-test.xls HSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2659 
spreadsheet/poc-xmlbomb-empty.xlsx XSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2653 
spreadsheet/password.xls HSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2660 
spreadsheet/poc-xmlbomb-empty.xlsx OPC PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2661 
spreadsheet/poc-xmlbomb.xlsx XSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2662 
spreadsheet/poc-xmlbomb.xlsx OPC PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2665 
spreadsheet/protected_passtika.xlsb XSSFB PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2663 
spreadsheet/poi-fuzz.xls HSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2664 
spreadsheet/poi-fuzz.xls HPSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2668 
spreadsheet/rank.xls HSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2669 
spreadsheet/rank.xls HPSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2646 
spreadsheet/noSharedStringTable.xlsx OPC PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2657 
spreadsheet/poc-shared-strings.xlsx XSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2658 
spreadsheet/poc-shared-strings.xlsx OPC PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2645 
spreadsheet/noSharedStringTable.xlsx XSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2674 
spreadsheet/reordered_sheets.xlsx XSSF PASSED
org.apache.poi.stress.TestAllFiles > handleExtracting(String, 
FileHandlerKnown, String, Class, String) Extracting - #2676 
spreadsheet/resize_compare.xls HSSF PASSED

[Bug 67475] [PATCH] TEXT function corner cases

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=67475

PJ Fanning  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 66620] Heap dump when using SXSSF for large XLSX files containing RichTextStrings

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66620

PJ Fanning  changed:

   What|Removed |Added

 Resolution|--- |INFORMATIONPROVIDED
 Status|NEW |RESOLVED

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 67475] [PATCH] TEXT function corner cases

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=67475

--- Comment #2 from PJ Fanning  ---
applied with r1912973

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



Re: [Bug 60848] SUMPRODUCT fails when first arg is of form --(...)

2023-10-14 Thread Jakub Vojtíšek
Thanks PJ Fanning and Stanton Fisque for your comments.

I must say that for me it would be a sad news if POI withdraws from
supporting excel formulas evaluations. The company I work for uses POI for
more than 10 years to process excel files. Being able to evaluate excel
workbooks in java and have a full control over it gives our clients many
benefits. We can evaluate workbooks automatically, provide audtabilty and
integrate with our system as well as 3rd party systems (using user
functions for that). We can deploy our system everywhere JVM runs (e.g. on
Linux) without problems. We use POI to evaluate large financial sheets and
actually we had only very few problems with POI so far. Due to the POI
being open source we were able to fix them locally. As I have some spare
time now I'm trying to contribute back to the community and trying to have
those issues fixed in POI. Also looking at other existing issues, the Bug
62271  is one of
them. It is not a problem for us, but it seems to be an interesting issue
with potential to resolve multiple bugs.

So I hope the evaluation stays in POI as I believe it is valuable for many
people. If possible I'll be happy to help with it.

Thanks and regards,
Jakub



On Fri, 13 Oct 2023 at 16:06, stanton fisque  wrote:

> there is a use case, and i have used it, so i will raise a counter comment
> for POI to retain running calculations:
>
> i had a project where i built a harness to load an excel spreadsheet and
> then exercise it as a system of record.  if POI were to lose the ability to
> perform that function, it would be a loss for that use case.  i do accept
> that it is an exotic case, but i'd wager it is not the only one.
>
> as a side note, some thought could be given to (if it were deemed
> necessary to go down this route) providing a contract layer so that
> existing functionality could be retained as an extension library.  the
> current implementation allows for runtime patching of the execution engine
> (i  had to use this for a missing function before PJF accepted  a PR from
> me sometime ago), so there is a minimal contract in place already.
>
>
> Stanton Fisque
> principal technologist
> latticeware.com
> portland, oregon
>
> > On Oct 13, 2023, at 05:27 AM, bugzi...@apache.org wrote:
> >
> > https://bz.apache.org/bugzilla/show_bug.cgi?id=60848
> >
> > --- Comment #15 from PJ Fanning  ---
> > I think it was a big mistake for POI to start evaluating formulas. It is
> too
> > complicated and there are not enough devs interested. It doesn't just
> take
> > someone to submit a change. It takes multiple people to review it.
> >
> >
> > Releases are irregular.
> >
> > Does anyone need POI to calculate formulas? The answer is no. Excel can
> be made
> > to recalculate the formulas when you load the xlsx into Excel.
> >
> > See
> >
> https://poi.apache.org/apidocs/dev/org/apache/poi/xssf/usermodel/XSSFWorkbook.html#setForceFormulaRecalculation-boolean-
> >
> > --
> > You are receiving this mail because:
> > You are the assignee for the bug.
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> > For additional commands, e-mail: dev-h...@poi.apache.org
> >
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> For additional commands, e-mail: dev-h...@poi.apache.org
>
>


Re: [PR] Fix the problem that getHeight() is smaller than the actual value [poi]

2023-10-14 Thread via GitHub


pjfanning commented on PR #505:
URL: https://github.com/apache/poi/pull/505#issuecomment-1763029916

   added with 
https://github.com/apache/poi/commit/fccf4a97fb4b17aed831b75d30c2202c59d91f01


-- 
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-unsubscr...@poi.apache.org

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


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



[Bug 67470] No exception throw when SXSSF spreadsheet build failed

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=67470

PJ Fanning  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from PJ Fanning  ---
This is a bug tracker. Closing this as it does not a bug report.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 67638] Unable to open .docx file when adding XWPFChart and XDDFChart

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=67638

PJ Fanning  changed:

   What|Removed |Added

 OS||All
 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #1 from PJ Fanning  ---
marking as duplicate - they all seem to be the same issue

*** This bug has been marked as a duplicate of bug 67510 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 67510] No POI-generated Charts can be opened by Excel for Mac v. 16.77

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=67510

PJ Fanning  changed:

   What|Removed |Added

 CC||lynda.p.doug...@gmail.com

--- Comment #16 from PJ Fanning  ---
*** Bug 67638 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 67510] No POI-generated Charts can be opened by Excel for Mac v. 16.77

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=67510

PJ Fanning  changed:

   What|Removed |Added

   Severity|critical|major
  Component|XSSF|POI Overall

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 67735] Support for complex scripts in XWPFRun

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=67735

Mohammad Alhaddar  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


pjfanning commented on PR #536:
URL: https://github.com/apache/poi/pull/536#issuecomment-1762944620

   Thanks - merged with 
https://github.com/apache/poi/commit/bc870ab76497d3f968a32282104fb170bea7a77f


-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Bump com.adarshr.test-logger from 3.2.0 to 4.0.0 [poi]

2023-10-14 Thread via GitHub


asfgit closed pull request #534: Bump com.adarshr.test-logger from 3.2.0 to 
4.0.0
URL: https://github.com/apache/poi/pull/534


-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Bump com.github.spotbugs from 5.0.14 to 5.1.5 [poi]

2023-10-14 Thread via GitHub


dependabot[bot] commented on PR #535:
URL: https://github.com/apache/poi/pull/535#issuecomment-1762943507

   OK, I won't notify you again about this release, but will get in touch when 
a new version is available. If you'd rather skip all updates until the next 
major or minor version, let me know by commenting `@dependabot ignore this 
major version` or `@dependabot ignore this minor version`. You can also ignore 
all major, minor, or patch releases for a dependency by adding an [`ignore` 
condition](https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#ignore)
 with the desired `update_types` to your config file.
   
   If you change your mind, just re-open this PR and I'll resolve any conflicts 
on 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-unsubscr...@poi.apache.org

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


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



Re: [PR] Bump com.github.spotbugs from 5.0.14 to 5.1.5 [poi]

2023-10-14 Thread via GitHub


asfgit closed pull request #535: Bump com.github.spotbugs from 5.0.14 to 5.1.5
URL: https://github.com/apache/poi/pull/535


-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Bump com.adarshr.test-logger from 3.2.0 to 4.0.0 [poi]

2023-10-14 Thread via GitHub


dependabot[bot] commented on PR #534:
URL: https://github.com/apache/poi/pull/534#issuecomment-1762943458

   OK, I won't notify you again about this release, but will get in touch when 
a new version is available. If you'd rather skip all updates until the next 
major or minor version, let me know by commenting `@dependabot ignore this 
major version` or `@dependabot ignore this minor version`. You can also ignore 
all major, minor, or patch releases for a dependency by adding an [`ignore` 
condition](https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#ignore)
 with the desired `update_types` to your config file.
   
   If you change your mind, just re-open this PR and I'll resolve any conflicts 
on 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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


asfgit closed pull request #536: Complex scripts support in XWPFRun
URL: https://github.com/apache/poi/pull/536


-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


moalhaddar commented on code in PR #536:
URL: https://github.com/apache/poi/pull/536#discussion_r1359401855


##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -849,7 +929,22 @@ public int getFontSize() {
 }
 
 /**
- * Specifies the font size which shall be applied to all non complex script
+ * Specifies the font size which shall be applied to the complex script
+ * characters in the contents of this run when displayed.
+ *
+ * @return value representing the font size (non-integer size will be 
rounded with half rounding up,
+ * -1 is returned if size not set)
+ * @deprecated use {@link #getComplexScriptFontSizeAsDouble()}
+ */
+@Deprecated
+@Removal(version = "6.0.0")

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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


moalhaddar commented on code in PR #536:
URL: https://github.com/apache/poi/pull/536#discussion_r1359401498


##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -911,6 +1047,29 @@ public void setFontSize(double size) {
 ctSize.setVal(bd.multiply(BigDecimal.valueOf(2)).setScale(0, 
RoundingMode.HALF_UP).toBigInteger());
 }
 
+
+/**
+ * Specifies the font size which shall be applied to the currently 
specified complex
+ * characters in the contents of this run when displayed.
+ *
+ * 
+ * If this element is not present, the default value is to leave the value
+ * applied at previous level in the style hierarchy. If this element is
+ * never applied in the style hierarchy, then any appropriate font size may
+ * be used for the non-complex characters.
+ * 
+ *
+ * @param size The font size as number of point measurements.
+ * @see #setFontSize(int)
+ * @since POI 5.0.0

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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


pjfanning commented on code in PR #536:
URL: https://github.com/apache/poi/pull/536#discussion_r1359401238


##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -849,7 +929,22 @@ public int getFontSize() {
 }
 
 /**
- * Specifies the font size which shall be applied to all non complex script
+ * Specifies the font size which shall be applied to the complex script
+ * characters in the contents of this run when displayed.
+ *
+ * @return value representing the font size (non-integer size will be 
rounded with half rounding up,
+ * -1 is returned if size not set)
+ * @deprecated use {@link #getComplexScriptFontSizeAsDouble()}
+ */
+@Deprecated
+@Removal(version = "6.0.0")

Review Comment:
   for the new code only, could we could just `public double 
getComplexScriptFontSize()`? No `getComplexScriptFontSizeAsDouble` needed - 
let's not add new methods that have deprecated or removal annotations on them.



-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


pjfanning commented on code in PR #536:
URL: https://github.com/apache/poi/pull/536#discussion_r1359400893


##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -911,6 +1047,29 @@ public void setFontSize(double size) {
 ctSize.setVal(bd.multiply(BigDecimal.valueOf(2)).setScale(0, 
RoundingMode.HALF_UP).toBigInteger());
 }
 
+
+/**
+ * Specifies the font size which shall be applied to the currently 
specified complex
+ * characters in the contents of this run when displayed.
+ *
+ * 
+ * If this element is not present, the default value is to leave the value
+ * applied at previous level in the style hierarchy. If this element is
+ * never applied in the style hierarchy, then any appropriate font size may
+ * be used for the non-complex characters.
+ * 
+ *
+ * @param size The font size as number of point measurements.
+ * @see #setFontSize(int)
+ * @since POI 5.0.0

Review Comment:
   Could you use `@since POI 5.2.5` on all the new public methods? Including 
any new public methods that have no `@since` setting.



-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


pjfanning commented on PR #536:
URL: https://github.com/apache/poi/pull/536#issuecomment-1762891761

   as an aside, would you have any interest in trying to fix 
https://bz.apache.org/bugzilla/show_bug.cgi?id=63741 ?


-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


pjfanning commented on PR #536:
URL: https://github.com/apache/poi/pull/536#issuecomment-1762891428

   I thoroughly dislike the M$ formats.
   
   Could I suggest this?
   * leave the existing methods as is - no changes
   * remove the ScriptType enum
   * create separate methods for the complex script settings, eg for 'bold'
 * setComplexScriptBold(boolean)
 * isComplexScriptBold()
   * similar separate methods for italic and font size


-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


moalhaddar commented on code in PR #536:
URL: https://github.com/apache/poi/pull/536#discussion_r1359371496


##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -256,8 +256,23 @@ public void setLang(String lang) {
  */
 @Override
 public boolean isBold() {
+return isBold(ScriptType.NON_COMPLEX);

Review Comment:
   I see. You mean as in an internal state for the script type with a setter 
and a getter? I think i can do that



-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


moalhaddar commented on code in PR #536:
URL: https://github.com/apache/poi/pull/536#discussion_r1359369096


##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -905,10 +1006,28 @@ public void setFontSize(int size) {
  */
 @Override
 public void setFontSize(double size) {
-BigDecimal bd = BigDecimal.valueOf(size);
+setFontSize(size, ScriptType.NON_COMPLEX);
+}
+
+/**
+ * Whether the font size property shall be applied to the specified script 
type.
+ *
+ * @param size The font size as number of point measurements.
+ * @param scriptType the script type to apply this property to.
+ */
+public void setFontSize(double size, ScriptType scriptType) {
 CTRPr pr = getRunProperties(true);
-CTHpsMeasure ctSize = pr.sizeOfSzArray() > 0 ? pr.getSzArray(0) : 
pr.addNewSz();
-ctSize.setVal(bd.multiply(BigDecimal.valueOf(2)).setScale(0, 
RoundingMode.HALF_UP).toBigInteger());
+BigDecimal bd = BigDecimal.valueOf(size);
+BigInteger val = bd.multiply(BigDecimal.valueOf(2)).setScale(0, 
RoundingMode.HALF_UP).toBigInteger();
+boolean isComplexScript = scriptType == ScriptType.COMPLEX;
+
+if (isComplexScript) {
+CTHpsMeasure ctCsSize = pr.sizeOfSzCsArray() > 0 ? 
pr.getSzCsArray(0) : pr.addNewSzCs();

Review Comment:
   The current behavior of POI does exactly this for the regular fonts. So i 
repeated the implementation with the complex scripts.



-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


moalhaddar commented on code in PR #536:
URL: https://github.com/apache/poi/pull/536#discussion_r1359363306


##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -1447,6 +1566,19 @@ public enum FontCharRange {
 hAnsi /* high ansi */
 }
 
+/**
+ * @see https://www.ecma-international.org/publications-and-standards/standards/ecma-376/;>OOXML
 Spec

Review Comment:
   The sections doesn't mention what a complex script is because it's something 
related to the typesetting. However, these sections are titled:
   - 17.3.2.2 bCs (Complex Script Bold)
   - 17.3.2.17 iCs (Complex Script Italics)
   - 17.3.2.38 sz (Non-Complex Script Font Size)
   - 17.3.2.39 szCs (Complex Script Font Size)
   
   and in them they specify that these properties must have an explicit tag 
with it's value for them to work with complex scripts. I'm not sure if i should 
include the entire paragraphs or only a link to the PDF zip file? (it's 1 file 
only).
   
   
https://www.ecma-international.org/wp-content/uploads/ECMA-376-1_5th_edition_december_2016.zip
   
   What would you suggest?



-- 
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-unsubscr...@poi.apache.org

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


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



Re: [PR] Complex scripts support in XWPFRun [poi]

2023-10-14 Thread via GitHub


pjfanning commented on code in PR #536:
URL: https://github.com/apache/poi/pull/536#discussion_r1359348163


##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -905,10 +1006,28 @@ public void setFontSize(int size) {
  */
 @Override
 public void setFontSize(double size) {
-BigDecimal bd = BigDecimal.valueOf(size);
+setFontSize(size, ScriptType.NON_COMPLEX);
+}
+
+/**
+ * Whether the font size property shall be applied to the specified script 
type.
+ *
+ * @param size The font size as number of point measurements.
+ * @param scriptType the script type to apply this property to.
+ */
+public void setFontSize(double size, ScriptType scriptType) {
 CTRPr pr = getRunProperties(true);
-CTHpsMeasure ctSize = pr.sizeOfSzArray() > 0 ? pr.getSzArray(0) : 
pr.addNewSz();
-ctSize.setVal(bd.multiply(BigDecimal.valueOf(2)).setScale(0, 
RoundingMode.HALF_UP).toBigInteger());
+BigDecimal bd = BigDecimal.valueOf(size);
+BigInteger val = bd.multiply(BigDecimal.valueOf(2)).setScale(0, 
RoundingMode.HALF_UP).toBigInteger();
+boolean isComplexScript = scriptType == ScriptType.COMPLEX;
+
+if (isComplexScript) {
+CTHpsMeasure ctCsSize = pr.sizeOfSzCsArray() > 0 ? 
pr.getSzCsArray(0) : pr.addNewSzCs();

Review Comment:
   what are you going to do if the array already exists and it has more than 1 
array element?



##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -256,8 +256,23 @@ public void setLang(String lang) {
  */
 @Override
 public boolean isBold() {
+return isBold(ScriptType.NON_COMPLEX);

Review Comment:
   Is there any chance that the the run itself could be marked as having 
ScriptType.COMPLEX? It feels very messy for the API caller to have to specify 
this on all the methods like isBold, isItalic, etc.



##
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java:
##
@@ -1447,6 +1566,19 @@ public enum FontCharRange {
 hAnsi /* high ansi */
 }
 
+/**
+ * @see https://www.ecma-international.org/publications-and-standards/standards/ecma-376/;>OOXML
 Spec

Review Comment:
   Can you pull out the text? Or tell us exactly where to find these sections. 
The ECMA specs are an insane mess with zips inside zips. 4 separate parts.
   
   This enum should be its own class but the question is whether it is docx 
specific or needs to appear in a more general package.



-- 
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-unsubscr...@poi.apache.org

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


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



[PR] Complex scripts in xwpf run [poi]

2023-10-14 Thread via GitHub


moalhaddar opened a new pull request, #536:
URL: https://github.com/apache/poi/pull/536

   Bugzilla ticket: https://bz.apache.org/bugzilla/show_bug.cgi?id=67735


-- 
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-unsubscr...@poi.apache.org

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


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



[Bug 67735] New: Support for complex scripts in XWPFRun

2023-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=67735

Bug ID: 67735
   Summary: Support for complex scripts in XWPFRun
   Product: POI
   Version: 5.2.2-FINAL
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: XWPF
  Assignee: dev@poi.apache.org
  Reporter: moalhad...@gmail.com
  Target Milestone: ---

In XWPFRun, there are some properties that must be explicitly set for complex
scripts. Mainly:
- Font Size.
- Bold.
- Italic.

If the text within the run is considered a complex script then the regular
setter and getters for these properties won't work, because under OOXML
specification they must be implemented in their own. See ECMA OOXML Part 1,
sections:
- 17.3.2.2
- 17.3.2.17
- 17.3.2.38
- 17.3.2.39

For example, if i have a run with arabic text within and i try to set the font
with the current setFontSize method, then the output run would not have the
font size affected, since the current implementation is for non-complex scripts
only.

This is an enhancement while maintaining the current interfaces to behave the
same as before while extending the functionality.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org