diff options
Diffstat (limited to 'offapi/com/sun/star/embed')
83 files changed, 7680 insertions, 0 deletions
diff --git a/offapi/com/sun/star/embed/Actions.idl b/offapi/com/sun/star/embed/Actions.idl new file mode 100644 index 000000000..4adc8569b --- /dev/null +++ b/offapi/com/sun/star/embed/Actions.idl @@ -0,0 +1,58 @@ +/* -*- 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_embed_Actions_idl__ +#define __com_sun_star_embed_Actions_idl__ + + +module com { module sun { module star { module embed { + +/** This constant set contains possible actions that could be approved by +ActionsApproval implementation. +*/ +published constants Actions +{ + /** "Prevent Close" - throws veto exception if target object is going to + close. + + <p> + Usually a com::sun::star::util::XCloseListener + implementation could use this constant to request approval to throw + veto exception. + </p> + */ + const long PREVENT_CLOSE = 1; + + /** "Prevent Termination" - throws veto exception if target object is going + to terminate. + + <p> + Usually a com::sun::star::frame::XTerminateListener + implementation could use this constant to request approval to throw + veto exception. + </p> + */ + const long PREVENT_TERMINATION = 2; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/Aspects.idl b/offapi/com/sun/star/embed/Aspects.idl new file mode 100644 index 000000000..87f615b96 --- /dev/null +++ b/offapi/com/sun/star/embed/Aspects.idl @@ -0,0 +1,70 @@ +/* -*- 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_embed_Aspects_idl__ +#define __com_sun_star_embed_Aspects_idl__ + + + +module com { module sun { module star { module embed { + +/** The constant set contains possible aspects for an embedded object. + + <p> + This constant set provides a set of values that + can be used to specify the kind of object view. + It can be used for example by container to request + view representation of a certain kind from + XEmbeddedObject. + </p> + + <p> + The first 32 bits are reserved for MS OLE aspects. + </p> + + @see XEmbeddedObject +*/ +published constants Aspects +{ + // MS OLE aspects + + /** specifies view of the object to be displayed as an embedded object + inside a container. + */ + const hyper MSOLE_CONTENT = 1; + + /** specifies view of the object to be displayed in a browsing tool. + */ + const hyper MSOLE_THUMBNAIL = 2; + + /** specifies view of the object when object is represented by Icon. + */ + const hyper MSOLE_ICON = 4; + + /** specifies view of the object for print preview. + */ + const hyper MSOLE_DOCPRINT = 8; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/BaseStorage.idl b/offapi/com/sun/star/embed/BaseStorage.idl new file mode 100644 index 000000000..52de6a080 --- /dev/null +++ b/offapi/com/sun/star/embed/BaseStorage.idl @@ -0,0 +1,63 @@ +/* -*- 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_embed_BaseStorage_idl__ +#define __com_sun_star_embed_BaseStorage_idl__ + +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/beans/XPropertySet.idl> + + + + module com { module sun { module star { module embed { + +/** This is a service that allows to get access to a storage hierarchy. + */ +published service BaseStorage +{ + /** This is a general interface representing storage functionality. + It allows to copy storages, get access to child elements and to + control lifetime. + */ + interface ::com::sun::star::embed::XStorage; + + /** allows to get access to storage properties. + */ + interface ::com::sun::star::beans::XPropertySet; + + /** allows to get the mode the storage is opened in. + + <p> + Can be a combination of values from ElementModes. + </p> + */ + [property, readonly] long OpenMode; + + /** allows to retrieve URL the storage is based on. + */ + [property, optional, readonly] string URL; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/DocumentCloser.idl b/offapi/com/sun/star/embed/DocumentCloser.idl new file mode 100644 index 000000000..292823c1e --- /dev/null +++ b/offapi/com/sun/star/embed/DocumentCloser.idl @@ -0,0 +1,68 @@ +/* -*- 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_embed_DocumentCloser_idl__ +#define __com_sun_star_embed_DocumentCloser_idl__ + +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/frame/XFrame.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/frame/DoubleInitializationException.idl> + +module com { module sun { module star { module embed { + +/** The main task of this service is to close an office document frame embedded + in an application running in another process correctly. + + <p> + The usual usage of this service is to create it, initialize with document + frame, and to dispose the service. While disposing the service will do all + the required actions to let the frame be closed using + com::sun::star::util::XCloseable::close( true ). Thus + in case there is a code that prevents closing of the frame the code + automatically becomes the owner of the frame. + </p> + + <p> + In addition the code will disconnect the VCL window the frame is based on + from the container system window. + </p> +*/ +published service DocumentCloser : com::sun::star::lang::XComponent +{ + /** is used to initialize the object on it's creation. + + @param xFrame + the frame of the document that should be closed. + + */ + DocumentCloserCtor1( [in] com::sun::star::frame::XFrame xFrame ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::frame::DoubleInitializationException, + ::com::sun::star::uno::Exception ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/ElementModes.idl b/offapi/com/sun/star/embed/ElementModes.idl new file mode 100644 index 000000000..aaf004c9d --- /dev/null +++ b/offapi/com/sun/star/embed/ElementModes.idl @@ -0,0 +1,99 @@ +/* -*- 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_embed_ElementModes_idl__ +#define __com_sun_star_embed_ElementModes_idl__ + + + +module com { module sun { module star { module embed { + +/** The constant set contains possible modes to open an element. + + <p> + The modes can be combined by "or" operation. + ElementModes::READ and ElementModes::WRITE + are base modes. A result mode must include one of base modes. + </p> + + @see XStorage +*/ +published constants ElementModes +{ + /** specifies opening of an element for reading. + */ + const long READ = 1; + + /** specifies opening of a seekable element. + + <p> + This mode is ignored for Storage elements. + This flag makes sense only in combination with + ElementModes::READ and/or + ElementModes::WRITE. + </p> + */ + const long SEEKABLE = 2; + + /** specifies opening of a seekable element for reading. + + <p> + This is just a combination of the previous two values. For storages + it is the same as ElementModes::READ. + </p> + */ + const long SEEKABLEREAD = 3; + + /** specifies opening of an element for writing. + */ + const long WRITE = 4; + + /** specifies opening of an element for reading and writing. + + <p> + For a stream element is also specifies that it must be seekable. + </p> + */ + const long READWRITE = 7; + + /** lets the document be truncated immediately after opening. + + <p> + This flag makes sense only in combination with + ElementModes::WRITE. + </p> + */ + const long TRUNCATE = 8; + + /** restricts creation of a new element on opening in case a requested one + does not exist. + + <p> + This flag makes sense only in combination with + ElementModes::WRITE. + </p> + */ + const long NOCREATE = 16; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/EmbedMapUnits.idl b/offapi/com/sun/star/embed/EmbedMapUnits.idl new file mode 100644 index 000000000..76f0b56a3 --- /dev/null +++ b/offapi/com/sun/star/embed/EmbedMapUnits.idl @@ -0,0 +1,91 @@ +/* -*- 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_embed_EmbedMapUnits_idl__ +#define __com_sun_star_embed_EmbedMapUnits_idl__ + + + +module com { module sun { module star { module embed { + +/** contains list of possible map modes supported by embedded object. + + @see XVisualObject +*/ +published constants EmbedMapUnits +{ + /** In this type of map mode one logical point is equal to one-hundredth + of millimeter. + */ + const long ONE_100TH_MM = 0; + + /** In this type of map mode one logical point is equal to one-tenth + of millimeter. + */ + const long ONE_10TH_MM = 1; + + /** In this type of map mode one logical point is equal to one + millimeter. + */ + const long ONE_MM = 2; + + /** In this type of map mode one logical point is equal to one + centimeter. + */ + const long ONE_CM = 3; + + /** In this type of map mode one logical point is equal to one-thousandth + of inch. + */ + const long ONE_1000TH_INCH = 4; + + /** In this type of map mode one logical point is equal to one-hundredth + of inch. + */ + const long ONE_100TH_INCH = 5; + + /** In this type of map mode one logical point is equal to one-tenth + of inch. + */ + const long ONE_10TH_INCH = 6; + + /** In this type of map mode one logical point is equal to one inch. + */ + const long ONE_INCH = 7; + + /** In this type of map mode one logical point is equal to one + typographical point. + */ + const long POINT = 8; + + /** In this type of map mode one logical point is equal to one twentieth + of typographical point. + */ + const long TWIP = 9; + + /** In this type of map mode one logical point is equal to one pixel. + */ + const long PIXEL = 10; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/EmbedMisc.idl b/offapi/com/sun/star/embed/EmbedMisc.idl new file mode 100644 index 000000000..e017143a8 --- /dev/null +++ b/offapi/com/sun/star/embed/EmbedMisc.idl @@ -0,0 +1,114 @@ +/* -*- 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_embed_EmbedMisc_idl__ +#define __com_sun_star_embed_EmbedMisc_idl__ + + + +module com { module sun { module star { module embed { + +/** The constant set contains flags describing miscellaneous characteristics + of embedded objects. + + <p> + The constant values can be combined with "or" operation. + The first 32 bits are reserved for MS values, they are added because + this API is going to be used to embed MS OLE objects into OOo documents, + so there should be a possibility to transfer all the possible MS flags + to container. In case own specific values should be added those bits can + not be used. + </p> + + @see XEmbeddedObject +*/ +published constants EmbedMisc +{ + // analog of the MS OLEMISC enum + + /** means that the object wish to regenerate view representation if it's + view in the container is resized. + */ + const hyper MS_EMBED_RECOMPOSEONRESIZE = 1; + + /** The object has no view representation except icon. + */ + const hyper MS_EMBED_ONLYICONIC = 2; + + /** If the object is generated from a selection, the selection should not + be removed, the object should be inserted beside the selection. + */ + const hyper MS_EMBED_INSERTNOTREPLACE = 4; + + /** The object is a static object that contains only representation. + */ + const hyper MS_EMBED_STATIC = 8; + + const hyper MS_EMBED_CANTLINKINSIDE = 16; + + const hyper MS_EMBED_CANLINKBYOLE1 = 32; + + const hyper MS_EMBED_ISLINKOBJECT = 64; + + const hyper MS_EMBED_INSIDEOUT = 128; + + const hyper MS_EMBED_ACTIVATEWHENVISIBLE = 256; + + const hyper MS_EMBED_RENDERINGISDEVICEINDEPENDENT = 512; + + const hyper MS_EMBED_INVISIBLEATRUNTIME = 1024; + + const hyper MS_EMBED_ALWAYSRUN = 2048; + + const hyper MS_EMBED_ACTSLIKEBUTTON = 4096; + + const hyper MS_EMBED_ACTSLIKELABEL = 8192; + + const hyper MS_EMBED_NOUIACTIVATE = 16384; + + const hyper MS_EMBED_ALIGNABLE = 32768; + + const hyper MS_EMBED_SIMPLEFRAME = 65536; + + const hyper MS_EMBED_SETCLIENTSITEFIRST = 131072; + + const hyper MS_EMBED_IMEMODE = 262144; + + const hyper MS_EMBED_IGNOREACTIVATEWHENVISIBLE = 524288; + + const hyper MS_EMBED_WANTSTOMENUMERGE = 1048576; + + const hyper MS_EMBED_SUPPORTSMULTILEVELUNDO = 2097152; + + const hyper EMBED_ACTIVATEIMMEDIATELY = 0x100000000; + + const hyper EMBED_NEVERRESIZE = 0x200000000; + + /** The object needs the size to be provided from the container after + it is loaded to function in optimal way. + */ + const hyper EMBED_NEEDSSIZEONLOAD = 0x400000000; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/EmbedStates.idl b/offapi/com/sun/star/embed/EmbedStates.idl new file mode 100644 index 000000000..95d0aa0a4 --- /dev/null +++ b/offapi/com/sun/star/embed/EmbedStates.idl @@ -0,0 +1,84 @@ +/* -*- 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_embed_EmbedStates_idl__ +#define __com_sun_star_embed_EmbedStates_idl__ + + + +module com { module sun { module star { module embed { + +/** This constant set contains possible states for +EmbeddedObject. +*/ +published constants EmbedStates +{ + /** "Loaded" - the persistent representation of the object is loaded in + memory. + + <p> + The object is created and assigned with a persistent entry, + and a view representation ( metafile and etc. ) can be retrieved + ( if there is any ). + </p> + */ + const long LOADED = 0; + + /** "Running" - the object is connected and loaded. + + <p> + The object has a connection to the container client and a component + loaded from persistent entry. In case of internal document it also + means existing of document model that implements + com::sun::star::frame::XModel interface. + </p> + */ + const long RUNNING = 1; + + /** "Active" - the object is activated in separate window + ( outplace activation ). + */ + const long ACTIVE = 2; + + /** "Inplace active" - the object has own window in the container's + window. + + <p> + The object is activated and has its own window in the container's + window that allows object to process mouse events and control own + rendering. + </p> + */ + const long INPLACE_ACTIVE = 3; + + /** "UI active" - the inplace active object that has user interface. + + <p> + The object is inplace active, allowed to have menus, toolbars, + keyboard accelerators, and has the focus. + </p> + */ + const long UI_ACTIVE = 4; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/EmbedUpdateModes.idl b/offapi/com/sun/star/embed/EmbedUpdateModes.idl new file mode 100644 index 000000000..cb5387ec9 --- /dev/null +++ b/offapi/com/sun/star/embed/EmbedUpdateModes.idl @@ -0,0 +1,56 @@ +/* -*- 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_embed_EmbedUpdateModes_idl__ +#define __com_sun_star_embed_EmbedUpdateModes_idl__ + + + +module com { module sun { module star { module embed { + +/** The constant set specifies possible modes of object update. + + @see XEmbeddedObject +*/ +published constants EmbedUpdateModes +{ + /** An object representation should be updated as often as possible. + + <p> + Any time object detects that it is changed the representation + of the object is updated. + </p> + */ + const long ALWAYS_UPDATE = 0; + + /** An object representation should be updated only in case of request. + + <p> + The representation of the object is updated only by explicit request. + </p> + */ + const long EXPLICIT_UPDATE = 1; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/EmbedVerbs.idl b/offapi/com/sun/star/embed/EmbedVerbs.idl new file mode 100644 index 000000000..e7038305d --- /dev/null +++ b/offapi/com/sun/star/embed/EmbedVerbs.idl @@ -0,0 +1,67 @@ +/* -*- 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_embed_EmbedVerbs_idl__ +#define __com_sun_star_embed_EmbedVerbs_idl__ + + + +module com { module sun { module star { module embed { + +/** This constants set contains possible verbs for a contained object. + + @see XEmbeddedObject +*/ +published constants EmbedVerbs +{ + /** lets the object do default activation, as by double-click. + */ + const long MS_OLEVERB_PRIMARY = 0; + + /** lets the object open itself for editing of viewing. + */ + const long MS_OLEVERB_SHOW = -1; + + /** lets the object activate itself outplace. + */ + const long MS_OLEVERB_OPEN = -2; + + /** lets the inplace object remove its UI from container. + */ + const long MS_OLEVERB_HIDE = -3; + + /** lets the object proceed with UI activation. + */ + const long MS_OLEVERB_UIACTIVATE = -4; + + /** lets the object activate itself inplace. + */ + const long MS_OLEVERB_IPACTIVATE = -5; + + /** lets the object forget any undo state. + */ + const long MS_OLEVERB_DISCARDUNDOSTATE = -6; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/EmbeddedObjectCreator.idl b/offapi/com/sun/star/embed/EmbeddedObjectCreator.idl new file mode 100644 index 000000000..19ef22b49 --- /dev/null +++ b/offapi/com/sun/star/embed/EmbeddedObjectCreator.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/. + * + * 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_embed_EmbeddedObjectCreator_idl__ +#define __com_sun_star_embed_EmbeddedObjectCreator_idl__ + +#include <com/sun/star/embed/XEmbeddedObjectCreator.idl> + + + module com { module sun { module star { module embed { + +/** + @since LibreOffice 4.1 + */ +service EmbeddedObjectCreator : XEmbeddedObjectCreator; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/EmbeddedObjectDescriptor.idl b/offapi/com/sun/star/embed/EmbeddedObjectDescriptor.idl new file mode 100644 index 000000000..02ff3adf5 --- /dev/null +++ b/offapi/com/sun/star/embed/EmbeddedObjectDescriptor.idl @@ -0,0 +1,84 @@ +/* -*- 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_embed_EmbeddedObjectDescriptor_idl__ +#define __com_sun_star_embed_EmbeddedObjectDescriptor_idl__ + +#include <com/sun/star/io/XInputStream.idl> +#include <com/sun/star/awt/Rectangle.idl> +#include <com/sun/star/util/URL.idl> +#include <com/sun/star/task/XInteractionHandler.idl> +#include <com/sun/star/task/XStatusIndicator.idl> +#include <com/sun/star/frame/XDispatchProviderInterceptor.idl> +#include <com/sun/star/embed/XStorage.idl> + + +module com { module sun { module star { module embed { + +/** describes properties of an embedded object + + <p> + This service may be represented by a + com::sun::star::beansPropertyValue[]. + Such descriptors will be passed to different functions, included into + possible load/save processes. Every member of such process can use + this descriptor and may change it to actualize the information about + the object. So this descriptor should be used as an in/out parameter. + </p> + + @see com::sun::star::beans::PropertyValue + */ +published service EmbeddedObjectDescriptor +{ + /** lets the graphical representation of embedded document be stored. + + <p> + Setting of this property to true tells the embedded object that + controls the document to store or not to store the graphical + representation of the document into the object persistence. + If this property is not set the object makes the decision itself. + </p> + */ + [optional,property] boolean StoreVisualReplacement; + + /** allows to provide a dispatch interceptor for outplace activation. + */ + [optional,property] ::com::sun::star::frame::XDispatchProviderInterceptor + OutplaceDispatchInterceptor; + + /** denotes the storage from which the embedded object is to be recovered. + + <p>Upon activating the embedded object, it is normally loaded from a storage as denoted by + the parameters to the XEmbedObjectCreator method calls.</p> + + <p>You can pass a non-`NULL` <code>RecoveryStorage</code> in the object descriptor if you wish to load the + embedded object from an alternate storage.</p> + + <p>The object will still be based on the storage denoted in the <code>XEmbedObjectCreator</code> method + call, i.e., subsequent save operations will still use that storage. <code>RecoveryStorage</code> is used + at loading time only, and then discarded.</p> + */ + [optional, property] XStorage RecoveryStorage; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/EntryInitModes.idl b/offapi/com/sun/star/embed/EntryInitModes.idl new file mode 100644 index 000000000..c41c1405b --- /dev/null +++ b/offapi/com/sun/star/embed/EntryInitModes.idl @@ -0,0 +1,66 @@ +/* -*- 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_embed_EntryInitModes_idl__ +#define __com_sun_star_embed_EntryInitModes_idl__ + + + +module com { module sun { module star { module embed { + +/** This constant set contains possible modes to initialize object + persistence. + + @see XEmbedPersist +*/ +published constants EntryInitModes +{ + /** In case object persistence is created based on existing entry, + the object should be initialized from this entry. Otherwise + the object should be initialized as a new one. + */ + const long DEFAULT_INIT = 0; + + /** The object should be initialized as a new empty one. + */ + const long TRUNCATE_INIT = 1; + + /** The object should be initialized as a new one only in case it still + was not initialized. If the object initialized already do not + reinitialize it. + */ + const long NO_INIT = 2; + + /** The object should be initialized using additional arguments from + provided + com::sun::star::document::MediaDescriptor. + */ + const long MEDIA_DESCRIPTOR_INIT = 3; + + /** The object should be initialized as a link using URL provided in + additional arguments. + */ + const long URL_LINK_INIT = 4; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/FileSystemStorage.idl b/offapi/com/sun/star/embed/FileSystemStorage.idl new file mode 100644 index 000000000..66dece34e --- /dev/null +++ b/offapi/com/sun/star/embed/FileSystemStorage.idl @@ -0,0 +1,104 @@ +/* -*- 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_embed_FileSystemStorage_idl__ +#define __com_sun_star_embed_FileSystemStorage_idl__ + +#include <com/sun/star/embed/BaseStorage.idl> + + + module com { module sun { module star { module embed { + +/** This is a service that allows to get access to a file system folder using + storage hierarchy. + */ +published service FileSystemStorage +{ + /** This service describes the base functionality of storages. + + <p> + Please see below the description of additional requirements for the + file system storage implementation. + </p> + + <dl> + <dt>interface com::sun::star::lang::XComponent + </dt> + <dd> + <p> + A file system storage is created either by + StorageFactory or by XStorage + interface and is controlled by refcounting. In case + refcounting is decreased to zero the storage will be + disposed automatically. + </p> + + <p> + In case a storage object is disposed the elements + ( substorages and substreams ) are not affected. + </p> + </dd> + <dt>interface XStorage</dt> + <dd> + <dl> + <dt>XStorage::openStorageElement()</dt> + <dd> + This method returns FileSystemStorage + service implementation. + </dd> + + <dt>XStorage::copyLastCommitTo()</dt> + <dd> + Since this service implementation supports no transaction + this method just creates a copy of the storage in its + current state. + </dd> + + <dt>XStorage::copyStorageElementLastCommitTo()</dt> + <dd> + Since this service implementation supports no transaction + this method just creates a copy of the storage in its + current state. + </dd> + + <dt>XStorage::removeStorageElement()</dt> + <dd> + If the element is opened and it is a stream element + the removing will fail. If the element is opened and + it is a storage element, all the contents that can be + removed will be removed. + </dd> + </dl> + </dd> + <dt>property URL</dt> + <dd> + This property is not optional for this service. + </dd> + </dl> + + */ + service BaseStorage; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/FileSystemStorageFactory.idl b/offapi/com/sun/star/embed/FileSystemStorageFactory.idl new file mode 100644 index 000000000..125d39ba4 --- /dev/null +++ b/offapi/com/sun/star/embed/FileSystemStorageFactory.idl @@ -0,0 +1,92 @@ +/* -*- 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_embed_FileSystemStorageFactory_idl__ +#define __com_sun_star_embed_FileSystemStorageFactory_idl__ + +#include <com/sun/star/lang/XSingleServiceFactory.idl> + + + + module com { module sun { module star { module embed { + +/** The FileSystemStorageFactory is a service that allows to + create a FileSystemStorage based on URL. The URL must point + to a folder. + + <p> + In case + com::sun::star::lang::XSingleServiceFactory::createInstance() + call is used the result storage will be open in read-write mode based + on an arbitrary file system folder. + </p> + + <p> + In case + com::sun::star::lang::XSingleServiceFactory::createInstanceWithArguments() + call is used a sequence of the following parameters can be used: + </p> + + <dl> + <dt>parameter 1</dt> + <dd> + specifies source of the object, it must be a string + containing URL. + </dd> + + <dt>parameter 2</dt> + <dd> + specifies mode the storage should be open in, can take + values from ElementModes constant set. + </dd> + + <dt>parameter 3</dt> + <dd> + allows to provide + com::sun::star::document::MediaDescryptor + to the storage so some parts can be used for + initialization, it can be for example + com::sun::star::task::XInteractionHandler + implementation. + </dd> + </dl> + + <p> + The parameters are optional, that means that sequence can be empty or + contain only first parameter, or first and second one. In case + no parameters are provided the call works the same way as + com::sun::star::lang::XSingleServiceFactory::createInstance(). + In case only first parameter is provided, the storage is opened in + readonly mode. + </p> + + <p> + The opened storages can support read access in addition to + specified one. + </p> +*/ +published service FileSystemStorageFactory + : ::com::sun::star::lang::XSingleServiceFactory; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/HatchWindowFactory.idl b/offapi/com/sun/star/embed/HatchWindowFactory.idl new file mode 100644 index 000000000..2456ce589 --- /dev/null +++ b/offapi/com/sun/star/embed/HatchWindowFactory.idl @@ -0,0 +1,38 @@ +/* -*- 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_embed_HatchWindowFactory_idl__ +#define __com_sun_star_embed_HatchWindowFactory_idl__ + +#include <com/sun/star/embed/XHatchWindowFactory.idl> + + +module com { module sun { module star { module embed { + + +/** + @since LibreOffice 4.1 + */ +service HatchWindowFactory : XHatchWindowFactory; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/InsertedObjectInfo.idl b/offapi/com/sun/star/embed/InsertedObjectInfo.idl new file mode 100644 index 000000000..66550761a --- /dev/null +++ b/offapi/com/sun/star/embed/InsertedObjectInfo.idl @@ -0,0 +1,54 @@ +/* -*- 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_embed_InsertedObjectInfo_idl__ +#define __com_sun_star_embed_InsertedObjectInfo_idl__ + +#include <com/sun/star/beans/NamedValue.idl> +#include <com/sun/star/embed/XEmbeddedObject.idl> + + + module com { module sun { module star { module embed { + + +/** is intended to provide result of creation of an embedded object by dialog. + */ +published struct InsertedObjectInfo +{ + /** The new created embedded object. + */ + XEmbeddedObject Object; + + /** Container related options selected by user. + + <p> + A dialog related to embedded object creation usually allows user + to make some choices that can be container related. This information + can be provided by this member. + </p> + */ + sequence < ::com::sun::star::beans::NamedValue > Options; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/InstanceLocker.idl b/offapi/com/sun/star/embed/InstanceLocker.idl new file mode 100644 index 000000000..f46435ef9 --- /dev/null +++ b/offapi/com/sun/star/embed/InstanceLocker.idl @@ -0,0 +1,97 @@ +/* -*- 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_embed_InstanceLocker_idl__ +#define __com_sun_star_embed_InstanceLocker_idl__ + +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XActionsApproval.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/frame/DoubleInitializationException.idl> + +module com { module sun { module star { module embed { + +/** The main task of this service is to prevent closing, terminating and/or + etc. of controlled object. + + <p> + After creation the service adds a listener of requested type + ( close, terminate and/or etc. ) to the controlled object and let + the listener throw related veto exception until the service is disposed. + </p> +*/ +published service InstanceLocker : com::sun::star::lang::XComponent +{ + /** is used to initialize the object on it's creation. + + @param xInstance + the controlled object. Must implement the related to the + requested actions broadcaster interface. + + @param nActions + specifies the actions that should be done ( prevent closing, + prevent termination and/or etc. ). It must not be empty and can + currently contain following values or their combination: + Actions::PREVENT_CLOSE and + Actions::PREVENT_TERMINATION. + */ + InstanceLockerCtor1( [in] com::sun::star::uno::XInterface xInstance, + [in] long nActions ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::frame::DoubleInitializationException, + ::com::sun::star::uno::Exception ); + + /** is used to initialize the object on it's creation. + + @param xInstance + the controlled object. Must implement the related to the + requested actions broadcaster interface. + + @param nActions + specifies the actions that should be done ( prevent closing, + prevent termination and/or etc. ). It must not be empty and can + currently contain following values or their combination: + Actions::PREVENT_CLOSE and + Actions::PREVENT_TERMINATION. + + @param xApprove + The object implementing XActionsApproval interface. + If this parameter is an empty reference the object will proceed + with the specified in the first parameter action until it is + disposed ( just like in the case of the first constructor ). + If the instance is provided, it will be asked for approval each + time before proceeding with the action ( the action is + specified using string and can take following + values in this case: "PreventClose", "PreventTermination" ). + */ + InstanceLockerCtor2( [in] com::sun::star::uno::XInterface xInstance, + [in] long nActions, + [in] XActionsApproval xApprove ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::frame::DoubleInitializationException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/InvalidStorageException.idl b/offapi/com/sun/star/embed/InvalidStorageException.idl new file mode 100644 index 000000000..38651f946 --- /dev/null +++ b/offapi/com/sun/star/embed/InvalidStorageException.idl @@ -0,0 +1,44 @@ +/* -*- 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_embed_InvalidStorageException_idl__ +#define __com_sun_star_embed_InvalidStorageException_idl__ + +#include <com/sun/star/io/IOException.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case a storage is invalid. + + <p> + For example in case it is broken one. + </p> + */ +published exception InvalidStorageException: com::sun::star::io::IOException +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/LinkageMisuseException.idl b/offapi/com/sun/star/embed/LinkageMisuseException.idl new file mode 100644 index 000000000..7cb7cb7e8 --- /dev/null +++ b/offapi/com/sun/star/embed/LinkageMisuseException.idl @@ -0,0 +1,44 @@ +/* -*- 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_embed_LinkageMisuseException_idl__ +#define __com_sun_star_embed_LinkageMisuseException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case a linked object is misused. + + <p> + Or if embedded object is misused as a linked object. + </p> + */ +published exception LinkageMisuseException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/MSOLEObjectSystemCreator.idl b/offapi/com/sun/star/embed/MSOLEObjectSystemCreator.idl new file mode 100644 index 000000000..05f830824 --- /dev/null +++ b/offapi/com/sun/star/embed/MSOLEObjectSystemCreator.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/. + * + * 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_embed_MSOLEObjectSystemCreator_idl__ +#define __com_sun_star_embed_MSOLEObjectSystemCreator_idl__ + +#include <com/sun/star/embed/XEmbedObjectClipboardCreator.idl> + + + module com { module sun { module star { module embed { + +/** + @since LibreOffice 4.1 + */ +service MSOLEObjectSystemCreator : XEmbedObjectClipboardCreator; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/NeedsRunningStateException.idl b/offapi/com/sun/star/embed/NeedsRunningStateException.idl new file mode 100644 index 000000000..c9d3bb04f --- /dev/null +++ b/offapi/com/sun/star/embed/NeedsRunningStateException.idl @@ -0,0 +1,47 @@ +/* -*- 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_embed_NeedsRunningStateException_idl__ +#define __com_sun_star_embed_NeedsRunningStateException_idl__ + +#include <com/sun/star/embed/WrongStateException.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case a list of accepted verbs of states is + requested and the object is in loaded state and this information can be + retrieved only when the object is in running state. + + <p> + This exception means that the object supports at least running state in + addition to the loaded state. Other states and possible verbs can be + detected only after object is switched to running state. + */ +published exception NeedsRunningStateException: WrongStateException +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/NoVisualAreaSizeException.idl b/offapi/com/sun/star/embed/NoVisualAreaSizeException.idl new file mode 100644 index 000000000..3c9b7c348 --- /dev/null +++ b/offapi/com/sun/star/embed/NoVisualAreaSizeException.idl @@ -0,0 +1,41 @@ +/* -*- 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_embed_NoVisualAreaSizeException_idl__ +#define __com_sun_star_embed_NoVisualAreaSizeException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case the object can not provide own visual + area currently. + */ +published exception NoVisualAreaSizeException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/OLEEmbeddedObjectFactory.idl b/offapi/com/sun/star/embed/OLEEmbeddedObjectFactory.idl new file mode 100644 index 000000000..f4f6188de --- /dev/null +++ b/offapi/com/sun/star/embed/OLEEmbeddedObjectFactory.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/. + * + * 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_embed_OLEEmbeddedObjectFactory_idl__ +#define __com_sun_star_embed_OLEEmbeddedObjectFactory_idl__ + +#include <com/sun/star/embed/XEmbeddedObjectCreator.idl> + + + module com { module sun { module star { module embed { + +/** + @since LibreOffice 4.1 + */ +service OLEEmbeddedObjectFactory : XEmbeddedObjectCreator; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/OLESimpleStorage.idl b/offapi/com/sun/star/embed/OLESimpleStorage.idl new file mode 100644 index 000000000..3d14e2e6d --- /dev/null +++ b/offapi/com/sun/star/embed/OLESimpleStorage.idl @@ -0,0 +1,65 @@ +/* -*- 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_embed_OLESimpleStorage_idl__ +#define __com_sun_star_embed_OLESimpleStorage_idl__ + +#include <com/sun/star/embed/XOLESimpleStorage.idl> +#include <com/sun/star/io/XInputStream.idl> +#include <com/sun/star/io/XStream.idl> + +module com { module sun { module star { module embed { +/** This service provides a simple functionality to allow + read/write the storages in OLE storage format. +*/ +published service OLESimpleStorage: XOLESimpleStorage +{ + // CONSTRUCTORS ---------------------------------------------------------- + /** is used to initialize the object on it's creation. + + @param xInputStream + [in] the InputStream that contains data in OLE storage format. + + @param bNoTempCopy + [in] specifies whether a temporary copy should be created during + substreams opening. If the copy is not created the storage must + stay alive while the opened substreams are used. + + */ + createFromInputStream ([in] ::com::sun::star::io::XInputStream xInputStream, [in] boolean bNoTempCopy); + + /** is used to initialize the object on it's creation. + + @param xStream + [in] the Stream that contains data in OLE storage format. + + @param bNoTempCopy + [in] specifies whether a temporary copy should be created during + substreams opening. If the copy is not created the storage must + stay alive while the opened substreams are used. + + */ + createFromStream ([in] ::com::sun::star::io::XStream xStream, [in] boolean bNoTempCopy); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/OOoEmbeddedObjectFactory.idl b/offapi/com/sun/star/embed/OOoEmbeddedObjectFactory.idl new file mode 100644 index 000000000..c5568a328 --- /dev/null +++ b/offapi/com/sun/star/embed/OOoEmbeddedObjectFactory.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/. + * + * 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_embed_OOoEmbeddedObjectFactory_idl__ +#define __com_sun_star_embed_OOoEmbeddedObjectFactory_idl__ + +#include <com/sun/star/embed/XEmbeddedObjectCreator.idl> + + + module com { module sun { module star { module embed { + +/** + @since LibreOffice 4.1 + */ +service OOoEmbeddedObjectFactory : XEmbeddedObjectCreator; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/ObjectSaveVetoException.idl b/offapi/com/sun/star/embed/ObjectSaveVetoException.idl new file mode 100644 index 000000000..4699f0302 --- /dev/null +++ b/offapi/com/sun/star/embed/ObjectSaveVetoException.idl @@ -0,0 +1,43 @@ +/* -*- 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_embed_ObjectSaveVetoException_idl__ +#define __com_sun_star_embed_ObjectSaveVetoException_idl__ + +#include <com/sun/star/io/IOException.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case container wants to avoid objects + saving. + + @see XEmbeddedClient + */ +published exception ObjectSaveVetoException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/StateChangeInProgressException.idl b/offapi/com/sun/star/embed/StateChangeInProgressException.idl new file mode 100644 index 000000000..ec45cef9c --- /dev/null +++ b/offapi/com/sun/star/embed/StateChangeInProgressException.idl @@ -0,0 +1,49 @@ +/* -*- 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_embed_StateChangeInProgressException_idl__ +#define __com_sun_star_embed_StateChangeInProgressException_idl__ + +#include <com/sun/star/embed/WrongStateException.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case the object does not allow + to call requested functionality currently because the object is changing + state. + */ +published exception StateChangeInProgressException: com::sun::star::embed::WrongStateException +{ + /** contains the target state the object tries to reach currently. + + <p> + Contains a value from EmbedStates constant set. + </p> + */ + long TargetState; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/Storage.idl b/offapi/com/sun/star/embed/Storage.idl new file mode 100644 index 000000000..0382670f9 --- /dev/null +++ b/offapi/com/sun/star/embed/Storage.idl @@ -0,0 +1,322 @@ +/* -*- 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_embed_Storage_idl__ +#define __com_sun_star_embed_Storage_idl__ + +#include <com/sun/star/embed/BaseStorage.idl> +#include <com/sun/star/embed/XEncryptionProtectedSource.idl> +#include <com/sun/star/embed/XTransactedObject.idl> +#include <com/sun/star/embed/XTransactionBroadcaster.idl> +#include <com/sun/star/util/XModifiable.idl> +#include <com/sun/star/container/XNameAccess.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/beans/XPropertySet.idl> + + + + module com { module sun { module star { module embed { + +/** This is a service that allows to get access to a package using storage + hierarchy. + + <p> + A root storage should be retrieved by using StorageFactory + service. Substorages are created through XStorage interface + of a parent storage. + </p> + */ +published service Storage +{ + /** This service describes the base functionality of storages. + + <p> + Please see below the description of additional requirements for the + package storage implementation. + </p> + + <dl> + <dt>interface com::sun::star::lang::XComponent + </dt> + <dd> + <p> + A root storage is created by StorageFactory + and is controlled by refcounting. In case refcounting + is decreased to zero the storage will be disposed + automatically. It is still strongly recommended that + a root storage is disposed explicitly since in garbage + collector based languages the refcounting can be + decreased too late and resources locked by the storage + will not be freed until then. + </p> + + <p> + A substorage is created by XStorage + interface of storage. Each time a substorage is opened + it is locked ( in case it is opened in readonly mode + it is locked for writing, in case it is opened in + read-write mode it is locked for reading and writing ) + until it is disposed. The lifetime of substorage is + also controlled by refcounting but because of mentioned + garbage collection specific it is strongly recommended + to dispose substorages explicitly. + </p> + + <p> + In case a storage object is disposed all the elements + ( substorages and substreams ) retrieved from the + object are disposed. If the storage was opened in + read-write mode all non-committed changes will be lost. + </p> + </dd> + <dt>interface XStorage</dt> + <dd> + <dl> + <dt>XStorage::openStreamElement()</dt> + <dd> + <p> + This method returns StorageStream + service implementation. + </p> + + <p> + If the child stream is an encrypted one a correct + common storage password should be set through + XEncryptionProtectedSource interface to + this storage or to a one of storages in parent + hierarchy. In case the password is not set or is a + wrong one an exception will be thrown. + </p> + </dd> + + <dt>XStorage::openEncryptedStreamElement()</dt> + <dd> + This method allows to specify reading password for the + stream explicitly. The password will be used to read + the stream. It is possible to specify a new password + for stream storing through + XEncryptionProtectedSource interface. In + case a new password is not specified an old one will + be used for storing. + </dd> + + <dt>XStorage::openStorageElement()</dt> + <dd> + This method returns Storage service + implementation. + </dd> + + <dt>XStorage::cloneStreamElement()</dt> + <dd> + <p> + This method returns StorageStream service + implementation. + </p> + + <p> + The latest flashed version of the stream will be used. + The stream can be flashed explicitly by + com::sun::star::io::XOutputStream::flush() + call. + </p> + + <p> + A storage flashes on commit all the child streams it + owns. So in case after the stream is changed neither + the storage was committed nor the stream was flushed + explicitly, the changes will not appear in the new + created stream. This method allows to retrieve copy of + a child stream even in case it is already opened for + writing. + </p> + + <p> + If the child stream is an encrypted one a correct + common storage password should be set through + XEncryptionProtectedSource interface to + this storage or to a one of storages in parent + hierarchy. In case the password is not set or is a + wrong one an exception will be thrown. + </p> + </dd> + + <dt>XStorage::cloneEncryptedStreamElement()</dt> + <dd> + <p> + This method returns StorageStream service + implementation. + </p> + + <p> + The latest flashed version of the stream will be used. + The stream can be flashed explicitly by + com::sun::star::io::XOutputStream::flush() + call. + </p> + + <p> + A storage flashes on commit all the child streams it + owns. So in case after the stream is changed neither + the storage was committed nor the stream was flushed + explicitly, the changes will not appear in the new + created stream. This method allows to retrieve copy of + a child stream even in case it is already opened for + writing. + </p> + </dd> + + <dt>XStorage::copyLastCommitTo()</dt> + <dd> + This method gets Storage service + implementation and fills it in with the latest + committed version of this storage. So in case the + storage was not committed after it was changed, the + changes will not appear in the new created storage. + </dd> + + <dt>XStorage::copyStorageElementLastCommitTo()</dt> + <dd> + <p> + This method gets Storage service + implementation and fills it in with the contents of + the requested substorage. The latest committed version + of child storage will be used. So in case the child + storage was not committed after it was changed, the + changes will not appear in the new created storage. + </p> + + <p> + This method allows to retrieve copy of a child storage + even in case it is already opened for writing. + </p> + </dd> + + <dt>XStorage::removeStorageElement()</dt> + <dd> + If the element is opened the removing will fail. + </dd> + </dl> + </dd> + <dt>property URL</dt> + <dd> + If the storage is created based on url this property allows + to retrieve it. + </dd> + </dl> + + */ + service BaseStorage; + + /** allows to commit or revert changes that were done for the storage. + + <p> + If a storage is committed all changes made to it will be integrated to + its parent storage. This is recursive process, so the last committed + storage should be the root one. For the package based storages commit + of a root storage also means flashing to the related medium. If + a storage is not committed, no changes for it or its child elements + will be stored. + </p> + */ + interface ::com::sun::star::embed::XTransactedObject; + + /** allows to track storage's transaction state. + */ + interface ::com::sun::star::embed::XTransactionBroadcaster; + + /** allows to set password to a root storage. + + <p> + This interface can be supported by a storage to allow to set + a common storage password. This password is used as default password + to decrypt all encrypted streams and to encrypt streams that are + marked to use common storage password on storing. + Specifying of the password for a storage allows to use it for the + whole subtree. Of course substorage can allow to overwrite the common + storage password for own subtree. + </p> + */ + [optional] + interface ::com::sun::star::embed::XEncryptionProtectedSource; + + /** allows to get and set the media type of the storage. + */ + [property] string MediaType; + + /** allows to get and set the version of the format related to the + MediaType. + */ + [property,optional] string Version; + + /** allows to detect whether mediatype is detected by using fallback + approach. + + <p> + Can be set to true if the mediatype can not be detected in standard + way, but there is a fallback solution allows to do it. + </p> + + <p> + Usually means that the document validity is questionable, although + the package itself is not corrupted. The decision about document + validity in this case is in application hands. It is up to user of + the storage to decide whether he accepts the fallback approach for + an implementation of this service, outputs a warning or an error. + </p> + */ + [property, readonly] boolean MediaTypeFallbackIsUsed; + + /** allows to detect whether the storage is a root one. + */ + [property, readonly] boolean IsRoot; + + /** allows to detect whether storage is open in "repair package" mode or + not. + */ + [property, optional, readonly] boolean RepairPackage; + + /** allows to detect if the storage contains encrypted entries. + + <p> + In case it is set to `TRUE` the storage itself and/or a tree of + substorages contain encrypted streams. Usually in case this property + is supported the implementation supports + XEncryptionProtectedSource interface. + </p> + */ + [property, optional, readonly] boolean HasEncryptedEntries; + + /** allows to detect if the storage contains non-encrypted entries. + + <p> + In case it is set to `TRUE` the storage itself and/or a tree of + substorages contains non-encrypted streams. Usually in case this + property is supported the implementation supports + XEncryptionProtectedSource interface. + </p> + */ + [property, optional, readonly] boolean HasNonEncryptedEntries; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/StorageFactory.idl b/offapi/com/sun/star/embed/StorageFactory.idl new file mode 100644 index 000000000..71446713a --- /dev/null +++ b/offapi/com/sun/star/embed/StorageFactory.idl @@ -0,0 +1,107 @@ +/* -*- 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_embed_StorageFactory_idl__ +#define __com_sun_star_embed_StorageFactory_idl__ + +#include <com/sun/star/lang/XSingleServiceFactory.idl> + + + + module com { module sun { module star { module embed { + +/** The StorageFactory is a service that allows to create + a storage based on either stream or URL. + + <p> + In case + com::sun::star::lang::XSingleServiceFactory::createInstance() + call is used the result storage will be open in read-write mode based + on an arbitrary medium. + </p> + + <p> + In case + com::sun::star::lang::XSingleServiceFactory::createInstanceWithArguments() + call is used a sequence of the following parameters can be used: + </p> + + <dl> + <dt>parameter 1</dt> + <dd> + specifies source of the object, it can be a string + containing URL, an + com::sun::star::io::XStream + implementation or + com::sun::star::io::XInputStream; + in case of + com::sun::star::io::XStream + implementation + the com::sun::star::io::XSeekable + interface must be supported. + </dd> + + <dt>parameter 2</dt> + <dd> + specifies mode the storage should be open in, can take + values from ElementModes constant set. + </dd> + + <dt>parameter 3</dt> + <dd> + this parameter represents `any` containing a sequence of + com::sun::star::beans::PropertyValue.<br> + The parameter can contain entries from + com::sun::star::document::MediaDescryptor + to transport some document info during the storage + initialization, it can be for example + com::sun::star::task::XInteractionHandler + implementation, password for the storage and repair + package flag.<br> + Additionally the parameter might contain property with the name + "StorageFormat" that can take values from + com::sun::star::embed::StorageFormats. + If the property is not provided a storage of package format + is created. + </dd> + </dl> + + <p> + The parameters are optional, that means that sequence can be empty or + contain only first parameter, or first and second one. In case + no parameters are provided the call works the same way as + com::sun::star::lang::XSingleServiceFactory::createInstance(). + In case only first parameter is provided, the storage is opened in + readonly mode. + </p> + + <p> + The opened root storage can support read access in addition to + specified one. + </p> +*/ +published service StorageFactory + : ::com::sun::star::lang::XSingleServiceFactory; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/StorageFormats.idl b/offapi/com/sun/star/embed/StorageFormats.idl new file mode 100644 index 000000000..89703ceb7 --- /dev/null +++ b/offapi/com/sun/star/embed/StorageFormats.idl @@ -0,0 +1,52 @@ +/* -*- 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_embed_StorageFormats_idl__ +#define __com_sun_star_embed_StorageFormats_idl__ + + + +module com { module sun { module star { module embed { + +/** The constant set contains IDs of formats that are supported by + StorageFactory. + + @see StorageFactory + @since OOo 3.3 +*/ +published constants StorageFormats +{ + /** specifies package format + */ + const long PACKAGE = 1; + + /** specifies zip format + */ + const long ZIP = 2; + + /** specifies Office Open XML format + */ + const long OFOPXML = 3; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/StorageStream.idl b/offapi/com/sun/star/embed/StorageStream.idl new file mode 100644 index 000000000..8388e2ac8 --- /dev/null +++ b/offapi/com/sun/star/embed/StorageStream.idl @@ -0,0 +1,205 @@ +/* -*- 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_embed_StorageStream_idl__ +#define __com_sun_star_embed_StorageStream_idl__ + +#include <com/sun/star/embed/XEncryptionProtectedSource.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/io/XStream.idl> +#include <com/sun/star/io/XSeekable.idl> + + + + + module com { module sun { module star { module embed { + +/** This is a service that represents a stream that can be provided by + XStorage::openStreamElement() call implemented by + Storage service. + + <p> + In case a stream is open with read-write access only one instance + of the stream can exist. + </p> + */ +published service StorageStream +{ + /** allows to get access to com::sun::star::io::XInputStream + and com::sun::star::io::XOutputStream + implementations. + + <p> + In case the storage stream is open readonly the returned reference + to com::sun::star::io::XOutputStream will be + empty. + </p> + */ + interface ::com::sun::star::io::XStream; + + /** allows to control object lifetime. + + <p> + A storage stream is created by a storage and has a restrictions + depending on the mode the stream is opened in. + </p> + + <p> + In case a stream is opened with read-write access only one instance of + the stream can exist. It means that the stream can not be reopened + even for readonly access until the read-write instance is disposed. + From the other side it is possible to open multiple streams for + readonly access. But because of the rule mentioned above it will not + be possible to open the stream for read-write access until all the + readonly instances are disposed. + </p> + + <p> + The stream must be disposed by + com::sun::star::lang::XComponent::dispose() + call or by explicit closing of input and output ( if provided ) + streams implementations with + com::sun::star::io::XInputStream::closeInput() + and + com::sun::star::io::XOutputStream::closeOutput() + calls. + </p> + + <p> + When a stream is disposed all the changes that were done for it are + automatically flashed, so that they become visible from parent + storage. It is also possible to flash the stream explicitly. + </p> + + <p> + In case parent storage is disposed the stream is disposed + automatically. + </p> + + <p> + In case a stream is disposed any call to its methods should result in + com::sun::star::lang::DisposedException. + </p> + */ + interface ::com::sun::star::lang::XComponent; + + /** allows to get access to stream properties. + */ + interface ::com::sun::star::beans::XPropertySet; + + /** allows to seek to a specified position within the stream. + + <p> + This interface must be supported in case either seekable readonly + or read-write access is requested. + </p> + */ + [optional] + interface ::com::sun::star::io::XSeekable; + + /** allows to set password to the stream. + + <p> + This interface must be supported by a stream with read-write access + to allow to set a password that should be used next time the + stream is stored. + </p> + + <p> + If the password is set or changed by this interface and the + stream is closed the new password should be used to get access to the + stream next time. + </p> + */ + [optional] + interface ::com::sun::star::embed::XEncryptionProtectedSource; + + /** allows to get and set media type of the stream. + */ + [property] string MediaType; + + /** specifies if the stream should be compressed next time it is stored. + */ + [property] boolean IsCompressed; + + /** allows to detect if the stream is encrypted. + + <p> + The property value `TRUE` means that the stream is currently encrypted. + `FALSE` - the stream is not encrypted. + </p> + + <p> + If somebody sets a password explicitly by using + XEncryptionProtectedSource interface the value is + automatically set to `TRUE`. If the interface is used to remove + the encryption - the value is automatically set to `FALSE`. + </p> + + */ + [property, readonly] boolean IsEncrypted; + + /** specifies whether the stream will become encrypted next time the + common storage password holder is committed. + + <p> + The property value `TRUE` means that the stream will become encrypted + after the closest storage in the parent hierarchy, that has common + storage password, is committed. + `FALSE` - the stream will not react to commit of such a storage. + </p> + + <p> + In case stream is not encrypted and the property is set to `TRUE`, + the stream will stay non-encrypted until the closest storage + in the parent hierarchy, that has common storage password, is committed. + On the commit the stream will be encrypted with the common storage + password. If there is no such storage in the hierarchy the stream + will not be encrypted at all. + Thus this property must be set very carefully. + </p> + + <p> + If somebody sets a password explicitly by using + XEncryptionProtectedSource interface the value is + automatically set to `FALSE` and the stream becomes encrypted + with specified password immediately. + </p> + + <p> + In case stream is encrypted one and the value is set to `TRUE` + the stream becomes non-encrypted until the common storage password + holder is committed. The data about previously set password ( if any ) + will be removed and the stream can be accessed as non-encrypted stream. + </p> + */ + [property] boolean UseCommonStoragePasswordEncryption; + + /** allows to detect size of the stream in bytes. + */ + [property, readonly] long Size; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/StorageWrappedTargetException.idl b/offapi/com/sun/star/embed/StorageWrappedTargetException.idl new file mode 100644 index 000000000..86fd261be --- /dev/null +++ b/offapi/com/sun/star/embed/StorageWrappedTargetException.idl @@ -0,0 +1,41 @@ +/* -*- 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_embed_StorageWrappedTargetException_idl__ +#define __com_sun_star_embed_StorageWrappedTargetException_idl__ + +#include <com/sun/star/lang/WrappedTargetException.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can wrap an exception thrown during XStorage + methods execution. + */ +published exception StorageWrappedTargetException: com::sun::star::lang::WrappedTargetException +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/UnreachableStateException.idl b/offapi/com/sun/star/embed/UnreachableStateException.idl new file mode 100644 index 000000000..5f95e1da9 --- /dev/null +++ b/offapi/com/sun/star/embed/UnreachableStateException.idl @@ -0,0 +1,47 @@ +/* -*- 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_embed_UnreachableStateException_idl__ +#define __com_sun_star_embed_UnreachableStateException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case specified state can not be reached. + */ +published exception UnreachableStateException: com::sun::star::uno::Exception +{ + /** The current state of the object. + */ + long CurrentState; + + /** The state that could not be reached. + */ + long NextState; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/UseBackupException.idl b/offapi/com/sun/star/embed/UseBackupException.idl new file mode 100644 index 000000000..129944127 --- /dev/null +++ b/offapi/com/sun/star/embed/UseBackupException.idl @@ -0,0 +1,54 @@ +/* -*- 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_embed_UseBackupException_idl__ +#define __com_sun_star_embed_UseBackupException_idl__ + +#include <com/sun/star/io/IOException.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case a storage commit is failed. + <p> + If a commit process of a storage fails on last transfer and the original + content may be corrupted the storage should throw this exception to notify + the user that a backup usage is required to restore the original content. + </p> + + <p> + The storage itself must disconnect from the medium it is based on to allow + restoring. Although the storage will still contain all the data + internally, and can be used as a temporary storage usually used. + </p> + */ +published exception UseBackupException: com::sun::star::io::IOException +{ + /** The URL of the temporary file the storage is based on now. + */ + string TemporaryFileURL; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/VerbAttributes.idl b/offapi/com/sun/star/embed/VerbAttributes.idl new file mode 100644 index 000000000..312450848 --- /dev/null +++ b/offapi/com/sun/star/embed/VerbAttributes.idl @@ -0,0 +1,47 @@ +/* -*- 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_embed_VerbAttributes_idl__ +#define __com_sun_star_embed_VerbAttributes_idl__ + + + +module com { module sun { module star { module embed { + +/** The constant set specifies possible attributes of a verb. + + @see VerbDescriptor +*/ +published constants VerbAttributes +{ + /** Execution of the verb with this attribute must not modify the + object. + */ + const long MS_VERBATTR_NEVERDIRTIES = 1; + + /** indicates that the verb should appear in the object's menu. + */ + const long MS_VERBATTR_ONCONTAINERMENU = 2; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/VerbDescriptor.idl b/offapi/com/sun/star/embed/VerbDescriptor.idl new file mode 100644 index 000000000..f6fe3608f --- /dev/null +++ b/offapi/com/sun/star/embed/VerbDescriptor.idl @@ -0,0 +1,62 @@ +/* -*- 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_embed_VerbDescriptor_idl__ +#define __com_sun_star_embed_VerbDescriptor_idl__ + + + + module com { module sun { module star { module embed { + + +/** describes a verb. + */ +published struct VerbDescriptor +{ + /** specifies the id of the verb. + */ + long VerbID; + + /** specifies the name of the verb. + */ + string VerbName; + + /** specifies the flags that are set for the verb. + + <p> + The flags can be used to build the verb's menu. + </p> + */ + long VerbFlags; + + /** specifies the attributes of the verb. + + <p> + It can take values from VerbAttributes. + </p> + */ + long VerbAttributes; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/VisualRepresentation.idl b/offapi/com/sun/star/embed/VisualRepresentation.idl new file mode 100644 index 000000000..a8f70459c --- /dev/null +++ b/offapi/com/sun/star/embed/VisualRepresentation.idl @@ -0,0 +1,47 @@ +/* -*- 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_embed_VisualRepresentation_idl__ +#define __com_sun_star_embed_VisualRepresentation_idl__ + +#include <com/sun/star/datatransfer/DataFlavor.idl> + + + module com { module sun { module star { module embed { + + +/** can contain a graphical representation in an arbitrary format. + */ +published struct VisualRepresentation +{ + /** The format of the visual representation. + */ + ::com::sun::star::datatransfer::DataFlavor Flavor; + + /** The data in the format specified by #Flavor. + */ + any Data; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/WrongStateException.idl b/offapi/com/sun/star/embed/WrongStateException.idl new file mode 100644 index 000000000..f500bba2a --- /dev/null +++ b/offapi/com/sun/star/embed/WrongStateException.idl @@ -0,0 +1,41 @@ +/* -*- 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_embed_WrongStateException_idl__ +#define __com_sun_star_embed_WrongStateException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + + module com { module sun { module star { module embed { + + +/** This exception can be thrown in case the object's state does not allow + to call requested functionality. + */ +published exception WrongStateException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XActionsApproval.idl b/offapi/com/sun/star/embed/XActionsApproval.idl new file mode 100644 index 000000000..8da5b738f --- /dev/null +++ b/offapi/com/sun/star/embed/XActionsApproval.idl @@ -0,0 +1,57 @@ +/* -*- 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_embed_XActionsApproval_idl__ +#define __com_sun_star_embed_XActionsApproval_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + + module com { module sun { module star { module embed { + +/** allows to request an approval for an action. + + <p> + An implementation of this interface is usually provided to another object + to allow this object to request an approval for actions. The list of + possible actions must be documented in documentation of the object. + </p> + */ +published interface XActionsApproval: com::sun::star::uno::XInterface +{ + /** requests an approval for the specified action. + + @param nAction + a value specifying the action that should be approved. Could take + values from Actions constants set. The explicit set + of the actions should be documented by the object that is going + to use this interface for approval as for example + InstanceLocker does. + + @return + returns `TRUE` in case the specified action is approved. + */ + boolean approveAction( [in] long nAction ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XClassifiedObject.idl b/offapi/com/sun/star/embed/XClassifiedObject.idl new file mode 100644 index 000000000..973f49898 --- /dev/null +++ b/offapi/com/sun/star/embed/XClassifiedObject.idl @@ -0,0 +1,68 @@ +/* -*- 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_embed_XClassifiedObject_idl__ +#define __com_sun_star_embed_XClassifiedObject_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/NoSupportException.idl> + + + + module com { module sun { module star { module embed { + +/** represents common functionality for embedded objects + */ +published interface XClassifiedObject: com::sun::star::uno::XInterface +{ + /** retrieves class ID of the object. + + @return + unique class ID of the object + */ + sequence< byte > getClassID(); + + /** retrieves symbolic name for the object type to be used in UI. + + @return + the symbolic name for the object + */ + string getClassName(); + + /** sets the class ID and symbolic name to an object. + + @param aClassID + the new class ID + + @param sClassName + the new symbolic name + + @throws ::com::sun::star::lang::NoSupportException + in case changing of class information is not allowed + */ + void setClassInfo( [in] sequence< byte > aClassID, + [in] string sClassName ) + raises( ::com::sun::star::lang::NoSupportException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XCommonEmbedPersist.idl b/offapi/com/sun/star/embed/XCommonEmbedPersist.idl new file mode 100644 index 000000000..29612596f --- /dev/null +++ b/offapi/com/sun/star/embed/XCommonEmbedPersist.idl @@ -0,0 +1,106 @@ +/* -*- 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_embed_XCommonEmbedPersist_idl__ +#define __com_sun_star_embed_XCommonEmbedPersist_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module embed { + +/** specifies common implementation for embedded objects and links + persistence. + */ +published interface XCommonEmbedPersist: com::sun::star::uno::XInterface +{ + /** lets the object or the link store itself. + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws com::sun::star::io::IOException + in case of io problems during saving + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void storeOwn() + raises( ::com::sun::star::embed::WrongStateException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + + /** allows to detect if the data store is read-only. + + @returns + `TRUE` if the data store is readonly or opened readonly + `FALSE` otherwise + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state ( has no entry ) + */ + boolean isReadonly() + raises( ::com::sun::star::embed::WrongStateException ); + + /** lets the object or the link reload itself. + + <p> + If the object has persistence it will be reloaded from its persistent + entry. + </p> + + @param aMediaArgs + optional parameters for document reloading, see also + com::sun::star::document::MediaDescriptor + + @param aObjectArgs + optional parameters for object reloading, see also + com::sun::star::embed::EmbeddedObjectDescriptor + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void reload( + [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaArgs, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XComponentSupplier.idl b/offapi/com/sun/star/embed/XComponentSupplier.idl new file mode 100644 index 000000000..b2bf4c5e7 --- /dev/null +++ b/offapi/com/sun/star/embed/XComponentSupplier.idl @@ -0,0 +1,48 @@ +/* -*- 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_embed_XComponentSupplier_idl__ +#define __com_sun_star_embed_XComponentSupplier_idl__ + +#include <com/sun/star/util/XCloseable.idl> + + + module com { module sun { module star { module embed { + +/** provides access to a component. + */ +published interface XComponentSupplier: com::sun::star::uno::XInterface +{ + /** allows to get access to a component. + <p> + The component may not support + com::sun::star::lang::XComponent interface. + </p> + + @return + component representation + */ + ::com::sun::star::util::XCloseable getComponent(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbedObjectClipboardCreator.idl b/offapi/com/sun/star/embed/XEmbedObjectClipboardCreator.idl new file mode 100644 index 000000000..22e89f967 --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbedObjectClipboardCreator.idl @@ -0,0 +1,91 @@ +/* -*- 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_embed_XEmbedObjectClipboardCreator_idl__ +#define __com_sun_star_embed_XEmbedObjectClipboardCreator_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/embed/InsertedObjectInfo.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module embed { + +/** allows to create and initialize a new embedded object from clipboard. + + <p> + This interface contains methods that can help to create and initialize + an embedded object based on system clipboard. + </p> + */ +published interface XEmbedObjectClipboardCreator: com::sun::star::uno::XInterface +{ + /** creates a new object and initializes it from the system clipboard. + + <p> In case specified entry exists it's contents are ignored and + will be overwritten on storing. + </p> + + <p> + The clipboard can provide a number of choices that are container + related. This information will be returned in the + InsertedObjectInfo object. + <p> + + @param xStorage + a parent storage the entry should be created/opened in + + @param sEntryName + a name for the entry + + @param aObjectArgs + optional parameters for the object persistence initialization + see also + EmbeddedObjectDescriptor + + @returns + the structure containing the object and container related options + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + InsertedObjectInfo createInstanceInitFromClipboard( + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntryName, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbedObjectCreator.idl b/offapi/com/sun/star/embed/XEmbedObjectCreator.idl new file mode 100644 index 000000000..268805bc8 --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbedObjectCreator.idl @@ -0,0 +1,176 @@ +/* -*- 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_embed_XEmbedObjectCreator_idl__ +#define __com_sun_star_embed_XEmbedObjectCreator_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module embed { + +/** allows to create and initialize a new embedded object. + + <p> + This interface contains methods that can help to create and initialize + an embedded object. + </p> + */ +published interface XEmbedObjectCreator: com::sun::star::uno::XInterface +{ + /** creates a new object and initializes it as a new one. + + <p> In case specified entry exists it's contents are ignored and + will be overwritten on storing. + </p> + + @param aClassID + the class id of the new object + + @param sClassName + the class name of the new object + + @param xStorage + a parent storage the entry should be created/opened in + + @param sEntryName + a name for the entry + + @param aObjectArgs + optional parameters for the object persistence initialization + see also + EmbeddedObjectDescriptor + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + ::com::sun::star::uno::XInterface createInstanceInitNew( + [in] sequence< byte > aClassID, + [in] string sClassName, + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntryName, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + + + /** creates a new object that should be based on specified storage entry. + + <p> The specified entry must exists and the object should be loaded + from the entry. In case a persistent representation of a link is + specified, the result object will be a link. + </p> + + @param xStorage + a parent storage the entry should be opened in + + @param sEntryName + a name for the entry + + @param aMediaDescriptor + an object of type + com::sun::star::document::MediaDescriptor that + specifies document related properties; please remember that target + related parameters, for example URL, will be ignored since the + object should be loaded from storage entry + + @param aObjectArgs + an object of type EmbeddedObjectDescriptor + contains object related properties + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws ::com::sun::star::container::NoSuchElementException + the specified entry does not exist + + @throws com::sun::star::io::IOException + in case of io problems during opening + + @throws com::sun::star::uno::Exception + in case of other problems + */ + ::com::sun::star::uno::XInterface createInstanceInitFromEntry( + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntryName, + [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + + /** creates a new object and initializes it based on + com::sun::star::document::MediaDescriptor. + + <p> In case specified entry exists it's contents are ignored and will + be overwritten on storing. + </p> + + @param xStorage + a parent storage the entry should be created/opened in + + @param sEntryName + a name for the entry + + @param aMediaDescriptor + an object of type + com::sun::star::document::MediaDescriptor that + specifies source + + @param aObjectArgs + an object of type EmbeddedObjectDescriptor + contains object related properties + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + ::com::sun::star::uno::XInterface createInstanceInitFromMediaDescriptor( + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntryName, + [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbedObjectFactory.idl b/offapi/com/sun/star/embed/XEmbedObjectFactory.idl new file mode 100644 index 000000000..b7a760da1 --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbedObjectFactory.idl @@ -0,0 +1,106 @@ +/* -*- 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_embed_XEmbedObjectFactory_idl__ +#define __com_sun_star_embed_XEmbedObjectFactory_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module embed { + +/** allows to create and initialize a new embedded object of specified type. + <p> + This interface provides user with full control over object creation. + </p> + */ +published interface XEmbedObjectFactory: com::sun::star::uno::XInterface +{ + /** creates a new object and transport parameters for persistent + initialization. + + <p> + This method can be used to have a full control over persistence + initialization of an object. + </p> + + <p> + If the service implementation does not support + XEmbedObjectCreator interface, it must accept the empty + aClassID parameter in case of loading from existing entry. + </p> + + @param aClassID + the class id of the new object + + @param sClassName + the class name of the new object + + @param xStorage + a parent storage the entry should be created/opened in + + @param sEntName + a name for the entry + + @param nEntryConnectionMode + a mode in which the object should be initialized from entry + can take values from EntryInitModes constant set + + @param aArgs + optional parameters for the embedded document persistence + initialization, see also + com::sun::star::document::MediaDescriptor + + @param aObjectArgs + optional parameters for the object persistence initialization, + see also + com::sun::star::embed::EmbeddedObjectDescriptor + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + ::com::sun::star::uno::XInterface createInstanceUserInit( + [in] sequence< byte > aClassID, + [in] string sClassName, + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntName, + [in] long nEntryConnectionMode, + [in] sequence< ::com::sun::star::beans::PropertyValue > aArgs, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbedPersist.idl b/offapi/com/sun/star/embed/XEmbedPersist.idl new file mode 100644 index 000000000..5eec55149 --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbedPersist.idl @@ -0,0 +1,239 @@ +/* -*- 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_embed_XEmbedPersist_idl__ +#define __com_sun_star_embed_XEmbedPersist_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/embed/XCommonEmbedPersist.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module embed { + +/** specifies an implementation for embedded object persistence. + <p> + The idea is that any usable embedded object should be initialized + with an entry in the parent storage that will be used as persistent + representation. + </p> + */ +published interface XEmbedPersist: XCommonEmbedPersist +{ + /** provides object with a parent storage and a name for object's entry. + + <p> + An entry with the specified name should be created/opened inside + provided storage. It can be a storage or a stream. For example, + OOo API will refer to OLE storages only by streams, but the object + implementation will use storage based on this stream. + </p> + + <p> + Factory does this call to initialize the embedded object. + The linked object can be initialized by factory in different way + ( internally ). + </p> + + <p> + It is also possible to switch object persistent representation through + this call. Actually this is the way, this call can be used by user + ( since initialization is done by factory ). + </p> + + @param xStorage + a parent storage the entry should be created in + + @param sEntName + a name for the entry + + @param nEntryConnectionMode + a mode in which the object should be initialized from entry + can take values from EntryInitModes constant set + + @param aMediaArgs + optional parameters for the embedded document persistence + initialization, see also + com::sun::star::document::MediaDescriptor + + @param aObjectArgs + optional parameters for the object persistence initialization, + see also + com::sun::star::embed::EmbeddedObjectDescriptor + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void setPersistentEntry( + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntName, + [in] long nEntryConnectionMode, + [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaArgs, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + + /** lets the object store itself to an entry in destination storage, + the own persistence entry is not changed. + + @param xStorage + a parent storage the entry should be created inside + + @param sEntName + a name for the entry + + @param aMediaArgs + optional parameters for document saving, see also + com::sun::star::document::MediaDescriptor + + @param aObjectArgs + optional parameters for the object saving, see also + com::sun::star::embed::EmbeddedObjectDescriptor + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws com::sun::star::io::IOException + in case of io problems during storing + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void storeToEntry( + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntName, + [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaArgs, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + + /** lets the object store itself to an entry in destination storage and + prepare to use the new entry for own persistence. + + <p> + The object should be stored to the new entry, after that the entry + should be remembered by the object. After the storing process is + finished the XEmbedPersist::saveCompleted() method + can be used to specify whether the object should use the new entry or + the old one. The object persistence can not be used until + XEmbedPersist::saveCompleted() is called. + So this state can be treated as "HandsOff" state. + <p> + + @param xStorage + a parent storage the entry should be created in + + @param sEntName + a name for the entry + + @param aMediaArgs + optional parameters for document saving, see also + com::sun::star::document::MediaDescriptor + + @param aObjectArgs + optional parameters for the object saving, see also + com::sun::star::embed::EmbeddedObjectDescriptor + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws com::sun::star::io::IOException + in case of io problems during storing + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void storeAsEntry( + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntName, + [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaArgs, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + + + /** specifies whether the object should use an old storage or a new one + after "save as" operation. + + @param bUseNew + `TRUE` the new storage should be used + `FALSE` the old one + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws com::sun::star::uno::Exception + in case of other problems + */ + + void saveCompleted( [in] boolean bUseNew ) + raises( ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); + + /** allows to detect if the object has entry. + + @returns + `TRUE` if the object has own entry set + `FALSE` otherwise + */ + boolean hasEntry() + raises( ::com::sun::star::embed::WrongStateException ); + + /** allows to retrieve the current object entry name. + + @returns + the object entry name if any + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state ( has no entry ) + */ + string getEntryName() + raises( ::com::sun::star::embed::WrongStateException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbedPersist2.idl b/offapi/com/sun/star/embed/XEmbedPersist2.idl new file mode 100644 index 000000000..205b9027b --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbedPersist2.idl @@ -0,0 +1,30 @@ +/* -*- 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_XEmbedPersist2_idl__ +#define __com_sun_star_XEmbedPersist2_idl__ + +#include <com/sun/star/embed/XEmbedPersist.idl> + +module com { module sun { module star { module embed { + +interface XEmbedPersist2 : XEmbedPersist +{ + /** + * Checks whether or not the object has created its persistent + * representation counterpart of its in-memory model. + */ + boolean isStored(); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbeddedClient.idl b/offapi/com/sun/star/embed/XEmbeddedClient.idl new file mode 100644 index 000000000..81f794c7c --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbeddedClient.idl @@ -0,0 +1,67 @@ +/* -*- 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_embed_XEmbeddedClient_idl__ +#define __com_sun_star_embed_XEmbeddedClient_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/embed/XComponentSupplier.idl> +#include <com/sun/star/embed/ObjectSaveVetoException.idl> + + + + + module com { module sun { module star { module embed { + +/** represents common functionality for embedded clients. + */ +published interface XEmbeddedClient: XComponentSupplier +{ + /** asks client to let the object store itself. + + @throws com::sun::star::uno::ObjectSaveVetoException + in case container wants to avoid saving of object + + @throws com::sun::star::uno::Exception + in case of problems during saving + */ + void saveObject() + raises( ::com::sun::star::embed::ObjectSaveVetoException, + ::com::sun::star::uno::Exception ); + + /** An object can use this method to notify the client when the object + outplace window becomes visible or invisible. + + @param bVisible + visibility state of the window + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + */ + void visibilityChanged( [in] boolean bVisible ) + raises( ::com::sun::star::embed::WrongStateException ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbeddedObject.idl b/offapi/com/sun/star/embed/XEmbeddedObject.idl new file mode 100644 index 000000000..9e9de8b64 --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbeddedObject.idl @@ -0,0 +1,236 @@ +/* -*- 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_embed_XEmbeddedObject_idl__ +#define __com_sun_star_embed_XEmbeddedObject_idl__ + +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/embed/XEmbeddedClient.idl> +#include <com/sun/star/embed/XVisualObject.idl> +#include <com/sun/star/embed/XClassifiedObject.idl> +#include <com/sun/star/embed/XComponentSupplier.idl> +#include <com/sun/star/embed/XStateChangeBroadcaster.idl> +#include <com/sun/star/datatransfer/XTransferable.idl> +#include <com/sun/star/document/XEventBroadcaster.idl> +#include <com/sun/star/embed/VerbDescriptor.idl> +#include <com/sun/star/embed/UnreachableStateException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/embed/NeedsRunningStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/util/XCloseable.idl> + + + + + module com { module sun { module star { module embed { + +/** represents common functionality for embedded objects. + */ +published interface XEmbeddedObject +{ + // INTERFACES + /** represents common visualization functionality for embedded objects. + */ + interface XVisualObject; + + /** allows to detect class ID of the object. + */ + interface XClassifiedObject; + + /** allows to get access to the component handled by the object. + */ + interface XComponentSupplier; + + /** allows to be notified when object changes the state. + */ + interface XStateChangeBroadcaster; + + /** allows to be notified about object related events. + */ + interface ::com::sun::star::document::XEventBroadcaster; + + /** allows to control lifetime of the object. + */ + interface ::com::sun::star::util::XCloseable; + + // METHODS + /** changes the state of the object to the requested one. + + @param nNewState + specifies the new state, can take values from the constant set + com::sun::star::embed::EmbedStates + + @throws com::sun::star::embed::UnreachableStateException + the specified state can not be reached + + @throws com::sun::star::embed::WrongStateException + in case object is in invalid state + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void changeState( [in] long nNewState ) + raises( ::com::sun::star::embed::UnreachableStateException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); + + /** returns supported states for the object. + + @returns + the sequence of states the object can be set to + + @throws com::sun::star::embed::NeedsRunnignStateException + means that the object is in loaded state now and can be switched + to running state, other possible states can be detected only when + the object is not in loaded state any more + + @throws com::sun::star::embed::WrongStateException + in case object is in invalid state + */ + sequence< long > getReachableStates() + raises( ::com::sun::star::embed::NeedsRunningStateException, + ::com::sun::star::embed::WrongStateException ); + + /** returns the current state of the object. + + @returns + the current state of the object + + @throws com::sun::star::embed::WrongStateException + in case object is in invalid state + */ + long getCurrentState() + raises( ::com::sun::star::embed::WrongStateException ); + + /** lets object perform an action referenced by nVerbID. + + @param nVerbID + specifies an action to perform, can take values from + EmbedVerbs + + @throws ::com::sun::star::lang::IllegalArgumentException + the verb is not supported + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state to call the function + + @throws com::sun::star::embed::UnreachableStateException + the state, required by the verb, can not be reached + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void doVerb( [in] long nVerbID ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::embed::UnreachableStateException, + ::com::sun::star::uno::Exception ); + + /** returns supported verbs for the object. + + @returns + the sequence of verbs the object supports + + @throws com::sun::star::embed::NeedsRunnignStateException + means that the object is in loaded state now and can be switched + to running state, acceptable verbs can be detected only when the + object is not in loaded state any more + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state to call the function + */ + sequence< VerbDescriptor > getSupportedVerbs() + raises( ::com::sun::star::embed::NeedsRunningStateException, + ::com::sun::star::embed::WrongStateException ); + + /** sets a connection to the container's client. + + @param xClient + provides a reference to a client implementation + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + */ + void setClientSite( [in] XEmbeddedClient xClient ) + raises( ::com::sun::star::embed::WrongStateException ); + + /** provides access to the internal link to the container client. + + @returns + a reference to related container client if any is set + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + */ + XEmbeddedClient getClientSite() + raises( ::com::sun::star::embed::WrongStateException ); + + /** updates object's representations. + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state to call the function + + @throws com::sun::star::uno::Exception + in case problems detected + */ + void update() + raises( ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); + + /** specifies how often the object's representation should be updated. + + @param nMode + the new update mode, can take values from + EmbeddedUpdateModes + + @throws ::com::sun::star::embed::WrongStateException + the object is in wrong state + */ + void setUpdateMode( [in] long nMode ) + raises( ::com::sun::star::embed::WrongStateException ); + + /** retrieves the status of the object. + + @param nAspect + the aspect specifying the form of object representation + + @return + the value specifying the status of the object for specified aspect + can take values from EmbedMisc constant set + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + */ + hyper getStatus( [in] hyper nAspect ) + raises( ::com::sun::star::embed::WrongStateException ); + + /** provides object with the name of container document. + + @param sName + name of the container document + */ + void setContainerName( [in] string sName ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbeddedObjectCreator.idl b/offapi/com/sun/star/embed/XEmbeddedObjectCreator.idl new file mode 100644 index 000000000..b886865cd --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbeddedObjectCreator.idl @@ -0,0 +1,46 @@ +/* -*- 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_embed_XEmbeddedObjectCreator_idl__ +#define __com_sun_star_embed_XEmbeddedObjectCreator_idl__ + +#include <com/sun/star/embed/XEmbedObjectCreator.idl> +#include <com/sun/star/embed/XEmbedObjectFactory.idl> +#include <com/sun/star/embed/XLinkCreator.idl> +#include <com/sun/star/embed/XLinkFactory.idl> + + module com { module sun { module star { module embed { + +/** + @since LibreOffice 4.1 + */ +interface XEmbeddedObjectCreator +{ + interface XEmbedObjectCreator; + interface XEmbedObjectFactory; + interface XLinkCreator; + [optional] interface XLinkFactory; +}; + + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEmbeddedOleObject.idl b/offapi/com/sun/star/embed/XEmbeddedOleObject.idl new file mode 100644 index 000000000..4d826a18f --- /dev/null +++ b/offapi/com/sun/star/embed/XEmbeddedOleObject.idl @@ -0,0 +1,28 @@ +/* -*- 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_embed_XEmbeddedOleObject_idl__ +#define __com_sun_star_embed_XEmbeddedOleObject_idl__ + + module com { module sun { module star { module embed { + +/** Represents a marker for embedded OLE objects. + * + * @since LibreOffice 5.2 + */ +interface XEmbeddedOleObject +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/offapi/com/sun/star/embed/XEncryptionProtectedSource.idl b/offapi/com/sun/star/embed/XEncryptionProtectedSource.idl new file mode 100644 index 000000000..1aba0d991 --- /dev/null +++ b/offapi/com/sun/star/embed/XEncryptionProtectedSource.idl @@ -0,0 +1,57 @@ +/* -*- 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_embed_XEncryptionProtectedSource_idl__ +#define __com_sun_star_embed_XEncryptionProtectedSource_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/io/IOException.idl> + + + module com { module sun { module star { module embed { + +/** This interface allows to set a password for an object. + */ +published interface XEncryptionProtectedSource: com::sun::star::uno::XInterface +{ + /** sets a password for the object. + + @param sPassword + the new password + + @throws ::com::sun::star::io::IOException + in case password could not be set + */ + void setEncryptionPassword( [in] string sPassword ) + raises( ::com::sun::star::io::IOException ); + + /** removes encryption from the object. + + @throws ::com::sun::star::io::IOException + in case encryption could not be removed + */ + void removeEncryption() + raises( ::com::sun::star::io::IOException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEncryptionProtectedSource2.idl b/offapi/com/sun/star/embed/XEncryptionProtectedSource2.idl new file mode 100644 index 000000000..a5791fe95 --- /dev/null +++ b/offapi/com/sun/star/embed/XEncryptionProtectedSource2.idl @@ -0,0 +1,58 @@ +/* -*- 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_embed_XEncryptionProtectedSource2_idl__ +#define __com_sun_star_embed_XEncryptionProtectedSource2_idl__ + +#include <com/sun/star/embed/XEncryptionProtectedSource.idl> +#include <com/sun/star/beans/NamedValue.idl> + + +module com { module sun { module star { module embed { + +/** This interface allows to set a password for an object. + + @since OOo 3.4 + */ +interface XEncryptionProtectedSource2: XEncryptionProtectedSource +{ + /** sets an encryption data for the object. + + @param aEncryptionData + the new encryption data + + @throws ::com::sun::star::io::IOException + in case the data could not be set + */ + void setEncryptionData( [in] sequence< ::com::sun::star::beans::NamedValue > aEncryptionData ) + raises( ::com::sun::star::io::IOException ); + + /** determine if an encryption data is set for this object. + + @return + true if some encryption data was set, false otherwise + */ + boolean hasEncryptionData(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl b/offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl new file mode 100644 index 000000000..ecba64d51 --- /dev/null +++ b/offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl @@ -0,0 +1,125 @@ +/* -*- 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_embed_XEncryptionProtectedStorage_idl__ +#define __com_sun_star_embed_XEncryptionProtectedStorage_idl__ + +#include <com/sun/star/embed/XEncryptionProtectedSource2.idl> +#include <com/sun/star/beans/NamedValue.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/xml/crypto/DigestID.idl> +#include <com/sun/star/xml/crypto/CipherID.idl> + + +module com { module sun { module star { module embed { + +/** This interface allows to set a password for an object. + + @since OOo 3.4 + */ +interface XEncryptionProtectedStorage: XEncryptionProtectedSource2 +{ + /** allows to set the encryption algorithms for the object. + <p> + The algorithms will of course be used only for streams that have been + marked to be encrypted. If no stream in the storage is marked to be + encrypted, the algorithms-related information may have no effect to + the result package. + </p> + + <p> + The following values could be part of the provided sequence: + </p> + <dl> + <dt>StartKeyGenerationAlgorithm</dt> + <dd> + specifies the algorithm that was used to generate + the EncryptionKey from the original password; in case + the contents should be decrypted, the algorithm might + be already known by the object; if a different one is + set an exception should be thrown to indicate the + error; it should take values from + com::sun::star::xml:crypto::DigestID. + </dd> + <dt>EncryptionAlgorithm</dt> + <dd> + specifies the algorithm that should be used to + encrypt/decrypt the contents; in case the contents + should be decrypted, the algorithm might be already + known by the object; if a different one is set + an exception should be thrown to indicate the error; + it should take values from + com::sun::star::xml:crypto::CipherID. + </dd> + <dt>ChecksumAlgorithm</dt> + <dd> + specifies the algorithm that was used to generate + the checksum of the encrypted data; in case + the contents should be decrypted, the algorithm might + be already known by the object; if a different one is + set an exception should be thrown to indicate the + error; it should take values from + com::sun::star::xml:crypto::DigestID. + </dd> + </dl> + */ + void setEncryptionAlgorithms( [in] sequence< ::com::sun::star::beans::NamedValue > aAlgorithms ) + raises( ::com::sun::star::lang::IllegalArgumentException ); + + /** allows to get the encryption algorithms of the object. + */ + sequence< ::com::sun::star::beans::NamedValue > getEncryptionAlgorithms(); + + /** set OpenPGP-specific encryption properties + + <p> + When provided, switch ODF package encryption to OpenPGP. + </p> + <p> + For each recipient, add one sequence of named values, each of + the same structure. The following values could be part of that + provided sequence: + </p> + <dl> + <dt>KeyId</dt> + <dd> + specifies OpenPGP key ID or fingerprint of the public + key used to encrypt this session key against + </dd> + <dt>KeyPacket</dt> + <dd> + (optional) public key packet of the key used to encrypt + </dd> + <dt>CipherValue</dt> + <dd> + OpenPGP-encrypted session key for this recipient + </dd> + </dl> + + @since LibreOffice 6.0 + */ + void setGpgProperties( [in] sequence< sequence< ::com::sun::star::beans::NamedValue > > aProps ) + raises( ::com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XExtendedStorageStream.idl b/offapi/com/sun/star/embed/XExtendedStorageStream.idl new file mode 100644 index 000000000..a22e6fd88 --- /dev/null +++ b/offapi/com/sun/star/embed/XExtendedStorageStream.idl @@ -0,0 +1,96 @@ +/* -*- 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_embed_XExtendedStorageStream_idl__ +#define __com_sun_star_embed_XExtendedStorageStream_idl__ + +#include <com/sun/star/io/XStream.idl> +#include <com/sun/star/io/XSeekable.idl> +#include <com/sun/star/embed/XEncryptionProtectedSource.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/embed/XTransactedObject.idl> +#include <com/sun/star/embed/XTransactionBroadcaster.idl> + + + module com { module sun { module star { module embed { + +/** This interface allows access to an extended storage stream that might be + transacted. + */ +published interface XExtendedStorageStream +{ + // INTERFACES + /** Stream access. + */ + interface ::com::sun::star::io::XStream; + + /** allows to control object lifetime. + */ + interface ::com::sun::star::lang::XComponent; + + /** allows to seek to a specified position within the stream. + + <p> + This interface must be supported in case either seekable readonly + or read-write access is requested. + </p> + */ + [optional] interface ::com::sun::star::io::XSeekable; + + /** allows to set password to the stream. + + <p> + This interface must be supported by a stream with read-write access + to allow to set a password that should be used next time the + stream is stored if the encryption is supported. + </p> + + <p> + If the password is set or changed by this interface and the + stream is closed the new password should be used to get access to the + stream next time. + </p> + */ + [optional] interface ::com::sun::star::embed::XEncryptionProtectedSource; + + /** allows to get access to stream properties. + */ + [optional] interface ::com::sun::star::beans::XPropertySet; + + /** allows to have transacted access. + */ + [optional] interface ::com::sun::star::embed::XTransactedObject; + + /** allows to register a listener for transaction actions. + + <p> + If XTransactedObject interface is implemented this + interface must be implemented as well. + </p> + */ + [optional] interface ::com::sun::star::embed::XTransactionBroadcaster; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XHatchWindow.idl b/offapi/com/sun/star/embed/XHatchWindow.idl new file mode 100644 index 000000000..f65264298 --- /dev/null +++ b/offapi/com/sun/star/embed/XHatchWindow.idl @@ -0,0 +1,56 @@ +/* -*- 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_embed_XHatchWindow_idl__ +#define __com_sun_star_embed_XHatchWindow_idl__ + +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/embed/XHatchWindowController.idl> +#include <com/sun/star/awt/Size.idl> + + + module com { module sun { module star { module embed { + + +/** specifies the operations for a hatch window. + + <p> + A hatch window is a kind of window that is adopted to contain + an embedded object window to represent the contained window border + and to handle resizing/moving in a specific way: after user have + selected the new size/placement the hatching window sends request + to owner for resizing/moving. + Thus the window can not resize/move itself. + </p> + */ +published interface XHatchWindow: com::sun::star::lang::XComponent +{ + /** sets the object that will control resizing/moving, if the object is + not set the window can not be resized/moved. + */ + void setController( [in] XHatchWindowController xController ); + + [attribute] com::sun::star::awt::Size HatchBorderSize; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XHatchWindowController.idl b/offapi/com/sun/star/embed/XHatchWindowController.idl new file mode 100644 index 000000000..b5810a255 --- /dev/null +++ b/offapi/com/sun/star/embed/XHatchWindowController.idl @@ -0,0 +1,66 @@ +/* -*- 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_embed_XHatchWindowController_idl__ +#define __com_sun_star_embed_XHatchWindowController_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/awt/Rectangle.idl> + + + module com { module sun { module star { module embed { + + +/** specifies the operations for a hatch window. + + <p> + A hatch window owner is responsible to handle resize/move requests + sent by the window. It is also responsible to validate tracking + rectangle size. + </p> + */ +published interface XHatchWindowController: com::sun::star::uno::XInterface +{ + /** requests window owner to resize/move the window. + + @param aRect + the new requested position and size of the window + */ + void requestPositioning( [in] com::sun::star::awt::Rectangle aRect ); + + /** returns the closest valid rectangle to the provided one. + + @param aRect + a new selected position and size of the tracking rectangle + + @returns + the closest valid position and size to the provided one + */ + com::sun::star::awt::Rectangle calcAdjustedRectangle( + [in] com::sun::star::awt::Rectangle aRect ); + + void activated(); + void deactivated(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XHatchWindowFactory.idl b/offapi/com/sun/star/embed/XHatchWindowFactory.idl new file mode 100644 index 000000000..a1acfc3e5 --- /dev/null +++ b/offapi/com/sun/star/embed/XHatchWindowFactory.idl @@ -0,0 +1,66 @@ +/* -*- 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_embed_XHatchWindowFactory_idl__ +#define __com_sun_star_embed_XHatchWindowFactory_idl__ + +#include <com/sun/star/embed/XHatchWindow.idl> +#include <com/sun/star/awt/XWindowPeer.idl> +#include <com/sun/star/awt/Rectangle.idl> +#include <com/sun/star/awt/Size.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + + module com { module sun { module star { module embed { + + +/** creates a hatch window implementation. + */ +published interface XHatchWindowFactory: com::sun::star::uno::XInterface +{ + /** creates a new hatch window instance. + + @param xParent + the parent window the hatch window should be created in + + @param aBounds + position and size of the hatch window + + @param aSize + border and handler squares size + + @returns + a new hatch window + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + */ + ::com::sun::star::embed::XHatchWindow createHatchWindowInstance( + [in] com::sun::star::awt::XWindowPeer xParent, + [in] com::sun::star::awt::Rectangle aBounds, + [in] com::sun::star::awt::Size aSize ) + raises( ::com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XHierarchicalStorageAccess.idl b/offapi/com/sun/star/embed/XHierarchicalStorageAccess.idl new file mode 100644 index 000000000..b61c5cc62 --- /dev/null +++ b/offapi/com/sun/star/embed/XHierarchicalStorageAccess.idl @@ -0,0 +1,186 @@ +/* -*- 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_embed_XHierarchicalStorageAccess_idl__ +#define __com_sun_star_embed_XHierarchicalStorageAccess_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/io/XStream.idl> +#include <com/sun/star/embed/XExtendedStorageStream.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/embed/StorageWrappedTargetException.idl> +#include <com/sun/star/embed/InvalidStorageException.idl> +#include <com/sun/star/packages/WrongPasswordException.idl> +#include <com/sun/star/container/XNameAccess.idl> +#include <com/sun/star/container/NoSuchElementException.idl> +#include <com/sun/star/container/ElementExistException.idl> +#include <com/sun/star/packages/NoEncryptionException.idl> + + + + module com { module sun { module star { module embed { + +/** This interface allows hierarchical access to storage tree. + + <p> + Currently only streams can be opened using this interface. + </p> + + <p> + The hierarchical access can not be mixed with a normal access. Thus when + in a storage a stream with a path "a/b/c" is accessed using hierarchical + access, another stream "a/b/d" can also be opened with hierarchical + access ( if it is still not opened ), but the substorage "a" can not be + opened ( it is locked by hierarchical access ). + </p> + */ +published interface XHierarchicalStorageAccess +{ + // METHODS + /** allows to get access to a child stream of the storage, using + hierarchical path. + + <p> + In case the stream is open in readonly mode the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + @param sStreamPath + the path to the substream that should be open + + @param nOpenMode + a mode the stream should be open in, + can be a combination of ElementModes values + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::WrongPasswordException + the provided password is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + XExtendedStorageStream openStreamElementByHierarchicalName( + [in] string sStreamPath, + [in] long nOpenMode ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get access to a child encrypted stream with password using + hierarchical path. + + <p> + If storage does not allow any encryption this method will always throw + com::sun::star::packages::NoEncryptionException. + </p> + + <p> + In case the stream is open in readonly mode the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + @param sStreamName + the path to the substream that should be open + + @param nOpenMode + a mode the stream should be open in, + can be a combination of ElementModes values + + @param sPassword + this parameter allows to specify a reading password for the + stream, the password must be a correct one, otherwise an + exception will be thrown + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoEncryptionException + the stream is not encrypted + + @throws ::com::sun::star::packages::WrongPasswordException + the provided password is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + XExtendedStorageStream openEncryptedStreamElementByHierarchicalName( + [in] string sStreamName, + [in] long nOpenMode, + [in] string sPassword ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** removes a stream specified by hierarchical name from a storage. + + @param sElementPath + the path to the element to remove + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + an illegal argument is provided + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with such name + + @throws ::com::sun::star::io::IOException + in case of io errors during removing + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + + */ + void removeStreamElementByHierarchicalName( [in] string sElementPath ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XHierarchicalStorageAccess2.idl b/offapi/com/sun/star/embed/XHierarchicalStorageAccess2.idl new file mode 100644 index 000000000..93eaa5ee3 --- /dev/null +++ b/offapi/com/sun/star/embed/XHierarchicalStorageAccess2.idl @@ -0,0 +1,94 @@ +/* -*- 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_embed_XHierarchicalStorageAccess2_idl__ +#define __com_sun_star_embed_XHierarchicalStorageAccess2_idl__ + +#include <com/sun/star/embed/XHierarchicalStorageAccess.idl> +#include <com/sun/star/beans/NamedValue.idl> + + + module com { module sun { module star { module embed { + +/** This interface extends XHierarchicalStorageAccess interface. + */ +interface XHierarchicalStorageAccess2 : XHierarchicalStorageAccess +{ + /** allows to get access to a child encrypted stream with encryption data + using hierarchical path. + + <p> + If storage does not allow any encryption this method will always throw + com::sun::star::packages::NoEncryptionException. + </p> + + <p> + In case the stream is open in readonly mode the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + @param sStreamName + the path to the substream that should be open + + @param nOpenMode + a mode the stream should be open in, + can be a combination of ElementModes values + + @param aEncryptionData + this parameter allows to specify an encryption data for the + stream, the data must be correct, otherwise an + exception will be thrown + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoEncryptionException + the stream is not encrypted + + @throws ::com::sun::star::packages::WrongPasswordException + the provided password is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + XExtendedStorageStream openEncryptedStreamByHierarchicalName( + [in] string sStreamName, + [in] long nOpenMode, + [in] sequence< ::com::sun::star::beans::NamedValue > aEncryptionData ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XInplaceClient.idl b/offapi/com/sun/star/embed/XInplaceClient.idl new file mode 100644 index 000000000..c92aa36d4 --- /dev/null +++ b/offapi/com/sun/star/embed/XInplaceClient.idl @@ -0,0 +1,194 @@ +/* -*- 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_embed_XInplaceClient_idl__ +#define __com_sun_star_embed_XInplaceClient_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/container/XIndexAccess.idl> +#include <com/sun/star/frame/XDispatchProvider.idl> +#include <com/sun/star/frame/XLayoutManager.idl> +#include <com/sun/star/awt/XWindow.idl> +#include <com/sun/star/awt/Rectangle.idl> +#include <com/sun/star/awt/Size.idl> +#include <com/sun/star/awt/KeyEvent.idl> +#include <com/sun/star/embed/WrongStateException.idl> + + + + module com { module sun { module star { module embed { + +/** represents common functionality for inplace clients. + */ +interface XInplaceClient: com::sun::star::uno::XInterface +{ + /** checks if the container can activate the object inplace. + + @return + `TRUE` the container can activate the object inplace. + `FALSE` otherwise. + */ + boolean canInplaceActivate(); + + /** notifies container through the client that the object is to be + inplace activated. + + @throws com::sun::star::embed::WrongStateException + the container is not ready for activation + */ + void activatingInplace() + raises( ::com::sun::star::embed::WrongStateException ); + + /** notifies container through the client that the object is to be + UI-activated. + + @throws com::sun::star::embed::WrongStateException + the container is not ready for activation + */ + void activatingUI() + raises( ::com::sun::star::embed::WrongStateException ); + + /** notifies container through the client that the object is deactivated. + + @throws com::sun::star::embed::WrongStateException + the container is not ready for deactivation + */ + void deactivatedInplace() + raises( ::com::sun::star::embed::WrongStateException ); + + /** notifies container through the client that the object is + UI-deactivated. + + <p> + After this notification the container can restore its own UI and take focus. + </p> + + @throws com::sun::star::embed::WrongStateException + the container is not ready for deactivation + */ + void deactivatedUI() + raises( ::com::sun::star::embed::WrongStateException ); + + /** allows to retrieve the + com::sun::star::frame::LayoutManager of the + container. + + @return + reference to object representing the + com::sun::star::frame::LayoutManager of the + container + + @throws com::sun::star::embed::WrongStateException + the object is in unexpected state to make such request + */ + ::com::sun::star::frame::XLayoutManager getLayoutManager() + raises( ::com::sun::star::embed::WrongStateException ); + + /** allows to retrieve the container's dispatch provider. + + @return + reference to object implementing the + com::sun::star::frame::XDispatchProvider + + @throws com::sun::star::embed::WrongStateException + the object is in unexpected state to make such request + */ + ::com::sun::star::frame::XDispatchProvider getInplaceDispatchProvider() + raises( ::com::sun::star::embed::WrongStateException ); + + /** gets the inplace object position rectangle. + + <p> + The rectangle is provided in object's parent window coordinates in + pixels. The intersection of position and clip rectangles specifies + the visible part of the object. In case the position window has a size + that is bigger than object's size, the object should either scale or + deactivate. + </p> + + @return + specifies a new position rectangle + + @throws com::sun::star::embed::WrongStateException + the object is in unexpected state to make such request + */ + ::com::sun::star::awt::Rectangle getPlacement() + raises( ::com::sun::star::embed::WrongStateException ); + + /** gets the inplace object clip rectangle. + + <p> + The rectangle is provided in object's parent window coordinates in + pixels. The intersection of position and clip rectangles specifies + the visible part of the object. + </p> + + @return + specifies a new clip rectangle + + @throws com::sun::star::embed::WrongStateException + the object is in unexpected state to make such request + */ + ::com::sun::star::awt::Rectangle getClipRectangle() + raises( ::com::sun::star::embed::WrongStateException ); + + /** provides accelerator table the object wants to use while it is + inplace active. + + @param aKeys + an accelerator table from object + + @throws com::sun::star::embed::WrongStateException + the object is in unexpected state + */ + void translateAccelerators( [in] sequence< ::com::sun::star::awt::KeyEvent > aKeys ) + raises( ::com::sun::star::embed::WrongStateException ); + + /** scrolls the object. + + @param aOffset + scrolls the object to specified offset in pixels + + @throws com::sun::star::embed::WrongStateException + the object is in unexpected state + */ + void scrollObject( [in] ::com::sun::star::awt::Size aOffset ) + raises( ::com::sun::star::embed::WrongStateException ); + + /** notifies the container that the position of the object is changed. + + @param aPosRect + specifies a new position rectangle + + @throws com::sun::star::embed::WrongStateException + the object state is not correct + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void changedPlacement( [in] ::com::sun::star::awt::Rectangle aPosRect ) + raises( ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XInplaceObject.idl b/offapi/com/sun/star/embed/XInplaceObject.idl new file mode 100644 index 000000000..187605685 --- /dev/null +++ b/offapi/com/sun/star/embed/XInplaceObject.idl @@ -0,0 +1,109 @@ +/* -*- 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_embed_XInplaceObject_idl__ +#define __com_sun_star_embed_XInplaceObject_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/awt/Rectangle.idl> +#include <com/sun/star/awt/KeyEvent.idl> +#include <com/sun/star/embed/WrongStateException.idl> + + + + + module com { module sun { module star { module embed { + +/** represents common functionality for inplace embedded objects. + */ +published interface XInplaceObject: com::sun::star::uno::XInterface +{ + /** sets the visible part of the inplace object. + + <p> + Both rectangles are provided in object's parent window coordinates + in pixels. The intersection of rectangles specifies the visible part + of the object. In case the position window has a size that is + different from object's visual area size, the object should either + scale or deactivate. + </p> + + <p> + The method must activate object repainting. + </p> + + @param aPosRect + specifies a new position rectangle + + @param aClipRect + specifies a new clip rectangle + + @throws com::sun::star::embed::WrongStateException + the object is in invalid state + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void setObjectRectangles( [in] ::com::sun::star::awt::Rectangle aPosRect, + [in] ::com::sun::star::awt::Rectangle aClipRect ) + raises( ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); + + /** enables or disables modeless dialogs of the object. + + <p> + In case container wants to show a modal dialog it should disable + modeless of embedded object dialogs with this call. Later the same + call can be used to enable it. + </p> + + @param bEnable + `TRUE` to enable object modeless + `FALSE` to disable it + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void enableModeless( [in] boolean bEnable ) + raises( ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); + + /** provides accelerator table the container wants to use during inplace + editing. + + @return + an accelerator table from container + + @throws com::sun::star::embed::WrongStateException + the object is in unexpected state + */ + void translateAccelerators( + [in] sequence< ::com::sun::star::awt::KeyEvent > aKeys ) + raises( ::com::sun::star::embed::WrongStateException ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XInsertObjectDialog.idl b/offapi/com/sun/star/embed/XInsertObjectDialog.idl new file mode 100644 index 000000000..a0e89091f --- /dev/null +++ b/offapi/com/sun/star/embed/XInsertObjectDialog.idl @@ -0,0 +1,81 @@ +/* -*- 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_embed_XInsertObjectDialog_idl__ +#define __com_sun_star_embed_XInsertObjectDialog_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/embed/InsertedObjectInfo.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module embed { + +/** allows to create and initialize a new embedded object using GUI dialog. + */ +published interface XInsertObjectDialog: com::sun::star::uno::XInterface +{ + /** creates a new object using GUI dialog. + + <p> + The dialog allows for user to do a number of choices that are container + related. This information will be returned in the + InsertedObjectInfo object. + <p> + + @param xStorage + a parent storage the entry should be created/opened in + + @param sEntName + a name for the entry + + @param lObjArgs + optional parameters for the object persistence initialization + see also com::sun::star::embed::EmbeddedObjectDescriptor + + @returns + the structure containing the object and container related options + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + InsertedObjectInfo createInstanceByDialog( + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntName, + [in] sequence< ::com::sun::star::beans::PropertyValue > lObjArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XLinkCreator.idl b/offapi/com/sun/star/embed/XLinkCreator.idl new file mode 100644 index 000000000..8bb0e69e0 --- /dev/null +++ b/offapi/com/sun/star/embed/XLinkCreator.idl @@ -0,0 +1,88 @@ +/* -*- 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_embed_XLinkCreator_idl__ +#define __com_sun_star_embed_XLinkCreator_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module embed { + +/** allows to create and initialize a new link. + <p> + Methods of this interface does not require specification of the object type, + it will be detected. + </p> + */ +published interface XLinkCreator: com::sun::star::uno::XInterface +{ + /** creates a new object based on + com::sun::star::document::MediaDescriptor + and initializes it as a link. + + <p> + In case the entry exists already all its contents will be ignored and + rewritten on storing of the object. + </p> + + @param xStorage + a parent storage the entry should be created or opened in + + @param sEntryName + a name for the entry + + @param aArgs + com::sun::star::document::MediaDescriptor + the link will be based on + + @param aObjectArgs + optional parameters for the object persistence initialization, + see also + com::sun::star::embed::EmbeddedObjectDescriptor + + @throws ::com::sun::star::lang::IllegalArgumentException + the argument is illegal + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + ::com::sun::star::uno::XInterface createInstanceLink( + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntryName, + [in] sequence< ::com::sun::star::beans::PropertyValue > aArgs, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XLinkFactory.idl b/offapi/com/sun/star/embed/XLinkFactory.idl new file mode 100644 index 000000000..b28137ced --- /dev/null +++ b/offapi/com/sun/star/embed/XLinkFactory.idl @@ -0,0 +1,91 @@ +/* -*- 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_embed_XLinkFactory_idl__ +#define __com_sun_star_embed_XLinkFactory_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module embed { + +/** allows to create and initialize a new link of specified type. + */ +published interface XLinkFactory: com::sun::star::uno::XInterface +{ + /** creates a new link and transport parameters for persistent + initialization. + + <p> + This method can be used to have a full control over persistence + initialization of a link. + </p> + + @param aClassID + the class id of the new object + + @param ClassName + the class name of the new object + + @param xStorage + a parent storage the entry should be created in + + @param sEntryName + a name for the entry + + @param aArgs + com::sun::star::document::MediaDescriptor + that contains source for the link + + @param aObjectArgs + optional parameters for the object persistence initialization + see also + com::sun::star::embed::EmbeddedObjectDescriptor + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::io::IOException + in case of io problems during opening or creation + + @throws com::sun::star::uno::Exception + in case of other problems + */ + ::com::sun::star::uno::XInterface createInstanceLinkUserInit( + [in] sequence< byte > aClassID, + [in] string ClassName, + [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntryName, + [in] sequence< ::com::sun::star::beans::PropertyValue > aArgs, + [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XLinkageSupport.idl b/offapi/com/sun/star/embed/XLinkageSupport.idl new file mode 100644 index 000000000..be99765b7 --- /dev/null +++ b/offapi/com/sun/star/embed/XLinkageSupport.idl @@ -0,0 +1,119 @@ +/* -*- 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_embed_XLinkageSupport_idl__ +#define __com_sun_star_embed_XLinkageSupport_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/embed/XCommonEmbedPersist.idl> +#include <com/sun/star/beans/PropertyValue.idl> +#include <com/sun/star/embed/WrongStateException.idl> + + + module com { module sun { module star { module embed { + +/** specifies an additional implementation for linked embedded object support. + */ +published interface XLinkageSupport: XCommonEmbedPersist +{ + /** breaks the link and provides the object with a parent storage and a + name for object's entry + + <p> + This method can be used only for links implementations that implement + the whole set of embedded object interfaces. Usually the sets of + interfaces are the same for links and objects. An example of exception + from this are OOo links that do not implement + XEmbedPersist interface. For such cases the method will + throw an exception. + </p> + + <p> + The link will be broken and the linked object will become a normal + embedded object. + </p> + + <p> + An entry with the specified name should be created or opened inside + provided storage. This entry will be used for the object persistence. + If the entry exists already all its contents will be ignored. + </p> + + @param xStorage + a parent storage the entry should be created or opened in + + @param sEntryName + a name for the entry + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state or not a linked object + + @throws com::sun::star::io::IOException + in case object has not persistence or other io problems + + @throws com::sun::star::uno::Exception + in case of other problems + + @see also XEmbedPersist::setPersistentEntry + */ + void breakLink( [in] ::com::sun::star::embed::XStorage xStorage, + [in] string sEntryName ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + + + /** allows to detect whether the object is a linked one. + <p> + Most of embedded objects will not support this interface, but some + of them can do it, to allow conversion from link to object. After + the conversion the object does not change, so interface set stays the + same, but the object is not a link any more. + </p> + + @return + `TRUE` - the object is a linked one. + `FALSE` - otherwise + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state + */ + boolean isLink() + raises( ::com::sun::star::embed::WrongStateException ); + + /** returns the URL of the link object. + + @throws com::sun::star::embed::WrongStateException + the object is in wrong state or is not a link + */ + string getLinkURL() + raises( ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XOLESimpleStorage.idl b/offapi/com/sun/star/embed/XOLESimpleStorage.idl new file mode 100644 index 000000000..4ea4f69b1 --- /dev/null +++ b/offapi/com/sun/star/embed/XOLESimpleStorage.idl @@ -0,0 +1,77 @@ +/* -*- 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_embed_XOLESimpleStorage_idl__ +#define __com_sun_star_embed_XOLESimpleStorage_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/container/XNameContainer.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/embed/XTransactedObject.idl> +#include <com/sun/star/embed/XClassifiedObject.idl> + + +module com { module sun { module star { module embed { +/** This interface allows to access and change contents of OLE storages. + + <p> + This is a simple container allowing the access to OLE storages. The + subcomponents are either OLE storages themselves or streams. + </p> +*/ +published interface XOLESimpleStorage +{ + //INTERFACES + /** interface XNameContainer is the generic interface for + supporting the insertion and removal of named elements. + + <p>The access to the elements is provided though + XNameContainer methods.</p> + */ + interface ::com::sun::star::container::XNameContainer; + + /** interface XComponent allows to explicitly free resources + and break cyclic references. + */ + interface ::com::sun::star::lang::XComponent; + + /** interface XTransactedObject allows transacted access to + an object. + + <p>The storages are always opened in transacted mode, the + XTransactedObject interface allows to commit the storage. + </p> + */ + interface XTransactedObject; + + /** interface XClassifiedObject represents common + functionality for embedded objects + + <p>the XClassifiedObject interface allows to set/get the + ClassID of the storage.</p> + */ + interface XClassifiedObject; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XOptimizedStorage.idl b/offapi/com/sun/star/embed/XOptimizedStorage.idl new file mode 100644 index 000000000..65d5de599 --- /dev/null +++ b/offapi/com/sun/star/embed/XOptimizedStorage.idl @@ -0,0 +1,165 @@ +/* -*- 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_embed_XOptimizedStorage_idl__ +#define __com_sun_star_embed_XOptimizedStorage_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/io/XStream.idl> +#include <com/sun/star/io/XInputStream.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/embed/StorageWrappedTargetException.idl> +#include <com/sun/star/embed/InvalidStorageException.idl> +#include <com/sun/star/container/NoSuchElementException.idl> +#include <com/sun/star/container/ElementExistException.idl> +#include <com/sun/star/packages/EncryptionNotAllowedException.idl> +#include <com/sun/star/packages/NoRawFormatException.idl> +#include <com/sun/star/packages/WrongPasswordException.idl> +#include <com/sun/star/beans/PropertyValue.idl> +#include <com/sun/star/beans/UnknownPropertyException.idl> +#include <com/sun/star/beans/PropertyVetoException.idl> + + + module com { module sun { module star { module embed { + +/** This is a temporary interface that is introduced to temporarily optimize + the document storing process. PLEASE DO NOT USE IT, it might change in any + time and will be deprecated soon! + Another solution will be introduced as final one. + */ +published interface XOptimizedStorage +{ + /** allows to insert a raw stream representing non-encrypted stream with + header. + */ + void insertRawNonEncrStreamElementDirect( + [in] string sStreamName, + [in] ::com::sun::star::io::XInputStream xInStream ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoRawFormatException, + ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to insert a stream to the storage directly. The stream must + stay alive till the storage is committed. + */ + void insertStreamElementDirect( + [in] string sStreamName, + [in] ::com::sun::star::io::XInputStream xInStream, + [in] sequence < ::com::sun::star::beans::PropertyValue > aProperties ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to copy storage element directly, not guaranteed to work. + */ + void copyElementDirectlyTo( + [in] string sSourceName, + [in] ::com::sun::star::embed::XOptimizedStorage xTargetStorage, + [in] string sTargetName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to switch storage persistence to the provided stream. The stream + will be filled by the storage. If an empty reference is provided, the + storage will create a temporary stream to switch to itself. + It is applicable only for root storages. + */ + void writeAndAttachToStream( + [in] ::com::sun::star::io::XStream xStream ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to switch storage persistence to the provided URL. The caller is + responsible to be sure that the file referenced by the URL contains the + same contents as the stream the storage is based currently. Thus using + of this method is very dangerous and should be avoided when possible. + It is applicable only for root storages. + */ + void attachToURL( [in] string sURL, + [in] boolean bReadOnly ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get property of the child element with the specified name. + The implementation of the method might allow to access only subset + of the supported by element properties. + */ + any getElementPropertyValue( [in] string sElementName, + [in] string sPropertyName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** fills the provided stream with the last flushed version of data from + the child stream of the storage. + + @param sStreamName + the name of the substream that should be copied + + @param xTargetStream + the target stream where the data must be copied to + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::WrongPasswordException + the provided password is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + void copyStreamElementData( [in] string sStreamName, + [in] ::com::sun::star::io::XStream xTargetStream ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XPackageStructureCreator.idl b/offapi/com/sun/star/embed/XPackageStructureCreator.idl new file mode 100644 index 000000000..7224e8790 --- /dev/null +++ b/offapi/com/sun/star/embed/XPackageStructureCreator.idl @@ -0,0 +1,55 @@ +/* -*- 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_embed_XPackageStructureCreator_idl__ +#define __com_sun_star_embed_XPackageStructureCreator_idl__ + +#include <com/sun/star/io/XOutputStream.idl> +#include <com/sun/star/io/IOException.idl> + + + module com { module sun { module star { module embed { + +/** allows to convert filesystem folder tree into a package. + */ +published interface XPackageStructureCreator: com::sun::star::uno::XInterface +{ + /** converts filesystem folder tree into a package. + + @param sFolderURL + the URL of folder that must be converted, + the URL must be in format accepted by UCB + + @param xTargetStream + the result package will be written into this stream + + @throws ::com::sun::star::io::IOException + in case any problem on reading/writing appears + */ + void convertToPackage( + [in] string sFolderURL, + [in] ::com::sun::star::io::XOutputStream xTargetStream ) + raises( ::com::sun::star::io::IOException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XPersistanceHolder.idl b/offapi/com/sun/star/embed/XPersistanceHolder.idl new file mode 100644 index 000000000..01247f934 --- /dev/null +++ b/offapi/com/sun/star/embed/XPersistanceHolder.idl @@ -0,0 +1,68 @@ +/* -*- 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_embed_XPersistanceHolder_idl__ +#define __com_sun_star_embed_XPersistanceHolder_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/io/XStream.idl> + + + module com { module sun { module star { module embed { + +/** allows to disconnect an object from its persistence. + */ +published interface XPersistanceHolder: com::sun::star::uno::XInterface +{ + /** disconnects the object from the persistence. + + @throws com::sun::star::io::IOException + in case of io problems + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void disconnectPersistence() + raises( ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + + /** connects the object to a persistence. + + @param xStream + a stream that specify the persistence + + @throws com::sun::star::io::IOException + in case of io problems + + @throws com::sun::star::uno::Exception + in case of other problems + */ + void connectPersistance( + [in] ::com::sun::star::io::XStream xStream ) + raises( ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XRelationshipAccess.idl b/offapi/com/sun/star/embed/XRelationshipAccess.idl new file mode 100644 index 000000000..42804fb2c --- /dev/null +++ b/offapi/com/sun/star/embed/XRelationshipAccess.idl @@ -0,0 +1,249 @@ +/* -*- 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_embed_XRelationshipAccess_idl__ +#define __com_sun_star_embed_XRelationshipAccess_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/beans/StringPair.idl> +#include <com/sun/star/container/NoSuchElementException.idl> +#include <com/sun/star/container/ElementExistException.idl> +#include <com/sun/star/io/IOException.idl> + + + module com { module sun { module star { module embed { + +/** This interface allows to get access to relationship data. + + <p> + The relationship data is organized as a set of entries. Each of entry + is represented by a set of tags, where each tag has unique for this entry + name and a string value. An entry must contain at least one tag named + "ID", the value of this tag must be unique for the whole set of entries, + this tag is used as a unique identifier of an entry. + </p> + */ +published interface XRelationshipAccess : ::com::sun::star::uno::XInterface +{ + /** allows to detect whether there is an entry with specified value of + "ID" tag. + + @param sID + the value of "ID" tag + + @throws ::com::sun::star::io::IOException + in case there is a problem reading the relations info + */ + boolean hasByID( [in] string sID ) + raises( ::com::sun::star::io::IOException ); + + /** retrieves the value of "Target" tag from the entry with specified "ID" + tag. + + <p> + If the entry has no "Target" tag an empty string is returned. + </p> + + @param sID + the value of "ID" tag + + @throws ::com::sun::star::container::NoSuchElementException + in case there is no entry with specified tag + + @throws ::com::sun::star::io::IOException + in case there is a problem reading the relations info + */ + string getTargetByID( [in] string sID ) + raises( ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException ); + + /** retrieves the value of "Type" tag from the entry with specified "ID" + tag. + + <p> + If the entry has no "Type" tag an empty string is returned. + </p> + + @param sID + the value of "ID" tag + + @throws ::com::sun::star::container::NoSuchElementException + in case there is no entry with specified tag + + @throws ::com::sun::star::io::IOException + in case there is a problem reading the relations info + */ + string getTypeByID( [in] string sID ) + raises( ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException ); + + /** retrieves the sequence containing all the tags from the entry with + specified value of "ID" tag. + + @param sID + the value of "ID" tag + + @returns + sequence, each element of the sequence represents tag, + ::com::sun::star::beans::StringPair::First + represents the tag name and + ::com::sun::star::beans::StringPair::Second + represents the tag value + + @throws ::com::sun::star::container::NoSuchElementException + in case there is no entry with specified tag + + @throws ::com::sun::star::io::IOException + in case there is a problem reading the relations info + */ + sequence< ::com::sun::star::beans::StringPair > + getRelationshipByID( [in] string sID ) + raises( ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException ); + + /** retrieves the sequence containing all the entries which "Type" tag + takes the specified value. + + @param sType + specified value of "Type" tag, the parameter can contain an empty + string, in this case all the entries that have empty "Type" tag or + no such tag at all are returned + + @returns + sequence of entries, each entry is represented by sequence, + each element of the sequence represents tag, + ::com::sun::star::beans::StringPair::First + represents the tag name and + ::com::sun::star::beans::StringPair::Second + represents the tag value. + The sequence should contain the "ID" tag. + + @throws ::com::sun::star::io::IOException + in case there is a problem reading the relations info + */ + sequence< sequence< ::com::sun::star::beans::StringPair > > + getRelationshipsByType( [in] string sType ) + raises( ::com::sun::star::io::IOException ); + + /** retrieves the sequence containing all the entries controlled by the + object. + + @returns + sequence of entries, each entry is represented by sequence, + each element of the sequence represents tag, + ::com::sun::star::beans::StringPair::First + represents the tag name and + ::com::sun::star::beans::StringPair::Second + represents the tag value + + @throws ::com::sun::star::io::IOException + in case there is a problem reading the relations info + */ + sequence< sequence< ::com::sun::star::beans::StringPair > > + getAllRelationships() + raises( ::com::sun::star::io::IOException ); + + /** allows to insert an entry. + + @param sID + the value of "ID" tag + + @param aEntry + a sequence, each element of the sequence represents tag, + ::com::sun::star::beans::StringPair::First + represents the tag name and + ::com::sun::star::beans::StringPair::Second + represents the tag value. + May not contain "ID" tag, that is already specified in previous + parameter. + + @param bReplace + specifies whether the replacement of existing entry is allowed + + @throws ::com::sun::star::io::IOException + in case there is a problem reading/writing the relations info + + @throws ::com::sun::star::container::ElementExistException + in case an element with the specified "ID" tag exists already, and + no replacement is allowed + */ + void insertRelationshipByID( + [in] string sID, + [in] sequence< ::com::sun::star::beans::StringPair > aEntry, + [in] boolean bReplace ) + raises( ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException ); + + /** allows to remove an entry. + + @param sID + the value of "ID" tag + + @throws ::com::sun::star::container::NoSuchElementException + in case there is no entry with specified tag + + @throws ::com::sun::star::io::IOException + in case there is a problem reading/writing the relations info + */ + void removeRelationshipByID( [in] string sID ) + raises( ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException ); + + /** allows to insert a set of entries + + @param aEntries + sequence of entries, each entry is represented by sequence, + each element of the sequence represents tag, + ::com::sun::star::beans::StringPair::First + represents the tag name and + ::com::sun::star::beans::StringPair::Second + represents the tag value. + Each entry must contain "ID" tag. + + @param bReplace + specifies whether the replacement of existing entry is allowed + + @throws ::com::sun::star::container::ElementExistException + in case an element with the provided "ID" tag exists already, and + no replacement is allowed + + @throws ::com::sun::star::io::IOException + in case there is a problem reading/writing the relations info + */ + void insertRelationships( + [in] sequence< sequence< ::com::sun::star::beans::StringPair > > aEntries, + [in] boolean bReplace ) + raises( ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException ); + + /** allows to clear the set of entries. + + @throws ::com::sun::star::io::IOException + in case there is a problem reading/writing the relations info + */ + void clearRelationships() + raises( ::com::sun::star::io::IOException ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XStateChangeBroadcaster.idl b/offapi/com/sun/star/embed/XStateChangeBroadcaster.idl new file mode 100644 index 000000000..b9342d98d --- /dev/null +++ b/offapi/com/sun/star/embed/XStateChangeBroadcaster.idl @@ -0,0 +1,51 @@ +/* -*- 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_embed_XStateChangeBroadcaster_idl__ +#define __com_sun_star_embed_XStateChangeBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/embed/XStateChangeListener.idl> + + + +module com { module sun { module star { module embed { + + +/** broadcasts message in case embedded object object changes it's state. + */ +published interface XStateChangeBroadcaster: com::sun::star::uno::XInterface +{ + /** adds the specified listener to receive events about states change + */ + void addStateChangeListener( + [in] com::sun::star::embed::XStateChangeListener xListener ); + + /** removes the specified listener + */ + void removeStateChangeListener( + [in] com::sun::star::embed::XStateChangeListener xListener ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XStateChangeListener.idl b/offapi/com/sun/star/embed/XStateChangeListener.idl new file mode 100644 index 000000000..1a74f5f5e --- /dev/null +++ b/offapi/com/sun/star/embed/XStateChangeListener.idl @@ -0,0 +1,84 @@ +/* -*- 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_embed_XStateChangeListener_idl__ +#define __com_sun_star_embed_XStateChangeListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + +#include <com/sun/star/embed/WrongStateException.idl> + + +module com { module sun { module star { module embed { + + +/** makes it possible to receive events when an embedded object changes it's + state. + */ +published interface XStateChangeListener: com::sun::star::lang::XEventListener +{ + /** is called just before the object changes state. + + <p> + Actually the listener can try to complain about state changing, but + it is up to object to decide whether the state change can be + prevented. Anyway the possibility to complain must be used very + carefully. + </p> + + @param aEvent + specifies the object that is going to change own state + + @param nOldState + specifies the old state of the object + + @param nNewState + specifies the new state of the object + + @throws ::com::sun::star::embed::WrongStateException + the state change is unexpected by listener + */ + void changingState( [in] com::sun::star::lang::EventObject aEvent, + [in] long nOldState, + [in] long nNewState ) + raises( ::com::sun::star::embed::WrongStateException ); + + /** is called after the object has changed state. + + @param aEvent + specifies the object that has changed own state + + @param nOldState + specifies the old state of the object + + @param nNewState + specifies the new state of the object + */ + void stateChanged( [in] com::sun::star::lang::EventObject aEvent, + [in] long nOldState, + [in] long nNewState ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XStorage.idl b/offapi/com/sun/star/embed/XStorage.idl new file mode 100644 index 000000000..8821f60a8 --- /dev/null +++ b/offapi/com/sun/star/embed/XStorage.idl @@ -0,0 +1,592 @@ +/* -*- 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_embed_XStorage_idl__ +#define __com_sun_star_embed_XStorage_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/io/XStream.idl> +#include <com/sun/star/io/XInputStream.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/embed/StorageWrappedTargetException.idl> +#include <com/sun/star/embed/InvalidStorageException.idl> +#include <com/sun/star/packages/WrongPasswordException.idl> +#include <com/sun/star/container/XNameAccess.idl> +#include <com/sun/star/container/NoSuchElementException.idl> +#include <com/sun/star/container/ElementExistException.idl> +#include <com/sun/star/packages/NoEncryptionException.idl> +#include <com/sun/star/packages/NoRawFormatException.idl> + + + + module com { module sun { module star { module embed { + +/** This interface represents main storage functionality. + */ +published interface XStorage +{ + // INTERFACES + /** allows to get list of child elements and to check if an element with a + specified name exists in a storage. + + <p> + It is also possible to use this interface to get read access to + a child element by + com::sun::star::container::XNameAccess::getByName() + call. But the recommended way is to use XStorage + interface for this purpose. + </p> + */ + interface ::com::sun::star::container::XNameAccess; + + /** allows to control and track lifetime of the storage. + + <p> + In case a storage is disposed any call to its methods should result + in com::sun::star::lang::DisposedException. + </p> + */ + interface ::com::sun::star::lang::XComponent; + + + // METHODS + /** allows to copy current storage to another one + + <p> + The destination storage contents are overwritten. + After the successful copying the target storage is automatically + committed if it implements transacted access. + </p> + + @param xDest + a destination storage this storage must be copied to. + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + an illegal argument is provided + + @throws ::com::sun::star::io::IOException + in case of io errors during copying + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exception acquired during copying + */ + void copyToStorage( [in] XStorage xDest ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get access to a child stream of the storage. + + <p> + In case the stream is open in readonly mode the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + @param sStreamName + the name of the substream that should be open + + @param nOpenMode + a mode the stream should be open in, + can be a combination of ElementModes values + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::WrongPasswordException + the provided password is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XStream openStreamElement( + [in] string sStreamName, + [in] long nOpenMode ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get access to a child encrypted stream with password. + + <p> + If storage does not allow any encryption this method will always throw + com::sun::star::packages::NoEncryptionException. + </p> + + <p> + In case the stream is open in readonly mode the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + @param sStreamName + the name of the substream that should be open + + @param nOpenMode + a mode the stream should be open in, + can be a combination of ElementModes values + + @param sPassword + this parameter allows to specify a reading password for the + stream, the password must be a correct one, otherwise an + exception will be thrown + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoEncryptionException + the stream is not encrypted + + @throws ::com::sun::star::packages::WrongPasswordException + the provided password is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XStream openEncryptedStreamElement( + [in] string sStreamName, + [in] long nOpenMode, + [in] string sPassword ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get access to a child storage. + + <p> + The opened substorage must support specified in "nOpenMode" access + modes. It can support "read" mode in addition. But any child element + can support one of those modes only in case this mode is supported by + parent storage. + </p> + + @param sStorName + the name of the storage that should be open + + @param nOpenMode + a mode the storage should be open in + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + + */ + XStorage openStorageElement( [in] string sStorName, + [in] long nOpenMode ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get readonly copy of a child stream of the storage. + + <p> + The stream is open in readonly mode so the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + @param sStreamName + the name of the substream that should be copied + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::WrongPasswordException + the provided password is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XStream cloneStreamElement( [in] string sStreamName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get readonly copy of a child encrypted stream with password. + + <p> + If storage does not allow any encryption this method will always throw + com::sun::star::packages::NoEncryptionException. + </p> + + <p> + The stream is open in readonly mode so the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + <p> + This method allows to specify reading password for the child stream + explicitly. + </p> + + @param sStreamName + the name of the substream that should be copied + + @param sPassword + this parameter allows to specify a reading password for the + stream, the password must be a correct one, otherwise an + exception will be thrown + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoEncryptionException + the stream is not encrypted + + @throws ::com::sun::star::packages::WrongPasswordException + the provided password is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XStream cloneEncryptedStreamElement( + [in] string sStreamName, + [in] string sPassword ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get copy of this storage at the state of its last commit. + + <p> + This method makes sense only for services implementations that allow + transaction in the storage. + </p> + + @param xTargetStorage + the target storage that will be filled in with copy. + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::io::IOException + in case of io errors during copying + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + + */ + void copyLastCommitTo( [in] XStorage xTargetStorage ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get copy of a child storage at the state of its last commit. + + <p> + This method makes sense only for services implementations that allow + transaction in the storage. + </p> + + @param sStorName + the name of the storage that should be copied + + @param xTargetStorage + the target storage that will be filled in with copy + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::io::IOException + in case of io errors during copying + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + + */ + void copyStorageElementLastCommitTo( + [in] string sStorName, + [in] XStorage xTargetStorage ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to check if an element is a child stream with specified name. + + <p> + In case there is no child element with such name an exception will be + thrown. + </p> + + @param sElementName + the name of the element to check + + @returns + `TRUE` in case the element is a stream + `FALSE` - the element is a storage + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with such name + + @throws ::com::sun::star::lang::IllegalArgumentException + an illegal argument is provided + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + */ + boolean isStreamElement( [in] string sElementName ) + raises( ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::InvalidStorageException ); + + + /** allows to check if an element is a child storage with specified name. + + <p> + In case there is no child element with such name an exception will be + thrown. + </p> + + @param sElementName + the name of the element to check + + @returns + `TRUE` in case the element is a storage + `FALSE` - the element is a stream + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with such name + + @throws ::com::sun::star::lang::IllegalArgumentException + an illegal argument is provided + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + */ + boolean isStorageElement( [in] string sElementName ) + raises( ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::InvalidStorageException ); + + /** removes an element from a storage. + + @param sElementName + the name of the element to remove + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + an illegal argument is provided + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with such name + + @throws ::com::sun::star::io::IOException + in case of io errors during removing + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + + */ + void removeElement( [in] string sElementName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** renames an element in a storage. + + @param sElementName + the old name of the element to rename + + @param sNewName + the new name of the element to rename + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + an illegal argument is provided + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with old name in this storage + + @throws ::com::sun::star::container::ElementExistException + an element with new name already exists in this storage + + @throws ::com::sun::star::io::IOException + in case of io errors during renaming + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + + */ + void renameElement( [in] string sElementName, [in] string sNewName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to copy an entry from one storage to another. + + <p> + If target element supports transacted mode it must be committed by this + method after successful copying. + </p> + + @param sElementName + the name of the element in this storage + + @param xDest + a destination storage + + @param sNewName + the name of the result element in destination storage + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::container::NoSuchElementException + there is no specified source element in this storage + + @throws ::com::sun::star::container::ElementExistException + an element with specified destination name already exists in destination storage + + @throws ::com::sun::star::io::IOException + in case of io errors during copying + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + + */ + void copyElementTo( + [in] string sElementName, + [in] XStorage xDest, + [in] string sNewName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to move an entry from one storage to another. + + <p> + If target element supports transacted mode it must be committed by this + method after successful moving. + </p> + + @param sElementName + the name of the element in this storage + + @param xDest + a destination storage + + @param sNewName + the name of the result element in destination storage + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::container::NoSuchElementException + there is no specified source element in this storage + + @throws ::com::sun::star::container::ElementExistException + an element with specified destination name already exists in destination storage + + @throws ::com::sun::star::io::IOException + in case of io errors during moving + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + + */ + void moveElementTo( + [in] string sElementName, + [in] XStorage xDest, + [in] string sNewName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XStorage2.idl b/offapi/com/sun/star/embed/XStorage2.idl new file mode 100644 index 000000000..00b012437 --- /dev/null +++ b/offapi/com/sun/star/embed/XStorage2.idl @@ -0,0 +1,148 @@ +/* -*- 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_embed_XStorage2_idl__ +#define __com_sun_star_embed_XStorage2_idl__ + +#include <com/sun/star/embed/XStorage.idl> +#include <com/sun/star/beans/NamedValue.idl> + + + + module com { module sun { module star { module embed { + +/** This interface extends the base XStorage interface. + */ +interface XStorage2 : XStorage +{ + /** allows to get access to a child encrypted stream with EncryptionData. + + <p> + If storage does not allow any encryption this method will always throw + com::sun::star::packages::NoEncryptionException. + </p> + + <p> + In case the stream is open in readonly mode the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + @param sStreamName + the name of the substream that should be open + + @param nOpenMode + a mode the stream should be open in, + can be a combination of ElementModes values + + @param aEncryptionData + this parameter allows to specify an encryption data to decrypt the + stream, the encryption data must be correct, otherwise an + exception will be thrown + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoEncryptionException + the stream is not encrypted + + @throws ::com::sun::star::packages::WrongPasswordException + the provided encryption data is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XStream openEncryptedStream( + [in] string sStreamName, + [in] long nOpenMode, + [in] sequence< ::com::sun::star::beans::NamedValue > aEncryptionData ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get readonly copy of a child encrypted stream with encryption + data. + + <p> + If storage does not allow any encryption this method will always throw + com::sun::star::packages::NoEncryptionException. + </p> + + <p> + The stream is open in readonly mode so the + com::sun::star::io::XStream::getOutputStream() + method will return an empty reference. + </p> + + <p> + This method allows to specify encryption data for the child stream + explicitly. + </p> + + @param sStreamName + the name of the substream that should be copied + + @param aEncryptionData + this parameter allows to specify an encryption data for the + stream, the encryption data must be correct, otherwise an + exception will be thrown + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoEncryptionException + the stream is not encrypted + + @throws ::com::sun::star::packages::WrongPasswordException + the provided encryption data is wrong + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XStream cloneEncryptedStream( + [in] string sStreamName, + [in] sequence< ::com::sun::star::beans::NamedValue > aEncryptionData ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XStorageRawAccess.idl b/offapi/com/sun/star/embed/XStorageRawAccess.idl new file mode 100644 index 000000000..c9c27a844 --- /dev/null +++ b/offapi/com/sun/star/embed/XStorageRawAccess.idl @@ -0,0 +1,187 @@ +/* -*- 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_embed_XStorageRawAccess_idl__ +#define __com_sun_star_embed_XStorageRawAccess_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/io/XStream.idl> +#include <com/sun/star/io/XInputStream.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/embed/StorageWrappedTargetException.idl> +#include <com/sun/star/embed/InvalidStorageException.idl> +#include <com/sun/star/container/NoSuchElementException.idl> +#include <com/sun/star/container/ElementExistException.idl> +#include <com/sun/star/packages/NoEncryptionException.idl> +#include <com/sun/star/packages/NoRawFormatException.idl> + + + + module com { module sun { module star { module embed { + +/** This interface represents main storage functionality. + */ +published interface XStorageRawAccess +{ + /** allows to get a plain raw stream representing a package stream. + + <p> + This method returns a stream from the package as it is stored there, + without any decompression/description and etc. This method can be + helpful to check file consistency, for example by signing. + </p> + + @returns + the raw representation of encrypted stream with all the data + required to copy the stream without information loss + + @param sStreamName + the name of the substream that should be open + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with specified name + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XInputStream getPlainRawStreamElement( + [in] string sStreamName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get a raw stream representing encrypted stream with header. + + <p> + This method allows to transport encrypted streams without decryption. + Mainly this method is introduced to allow to copy one encrypted + storage stream to another without decryption. It is not recommended to + use this method outside of storage implementation since different + storages implementation could have different encryption format. If the + method is used outside of storage implementation the user code is + responsible to get sure that the raw format of source and target + storages is the same. + </p> + + <p> + The difference of this method from the previous one is that it handles + only encrypted streams. The contents of returned by these methods + streams can differ for the same entry, since this method can add + additional data into the stream to allow successful insertion. + </p> + + @param sStreamName + the name of the substream that should be open + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoEncryptionException + the stream is not an encrypted one + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with specified name + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XInputStream getRawEncrStreamElement( + [in] string sStreamName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to insert a raw stream representing encrypted stream with + header. + + <p> + This method allows to insert a stream retrieved by + XStorageRawAccess::getRawEncrStreamElement() into a + storage. + </p> + + <p> + This method allows to transport encrypted streams without decryption. + Mainly this method is introduced to allow to copy one encrypted + storage stream to another without decryption. It is not recommended to + use this method outside of storage implementation since different + storages implementation could have different encryption format. + </p> + + @param sStreamName + the name of the substream that should be open + + @param xInStream + a raw stream representing encrypted stream + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoRawFormatException + the stream is not one of raw package stream format + + @throws ::com::sun::star::container::ElementExistException + an element with specified name already exists + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + void insertRawEncrStreamElement( + [in] string sStreamName, + [in] ::com::sun::star::io::XInputStream xInStream ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoRawFormatException, + ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XTransactedObject.idl b/offapi/com/sun/star/embed/XTransactedObject.idl new file mode 100644 index 000000000..684ff9bf1 --- /dev/null +++ b/offapi/com/sun/star/embed/XTransactedObject.idl @@ -0,0 +1,52 @@ +/* -*- 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_embed_XTransactedObject_idl__ +#define __com_sun_star_embed_XTransactedObject_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/lang/WrappedTargetException.idl> + + + module com { module sun { module star { module embed { + +/** allows transacted access to an object. + */ +published interface XTransactedObject: com::sun::star::uno::XInterface +{ + /** commits the changes made for object. + */ + void commit() + raises( ::com::sun::star::io::IOException, + ::com::sun::star::lang::WrappedTargetException ); + + /** removes all the changes made for the object after last commit or + loading. + */ + void revert() + raises( ::com::sun::star::io::IOException, + ::com::sun::star::lang::WrappedTargetException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XTransactionBroadcaster.idl b/offapi/com/sun/star/embed/XTransactionBroadcaster.idl new file mode 100644 index 000000000..918d09686 --- /dev/null +++ b/offapi/com/sun/star/embed/XTransactionBroadcaster.idl @@ -0,0 +1,52 @@ +/* -*- 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_embed_XTransactionBroadcaster_idl__ +#define __com_sun_star_embed_XTransactionBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/embed/XTransactionListener.idl> + + + +module com { module sun { module star { module embed { + + +/** broadcasts message in case transacted object is committed or reverted. + */ +published interface XTransactionBroadcaster: com::sun::star::uno::XInterface +{ + /** adds the specified listener to receive events about commits and + reverts. + */ + void addTransactionListener( + [in] com::sun::star::embed::XTransactionListener aListener ); + + /** removes the specified listener. + */ + void removeTransactionListener( + [in] com::sun::star::embed::XTransactionListener aListener ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XTransactionListener.idl b/offapi/com/sun/star/embed/XTransactionListener.idl new file mode 100644 index 000000000..6fa6f9cbc --- /dev/null +++ b/offapi/com/sun/star/embed/XTransactionListener.idl @@ -0,0 +1,61 @@ +/* -*- 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_embed_XTransactionListener_idl__ +#define __com_sun_star_embed_XTransactionListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + +#include <com/sun/star/uno/Exception.idl> + + +module com { module sun { module star { module embed { + + +/** makes it possible to receive events when a transacted object is committed + or reverted. + */ +published interface XTransactionListener: com::sun::star::lang::XEventListener +{ + /** is called just before the object is committed. + */ + void preCommit( [in] com::sun::star::lang::EventObject aEvent ) + raises( ::com::sun::star::uno::Exception ); + + /** is called after the object is committed. + */ + void commited( [in] com::sun::star::lang::EventObject aEvent ); + + /** is called just before the object is reverted. + */ + void preRevert( [in] com::sun::star::lang::EventObject aEvent ) + raises( ::com::sun::star::uno::Exception ); + + /** is called after the object is reverted. + */ + void reverted( [in] com::sun::star::lang::EventObject aEvent ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XTransferableSupplier.idl b/offapi/com/sun/star/embed/XTransferableSupplier.idl new file mode 100644 index 000000000..9de5edaef --- /dev/null +++ b/offapi/com/sun/star/embed/XTransferableSupplier.idl @@ -0,0 +1,49 @@ +/* -*- 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_embed_XTransferableSupplier_idl__ +#define __com_sun_star_embed_XTransferableSupplier_idl__ + +#include <com/sun/star/datatransfer/XTransferable.idl> + + + module com { module sun { module star { module embed { + +/** provide access to a + com::sun::star::datatransfer::XTransferable + implementation from the object. + */ +published interface XTransferableSupplier: com::sun::star::uno::XInterface +{ + /** allows to get access to + com::sun::star::datatransfer::XTransferable + implementation. + + @return + com::sun::star::datatransfer::XTransferable + implementation + */ + ::com::sun::star::datatransfer::XTransferable getTransferable(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XVisualObject.idl b/offapi/com/sun/star/embed/XVisualObject.idl new file mode 100644 index 000000000..81536a92b --- /dev/null +++ b/offapi/com/sun/star/embed/XVisualObject.idl @@ -0,0 +1,151 @@ +/* -*- 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_embed_XVisualObject_idl__ +#define __com_sun_star_embed_XVisualObject_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/awt/Size.idl> +#include <com/sun/star/embed/VisualRepresentation.idl> +#include <com/sun/star/embed/WrongStateException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + + + module com { module sun { module star { module embed { + +/** represents common visualization functionality for embedded objects. + */ +published interface XVisualObject: ::com::sun::star::uno::XInterface +{ + /** sets the size of object's visual area. + + <p> + The size must be provided in logical units according to map mode the + object communicates in. + </p> + + <p> + If an object is inplace- or ui-active the method must not initiate + repainting itself. + </p> + + @param nAspect + the aspect specifying the form of object representation. + Can take values from Aspects constant set. + + @param aSize + the new size of the visual area + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws ::com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws ::com::sun::star::uno::Exception + the object failed to resize + */ + void setVisualAreaSize( [in] hyper nAspect, + [in] ::com::sun::star::awt::Size aSize ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); + + /** gets the size of object's visual area. + + <p> + The size must be provided in logical units according to map mode the + object communicates in. + </p> + + @param nAspect + the aspect specifying the form of object representation. + Can take values from Aspects constant set. + + @return + the size of visual area + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws ::com::sun::star::embed::WrongStateException + the object is in wrong state + */ + ::com::sun::star::awt::Size getVisualAreaSize( [in] hyper nAspect ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); + + /** retrieves visual representation of the object in preferable format. + + <p> + If the object persistence entry contains cached visual representation + then it can be retrieved by using this method even in loaded state. + </p> + + @param nAspect + the aspect the representation is requested for. + Can take values from Aspects constant set. + + @return + the visual representation of the object in the default format and + the format + + @throws ::com::sun::star::lang::IllegalArgumentException + one of arguments is illegal + + @throws ::com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws ::com::sun::star::uno::Exception + in case of problems + + */ + VisualRepresentation getPreferredVisualRepresentation( [in] hyper nAspect ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::Exception ); + + + /** retrieves map mode the object communicates in. + + @param nAspect + the aspect the map mode is requested for. + Can take values from Aspects constant set. + + @return + the map mode the object communicates in, it can take values from + EmbedMapUnits constant + + @throws ::com::sun::star::embed::WrongStateException + the object is in wrong state + + @throws ::com::sun::star::uno::Exception + in case of problems + */ + long getMapUnit( [in] hyper nAspect ) + raises( ::com::sun::star::uno::Exception ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/embed/XWindowSupplier.idl b/offapi/com/sun/star/embed/XWindowSupplier.idl new file mode 100644 index 000000000..ab18b1b19 --- /dev/null +++ b/offapi/com/sun/star/embed/XWindowSupplier.idl @@ -0,0 +1,44 @@ +/* -*- 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_embed_XWindowSupplier_idl__ +#define __com_sun_star_embed_XWindowSupplier_idl__ + +#include <com/sun/star/awt/XWindow.idl> + + + module com { module sun { module star { module embed { + +/** provides access to a VCL window implementation. + */ +published interface XWindowSupplier: com::sun::star::uno::XInterface +{ + /** allows to get access to a VCL window implementation. + + @return + VCL window implementation + */ + ::com::sun::star::awt::XWindow getWindow(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |