summaryrefslogtreecommitdiff
path: root/xmloff/source/core/xmlexp.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-25 13:16:02 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-25 13:16:02 +0000
commitd45e4c292c6269c32cd216b7e386bc7024bfe837 (patch)
tree6daab3bdf70ab99c1ee99f45a8473afaab1a7efe /xmloff/source/core/xmlexp.cxx
parent57c9cafdad18f0ee755ac28b033ea0c0a7023390 (diff)
INTEGRATION: CWS xformsdocmodify (1.140.2); FILE MERGED
2008/06/04 12:07:17 fs 1.140.2.2: #i90243# don't obtain view/config settings in GetDocumentSpecificSettings, this somehow contradicts the semantics of this (nealy introduced) method 2008/06/03 20:50:24 fs 1.140.2.1: #i90243# allow exporting document-specifc settings, which are neither view nor configuration settings
Diffstat (limited to 'xmloff/source/core/xmlexp.cxx')
-rw-r--r--xmloff/source/core/xmlexp.cxx74
1 files changed, 36 insertions, 38 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 0bbbc82286..d948e2a8ea 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xmlexp.cxx,v $
- * $Revision: 1.140 $
+ * $Revision: 1.141 $
*
* This file is part of OpenOffice.org.
*
@@ -961,22 +961,42 @@ void SvXMLExport::ImplExportSettings()
{
CheckAttrList();
- uno::Sequence<beans::PropertyValue> aViewProps;
- GetViewSettingsAndViews(aViewProps);
+ ::std::list< SettingsGroup > aSettings;
+ sal_Int32 nSettingsCount = 0;
- uno::Sequence<beans::PropertyValue> aConfigProps;
- GetConfigurationSettings(aConfigProps);
+ // view settings
+ uno::Sequence< beans::PropertyValue > aViewSettings;
+ GetViewSettingsAndViews( aViewSettings );
+ aSettings.push_back( SettingsGroup( XML_VIEW_SETTINGS, aViewSettings ) );
+ nSettingsCount += aViewSettings.getLength();
+
+ // configuration settings
+ uno::Sequence<beans::PropertyValue> aConfigSettings;
+ GetConfigurationSettings( aConfigSettings );
+ aSettings.push_back( SettingsGroup( XML_CONFIGURATION_SETTINGS, aConfigSettings ) );
+ nSettingsCount += aConfigSettings.getLength();
+
+ // any document specific settings
+ nSettingsCount += GetDocumentSpecificSettings( aSettings );
{
SvXMLElementExport aElem( *this,
- aViewProps.getLength() || aConfigProps.getLength(),
+ nSettingsCount != 0,
XML_NAMESPACE_OFFICE, XML_SETTINGS,
sal_True, sal_True );
XMLSettingsExportHelper aSettingsExportHelper(*this);
- if( aViewProps.getLength() )
- _ExportViewSettings2(aSettingsExportHelper, aViewProps );
- if( aConfigProps.getLength() )
- _ExportConfigurationSettings2(aSettingsExportHelper, aConfigProps );
+
+ for ( ::std::list< SettingsGroup >::const_iterator settings = aSettings.begin();
+ settings != aSettings.end();
+ ++settings
+ )
+ {
+ if ( !settings->aSettings.getLength() )
+ continue;
+
+ OUString sSettingsName( GetXMLToken( settings->eGroupName ) );
+ aSettingsExportHelper.exportSettings( settings->aSettings, sSettingsName );
+ }
}
}
@@ -1369,34 +1389,6 @@ void SvXMLExport::_ExportMeta()
}
}
-void SvXMLExport::_ExportViewSettings(const XMLSettingsExportHelper& rSettingsExportHelper )
-{
- uno::Sequence<beans::PropertyValue> aViewProps;
- GetViewSettingsAndViews(aViewProps);
- if( aViewProps.getLength() )
- _ExportViewSettings2(rSettingsExportHelper, aViewProps );
-}
-
-void SvXMLExport::_ExportViewSettings2(const XMLSettingsExportHelper& rSettingsExportHelper, uno::Sequence<beans::PropertyValue>& rProps )
-{
- OUString sViewSettings(GetXMLToken(XML_VIEW_SETTINGS));
- rSettingsExportHelper.exportSettings(rProps, sViewSettings);
-}
-
-void SvXMLExport::_ExportConfigurationSettings(const XMLSettingsExportHelper& rSettingsExportHelper )
-{
- uno::Sequence<beans::PropertyValue> aConfigProps;
- GetConfigurationSettings(aConfigProps);
- if( aConfigProps.getLength() )
- _ExportConfigurationSettings2(rSettingsExportHelper, aConfigProps );
-}
-
-void SvXMLExport::_ExportConfigurationSettings2(const XMLSettingsExportHelper& rSettingsExportHelper, uno::Sequence<beans::PropertyValue>& rProps )
-{
- OUString sConfigurationSettings(GetXMLToken(XML_CONFIGURATION_SETTINGS));
- rSettingsExportHelper.exportSettings(rProps, sConfigurationSettings);
-}
-
void SvXMLExport::_ExportScripts()
{
SvXMLElementExport aElement( *this, XML_NAMESPACE_OFFICE, XML_SCRIPTS, sal_True, sal_True );
@@ -1734,6 +1726,12 @@ void SvXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>&)
{
}
+sal_Int32 SvXMLExport::GetDocumentSpecificSettings( ::std::list< SettingsGroup >& _out_rSettings )
+{
+ (void)_out_rSettings;
+ return 0;
+}
+
void SvXMLExport::addDataStyle(const sal_Int32 nNumberFormat, sal_Bool /*bTimeFormat*/ )
{
if(mpNumExport)