本文整理汇总了Java中com.sun.star.lang.IllegalArgumentException类的典型用法代码示例。如果您正苦于以下问题:Java IllegalArgumentException类的具体用法?Java IllegalArgumentException怎么用?Java IllegalArgumentException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IllegalArgumentException类属于com.sun.star.lang包,在下文中一共展示了IllegalArgumentException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: loadDocument
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private XComponent loadDocument(OfficeContext context, File inputFile) throws OfficeException {
if (!inputFile.exists()) {
throw new OfficeException("input document not found");
}
XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
Map<String, ?> loadProperties = getLoadProperties(inputFile);
XComponent document = null;
try {
document = loader.loadComponentFromURL(toUrl(inputFile), "_blank", 0, toUnoProperties(loadProperties));
} catch (IllegalArgumentException illegalArgumentException) {
throw new OfficeException("could not load document: " + inputFile.getName(), illegalArgumentException);
} catch (ErrorCodeIOException errorCodeIOException) {
throw new OfficeException("could not load document: " + inputFile.getName() + "; errorCode: "
+ errorCodeIOException.ErrCode, errorCodeIOException);
} catch (IOException ioException) {
throw new OfficeException("could not load document: " + inputFile.getName(), ioException);
}
if (document == null) {
throw new OfficeException("could not load document: " + inputFile.getName());
}
XRefreshable refreshable = cast(XRefreshable.class, document);
if (refreshable != null) {
refreshable.refresh();
}
return document;
}
开发者ID:kuzavas,项目名称:ephesoft,代码行数:27,代码来源:AbstractConversionTask.java
示例2: loadDocument
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private XComponent loadDocument(OfficeContext context, File inputFile) throws OfficeException {
if (!inputFile.exists()) {
throw new OfficeException("input document not found");
}
XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
Map<String,?> loadProperties = getLoadProperties(inputFile);
XComponent document = null;
try {
document = loader.loadComponentFromURL(toUrl(inputFile), "_blank", 0, toUnoProperties(loadProperties));
} catch (IllegalArgumentException illegalArgumentException) {
throw new OfficeException("could not load document: " + inputFile.getName(), illegalArgumentException);
} catch (ErrorCodeIOException errorCodeIOException) {
throw new OfficeException("could not load document: " + inputFile.getName() + "; errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
} catch (IOException ioException) {
throw new OfficeException("could not load document: " + inputFile.getName(), ioException);
}
if (document == null) {
throw new OfficeException("could not load document: " + inputFile.getName());
}
return document;
}
开发者ID:qjx378,项目名称:wenku,代码行数:22,代码来源:AbstractConversionTask.java
示例3: setPropertyValue
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
@Override
public void setPropertyValue(String key, Object val)
throws UnknownPropertyException, PropertyVetoException,
IllegalArgumentException, WrappedTargetException
{
if (STAGE.equalsIgnoreCase(key))
{
if (val != null)
{
stage = val.toString();
master.setStage(stage);
}
}
else
master.setPropertyValue(key, val);
}
开发者ID:WollMux,项目名称:WollMux,代码行数:17,代码来源:PrintModels.java
示例4: createUIElement
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
@Override
public XUIElement createUIElement(String resourceUrl, PropertyValue[] arguments)
throws NoSuchElementException, IllegalArgumentException
{
Logger.debug("WollMuxSidebarFactory:createUIElement");
if (!resourceUrl.startsWith("private:resource/toolpanel/WollMuxSidebarFactory/WollMuxSidebarPanel"))
{
throw new NoSuchElementException(resourceUrl, this);
}
XWindow parentWindow = null;
for (int i = 0; i < arguments.length; i++)
{
if (arguments[i].Name.equals("ParentWindow"))
{
parentWindow =
UnoRuntime.queryInterface(XWindow.class, arguments[i].Value);
break;
}
}
return new WollMuxSidebarPanel(context, parentWindow, resourceUrl);
}
开发者ID:WollMux,项目名称:WollMux,代码行数:25,代码来源:WollMuxSidebarFactory.java
示例5: insertTextAtCurrentLocation
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
public static void insertTextAtCurrentLocation(XText text, XTextCursor cursor, String string, String parStyle)
throws WrappedTargetException, PropertyVetoException, UnknownPropertyException,
UndefinedParagraphFormatException {
text.insertString(cursor, string, true);
XParagraphCursor parCursor = UnoRuntime.queryInterface(
XParagraphCursor.class, cursor);
// Access the property set of the cursor, and set the currently selected text
// (which is the string we just inserted) to be bold
XPropertySet props = UnoRuntime.queryInterface(
XPropertySet.class, parCursor);
try {
props.setPropertyValue(PARA_STYLE_NAME, parStyle);
} catch (IllegalArgumentException ex) {
throw new UndefinedParagraphFormatException(parStyle);
}
cursor.collapseToEnd();
}
开发者ID:JabRef,项目名称:jabref,代码行数:19,代码来源:OOUtil.java
示例6: rebuildBibTextSection
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
public void rebuildBibTextSection(List<BibDatabase> databases, OOBibStyle style)
throws NoSuchElementException, WrappedTargetException, IllegalArgumentException,
CreationException, PropertyVetoException, UnknownPropertyException, UndefinedParagraphFormatException {
List<String> cited = findCitedKeys();
Map<String, BibDatabase> linkSourceBase = new HashMap<>();
Map<BibEntry, BibDatabase> entries = findCitedEntries(databases, cited, linkSourceBase); // Although entries are redefined without use, this also updates linkSourceBase
List<String> names = sortedReferenceMarks;
if (style.isSortByPosition()) {
// We need to sort the entries according to their order of appearance:
entries = getSortedEntriesFromSortedRefMarks(names, linkSourceBase);
} else {
SortedMap<BibEntry, BibDatabase> newMap = new TreeMap<>(entryComparator);
for (Map.Entry<BibEntry, BibDatabase> bibtexEntryBibtexDatabaseEntry : findCitedEntries(databases, cited,
linkSourceBase).entrySet()) {
newMap.put(bibtexEntryBibtexDatabaseEntry.getKey(), bibtexEntryBibtexDatabaseEntry.getValue());
}
entries = newMap;
}
clearBibTextSectionContent2();
populateBibTextSection(entries, style);
}
开发者ID:JabRef,项目名称:jabref,代码行数:24,代码来源:OOBibBase.java
示例7: createBibTextSection2
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private void createBibTextSection2(boolean end)
throws IllegalArgumentException, CreationException {
XTextCursor mxDocCursor = text.createTextCursor();
if (end) {
mxDocCursor.gotoEnd(false);
}
OOUtil.insertParagraphBreak(text, mxDocCursor);
// Create a new TextSection from the document factory and access it's XNamed interface
XNamed xChildNamed;
try {
xChildNamed = UnoRuntime.queryInterface(XNamed.class,
mxDocFactory.createInstance("com.sun.star.text.TextSection"));
} catch (Exception e) {
throw new CreationException(e.getMessage());
}
// Set the new sections name to 'Child_Section'
xChildNamed.setName(OOBibBase.BIB_SECTION_NAME);
// Access the Child_Section's XTextContent interface and insert it into the document
XTextContent xChildSection = UnoRuntime.queryInterface(XTextContent.class, xChildNamed);
text.insertTextContent(mxDocCursor, xChildSection, false);
}
开发者ID:JabRef,项目名称:jabref,代码行数:24,代码来源:OOBibBase.java
示例8: clearBibTextSectionContent2
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private void clearBibTextSectionContent2()
throws NoSuchElementException, WrappedTargetException, IllegalArgumentException, CreationException {
// Check if the section exists:
XTextSectionsSupplier supplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, mxDoc);
if (supplier.getTextSections().hasByName(OOBibBase.BIB_SECTION_NAME)) {
XTextSection section = (XTextSection) ((Any) supplier.getTextSections().getByName(OOBibBase.BIB_SECTION_NAME))
.getObject();
// Clear it:
XTextCursor cursor = text.createTextCursorByRange(section.getAnchor());
cursor.gotoRange(section.getAnchor(), false);
cursor.setString("");
} else {
createBibTextSection2(atEnd);
}
}
开发者ID:JabRef,项目名称:jabref,代码行数:17,代码来源:OOBibBase.java
示例9: insertBookMark
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private XTextContent insertBookMark(String name, XTextCursor position)
throws IllegalArgumentException, CreationException {
Object bookmark;
try {
bookmark = mxDocFactory.createInstance("com.sun.star.text.Bookmark");
} catch (Exception e) {
throw new CreationException(e.getMessage());
}
// name the bookmark
XNamed xNamed = UnoRuntime.queryInterface(XNamed.class, bookmark);
xNamed.setName(name);
// get XTextContent interface
XTextContent xTextContent = UnoRuntime.queryInterface(XTextContent.class, bookmark);
// insert bookmark at the end of the document
// instead of mxDocText.getEnd you could use a text cursor's XTextRange interface or any XTextRange
text.insertTextContent(position, xTextContent, true);
position.collapseToEnd();
return xTextContent;
}
开发者ID:JabRef,项目名称:jabref,代码行数:20,代码来源:OOBibBase.java
示例10: createTestUsers
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private void createTestUsers() throws IllegalArgumentException, SystemException, NotSupportedException, HeuristicRollbackException, HeuristicMixedException, RollbackException
{
AuthenticationUtil.setFullyAuthenticatedUser(user1);
for (String[] properties: userProperties)
{
int l = properties.length;
if (l > 0)
{
PersonInfo personInfo = newPersonInfo(properties);
String originalUsername = personInfo.getUsername();
String id = createUser(personInfo, networkOne);
Person person = new Person(
id,
null, // Not set to originalUsername, as the returned JSON does not set it
true, // enabled
personInfo.getFirstName(),
personInfo.getLastName(),
personInfo.getCompany(),
personInfo.getSkype(),
personInfo.getLocation(),
personInfo.getTel(),
personInfo.getMob(),
personInfo.getInstantmsg(),
personInfo.getGoogle(),
null); // description
testUsernames.add(originalUsername);
testPersons.add(person);
// The following call to personService.getPerson(id) returns a NodeRef like:
// workspace://SpacesStore/9db76769-96de-4de4-bdb4-a127130af362
// We call tenantService.getName(nodeRef) to get a fully qualified NodeRef as Solr returns this.
// They look like:
// workspace://@[email protected]/9db76769-96de-4de4-bdb4-a127130af362
NodeRef nodeRef = personService.getPerson(id);
nodeRef = tenantService.getName(nodeRef);
testPersonNodeRefs.add(nodeRef);
}
}
}
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:40,代码来源:QueriesPeopleApiTest.java
示例11: newPersonInfo
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private static PersonInfo newPersonInfo(String... properties) throws IllegalArgumentException
{
int l = properties.length;
if (l > 17)
{
throw new IllegalArgumentException("Too many properties supplied for "+properties);
}
return new PersonInfo(
(l <= 1 ? null : properties[ 1]), // firstName
(l <= 2 ? null : properties[ 2]), // lastName
(l <= 0 ? null : properties[ 0]), // username
(l <= 3 || properties[ 3] == null
? "password" : properties[ 3]), // password
(l <= 4 ? null : new Company(
properties[ 4], // organization
(l <= 5 ? null : properties[ 5]), // address1
(l <= 6 ? null : properties[ 6]), // address2
(l <= 7 ? null : properties[ 7]), // address3
(l <= 8 ? null : properties[ 8]), // postcode
(l <= 9 ? null : properties[ 9]), // telephone
(l <= 10 ? null : properties[10]), // fax
(l <= 11 ? null : properties[11]))),// email
(l <= 12 ? null : properties[12]), // skype
(l <= 13 ? null : properties[13]), // location
(l <= 14 ? null : properties[14]), // tel
(l <= 15 ? null : properties[15]), // mob
(l <= 16 ? null : properties[16]), // instantmsg
(l <= 17 ? null : properties[17])); // google
}
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:31,代码来源:QueriesPeopleApiTest.java
示例12: createTestUsers
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private Map<String, Person> createTestUsers(String[][] userProperties) throws IllegalArgumentException
{
for (String[] properties: userProperties)
{
int l = properties.length;
if (l > 0)
{
PersonInfo personInfo = newPersonInfo(properties);
String originalUsername = personInfo.getUsername();
String id = createUser(personInfo, networkOne);
Person person = new Person(
id,
null, // Not set to originalUsername, as the returned JSON does not set it
true, // enabled
personInfo.getFirstName(),
personInfo.getLastName(),
personInfo.getCompany(),
personInfo.getSkype(),
personInfo.getLocation(),
personInfo.getTel(),
personInfo.getMob(),
personInfo.getInstantmsg(),
personInfo.getGoogle(),
null); // description
testUsers.put(originalUsername, person);
// The following would automatically delete users after a test, but
// we need to clear other data and as we created them we should delete
// them.
// super.users.add(id);
}
}
return testUsers;
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:35,代码来源:QueriesPeopleApiTest.java
示例13: newPersonInfo
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
private static PersonInfo newPersonInfo(String... properties) throws IllegalArgumentException
{
int l = properties.length;
if (l > 17)
{
throw new IllegalArgumentException("Too many properties supplied for "+properties);
}
return new PersonInfo(
(l <= 1 ? null : properties[ 1]), // firstName
(l <= 2 ? null : properties[ 2]), // lastName
(l <= 0 ? null : properties[ 0]), // username
(l <= 3 || properties[ 3] == null
? "password" : properties[ 3]), // password
(l <= 4 ? null : new Company(
properties[ 4], // organization
(l <= 5 ? null : properties[ 5]), // address1
(l <= 6 ? null : properties[ 6]), // address2
(l <= 7 ? null : properties[ 7]), // address3
(l <= 8 ? null : properties[ 8]), // postcode
(l <= 9 ? null : properties[ 9]), // telephone
(l <= 10 ? null : properties[10]), // fax
(l <= 11 ? null : properties[11]))),// email
(l <= 12 ? null : properties[12]), // skype
(l <= 13 ? null : properties[13]), // location
(l <= 14 ? null : properties[14]), // tel
(l <= 15 ? null : properties[15]), // mob
(l <= 16 ? null : properties[16]), // instantmsg
(l <= 17 ? null : properties[17])); // google
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:31,代码来源:QueriesPeopleApiTest.java
示例14: ignoreRule
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
/**
* Called when "Ignore" is selected e.g. in the context menu for an error.
*/
@Override
public void ignoreRule(final String ruleId, final Locale locale)
throws IllegalArgumentException {
// TODO: config should be locale-dependent
disabledRulesUI.add(ruleId);
//config.setDisabledRuleIds(disabledRulesUI);
try {
//config.saveConfiguration(langTool.getLanguage());
} catch (final Throwable t) {
showError(t);
}
recheck = true;
}
开发者ID:prowritingaid,项目名称:openoffice-extension,代码行数:17,代码来源:Main.java
示例15: isVerfuegungspunkt
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
/**
* Liefert true, wenn es sich bei dem übergebenen Absatz paragraph um einen als
* Verfuegungspunkt markierten Absatz handelt.
*
* @param paragraph
* Das Objekt mit der Property ParaStyleName, die für den Vergleich
* herangezogen wird.
* @return true, wenn der Name des Absatzformates mit "WollMuxVerfuegungspunkt"
* beginnt.
*/
private static boolean isVerfuegungspunkt(XTextRange paragraph)
{
String paraStyleName = "";
try
{
paraStyleName =
AnyConverter.toString(UNO.getProperty(paragraph, "ParaStyleName"));
}
catch (IllegalArgumentException e)
{}
return paraStyleName.startsWith(ParaStyleNameVerfuegungspunkt);
}
开发者ID:WollMux,项目名称:WollMux,代码行数:23,代码来源:SachleitendeVerfuegung.java
示例16: isVerfuegungspunktMitZuleitung
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
/**
* Liefert true, wenn es sich bei dem übergebenen Absatz paragraph um einen als
* VerfuegungspunktMitZuleitung markierten Absatz handelt.
*
* @param paragraph
* Das Objekt mit der Property ParaStyleName, die für den Vergleich
* herangezogen wird.
* @return true, wenn der Name des Absatzformates mit
* "WollMuxVerfuegungspunktMitZuleitung" beginnt.
*/
private static boolean isVerfuegungspunktMitZuleitung(XTextRange paragraph)
{
String paraStyleName = "";
try
{
paraStyleName =
AnyConverter.toString(UNO.getProperty(paragraph, "ParaStyleName"));
}
catch (IllegalArgumentException e)
{}
return paraStyleName.startsWith(ParaStyleNameVerfuegungspunktMitZuleitung);
}
开发者ID:WollMux,项目名称:WollMux,代码行数:23,代码来源:SachleitendeVerfuegung.java
示例17: isZuleitungszeile
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
/**
* Liefert true, wenn es sich bei dem übergebenen Absatz paragraph um einen als
* Zuleitungszeile markierten Absatz handelt.
*
* @param paragraph
* Das Objekt mit der Property ParaStyleName, die für den Vergleich
* herangezogen wird.
* @return true, wenn der Name des Absatzformates mit "WollMuxZuleitungszeile"
* beginnt.
*/
private static boolean isZuleitungszeile(XTextRange paragraph)
{
String paraStyleName = "";
try
{
paraStyleName =
AnyConverter.toString(UNO.getProperty(paragraph, "ParaStyleName"));
}
catch (IllegalArgumentException e)
{}
return paraStyleName.startsWith(ParaStyleNameZuleitungszeile);
}
开发者ID:WollMux,项目名称:WollMux,代码行数:23,代码来源:SachleitendeVerfuegung.java
示例18: fixInputUserFields
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
/**
* Ersetzt alle vom WollMux-Seriendruck verwendeten Textfelder vom Typ
* c,s,s,t,textfield,InputUser durch ihren Stringwert. Diese Ersetzung ist
* notwendig, da InputUser-Felder als Spezialfelder (z.B. Wenn...Dann...Sonst...)
* verwendet werden und sie dokumentglobal nur den selben Wert haben können.
*
* Felder vom Typ c.s.s.t.textfield.User verwenden ebenfalls einen dokumentglobalen
* Textfieldmaster, müssen aber nicht durch die textuelle Repräsentation ersetzt
* werden, da sich mit dem Seriendruck nur die durch WollMux gesetzten
* Textfieldmaster ändern können und es kein Szenario gibt, mit dem davon abhängige
* User-Felder in ein Dokument eingefügt werden können (Es kann über die OOo-GUI
* kein User-Feld auf "WM(Function 'Autofunction....')" eingefügt werden, da der
* Name ein Leerzeichen enthält.
*
* Der Fix wurde in der Vergangenheit auf alle Textfelder des Dokuments angewandt,
* womit aber PageNumber-Felder in Kopf- und Fußzeilen unbrauchbar wurden. Daher
* gibt es jetzt nur noch eine "Whitelist" von Feldern, die ersetzt werden.
*
* @author Matthias Benkmann (D-III-ITD D.10), Christoph Lutz (D-III-ITD D.10)
* @throws WrappedTargetException
* @throws NoSuchElementException
*/
private static void fixInputUserFields(XEnumerationAccess textFields)
throws NoSuchElementException, WrappedTargetException
{
XEnumeration enu = textFields.createEnumeration();
while (enu.hasMoreElements())
{
Object textfield = enu.nextElement();
// Der eigentlich Test, ob der Inhalt des Content-Properties mit "WM(FUNCTION"
// beginnt ist eine Optimierung, da in der Regel nur die betroffenen
// InputUser-Textfelder mit diesem Text anfangen und supportsService sehr
// langsam ist.
String content = null;
try
{
content = AnyConverter.toString(UNO.getProperty(textfield, "Content"));
}
catch (IllegalArgumentException e)
{}
if (content != null && content.startsWith("WM(FUNCTION")
&& UNO.supportsService(textfield, "com.sun.star.text.TextField.InputUser"))
{
XTextRange range = UNO.XTextContent(textfield).getAnchor();
XTextCursor cursor =
range.getText().createTextCursorByRange(range.getStart());
cursor.setString(cursor.getString());
TextDocument.copyDirectValueCharAttributes(UNO.XPropertyState(range),
UNO.XPropertySet(cursor));
range.setString("");
}
}
}
开发者ID:WollMux,项目名称:WollMux,代码行数:55,代码来源:PrintIntoFile.java
示例19: createDatabaseField
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
/**
* Erzeugt über die Factory factory ein neues OOo-Seriendruckfeld, das auf die
* Datenbank dbName, die Tabelle tableName und die Spalte columnName verweist und
* liefert dieses zurück.
*
* @throws Exception
* Wenn die Factory das Feld nicht erzeugen kann.
* @throws IllegalArgumentException
* Wenn irgendetwas mit den Attributen dbName, tableName oder columnName
* nicht stimmt.
*
* @author Christoph Lutz (D-III-ITD-D101)
*/
private static XDependentTextField createDatabaseField(
XMultiServiceFactory factory, String dbName, String tableName,
String columnName) throws Exception, IllegalArgumentException
{
XDependentTextField dbField =
UNO.XDependentTextField(factory.createInstance("com.sun.star.text.TextField.Database"));
XPropertySet m =
UNO.XPropertySet(factory.createInstance("com.sun.star.text.FieldMaster.Database"));
UNO.setProperty(m, "DataBaseName", dbName);
UNO.setProperty(m, "DataTableName", tableName);
UNO.setProperty(m, "DataColumnName", columnName);
dbField.attachTextFieldMaster(m);
return dbField;
}
开发者ID:WollMux,项目名称:WollMux,代码行数:28,代码来源:OOoBasedMailMerge.java
示例20: insertFullReferenceAtCurrentLocation
import com.sun.star.lang.IllegalArgumentException; //导入依赖的package包/类
/**
* Insert a reference, formatted using a Layout, at the position of a given cursor.
* @param text The text to insert in.
* @param cursor The cursor giving the insert location.
* @param layout The Layout to format the reference with.
* @param parStyle The name of the paragraph style to use.
* @param entry The entry to insert.
* @param database The database the entry belongs to.
* @param uniquefier Uniqiefier letter, if any, to append to the entry's year.
*/
public static void insertFullReferenceAtCurrentLocation(XText text, XTextCursor cursor,
Layout layout, String parStyle, BibEntry entry, BibDatabase database, String uniquefier)
throws UndefinedParagraphFormatException, UnknownPropertyException, PropertyVetoException,
WrappedTargetException, IllegalArgumentException {
// Backup the value of the uniq field, just in case the entry already has it:
Optional<String> oldUniqVal = entry.getField(UNIQUEFIER_FIELD);
// Set the uniq field with the supplied uniquefier:
if (uniquefier == null) {
entry.clearField(UNIQUEFIER_FIELD);
} else {
entry.setField(UNIQUEFIER_FIELD, uniquefier);
}
// Do the layout for this entry:
String formattedText = layout.doLayout(entry, database);
// Afterwards, reset the old value:
if (oldUniqVal.isPresent()) {
entry.setField(UNIQUEFIER_FIELD, oldUniqVal.get());
} else {
entry.clearField(UNIQUEFIER_FIELD);
}
// Insert the formatted text:
OOUtil.insertOOFormattedTextAtCurrentLocation(text, cursor, formattedText, parStyle);
}
开发者ID:JabRef,项目名称:jabref,代码行数:39,代码来源:OOUtil.java
注:本文中的com.sun.star.lang.IllegalArgumentException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论