summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLSectionExport.cxx
diff options
context:
space:
mode:
authorDaniel Vogelheim <dvo@openoffice.org>2001-01-22 18:59:33 +0000
committerDaniel Vogelheim <dvo@openoffice.org>2001-01-22 18:59:33 +0000
commit2e07326bebc1395e97d4af54d185964d9cce9b77 (patch)
treec0083fb2abc66a8f8440007389e3a24fb1a3b7fd /xmloff/source/text/XMLSectionExport.cxx
parente84f908cad6a06a6a71fa9c7f5e0136d3723445e (diff)
- fixed: now DDE properties are only used if actually available
Diffstat (limited to 'xmloff/source/text/XMLSectionExport.cxx')
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx78
1 files changed, 40 insertions, 38 deletions
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index e4b6582692f7..440e8a6ddeb8 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLSectionExport.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: dvo $ $Date: 2000-12-02 21:43:40 $
+ * last change: $Author: dvo $ $Date: 2001-01-22 19:59:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,9 +75,7 @@
#include <rtl/ustrbuf.hxx>
#endif
-#ifndef __SGI_STL_VECTOR
-#include <stl/vector>
-#endif
+#include <vector>
#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
@@ -622,43 +620,47 @@ void XMLSectionExport::ExportRegularSectionStart(
}
else
{
- // data source DDE
- // unfortunately, we have to test all relevant strings for
- // non-zero length
- aAny = xPropSet->getPropertyValue(sDdeCommandFile);
- OUString sApplication;
- aAny >>= sApplication;
- aAny = xPropSet->getPropertyValue(sDdeCommandType);
- OUString sTopic;
- aAny >>= sTopic;
- aAny = xPropSet->getPropertyValue(sDdeCommandElement);
- OUString sItem;
- aAny >>= sItem;
-
- if ( (sApplication.getLength() > 0) ||
- (sTopic.getLength() > 0) ||
- (sItem.getLength() > 0 ) )
+ // check for DDE first
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName(sDdeCommandFile))
{
- GetExport().AddAttribute(XML_NAMESPACE_OFFICE,
- sXML_dde_application, sApplication);
- GetExport().AddAttribute(XML_NAMESPACE_OFFICE, sXML_dde_topic,
- sTopic);
- GetExport().AddAttribute(XML_NAMESPACE_OFFICE, sXML_dde_item,
- sItem);
-
- aAny = xPropSet->getPropertyValue(sIsAutomaticUpdate);
- if (*(sal_Bool*)aAny.getValue())
+ // data source DDE
+ // unfortunately, we have to test all relevant strings for
+ // non-zero length
+ aAny = xPropSet->getPropertyValue(sDdeCommandFile);
+ OUString sApplication;
+ aAny >>= sApplication;
+ aAny = xPropSet->getPropertyValue(sDdeCommandType);
+ OUString sTopic;
+ aAny >>= sTopic;
+ aAny = xPropSet->getPropertyValue(sDdeCommandElement);
+ OUString sItem;
+ aAny >>= sItem;
+
+ if ( (sApplication.getLength() > 0) ||
+ (sTopic.getLength() > 0) ||
+ (sItem.getLength() > 0 ) )
{
- GetExport().AddAttributeASCII(XML_NAMESPACE_OFFICE,
- sXML_automatic_update, sXML_true);
- }
+ GetExport().AddAttribute(XML_NAMESPACE_OFFICE,
+ sXML_dde_application, sApplication);
+ GetExport().AddAttribute(XML_NAMESPACE_OFFICE, sXML_dde_topic,
+ sTopic);
+ GetExport().AddAttribute(XML_NAMESPACE_OFFICE, sXML_dde_item,
+ sItem);
+
+ aAny = xPropSet->getPropertyValue(sIsAutomaticUpdate);
+ if (*(sal_Bool*)aAny.getValue())
+ {
+ GetExport().AddAttributeASCII(XML_NAMESPACE_OFFICE,
+ sXML_automatic_update, sXML_true);
+ }
- SvXMLElementExport aElem(GetExport(),
- XML_NAMESPACE_OFFICE,
- sXML_dde_source,
- sal_True, sal_True);
+ SvXMLElementExport aElem(GetExport(),
+ XML_NAMESPACE_OFFICE,
+ sXML_dde_source, sal_True, sal_True);
+ }
+ // else: no DDE data source
}
- // else: no data source
+ // else: no DDE on this system
}
}