summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-05-05 15:13:15 +0000
committerKurt Zenker <kz@openoffice.org>2008-05-05 15:13:15 +0000
commit349d9d2ffe4a0b5d2c81a7da3ef6c09f33574598 (patch)
tree8624f268bc898f8fb32f572aa1606c10230a7e93 /sfx2
parent443f974347e64f1b5b92c7d98e70b9847953557a (diff)
INTEGRATION: CWS dba30b (1.3.52); FILE MERGED
2008/04/15 22:18:08 fs 1.3.52.2: RESYNC: (1.3-1.4); FILE MERGED 2008/03/17 09:11:54 fs 1.3.52.1: during #152837#: (s|g)etImposedMacroExecMode renamed to (s|g)etCurrentMacroExecMode, to better fit its changed semantics
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/docmacromode.hxx29
1 files changed, 22 insertions, 7 deletions
diff --git a/sfx2/inc/sfx2/docmacromode.hxx b/sfx2/inc/sfx2/docmacromode.hxx
index 6257c4a62066..57a098d1df6f 100644
--- a/sfx2/inc/sfx2/docmacromode.hxx
+++ b/sfx2/inc/sfx2/docmacromode.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: docmacromode.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
@@ -56,15 +56,20 @@ namespace sfx2
class SAL_NO_VTABLE IMacroDocumentAccess
{
public:
- /** retrieves the MacroExecutionMode from the MediaDescriptor of the document
+ /** retrieves the current MacroExecutionMode.
- If there was no such externally imposed macro execution mode, implementations
- could return MacroExecMode::USE_CONFIG or MacroExecMode::NEVER_EXECUTE
+ Usually, this is initialized from the media descriptor used to load the document,
+ respectively the one passed into the document's XModel::attachResource call.
+
+ If no such mode was passed there, document implementations should return
+ MacroExecMode::NEVER_EXECUTE.
@see ::com::sun::star::document::MediaDescriptor::MacroExecutionMode
@see ::com::sun::star::frame::XComponentLoader::loadComponentFromURL
@see ::com::sun::star::frame::XModel::attachResource
+ @see setCurrentMacroExecMode
+
@todo
Effectively, this is the MacroExecutionMode of the MediaDescriptor of
the document. Thus, this setting could be obtained from the XModel
@@ -72,16 +77,26 @@ namespace sfx2
can be used for this and other purposes.
*/
virtual sal_Int16
- getImposedMacroExecMode() const = 0;
+ getCurrentMacroExecMode() const = 0;
+
+ /** sets the MacroExecutionMode of the document, as calculated by the DocumentMacroMode
+ class.
- /** sets the MacroExecutionMode to the document MediaDescriptor
+ Effectively, the existence of this method means that the responsibility
+ to store the current macro execution mode is not with the DocumentMacroMode
+ instance, but with the document instance itself.
+
+ Usually, a document implementation will simply put the macro execution mode
+ into its media descriptor, as returned by XModel::getArgs.
@see ::com::sun::star::document::MediaDescriptor::MacroExecutionMode
@see ::com::sun::star::frame::XComponentLoader::loadComponentFromURL
@see ::com::sun::star::frame::XModel::attachResource
+
+ see getCurrentMacroExecMode
*/
virtual sal_Bool
- setImposedMacroExecMode( sal_uInt16 ) = 0;
+ setCurrentMacroExecMode( sal_uInt16 ) = 0;
/** returns the origin of the document