Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix align issue of "inline" elements (#1372) #1373

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,20 @@ public void setNull(int parameterId) throws OdaException {
try {
java.sql.ParameterMetaData pm = this.preStat.getParameterMetaData();
if (pm == null) {
this.preStat.setNull(parameterId, java.sql.Types.OTHER);
try {
this.preStat.setNull(parameterId, java.sql.Types.OTHER);
} catch (SQLException e) {
// fallback, set the null value with SQL default null type
this.preStat.setNull(parameterId, java.sql.Types.NULL);
}
addLog("setNull", parameterId, "null");
} else {
this.preStat.setNull(parameterId, pm.getParameterType(parameterId));
try {
this.preStat.setNull(parameterId, pm.getParameterType(parameterId));
} catch (SQLException e) {
// fallback, set the null value with SQL default null type
this.preStat.setNull(parameterId, java.sql.Types.NULL);
}
}
} catch (SQLException e) {
throw new JDBCException(ResourceConstants.PREPARESTATEMENT_CANNOT_SET_NULL_VALUE, e);
Expand Down Expand Up @@ -887,7 +897,7 @@ private void addLog(String methodName, Exception e) {
/**
* This API is meant to execute the update/DML sql query.
*
* @return
* @return Return the execution status
* @throws OdaException
*/
public int executeUpdate() throws OdaException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void align(boolean endParagraph, LayoutContext context) {
justify(spacing, adjustLeftWhiteSpace, adjustRightWhiteSpace);
} else {
// is left aligned
if (!parent.content.isDirectionRTL()) {
if (parent.content != null && !parent.content.isDirectionRTL()) {
if (adjustLeftWhiteSpace != 0) {
Iterator<IArea> iter = getChildren();
while (iter.hasNext()) {
Expand Down
Loading