Skip to content

Commit df0b5b3

Browse files
Merge branch 'develop' into fb_impersonation
2 parents 9c2ab32 + 55f82cf commit df0b5b3

10 files changed

Lines changed: 111 additions & 76 deletions

File tree

api/src/org/labkey/api/reader/jxl/JxlCellStyle.java

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,18 @@
1818
import jxl.format.Alignment;
1919
import org.apache.commons.lang3.StringUtils;
2020
import org.apache.poi.ss.usermodel.BorderStyle;
21+
import org.apache.poi.ss.usermodel.CellPropertyType;
2122
import org.apache.poi.ss.usermodel.CellStyle;
2223
import org.apache.poi.ss.usermodel.Color;
2324
import org.apache.poi.ss.usermodel.FillPatternType;
2425
import org.apache.poi.ss.usermodel.Font;
2526
import org.apache.poi.ss.usermodel.HorizontalAlignment;
2627
import org.apache.poi.ss.usermodel.VerticalAlignment;
2728

29+
import java.util.EnumMap;
2830
import java.util.HashMap;
2931
import java.util.Map;
3032

31-
/**
32-
* User: klum
33-
* Date: May 20, 2011
34-
* Time: 1:45:20 PM
35-
*/
3633
public class JxlCellStyle implements CellStyle
3734
{
3835
private static final String DEFAULT_FORMAT = "General";
@@ -109,19 +106,14 @@ public boolean getLocked()
109106
return _format != null && _format.isLocked();
110107
}
111108

112-
private static final Map<Alignment, HorizontalAlignment> HORIZONTAL_ALIGNMENT_MAP = new HashMap<>();
113-
114-
static
115-
{
116-
HORIZONTAL_ALIGNMENT_MAP.put(Alignment.GENERAL, HorizontalAlignment.GENERAL);
117-
HORIZONTAL_ALIGNMENT_MAP.put(Alignment.LEFT, HorizontalAlignment.LEFT);
118-
HORIZONTAL_ALIGNMENT_MAP.put(Alignment.CENTRE, HorizontalAlignment.CENTER);
119-
HORIZONTAL_ALIGNMENT_MAP.put(Alignment.RIGHT, HorizontalAlignment.RIGHT);
120-
HORIZONTAL_ALIGNMENT_MAP.put(Alignment.FILL, HorizontalAlignment.FILL);
121-
HORIZONTAL_ALIGNMENT_MAP.put(Alignment.JUSTIFY, HorizontalAlignment.JUSTIFY);
122-
109+
private static final Map<Alignment, HorizontalAlignment> HORIZONTAL_ALIGNMENT_MAP = Map.of(
110+
Alignment.GENERAL, HorizontalAlignment.GENERAL,
111+
Alignment.LEFT, HorizontalAlignment.LEFT,
112+
Alignment.CENTRE, HorizontalAlignment.CENTER,
113+
Alignment.RIGHT, HorizontalAlignment.RIGHT,
114+
Alignment.FILL, HorizontalAlignment.FILL,
115+
Alignment.JUSTIFY, HorizontalAlignment.JUSTIFY);
123116
// Note: No JXL options for CENTER_SELECTION or DISTRIBUTED
124-
}
125117

126118
@Override
127119
public HorizontalAlignment getAlignment()
@@ -385,7 +377,7 @@ public boolean getQuotePrefixed()
385377
@Override
386378
public int getFontIndexAsInt()
387379
{
388-
throw new UnsupportedOperationException("method not yet supported");
380+
return getFontIndex();
389381
}
390382

