Add support for before/after attributes in xhtml style maps
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@187 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
049bf052bc
commit
de72a4f49e
16 changed files with 201 additions and 86 deletions
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.4 (2014-09-23)
|
||||
* Version 1.4 (2014-09-26)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -363,6 +363,18 @@ public class ConfigurationDialog extends ConfigurationDialogBase implements XSer
|
|||
if (!attr.containsKey("css")) { attr.put("css", ""); }
|
||||
dlg.setComboBoxText("Element", attr.get("element"));
|
||||
dlg.setTextFieldText("Css", none2empty(attr.get("css")));
|
||||
|
||||
if (nCurrentFamily==1 || nCurrentFamily==2) {
|
||||
if (!attr.containsKey("before")) { attr.put("before", ""); }
|
||||
if (!attr.containsKey("after")) { attr.put("after", ""); }
|
||||
dlg.setTextFieldText("Before", attr.get("before"));
|
||||
dlg.setTextFieldText("After", attr.get("after"));
|
||||
}
|
||||
else {
|
||||
dlg.setTextFieldText("Before", "");
|
||||
dlg.setTextFieldText("After", "");
|
||||
}
|
||||
|
||||
if (nCurrentFamily==1 || nCurrentFamily==2) {
|
||||
if (!attr.containsKey("block-element")) { attr.put("block-element", ""); }
|
||||
if (!attr.containsKey("block-css")) { attr.put("block-css", ""); }
|
||||
|
@ -378,6 +390,10 @@ public class ConfigurationDialog extends ConfigurationDialogBase implements XSer
|
|||
protected void getControls(DialogAccess dlg, Map<String,String> attr) {
|
||||
attr.put("element", dlg.getComboBoxText("Element"));
|
||||
attr.put("css", empty2none(dlg.getTextFieldText("Css")));
|
||||
if (nCurrentFamily==1 || nCurrentFamily==2) {
|
||||
attr.put("before", dlg.getTextFieldText("Before"));
|
||||
attr.put("after", dlg.getTextFieldText("After"));
|
||||
}
|
||||
if (nCurrentFamily==1 || nCurrentFamily==2) {
|
||||
attr.put("block-element", dlg.getComboBoxText("BlockElement"));
|
||||
attr.put("block-css", empty2none(dlg.getTextFieldText("BlockCss")));
|
||||
|
@ -387,6 +403,8 @@ public class ConfigurationDialog extends ConfigurationDialogBase implements XSer
|
|||
protected void clearControls(DialogAccess dlg) {
|
||||
dlg.setComboBoxText("Element", "");
|
||||
dlg.setTextFieldText("Css", "");
|
||||
dlg.setTextFieldText("Before", "");
|
||||
dlg.setTextFieldText("After", "");
|
||||
dlg.setComboBoxText("BlockElement", "");
|
||||
dlg.setTextFieldText("BlockCss", "");
|
||||
}
|
||||
|
@ -397,7 +415,11 @@ public class ConfigurationDialog extends ConfigurationDialogBase implements XSer
|
|||
dlg.setControlEnabled("ElementLabel", bHasMappings && nCurrentFamily<=2);
|
||||
dlg.setControlEnabled("Element", bHasMappings && nCurrentFamily<=2);
|
||||
dlg.setControlEnabled("CssLabel", bHasMappings);
|
||||
dlg.setControlEnabled("Css", bHasMappings);
|
||||
dlg.setControlEnabled("Css", bHasMappings);
|
||||
dlg.setControlEnabled("BeforeLabel", bHasMappings && (nCurrentFamily==1 || nCurrentFamily==2));
|
||||
dlg.setControlEnabled("Before", bHasMappings && (nCurrentFamily==1 || nCurrentFamily==2));
|
||||
dlg.setControlEnabled("AfterLabel", bHasMappings && (nCurrentFamily==1 || nCurrentFamily==2));
|
||||
dlg.setControlEnabled("After", bHasMappings && (nCurrentFamily==1 || nCurrentFamily==2));
|
||||
dlg.setControlEnabled("BlockElementLabel", bHasMappings && (nCurrentFamily==1 || nCurrentFamily==2));
|
||||
dlg.setControlEnabled("BlockElement", bHasMappings && (nCurrentFamily==1 || nCurrentFamily==2));
|
||||
dlg.setControlEnabled("BlockCssLabel", bHasMappings && (nCurrentFamily==1 || nCurrentFamily==2));
|
||||
|
|
|
@ -34,9 +34,6 @@ import java.io.IOException;
|
|||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import com.sun.star.beans.PropertyValue;
|
||||
import com.sun.star.frame.XDispatchHelper;
|
||||
import com.sun.star.frame.XDispatchProvider;
|
||||
import com.sun.star.frame.XFrame;
|
||||
import com.sun.star.lang.XComponent;
|
||||
import com.sun.star.lib.uno.helper.WeakBase;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue