summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/forms/elementexport.cxx13
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx7
2 files changed, 11 insertions, 9 deletions
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index b80d7b0bb2c6..688c6e8427fb 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -778,31 +778,34 @@ namespace xmloff
// get the property names
getValuePropertyNames(m_eType, m_nClassId, pCurrentValuePropertyName, pValuePropertyName);
- static const sal_Char* pCurrentValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCAFlags::CurrentValue);
- static const sal_Char* pValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCAFlags::Value);
- static const sal_uInt16 nCurrentValueAttributeNamespaceKey = OAttributeMetaData::getCommonControlAttributeNamespace(CCAFlags::CurrentValue);
- static const sal_uInt16 nValueAttributeNamespaceKey = OAttributeMetaData::getCommonControlAttributeNamespace(CCAFlags::Value);
-
// add the attributes if necessary and possible
if (pCurrentValuePropertyName && (CCAFlags::CurrentValue & m_nIncludeCommon))
{
+ static const sal_Char* pCurrentValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCAFlags::CurrentValue);
// don't export the current-value if this value originates from a data binding
// #i26944#
if ( controlHasActiveDataBinding() )
exportedProperty( OUString::createFromAscii( pCurrentValuePropertyName ) );
else
+ {
+ static const sal_uInt16 nCurrentValueAttributeNamespaceKey = OAttributeMetaData::getCommonControlAttributeNamespace(CCAFlags::CurrentValue);
exportGenericPropertyAttribute(
nCurrentValueAttributeNamespaceKey,
pCurrentValueAttributeName,
pCurrentValuePropertyName
);
+ }
}
if (pValuePropertyName && (CCAFlags::Value & m_nIncludeCommon))
+ {
+ static const sal_Char* pValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCAFlags::Value);
+ static const sal_uInt16 nValueAttributeNamespaceKey = OAttributeMetaData::getCommonControlAttributeNamespace(CCAFlags::Value);
exportGenericPropertyAttribute(
nValueAttributeNamespaceKey,
pValueAttributeName,
pValuePropertyName);
+ }
OSL_ENSURE((nullptr == pValuePropertyName) == (CCAFlags::NONE == (CCAFlags::Value & m_nIncludeCommon)),
"OControlExport::exportCommonControlAttributes: no property found for the value attribute!");
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index 8e961ea92606..30d2dd4a924a 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -151,19 +151,18 @@ void XMLIndexBibliographyConfigurationContext::ProcessAttribute(
}
}
-
SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList )
{
- OUString sKey;
- bool bSort(true);
-
// process children here and use default context!
if ( ( nPrefix == XML_NAMESPACE_TEXT ) &&
IsXMLToken( rLocalName, XML_SORT_KEY ) )
{
+ OUString sKey;
+ bool bSort(true);
+
sal_Int16 nLength = xAttrList->getLength();
for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
{