391383
@Override
@@ -399,4 +391,47 @@ public void setFillForegroundColor(Color color)
399391
{
400392
throw new UnsupportedOperationException("method not yet supported");
401393
}
394+
395+
/**
396+
* A pared down version of {@link org.apache.poi.ss.util.CellUtil#getFormatProperties(org.apache.poi.ss.usermodel.CellStyle)}
397+
* that only includes properties supported by this implementation.
398+
*/
399+
@Override
400+
public EnumMap<CellPropertyType, Object> getFormatProperties()
401+
{
402+
EnumMap<CellPropertyType, Object> properties = new EnumMap<>(CellPropertyType.class);
403+
properties.put(CellPropertyType.ALIGNMENT, getAlignment());
404+
properties.put(CellPropertyType.VERTICAL_ALIGNMENT, getVerticalAlignment());
405+
//properties.put(CellPropertyType.BORDER_BOTTOM, getBorderBottom());
406+
//properties.put(CellPropertyType.BORDER_LEFT, getBorderLeft());
407+
//properties.put(CellPropertyType.BORDER_RIGHT, getBorderRight());
408+
//properties.put(CellPropertyType.BORDER_TOP, getBorderTop());
409+
properties.put(CellPropertyType.BOTTOM_BORDER_COLOR, getBottomBorderColor());
410+
properties.put(CellPropertyType.DATA_FORMAT, getDataFormat());
411+
properties.put(CellPropertyType.FILL_PATTERN, getFillPattern());
412+
413+
//properties.put(CellPropertyType.FILL_FOREGROUND_COLOR, getFillForegroundColor());
414+
//properties.put(CellPropertyType.FILL_BACKGROUND_COLOR, getFillBackgroundColor());
415+
//properties.put(CellPropertyType.FILL_FOREGROUND_COLOR_COLOR, getFillForegroundColorColor());
416+
//properties.put(CellPropertyType.FILL_BACKGROUND_COLOR_COLOR, getFillBackgroundColorColor());
417+
418+
properties.put(CellPropertyType.FONT, getFontIndex());
419+
properties.put(CellPropertyType.HIDDEN, getHidden());
420+
properties.put(CellPropertyType.INDENTION, getIndention());
421+
properties.put(CellPropertyType.LEFT_BORDER_COLOR, getLeftBorderColor());
422+
properties.put(CellPropertyType.LOCKED, getLocked());
423+
properties.put(CellPropertyType.RIGHT_BORDER_COLOR, getRightBorderColor());
424+
//properties.put(CellPropertyType.ROTATION, getRotation());
425+
properties.put(CellPropertyType.TOP_BORDER_COLOR, getTopBorderColor());
426+
properties.put(CellPropertyType.WRAP_TEXT, getWrapText());
427+
//properties.put(CellPropertyType.SHRINK_TO_FIT, getShrinkToFit());
428+
//properties.put(CellPropertyType.QUOTE_PREFIXED, getQuotePrefixed());
429+
return properties;
430+
}
431+
432+
@Override
433+
public void invalidateCachedProperties()
434+
{
435+
// Properties can't change in this implementation, nothing to invalidate
436+
}
402437
}

assay/package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assay/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"clean": "rimraf resources/web/assay/gen && rimraf resources/views/gen && rimraf resources/web/gen"
1313
},
1414
"dependencies": {
15-
"@labkey/components": "7.21.0"
15+
"@labkey/components": "7.23.0"
1616
},
1717
"devDependencies": {
18-
"@labkey/build": "8.9.0",
18+
"@labkey/build": "9.0.0",
1919
"@types/jest": "30.0.0",
2020
"@types/react": "18.3.27",
2121
"@types/react-dom": "18.3.7"

core/package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353
}
5454
},
5555
"dependencies": {
56-
"@labkey/components": "7.22.1",
56+
"@labkey/components": "7.23.0",
5757
"@labkey/themes": "1.7.0"
5858
},
5959
"devDependencies": {
60-
"@labkey/build": "8.9.0",
60+
"@labkey/build": "9.0.0",
6161
"@labkey/eslint-config": "1.1.3",
6262
"@types/jest": "30.0.0",
6363
"@types/react": "18.3.27",

experiment/package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

experiment/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"test-integration": "cross-env NODE_ENV=test jest --ci --runInBand -c test/js/jest.config.integration.js"
1414
},
1515
"dependencies": {
16-
"@labkey/components": "7.22.1"
16+
"@labkey/components": "7.23.0"
1717
},
1818
"devDependencies": {
19-
"@labkey/build": "8.9.0",
19+
"@labkey/build": "9.0.0",
2020
"@labkey/test": "1.12.0",
2121
"@types/jest": "30.0.0",
2222
"@types/react": "18.3.27",

pipeline/package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pipeline/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
"build-prod": "npm run clean && cross-env NODE_ENV=production PROD_SOURCE_MAP=source-map webpack --config node_modules/@labkey/build/webpack/prod.config.js --color --progress --profile"
1515
},
1616
"dependencies": {
17-
"@labkey/components": "7.21.0"
17+
"@labkey/components": "7.23.0"
1818
},
1919
"devDependencies": {
20-
"@labkey/build": "8.9.0",
20+
"@labkey/build": "9.0.0",
2121
"@labkey/eslint-config": "1.1.3",
2222
"@types/jest": "30.0.0",
2323
"@types/react": "18.3.27",

search/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ dependencies {
328328
BuildUtils.addExternalDependency(
329329
project,
330330
new ExternalDependency(
331-
"org.codelibs:jhighlight:1.1.0",
331+
"org.codelibs:jhighlight:1.1.1",
332332
"JHighlight",
333333
"codelibs",
334334
"https://github.com/codelibs/jhighlight",
@@ -406,7 +406,7 @@ dependencies {
406406
BuildUtils.addExternalDependency(
407407
project,
408408
new ExternalDependency(
409-
"com.googlecode.plist:dd-plist:1.28",
409+
"com.googlecode.plist:dd-plist:1.29",
410410
"DD Plist",
411411
"com.dd.plist",
412412
"https://github.com/3breadt/dd-plist",

0 commit comments

Comments
 (0)