summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-04-22 10:24:18 +0000
committerOliver Bolte <obo@openoffice.org>2005-04-22 10:24:18 +0000
commitb165ff800256d6a2e8375b11491b1cbaf88c0016 (patch)
tree2654161a358ae50ed4bc97f9d92f064a8ff843b7 /sc
parent674c7364ceeffe50b2f94181963aa20b24955551 (diff)
INTEGRATION: CWS validationfix (1.42.20); FILE MERGED
2005/04/18 09:00:55 nn 1.42.20.1: #i47525# distinguish between macro-name and script-url for macros in validation
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 0ebed441428e..9212e02bd221 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLStylesExportHelper.cxx,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: vg $ $Date: 2005-03-23 13:41:33 $
+ * last change: $Author: obo $ $Date: 2005-04-22 11:24:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,6 +119,10 @@
#include <comphelper/extract.hxx>
#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+
#include <algorithm>
using namespace com::sun::star;
@@ -180,6 +184,7 @@ ScMyValidationsContainer::ScMyValidationsContainer()
sOnError(RTL_CONSTASCII_USTRINGPARAM("OnError")),
sEventType(RTL_CONSTASCII_USTRINGPARAM("EventType")),
sStarBasic(RTL_CONSTASCII_USTRINGPARAM("StarBasic")),
+ sScript(RTL_CONSTASCII_USTRINGPARAM("Script")),
sLibrary(RTL_CONSTASCII_USTRINGPARAM("Library")),
sMacroName(RTL_CONSTASCII_USTRINGPARAM("MacroName"))
{
@@ -482,13 +487,18 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
SvXMLElementExport aEMElem(rExport, XML_NAMESPACE_TABLE, XML_ERROR_MACRO, sal_True, sal_True);
}
{
+ // #i47525# for a script URL the type and the property name for the URL
+ // are both "Script", for a simple macro name the type is "StarBasic"
+ // and the property name is "MacroName".
+ bool bScriptURL = SfxApplication::IsXScriptURL( aItr->sErrorTitle );
+
uno::Sequence<beans::PropertyValue> aSeq(3);
beans::PropertyValue* pArr(aSeq.getArray());
pArr[0].Name = sEventType;
- pArr[0].Value <<= sStarBasic;
+ pArr[0].Value <<= bScriptURL ? sScript : sStarBasic;
pArr[1].Name = sLibrary;
pArr[1].Value <<= sEmptyString;
- pArr[2].Name = sMacroName;
+ pArr[2].Name = bScriptURL ? sScript : sMacroName;
pArr[2].Value <<= aItr->sErrorTitle;
// 2) export the sequence