Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / util / XStringEscape.idl
blob00c6c0461531e6d0ce89062596b321bff34d392b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_util_XStringEscape_idl__
20 #define __com_sun_star_util_XStringEscape_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/lang/IllegalArgumentException.idl>
27 module com { module sun { module star { module util {
29 /** This interface is used to encode an arbitrary String into a
30 escaped form.
32 <p>The escaped form is chosen to be suitable for use with other interfaces
33 of the object or service providing this interface.</p>
35 <p>Any characters or character sequences that are not compatible with
36 any naming rules or restrictions must be replaced by an escaped form,
37 that complies to these rules.
39 <p>The transformation should preserve all traits of the string that are
40 generally respected by the service. For example, the case of a string
41 may be lost after encoding and then decoding, if the service
42 generally is case insensitive.
44 <p>Other than that the encoding is one-to-one and can be reversed. The
45 encoding should try to preserve as much as possible of the original
46 string, to keep human-readable input human-friendly where possible.
47 Strings that already conform to the naming conventions should be left
48 unchanged or minimally modified.</p>
50 published interface XStringEscape: com::sun::star::uno::XInterface
52 /** encodes an arbitrary string into an escaped form compatible with some naming rules.
54 string escapeString([in] string aString)
55 raises( com::sun::star::lang::IllegalArgumentException);
57 /** decodes an escaped string into the original form.
59 string unescapeString([in] string aEscapedString)
60 raises( com::sun::star::lang::IllegalArgumentException);
65 }; }; }; };
67 #endif
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */