summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Kovacs <lkovacs@openoffice.org>2002-09-23 13:08:29 +0000
committerLaszlo Kovacs <lkovacs@openoffice.org>2002-09-23 13:08:29 +0000
commitf302b530d8d26546a137f7b77c73185a60d29238 (patch)
treea5c248f5a6bd796fd6cc5d4665ad591525acb380
parent5079106994689cc1bc361f19bee041b18f7b4e7b (diff)
Comments and header guards added
-rw-r--r--scripting/source/storage/ScriptElement.cxx12
-rw-r--r--scripting/source/storage/ScriptElement.hxx18
-rw-r--r--scripting/source/storage/ScriptInfo.cxx29
-rw-r--r--scripting/source/storage/ScriptInfo.hxx20
4 files changed, 59 insertions, 20 deletions
diff --git a/scripting/source/storage/ScriptElement.cxx b/scripting/source/storage/ScriptElement.cxx
index 06d4e86d2e1b..57fd28d9e64e 100644
--- a/scripting/source/storage/ScriptElement.cxx
+++ b/scripting/source/storage/ScriptElement.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ScriptElement.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dfoster $ $Date: 2002-09-20 14:33:48 $
+ * last change: $Author: lkovacs $ $Date: 2002-09-23 14:08:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,7 +59,9 @@
*
************************************************************************/
+#ifndef _SCRIPT_FRAMEWORK_STORAGE_SCRIPT_ELEMENT_HXX_
#include "ScriptElement.hxx"
+#endif
#include <util/util.hxx>
using namespace ::rtl;
@@ -71,6 +73,12 @@ namespace scripting_impl
{
//*************************************************************************
+/**
+ Construct a ScriptElement from a ScriptImplInfo object
+
+ @param sII
+ the ScriptImplInfoObject
+*/
ScriptElement::ScriptElement(storage::ScriptImplInfo & sII) :
m_sII( sII ),
XMLElement(OUSTR("script"))
diff --git a/scripting/source/storage/ScriptElement.hxx b/scripting/source/storage/ScriptElement.hxx
index 7777b8746806..866dbe609648 100644
--- a/scripting/source/storage/ScriptElement.hxx
+++ b/scripting/source/storage/ScriptElement.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ScriptElement.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dfoster $ $Date: 2002-09-20 14:33:48 $
+ * last change: $Author: lkovacs $ $Date: 2002-09-23 14:08:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -58,12 +58,14 @@
*
*
************************************************************************/
-#ifndef _SCRIPTING_STORAGE_METADATA_ELEMENT_HXX_
-#define _SCRIPTING_STORAGE_METADATA_ELEMENT_HXX_
+#ifndef _SCRIPT_FRAMEWORK_STORAGE_SCRIPT_ELEMENT_HXX_
+#define _SCRIPT_FRAMEWORK_STORAGE_SCRIPT_ELEMENT_HXX_
#include <osl/mutex.hxx>
+#ifndef _DRAFTS_COM_SUN_STAR_SCRIPT_FRAMEWORK_STORAGE_SCRIPTIMPLINFO_HPP_
#include <drafts/com/sun/star/script/framework/storage/ScriptImplInfo.hpp>
+#endif
#include "XMLElement.hxx"
@@ -76,7 +78,13 @@ private:
drafts::com::sun::star::script::framework::storage::ScriptImplInfo m_sII;
public:
- explicit ScriptElement(drafts::com::sun::star::script::framework::storage::ScriptImplInfo &);
+ /**
+ Construct a ScriptElement from a ScriptImplInfo object
+
+ @param sII
+ the ScriptImplInfoObject
+ */
+ explicit ScriptElement(drafts::com::sun::star::script::framework::storage::ScriptImplInfo & sII);
~ScriptElement() SAL_THROW (());
};
diff --git a/scripting/source/storage/ScriptInfo.cxx b/scripting/source/storage/ScriptInfo.cxx
index 3a2080306b4d..5470da02bf31 100644
--- a/scripting/source/storage/ScriptInfo.cxx
+++ b/scripting/source/storage/ScriptInfo.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ScriptInfo.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dfoster $ $Date: 2002-09-20 14:33:49 $
+ * last change: $Author: lkovacs $ $Date: 2002-09-23 14:08:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,10 +63,14 @@
#include <cppuhelper/implementationentry.hxx>
#include <util/util.hxx>
+#ifndef _SCRIPT_FRAMEWORK_STORAGE_SCRIPT_INFO_HXX_
#include <ScriptInfo.hxx>
+#endif
#include <drafts/com/sun/star/script/framework/storage/XScriptStorageManager.hpp>
+#ifndef _DRAFTS_COM_SUN_STAR_SCRIPT_FRAMEWORK_STORAGE_XPARCELINVOCATIONPREP_HPP_
#include <drafts/com/sun/star/script/framework/storage/XParcelInvocationPrep.hpp>
+#endif
using namespace ::rtl;
using namespace ::com::sun::star::uno;
@@ -235,19 +239,25 @@ throw(RuntimeException)
//*************************************************************************
/**
- * This function prepares the script for invocation and returns the full path
- * to the prepared parcel folder
- *
- */
+ This function prepares the script for invocation and returns the full path
+ to the prepared parcel folder
+
+ @return
+ <type>::rtl::OUString</type> file URI to the prepared parcel
+
+*/
::rtl::OUString SAL_CALL ScriptInfo::prepareForInvocation() throw(RuntimeException)
{
try
{
+ // if not document URI nothing to do, return path
if (m_scriptImplInfo.parcelURI.compareToAscii(docUriPrefix, 16) != 0)
{
return m_scriptImplInfo.parcelURI;
}
+ // if document URI then copy parcel to a temporary area and return path to it
+
validateXRef(m_xContext, "ScriptInfo::prepareForInvocation(): invalid context");
Any aAny=m_xContext->getValueByName(
OUString::createFromAscii(
@@ -274,6 +284,13 @@ throw(RuntimeException)
throw RuntimeException(temp.concat(e.Message),
Reference<XInterface> ());
}
+ catch(RuntimeException &e)
+ {
+ OUString temp = OUSTR(
+ "ScriptInfo::prepareForInvocation UnknownException: ");
+ throw RuntimeException(temp.concat(e.Message),
+ Reference<XInterface> ());
+ }
#ifdef _DEBUG
catch ( ... )
{
diff --git a/scripting/source/storage/ScriptInfo.hxx b/scripting/source/storage/ScriptInfo.hxx
index f5b8c845e199..8196f2af4126 100644
--- a/scripting/source/storage/ScriptInfo.hxx
+++ b/scripting/source/storage/ScriptInfo.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ScriptInfo.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dfoster $ $Date: 2002-09-20 14:33:50 $
+ * last change: $Author: lkovacs $ $Date: 2002-09-23 14:08:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,8 +59,8 @@
*
************************************************************************/
-#ifndef __SCRIPTING_STORAGE_SCRIPTINFO_HXX_
-#define __SCRIPTING_STORAGE_SCRIPTINFO_HXX_
+#ifndef __SCRIPT_FRAMEWORK_STORAGE_SCRIPTINFO_HXX_
+#define __SCRIPT_FRAMEWORK_STORAGE_SCRIPTINFO_HXX_
#include <cppuhelper/implbase4.hxx> // helper for component factory
@@ -70,7 +70,9 @@
#include <drafts/com/sun/star/script/framework/storage/XScriptInfo.hpp>
#include <drafts/com/sun/star/script/framework/storage/ScriptImplInfo.hpp>
+#ifndef _DRAFTS_COM_SUN_STAR_SCRIPT_FRAMEWORK_XSCRIPTINVOCATIONPREP_HPP_
#include <drafts/com/sun/star/script/framework/storage/XScriptInvocationPrep.hpp>
+#endif
namespace scripting_impl {
@@ -112,9 +114,13 @@ public:
virtual ::rtl::OUString SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL extraProperties( ) throw (::com::sun::star::uno::RuntimeException);
/**
- * This function prepares the script for invocation and returns the full path
- * to the prepared parcel folder
- */
+ This function prepares the script for invocation and returns the full path
+ to the prepared parcel folder
+
+ @return
+ <type>::rtl::OUString</type> file URI to the prepared parcel
+
+ */
virtual ::rtl::OUString SAL_CALL prepareForInvocation() throw (::com::sun::star::uno::RuntimeException);
};