Various work on w2l 1.2
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@17 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
6f3a08b4f6
commit
c410adda52
17 changed files with 202 additions and 60 deletions
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.0 (2009-03-02)
|
||||
* Version 1.2 (2009-03-02)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -597,8 +597,23 @@ public class Converter extends ConverterBase {
|
|||
anchor.setAttribute("href",sHref);
|
||||
String sName = Misc.getAttribute(onode,XMLString.OFFICE_NAME);
|
||||
if (sName!=null) {
|
||||
anchor.setAttribute("name",sName);
|
||||
anchor.setAttribute("title",sName); // OOo does not have title...
|
||||
// The name attribute is rarely use (usually the user will insert a bookmark)
|
||||
// Hence we (mis)use it to set additional attributes that are not supported by OOo
|
||||
if (sName.indexOf(";")==-1 && sName.indexOf("=")==-1) {
|
||||
// Simple case, use the value to set name and title
|
||||
anchor.setAttribute("name",sName);
|
||||
anchor.setAttribute("title",sName);
|
||||
}
|
||||
else {
|
||||
// Complex case - using the syntax: name=value;name=value;...
|
||||
String[] sElements = sName.split(";");
|
||||
for (String sElement : sElements) {
|
||||
String[] sNameVal = sElement.split("=");
|
||||
if (sNameVal.length>=2) {
|
||||
anchor.setAttribute(sNameVal[0],sNameVal[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: target has been deprecated in xhtml 1.0 strict
|
||||
String sTarget = Misc.getAttribute(onode,XMLString.OFFICE_TARGET_FRAME_NAME);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue