LibreOffice Module xmerge (master) 1
ConverterCapabilitiesImpl.java
Go to the documentation of this file.
1/*
2 * This file is part of the LibreOffice project.
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 *
8 * This file incorporates work covered by the following license notice:
9 *
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
17 */
18
19package org.openoffice.xmerge.converter.xml.xslt;
20
23
33public final class ConverterCapabilitiesImpl
34 implements ConverterCapabilities {
35
36 public boolean canConvertTag(String tag) {
37
39 return true;
41 return true;
42 else if (OfficeConstants.TAG_OFFICE_BODY.equals(tag))
43 return true;
44 else if (OfficeConstants.TAG_PARAGRAPH.equals(tag))
45 return true;
46 else if (OfficeConstants.TAG_HEADING.equals(tag))
47 return true;
48 else if (OfficeConstants.TAG_ORDERED_LIST.equals(tag))
49 return true;
50 else if (OfficeConstants.TAG_UNORDERED_LIST.equals(tag))
51 return true;
52 else if (OfficeConstants.TAG_LIST_ITEM.equals(tag))
53 return true;
54 else if (OfficeConstants.TAG_LIST_HEADER.equals(tag))
55 return true;
56 else if (OfficeConstants.TAG_SPAN.equals(tag))
57 return true;
58 else if (OfficeConstants.TAG_HYPERLINK.equals(tag))
59 return true;
60 else if (OfficeConstants.TAG_LINE_BREAK.equals(tag))
61 return true;
62 else if (OfficeConstants.TAG_SPACE.equals(tag))
63 return true;
64 else if (OfficeConstants.TAG_TAB_STOP.equals(tag))
65 return true;
66
67 return false;
68 }
69
70 public boolean canConvertAttribute(String tag, String attribute) {
71 return OfficeConstants.TAG_SPACE.equals(tag)
73 }
74}
Xslt implementation of ConverterCapabilities for the PluginFactoryImpl.
boolean canConvertAttribute(String tag, String attribute)
Test to see if the device document format supports the tag attribute in question.
boolean canConvertTag(String tag)
Test to see if the device document format supports the tag in question.
A ConverterCapabilities object is used by DocumentMerger implementations.
This interface contains constants for StarOffice XML tags, attributes (StarCalc cell types,...
String TAG_ORDERED_LIST
Element tag for text:ordered-list.
String TAG_LINE_BREAK
Element tag for text:line-break.
String TAG_LIST_HEADER
Element tag for text:list-header.
String TAG_OFFICE_BODY
Element tag for office:body.
String TAG_TAB_STOP
Element tag for text:tab-stop.
String TAG_UNORDERED_LIST
Element tag for text:unordered-list.
String ATTRIBUTE_SPACE_COUNT
Attribute tag for text:c of element text:s.
String TAG_OFFICE_DOCUMENT_CONTENT
Element tag for office:document-content, this is the root tag in content.xml.
String TAG_OFFICE_DOCUMENT
Element tag for office:document, this is the root tag.
String TAG_LIST_ITEM
Element tag for text:list-item.
Document and PluginFactory implementations for XML based formats.
Provides interfaces for converting between two Document formats, and supports a "merge" interface for...
Definition: Convert.java:19
sal_Int32 attribute