deweese 2003/12/02 02:58:32
Modified: sources/org/apache/batik/bridge SVGUseElementBridge.java
URIResolver.java
sources/org/apache/batik/gvt/text ConcreteTextSelector.java
Log:
1) When using multiple symbols from an external file Batik will now
only load that external file once.
2) Clicking on the Canvas no longer clears the system clipboard.
Revision Changes Path
1.37 +9 -7
xml-batik/sources/org/apache/batik/bridge/SVGUseElementBridge.java
Index: SVGUseElementBridge.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGUseElementBridge.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- SVGUseElementBridge.java 5 Nov 2003 22:21:09 -0000 1.36
+++ SVGUseElementBridge.java 2 Dec 2003 10:58:32 -0000 1.37
@@ -131,14 +131,16 @@
* content will be appended. The composite node is emptied
* before appending new content.
*/
- public CompositeGraphicsNode buildCompositeGraphicsNode(BridgeContext ctx,
Element e,
- CompositeGraphicsNode
gn,
-
ReferencedElementMutationListener l) {
+ public CompositeGraphicsNode buildCompositeGraphicsNode
+ (BridgeContext ctx, Element e,
+ CompositeGraphicsNode gn,
+ ReferencedElementMutationListener l) {
// get the referenced element
String uri = XLinkSupport.getXLinkHref(e);
- if (uri.length() == 0)
- throw new BridgeException(e, ERR_URI_MALFORMED,
- new Object[] {uri});
+ if (uri.length() == 0) {
+ throw new BridgeException(e, ERR_ATTRIBUTE_MISSING,
+ new Object[] {"xlink:href"});
+ }
Element refElement = ctx.getReferencedElement(e, uri);
SVGOMDocument document
1.25 +7 -2 xml-batik/sources/org/apache/batik/bridge/URIResolver.java
Index: URIResolver.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/URIResolver.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- URIResolver.java 9 Aug 2003 16:58:37 -0000 1.24
+++ URIResolver.java 2 Dec 2003 10:58:32 -0000 1.25
@@ -160,7 +160,12 @@
UserAgent userAgent = documentLoader.getUserAgent();
userAgent.checkLoadExternalResource(purl, pDocURL);
- Document doc = documentLoader.loadDocument(purl.toString());
+ String purlStr = purl.toString();
+ if (frag != null) {
+ purlStr = purlStr.substring(0, purlStr.length()-(frag.length()+1));
+ }
+
+ Document doc = documentLoader.loadDocument(purlStr);
if (frag != null)
return doc.getElementById(frag);
return doc;
1.18 +4 -2
xml-batik/sources/org/apache/batik/gvt/text/ConcreteTextSelector.java
Index: ConcreteTextSelector.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/gvt/text/ConcreteTextSelector.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ConcreteTextSelector.java 7 Sep 2003 22:25:28 -0000 1.17
+++ ConcreteTextSelector.java 2 Dec 2003 10:58:32 -0000 1.18
@@ -157,9 +157,11 @@
}
public void clearSelection() {
+ if (selectionNode == null)
+ return;
dispatchSelectionEvent(new SelectionEvent
(null, SelectionEvent.SELECTION_CLEARED, null));
- copyToClipboard(null);
+ // copyToClipboard(null);
selectionNode = null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]