From 4c4976f717b3ddce68a872dffc2079ae49c41616 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 4 Feb 2016 19:06:39 +0100 Subject: SearchAlgorithms2, SearchOptions2, XTextSearch2, TextSearch2; tdf#72196 Change-Id: Ie6da8994451deca5577503e116281441c6358a6d --- offapi/com/sun/star/util/SearchAlgorithms2.idl | 37 ++++++++++++++++++++++++ offapi/com/sun/star/util/SearchOptions2.idl | 32 +++++++++++++++++++++ offapi/com/sun/star/util/TextSearch2.idl | 39 ++++++++++++++++++++++++++ offapi/com/sun/star/util/XTextSearch2.idl | 32 +++++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 offapi/com/sun/star/util/SearchAlgorithms2.idl create mode 100644 offapi/com/sun/star/util/SearchOptions2.idl create mode 100644 offapi/com/sun/star/util/TextSearch2.idl create mode 100644 offapi/com/sun/star/util/XTextSearch2.idl (limited to 'offapi/com/sun/star/util') diff --git a/offapi/com/sun/star/util/SearchAlgorithms2.idl b/offapi/com/sun/star/util/SearchAlgorithms2.idl new file mode 100644 index 000000000000..68906b127676 --- /dev/null +++ b/offapi/com/sun/star/util/SearchAlgorithms2.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_util_SearchAlgorithms2_idl__ +#define __com_sun_star_util_SearchAlgorithms2_idl__ + +module com { module sun { module star { module util { + +/** Constants that define the search algorithm to be used with + com::sun::star::util::SearchOptions2 + */ +published constants SearchAlgorithms2 +{ + /// Literal + const short ABSOLUTE = 1; + + /// Regular expression + const short REGEXP = 2; + + /// Weighted Levenshtein Distance + const short APPROXIMATE = 3; + + /// Wildcards '*' and '?' and escape character '~' + const short WILDCARD = 4; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/util/SearchOptions2.idl b/offapi/com/sun/star/util/SearchOptions2.idl new file mode 100644 index 000000000000..72097365ccf3 --- /dev/null +++ b/offapi/com/sun/star/util/SearchOptions2.idl @@ -0,0 +1,32 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_util_SearchOptions2_idl__ +#define __com_sun_star_util_SearchOptions2_idl__ + + +#include + + +module com { module sun { module star { module util { + + +published struct SearchOptions2 : com::sun::star::util::SearchOptions { + /** Search type, one of com::sun::star::util::SearchAlgorithms2 + constants. This is preferred over the content of the + SearchAlgorithms SearchOptions::algorithmType enum field. + */ + short AlgorithmType2; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/util/TextSearch2.idl b/offapi/com/sun/star/util/TextSearch2.idl new file mode 100644 index 000000000000..e8db00d17963 --- /dev/null +++ b/offapi/com/sun/star/util/TextSearch2.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_util_TextSearch2_idl__ +#define __com_sun_star_util_TextSearch2_idl__ + +#include + + +module com { module sun { module star { module util { + + +/** search a string with a defined algorithm in another string. + +

It is possible to search forward or backward in the string. +*/ +published service TextSearch2 : XTextSearch2; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/util/XTextSearch2.idl b/offapi/com/sun/star/util/XTextSearch2.idl new file mode 100644 index 000000000000..6f8c20a1ba96 --- /dev/null +++ b/offapi/com/sun/star/util/XTextSearch2.idl @@ -0,0 +1,32 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_util_XTextSearch2_idl__ +#define __com_sun_star_util_XTextSearch2_idl__ + + +#include + + +module com { module sun { module star { module util { + +/** enables an object to search in its content. + */ +published interface XTextSearch2 : com::sun::star::util::XTextSearch +{ + /** set the options for the forward or backward search. + */ + void setOptions2 ([in] SearchOptions2 options); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit