As requested on StackOverflow, expose on CellStyle QuotePrefix/123Prefix
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1768012 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6f5a44c139
commit
7c9754a08d
@ -243,6 +243,24 @@ public final class HSSFCellStyle implements CellStyle {
|
||||
return _format.isLocked();
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn on or off "Quote Prefix" or "123 Prefix" for the style,
|
||||
* which is used to tell Excel that the thing which looks like
|
||||
* a number or a formula shouldn't be treated as on.
|
||||
*/
|
||||
@Override
|
||||
public void setQuotePrefixed(boolean quotePrefix) {
|
||||
_format.set123Prefix(quotePrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is "Quote Prefix" or "123 Prefix" enabled for the cell?
|
||||
*/
|
||||
@Override
|
||||
public boolean getQuotePrefixed() {
|
||||
return _format.get123Prefix();
|
||||
}
|
||||
|
||||
/**
|
||||
* set the type of horizontal alignment for the cell
|
||||
* @param align - the type of alignment
|
||||
|
@ -397,6 +397,22 @@ public interface CellStyle {
|
||||
*/
|
||||
|
||||
boolean getLocked();
|
||||
|
||||
/**
|
||||
* Turn on or off "Quote Prefix" or "123 Prefix" for the style,
|
||||
* which is used to tell Excel that the thing which looks like
|
||||
* a number or a formula shouldn't be treated as on.
|
||||
* Turning this on is somewhat (but not completely, see {@link IgnoredErrorType})
|
||||
* like prefixing the cell value with a ' in Excel
|
||||
*/
|
||||
void setQuotePrefixed(boolean quotePrefix);
|
||||
|
||||
/**
|
||||
* Is "Quote Prefix" or "123 Prefix" enabled for the cell?
|
||||
* Having this on is somewhat (but not completely, see {@link IgnoredErrorType})
|
||||
* like prefixing the cell value with a ' in Excel
|
||||
*/
|
||||
boolean getQuotePrefixed();
|
||||
|
||||
/**
|
||||
* set the type of horizontal alignment for the cell
|
||||
|
@ -46,7 +46,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STBorderStyle;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STPatternType;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* High level representation of the the possible formatting information for the contents of the cells on a sheet in a
|
||||
@ -655,6 +654,14 @@ public class XSSFCellStyle implements CellStyle {
|
||||
return _cellXf.getProtection().getLocked();
|
||||
}
|
||||
|
||||
/**
|
||||
* Is "Quote Prefix" or "123 Prefix" enabled for the cell?
|
||||
*/
|
||||
@Override
|
||||
public boolean getQuotePrefixed() {
|
||||
return _cellXf.getQuotePrefix();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the color to use for the right border
|
||||
*
|
||||
@ -1255,6 +1262,16 @@ public class XSSFCellStyle implements CellStyle {
|
||||
}
|
||||
_cellXf.getProtection().setLocked(locked);
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn on or off "Quote Prefix" or "123 Prefix" for the style,
|
||||
* which is used to tell Excel that the thing which looks like
|
||||
* a number or a formula shouldn't be treated as on.
|
||||
*/
|
||||
@Override
|
||||
public void setQuotePrefixed(boolean quotePrefix) {
|
||||
_cellXf.setQuotePrefix(quotePrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the color to use for the right border
|
||||
|
Loading…
Reference in New Issue
Block a user