X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fdocbook%2Fui%2FAbstractDbkViewer.java;fp=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fdocbook%2Fui%2FAbstractDbkViewer.java;h=e9000936128b2f94f850475471b28161399911dc;hp=7c2b59b32905ea272622a7baba831bc2071f9729;hb=8769195311cc450c2b55b759f57aad8ba4efd790;hpb=1b2f009d0bfd15571251e474ea1efb25e46c4679 diff --git a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java index 7c2b59b..e900093 100644 --- a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java +++ b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java @@ -221,13 +221,13 @@ public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke protected DbkVideo newVideo(TextSection parent, Node node) { try { - DbkVideo video = new DbkVideo(parent,getCmsEditable().canEdit()?SWT.NONE : SWT.READ_ONLY, node); + DbkVideo video = new DbkVideo(parent, getCmsEditable().canEdit() ? SWT.NONE : SWT.READ_ONLY, node); GridData gd; if (maxMediaWidth != null) { gd = new GridData(SWT.CENTER, SWT.FILL, false, false); // TODO, manage size - gd.widthHint = maxMediaWidth; - gd.heightHint = (int) (gd.heightHint * 0.5625); +// gd.widthHint = maxMediaWidth; +// gd.heightHint = (int) (gd.heightHint * 0.5625); } else { gd = new GridData(SWT.CENTER, SWT.FILL, false, false); // gd.widthHint = video.getWidth(); @@ -235,7 +235,7 @@ public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke } video.setLayoutData(gd); updateContent(video); - return null; + return video; } catch (RepositoryException e) { throw new JcrException("Cannot add new image " + node, e); } @@ -807,8 +807,7 @@ public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke return newParagraph; } - protected Paragraph sectionTitleSplitted(DbkSectionTitle sectionTitle, Node newNode) - throws RepositoryException { + protected Paragraph sectionTitleSplitted(DbkSectionTitle sectionTitle, Node newNode) throws RepositoryException { updateContent(sectionTitle); Paragraph newParagraph = newParagraph(sectionTitle.getSection(), newNode); // we assume beforeFirst is not null since there was a sectionTitle