summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorka <kai.ahrens@sun.com>2010-06-03 20:35:47 +0200
committerka <kai.ahrens@sun.com>2010-06-03 20:35:47 +0200
commitb73ef727fbaf45cdaa99e6faa3e12de178b4447c (patch)
tree50020bafd784b7ff06a881671977f57a68163a03 /xmloff
parent79523db1f7d08b3fa2c825122f20ebf43f7963d2 (diff)
parent44ada130c3857b167e954b63c7a5490268b72c5b (diff)
impressbi01: latest changes
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/qa/unoapi/xmloff.sce26
-rw-r--r--xmloff/source/forms/elementexport.cxx4
-rw-r--r--xmloff/source/forms/propertyexport.cxx6
-rw-r--r--xmloff/source/forms/propertyexport.hxx8
-rw-r--r--xmloff/source/forms/propertyimport.cxx2
-rw-r--r--xmloff/source/script/XMLScriptExportHandler.cxx3
6 files changed, 29 insertions, 20 deletions
diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce
index aa61a24496..c73533f4e4 100644
--- a/xmloff/qa/unoapi/xmloff.sce
+++ b/xmloff/qa/unoapi/xmloff.sce
@@ -1,26 +1,26 @@
--o xmloff.Chart.XMLContentExporter
--o xmloff.Chart.XMLContentImporter
--o xmloff.Chart.XMLExporter
--o xmloff.Chart.XMLImporter
--o xmloff.Chart.XMLStylesExporter
--o xmloff.Chart.XMLStylesImporter
+#111102# -o xmloff.Chart.XMLContentExporter
+#111102# -o xmloff.Chart.XMLContentImporter
+#111102# -o xmloff.Chart.XMLExporter
+#111102# -o xmloff.Chart.XMLImporter
+#111102# -o xmloff.Chart.XMLStylesExporter
+#111102# -o xmloff.Chart.XMLStylesImporter
-o xmloff.Draw.XMLContentExporter
-o xmloff.Draw.XMLContentImporter
-o xmloff.Draw.XMLExporter
-o xmloff.Draw.XMLImporter
-o xmloff.Draw.XMLMetaExporter
--o xmloff.Draw.XMLMetaImporter
--o xmloff.Draw.XMLSettingsExporter
--o xmloff.Draw.XMLSettingsImporter
+#i111200 -o xmloff.Draw.XMLMetaImporter
+#i111287 -o xmloff.Draw.XMLSettingsExporter
+#i111287 -o xmloff.Draw.XMLSettingsImporter
#i87695 -o xmloff.Draw.XMLStylesExporter
-o xmloff.Draw.XMLStylesImporter
--o xmloff.Impress.XMLContentExporter
+#i111224 -o xmloff.Impress.XMLContentExporter
-o xmloff.Impress.XMLContentImporter
-o xmloff.Impress.XMLExporter
--o xmloff.Impress.XMLImporter
+#i111111# -o xmloff.Impress.XMLImporter
-o xmloff.Impress.XMLMetaExporter
-o xmloff.Impress.XMLMetaImporter
--o xmloff.Impress.XMLSettingsExporter
--o xmloff.Impress.XMLSettingsImporter
+#i111287 -o xmloff.Impress.XMLSettingsExporter
+#i111287 -o xmloff.Impress.XMLSettingsImporter
#i87695 -o xmloff.Impress.XMLStylesExporter
-o xmloff.Impress.XMLStylesImporter
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 3f895568ba..9fe201e65a 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -691,7 +691,7 @@ namespace xmloff
if (m_nIncludeCommon & CCA_TARGET_LOCATION)
{
- exportTargetLocationAttribute();
+ exportTargetLocationAttribute(false);
#if OSL_DEBUG_LEVEL > 0
// reset the bit for later checking
m_nIncludeCommon = m_nIncludeCommon & ~CCA_TARGET_LOCATION;
@@ -2138,7 +2138,7 @@ namespace xmloff
// the target frame
exportTargetFrameAttribute();
// the target URL
- exportTargetLocationAttribute();
+ exportTargetLocationAttribute(true); // #i110911# add type attribute (for form, but not for control)
// master fields
exportStringSequenceAttribute(
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index e6140c03c3..41b7587ce2 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -420,7 +420,7 @@ namespace xmloff
}
//---------------------------------------------------------------------
- void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty)
+ void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType)
{
DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString );
@@ -433,6 +433,10 @@ namespace xmloff
,OAttributeMetaData::getCommonControlAttributeName(_nProperty)
, sTargetLocation);
+ // #i110911# add xlink:type="simple" if required
+ if (_bAddType)
+ AddAttribute(XML_NAMESPACE_XLINK, token::XML_TYPE, token::XML_SIMPLE);
+
exportedProperty(_sPropertyName);
}
//---------------------------------------------------------------------
diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx
index 8ca221bbe8..28cd7ea84b 100644
--- a/xmloff/source/forms/propertyexport.hxx
+++ b/xmloff/source/forms/propertyexport.hxx
@@ -69,7 +69,7 @@ namespace xmloff
StringSet m_aRemainingProps;
// see examinePersistence
- void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty);
+ void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType);
protected:
IFormsExportContext& m_rContext;
@@ -230,8 +230,10 @@ namespace xmloff
<p>The value of this attribute is extracted from the TargetURL property of the object given.</p>
<p>The property needs a special handling because the URL's need to be made relative</p>
+
+ <p>If _bAddType is set, an additional xlink:type="simple" attribute is also added.</p>
*/
- inline void exportTargetLocationAttribute() { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION); }
+ inline void exportTargetLocationAttribute(bool _bAddType) { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION,_bAddType); }
/** add the form:image attribute to the export context.
@@ -239,7 +241,7 @@ namespace xmloff
<p>The property needs a special handling because the URL's need to be made relative</p>
*/
- inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA); }
+ inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA,false); }
/** flag the style properties as 'already exported'
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index b5c20be581..9cf2bea366 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -363,7 +363,7 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl
implPushBackPropertyValue( aNewValue );
}
#if OSL_DEBUG_LEVEL > 0
- else
+ else if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form>
{
::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" );
sMessage += ::rtl::OString( " Attribute name: " );
diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx
index be72ceba52..0e610cb15f 100644
--- a/xmloff/source/script/XMLScriptExportHandler.cxx
+++ b/xmloff/source/script/XMLScriptExportHandler.cxx
@@ -75,6 +75,9 @@ void XMLScriptExportHandler::Export(
OUString sTmp;
rValues[i].Value >>= sTmp;
rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sTmp);
+
+ // #i110911# xlink:type="simple" is required
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE);
}
// else: disregard
}