mirror of
https://github.com/apache/poi.git
synced 2025-03-06 08:59:07 +00:00
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
2780bf3be3
commit
5f2951ebc6
@ -243,6 +243,24 @@ public final class HSSFCellStyle implements CellStyle {
|
|||||||
return _format.isLocked();
|
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
|
* set the type of horizontal alignment for the cell
|
||||||
* @param align - the type of alignment
|
* @param align - the type of alignment
|
||||||
|
@ -398,6 +398,22 @@ public interface CellStyle {
|
|||||||
|
|
||||||
boolean getLocked();
|
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
|
* set the type of horizontal alignment for the cell
|
||||||
* @param align - the type of alignment
|
* @param align - the type of alignment
|
||||||
|
@ -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.STBorderStyle;
|
||||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STPatternType;
|
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
|
* 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();
|
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
|
* Get the color to use for the right border
|
||||||
*
|
*
|
||||||
@ -1256,6 +1263,16 @@ public class XSSFCellStyle implements CellStyle {
|
|||||||
_cellXf.getProtection().setLocked(locked);
|
_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
|
* Set the color to use for the right border
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user