diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-11-08 16:45:00 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-11-08 18:09:15 +0100 |
commit | a8448ded5555947925b0e9ddb4aeea7043f03933 (patch) | |
tree | e98ad6f441c03c34b90782d2f076dad58ed4e479 /offapi | |
parent | 46875d83476942ca215429c837a3457f55c3ccb0 (diff) |
sw: introduce an UNO manager for content controls
This builds on top of commit ad950f10dc382ea169f94a0c301ca8c424e7103e
(sw: introduce a manager for content controls, 2022-11-08) and exposes
it on the UNO API:
- add a new css.text.ContentControls service, backed by SwContentControlManager
- add a new css.text.XContentControlsSupplier interface, implemented by
SwXTextDocument
- implement XIndexAccess in ContentControls
This allows UNO (and later VBA) clients to have random access to the
content controls in a document, which is much easier than the relatively
complex traversal of the whole doc model.
Change-Id: I26240c9ddbd06f4f57f5f65460ef75a2ace94825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142454
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'offapi')
-rw-r--r-- | offapi/UnoApi_offapi.mk | 2 | ||||
-rw-r--r-- | offapi/com/sun/star/text/ContentControls.idl | 39 | ||||
-rw-r--r-- | offapi/com/sun/star/text/GenericTextDocument.idl | 3 | ||||
-rw-r--r-- | offapi/com/sun/star/text/XContentControlsSupplier.idl | 36 |
4 files changed, 80 insertions, 0 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 331e5eadaf5f..550422ded680 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -1344,6 +1344,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/text,\ ChainedTextFrame \ ChapterNumberingRule \ ContentControl \ + ContentControls \ ContentIndex \ ContentIndexMark \ Defaults \ @@ -3787,6 +3788,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/text,\ XAutoTextGroup \ XBookmarkInsertTool \ XBookmarksSupplier \ + XContentControlsSupplier \ XChapterNumberingSupplier \ XDefaultNumberingProvider \ XDependentTextField \ diff --git a/offapi/com/sun/star/text/ContentControls.idl b/offapi/com/sun/star/text/ContentControls.idl new file mode 100644 index 000000000000..d544b4ee767f --- /dev/null +++ b/offapi/com/sun/star/text/ContentControls.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 . + */ + + module com { module sun { module star { module text { + +/** provides access to the content controls of a (text) + document. + + @since LibreOffice 7.5 + */ +service ContentControls +{ + + /** provides access to the content controls of the document. + */ + interface com::sun::star::container::XIndexAccess; + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/text/GenericTextDocument.idl b/offapi/com/sun/star/text/GenericTextDocument.idl index 708e913353bc..6823df32f4e0 100644 --- a/offapi/com/sun/star/text/GenericTextDocument.idl +++ b/offapi/com/sun/star/text/GenericTextDocument.idl @@ -58,6 +58,9 @@ published service GenericTextDocument [optional] interface com::sun::star::text::XEndnotesSupplier; + /** @since LibreOffice 7.5 */ + [optional] interface com::sun::star::text::XContentControlsSupplier; + [optional] interface com::sun::star::util::XReplaceable; [optional] interface com::sun::star::text::XPagePrintable; diff --git a/offapi/com/sun/star/text/XContentControlsSupplier.idl b/offapi/com/sun/star/text/XContentControlsSupplier.idl new file mode 100644 index 000000000000..646e380cc12e --- /dev/null +++ b/offapi/com/sun/star/text/XContentControlsSupplier.idl @@ -0,0 +1,36 @@ +/* -*- 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 . + */ + +module com { module sun { module star { module text { + +/** makes it possible to access the content controls within + the context (e.g. document). + + @since LibreOffice 7.5 + */ +interface XContentControlsSupplier: com::sun::star::uno::XInterface +{ + /** returns a collection of content controls. + */ + com::sun::star::container::XIndexAccess getContentControls(); +}; + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |