/** * For isBold, isItalic etc */ private static boolean isCTOnOff(CTOnOff onoff) { if (!onoff.isSetVal()) { return true; } final STOnOff.Enum val = onoff.getVal(); return ( (STOnOff.TRUE == val) || (STOnOff.X_1 == val) || (STOnOff.ON == val) ); }
private boolean getRepeat() { boolean repeat = false; if (ctRow.isSetTrPr()) { CTTrPr trpr = getTrPr(); if (trpr.sizeOfTblHeaderArray() > 0) { CTOnOff rpt = trpr.getTblHeaderArray(0); repeat = (rpt.isSetVal() ? WMLHelper.convertSTOnOffToBoolean(rpt.getVal()) : true); } } return repeat; }
/** * Return true if the "can't split row" value is true. The logic for this * attribute is a little unusual: a TRUE value means DON'T allow rows to * split, FALSE means allow rows to split. * * @return true if rows can't be split, false otherwise. */ public boolean isCantSplitRow() { boolean isCant = false; if (ctRow.isSetTrPr()) { CTTrPr trpr = getTrPr(); if (trpr.sizeOfCantSplitArray() > 0) { CTOnOff onoff = trpr.getCantSplitArray(0); isCant = (onoff.isSetVal() ? WMLHelper.convertSTOnOffToBoolean(onoff.getVal()) : true); } } return isCant; }
/** * For isBold, isItalic etc */ private static boolean isCTOnOff(CTOnOff onoff) { if (!onoff.isSetVal()) { return true; } final STOnOff.Enum val = onoff.getVal(); return ( (STOnOff.TRUE == val) || (STOnOff.X_1 == val) || (STOnOff.ON == val) ); }
/** * For isBold, isItalic etc */ private static boolean isCTOnOff( CTOnOff onoff ) { if ( !onoff.isSetVal() ) return true; if ( onoff.getVal() == STOnOff.ON ) return true; if ( onoff.getVal() == STOnOff.TRUE ) return true; return false; }
/** * For isBold, isItalic etc */ private boolean isCTOnOff(CTOnOff onoff) { if(! onoff.isSetVal()) return true; if(onoff.getVal() == STOnOff.ON) return true; if(onoff.getVal() == STOnOff.TRUE) return true; return false; }
/** * For isBold, isItalic etc */ public static boolean isCTOnOff( CTOnOff onoff ) { if ( onoff == null ) { return false; } if ( !onoff.isSetVal() ) return true; if ( onoff.getVal() == STOnOff.ON ) return true; if ( onoff.getVal() == STOnOff.TRUE ) return true; if ( onoff.getVal() == STOnOff.X_1 ) // sometimes bold, italic are with w="1". Ex : <w:i w:val="1" /> // see https://code.google.com/p/xdocreport/issues/detail?id=315 return true; return false; } }
/** * For isBold, isItalic etc */ public static boolean isCTOnOff( CTOnOff onoff ) { if ( onoff == null ) { return false; } if ( !onoff.isSetVal() ) return true; if ( onoff.getVal() == STOnOff.ON ) return true; if ( onoff.getVal() == STOnOff.TRUE ) return true; if ( onoff.getVal() == STOnOff.X_1 ) // sometimes bold, italic are with w="1". Ex : <w:i w:val="1" /> // see https://code.google.com/p/xdocreport/issues/detail?id=315 return true; return false; } }
private boolean getRepeat() { boolean repeat = false; if (ctRow.isSetTrPr()) { CTTrPr trpr = getTrPr(); if (trpr.sizeOfTblHeaderArray() > 0) { CTOnOff rpt = trpr.getTblHeaderArray(0); repeat = (rpt.isSetVal() ? WMLHelper.convertSTOnOffToBoolean(rpt.getVal()) : true); } } return repeat; }
/** * Return true if the "can't split row" value is true. The logic for this * attribute is a little unusual: a TRUE value means DON'T allow rows to * split, FALSE means allow rows to split. * * @return true if rows can't be split, false otherwise. */ public boolean isCantSplitRow() { boolean isCant = false; if (ctRow.isSetTrPr()) { CTTrPr trpr = getTrPr(); if (trpr.sizeOfCantSplitArray() > 0) { CTOnOff onoff = trpr.getCantSplitArray(0); isCant = (onoff.isSetVal() ? WMLHelper.convertSTOnOffToBoolean(onoff.getVal()) : true); } } return isCant; }