summaryrefslogtreecommitdiff
path: root/xmloff/source/forms/elementexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/forms/elementexport.cxx')
-rw-r--r--xmloff/source/forms/elementexport.cxx77
1 files changed, 0 insertions, 77 deletions
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index dbcb9c0e8e22..749e64dcf846 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "elementexport.hxx"
#include "strings.hxx"
#include "xmloff/xmlnmspe.hxx"
@@ -63,10 +62,8 @@
#include <stdio.h>
#include <algorithm>
-//.........................................................................
namespace xmloff
{
-//.........................................................................
#if OSL_DEBUG_LEVEL > 0
#define RESET_BIT( bitfield, bit ) \
@@ -90,9 +87,7 @@ namespace xmloff
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::form::binding;
- //=====================================================================
//= OElementExport
- //=====================================================================
OElementExport::OElementExport(IFormsExportContext& _rContext, const Reference< XPropertySet >& _rxProps,
const Sequence< ScriptEventDescriptor >& _rEvents)
:OPropertyExport(_rContext, _rxProps)
@@ -101,13 +96,11 @@ namespace xmloff
{
}
- //---------------------------------------------------------------------
OElementExport::~OElementExport()
{
implEndElement();
}
- //---------------------------------------------------------------------
void OElementExport::doExport()
{
// collect some general information about the element
@@ -128,19 +121,16 @@ namespace xmloff
implEndElement();
}
- //---------------------------------------------------------------------
void OElementExport::examine()
{
// nothing to do here
}
- //---------------------------------------------------------------------
void OElementExport::exportAttributes()
{
// nothing to do here
}
- //---------------------------------------------------------------------
void OElementExport::exportSubTags()
{
// the properties which where not exported 'til now
@@ -150,20 +140,17 @@ namespace xmloff
exportEvents();
}
- //---------------------------------------------------------------------
void OElementExport::implStartElement(const sal_Char* _pName)
{
m_pXMLElement = new SvXMLElementExport(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, _pName, sal_True, sal_True);
}
- //---------------------------------------------------------------------
void OElementExport::implEndElement()
{
delete m_pXMLElement;
m_pXMLElement = NULL;
}
- //---------------------------------------------------------------------
void OElementExport::exportServiceNameAttribute()
{
Reference< XPersistObject > xPersistence(m_xProps, UNO_QUERY);
@@ -231,7 +218,6 @@ namespace xmloff
sToWriteServiceName);
}
- //---------------------------------------------------------------------
void OElementExport::exportEvents()
{
if (!m_aEvents.getLength())
@@ -242,10 +228,7 @@ namespace xmloff
m_rContext.getGlobalContext().GetEventExport().Export(xWrapper);
}
- //=====================================================================
//= OControlExport
- //=====================================================================
- //---------------------------------------------------------------------
OControlExport::OControlExport(IFormsExportContext& _rContext, const Reference< XPropertySet >& _rxControl,
const OUString& _rControlId, const OUString& _rReferringControls,
const Sequence< ScriptEventDescriptor >& _rEvents)
@@ -264,13 +247,11 @@ namespace xmloff
OSL_ENSURE(m_xProps.is(), "OControlExport::OControlExport: invalid arguments!");
}
- //---------------------------------------------------------------------
OControlExport::~OControlExport()
{
implEndElement();
}
- //---------------------------------------------------------------------
void OControlExport::exportOuterAttributes()
{
// the control id
@@ -298,7 +279,6 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
void OControlExport::exportInnerAttributes()
{
// the control id
@@ -332,13 +312,11 @@ namespace xmloff
flagStyleProperties();
}
- //---------------------------------------------------------------------
void OControlExport::exportAttributes()
{
exportOuterAttributes();
}
- //---------------------------------------------------------------------
void OControlExport::exportSubTags() throw (Exception)
{
// for the upcoming exportRemainingProperties:
@@ -468,7 +446,6 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
void OControlExport::exportGenericHandlerAttributes()
{
const Sequence< Property > aProperties = m_xPropertyInfo->getProperties();
@@ -549,7 +526,6 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
void OControlExport::exportCommonControlAttributes()
{
size_t i=0;
@@ -562,7 +538,6 @@ namespace xmloff
// the extra indents for the respective blocks are to ensure that there is no copy'n'paste error, using
// map identifiers from the wrong block
- // --------------------------------------------------------------------
// some string properties
{
// the attribute ids of all properties which are expected to be of type string
@@ -594,7 +569,6 @@ namespace xmloff
}
}
- // --------------------------------------------------------------------
// some boolean properties
{
static const sal_Int32 nBooleanPropertyAttributeIds[] =
@@ -634,8 +608,6 @@ namespace xmloff
}
}
-
- // --------------------------------------------------------------------
// some integer properties
{
// now the common handling
@@ -676,10 +648,8 @@ namespace xmloff
#endif
}
-
}
- // --------------------------------------------------------------------
// some enum properties
{
if (m_nIncludeCommon & CCA_BUTTON_TYPE)
@@ -726,7 +696,6 @@ namespace xmloff
}
}
- // --------------------------------------------------------------------
// some properties which require a special handling
// the target frame
@@ -855,7 +824,6 @@ namespace xmloff
// be 0 now ...
}
- //---------------------------------------------------------------------
void OControlExport::exportDatabaseAttributes()
{
#if OSL_DEBUG_LEVEL > 0
@@ -934,14 +902,12 @@ namespace xmloff
#endif
}
- //---------------------------------------------------------------------
void OControlExport::exportBindingAtributes()
{
#if OSL_DEBUG_LEVEL > 0
sal_Int32 nIncludeBinding = m_nIncludeBindings;
#endif
- // ....................................................
if ( m_nIncludeBindings & BA_LINKED_CELL )
{
exportCellBindingAttributes( ( m_nIncludeBindings & BA_LIST_LINKING_TYPE ) != 0 );
@@ -951,7 +917,6 @@ namespace xmloff
#endif
}
- // ....................................................
if ( m_nIncludeBindings & BA_LIST_CELL_RANGE )
{
exportCellListSourceRange();
@@ -1103,7 +1068,6 @@ namespace xmloff
}
- // -------------------
// the enum properties
{
if (SCA_STATE & m_nIncludeSpecial)
@@ -1135,7 +1099,6 @@ namespace xmloff
}
}
- // --------------------------------------------------------------------
// some properties which require a special handling
// the repeat delay
{
@@ -1168,7 +1131,6 @@ namespace xmloff
}
}
- // ----------------------------------
// the EchoChar property needs special handling, cause it's a Int16, but must be stored as one-character-string
{
if (SCA_ECHO_CHAR & m_nIncludeSpecial)
@@ -1192,7 +1154,6 @@ namespace xmloff
}
}
- // ----------------------------------
// the string properties
{
static const sal_Int32 nStringPropertyAttributeIds[] =
@@ -1225,7 +1186,6 @@ namespace xmloff
}
}
- // ----------------------------------
if ((SCA_MIN_VALUE | SCA_MAX_VALUE) & m_nIncludeSpecial)
{
// need to export the min value and the max value as attributes
@@ -1263,7 +1223,6 @@ namespace xmloff
#endif
}
- // ----------------------------------
if ( SCA_IMAGE_POSITION & m_nIncludeSpecial )
{
exportImagePositionAttributes();
@@ -1276,7 +1235,6 @@ namespace xmloff
// be 0 now ...
}
- //---------------------------------------------------------------------
OUString OControlExport::getScalarListSourceValue() const
{
OUString sListSource;
@@ -1291,7 +1249,6 @@ namespace xmloff
return sListSource;
}
- //---------------------------------------------------------------------
void OControlExport::exportListSourceAsAttribute()
{
// DA_LIST_SOURCE needs some special handling
@@ -1309,7 +1266,6 @@ namespace xmloff
exportedProperty( PROPERTY_LISTSOURCE );
}
- //---------------------------------------------------------------------
void OControlExport::getSequenceInt16PropertyAsSet(const OUString& _rPropertyName, Int16Set& _rOut)
{
Sequence< sal_Int16 > aValueSequence;
@@ -1321,7 +1277,6 @@ namespace xmloff
_rOut.insert(*pValues);
}
- //---------------------------------------------------------------------
void OControlExport::exportListSourceAsElements()
{
// the string lists
@@ -1445,7 +1400,6 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
void OControlExport::implStartElement(const sal_Char* _pName)
{
// before we let the base class start it's outer element, we add a wrapper element
@@ -1465,7 +1419,6 @@ namespace xmloff
OElementExport::implStartElement(_pName);
}
- //---------------------------------------------------------------------
void OControlExport::implEndElement()
{
// end the inner element
@@ -1476,19 +1429,16 @@ namespace xmloff
m_pOuterElement = NULL;
}
- //---------------------------------------------------------------------
const sal_Char* OControlExport::getOuterXMLElementName() const
{
return 0;
}
- //---------------------------------------------------------------------
const sal_Char* OControlExport::getXMLElementName() const
{
return getElementName(m_eType);
}
- //---------------------------------------------------------------------
void OControlExport::examine()
{
OSL_ENSURE( ( m_nIncludeCommon == 0 ) && ( m_nIncludeSpecial == 0 ) && ( m_nIncludeDatabase == 0 )
@@ -1821,7 +1771,6 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
void OControlExport::exportCellBindingAttributes( bool _bIncludeListLinkageType )
{
try
@@ -1831,14 +1780,12 @@ namespace xmloff
OSL_ENSURE( xBinding.is(), "OControlExport::exportCellBindingAttributes: invalid bindable or invalid binding!" );
if ( xBinding.is() )
{
- // ....................................................
AddAttribute(
OAttributeMetaData::getBindingAttributeNamespace( BA_LINKED_CELL ),
OAttributeMetaData::getBindingAttributeName( BA_LINKED_CELL ),
aHelper.getStringAddressFromCellBinding( xBinding )
);
- // ....................................................
if ( _bIncludeListLinkageType )
{
sal_Int16 nLinkageType = aHelper.isCellIntegerBinding( xBinding ) ? 1 : 0;
@@ -1866,25 +1813,21 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
void OControlExport::exportXFormsBindAttributes()
{
OUString sBindName = getXFormsBindName( m_xProps );
AddAttribute( XML_NAMESPACE_XFORMS, XML_BIND, sBindName );
}
- //---------------------------------------------------------------------
void OControlExport::exportXFormsListAttributes()
{
OUString sBindName = getXFormsListBindName( m_xProps );
AddAttribute( XML_NAMESPACE_FORM, XML_XFORMS_LIST_SOURCE, sBindName );
}
- //---------------------------------------------------------------------
void OControlExport::exportXFormsSubmissionAttributes()
{
OUString sSubmission = getXFormsSubmissionName( m_xProps );
AddAttribute( XML_NAMESPACE_FORM, XML_XFORMS_SUBMISSION, sSubmission );
}
- //---------------------------------------------------------------------
void OControlExport::exportCellListSourceRange( )
{
try
@@ -1912,7 +1855,6 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
void OControlExport::exportImagePositionAttributes()
{
try
@@ -1960,7 +1902,6 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
bool OControlExport::controlHasActiveDataBinding() const
{
try
@@ -1989,7 +1930,6 @@ namespace xmloff
return false;
}
- //---------------------------------------------------------------------
bool OControlExport::controlHasUserSuppliedListEntries() const
{
try
@@ -2023,23 +1963,18 @@ namespace xmloff
return true;
}
- //=====================================================================
//= OColumnExport
- //=====================================================================
- //---------------------------------------------------------------------
OColumnExport::OColumnExport(IFormsExportContext& _rContext, const Reference< XPropertySet >& _rxControl, const OUString& _rControlId,
const Sequence< ScriptEventDescriptor >& _rEvents)
:OControlExport(_rContext, _rxControl, _rControlId, OUString(), _rEvents)
{
}
- //---------------------------------------------------------------------
OColumnExport::~OColumnExport()
{
implEndElement();
}
- //---------------------------------------------------------------------
void OColumnExport::exportServiceNameAttribute()
{
// the attribute "service name" (which has a slightly different meaning for columns
@@ -2064,13 +1999,11 @@ namespace xmloff
}
- //---------------------------------------------------------------------
const sal_Char* OColumnExport::getOuterXMLElementName() const
{
return "column";
}
- //---------------------------------------------------------------------
void OColumnExport::exportAttributes()
{
OControlExport::exportAttributes();
@@ -2093,7 +2026,6 @@ namespace xmloff
}
}
- //---------------------------------------------------------------------
void OColumnExport::examine()
{
OControlExport::examine();
@@ -2107,10 +2039,7 @@ namespace xmloff
m_nIncludeCommon &= ~CCA_DROPDOWN;
}
- //=====================================================================
//= OFormExport
- //=====================================================================
- //---------------------------------------------------------------------
OFormExport::OFormExport(IFormsExportContext& _rContext, const Reference< XPropertySet >& _rxForm,
const Sequence< ScriptEventDescriptor >& _rEvents)
:OElementExport(_rContext, _rxForm, _rEvents)
@@ -2119,13 +2048,11 @@ namespace xmloff
OSL_ENSURE(m_xProps.is(), "OFormExport::OFormExport: invalid arguments!");
}
- //---------------------------------------------------------------------
const sal_Char* OFormExport::getXMLElementName() const
{
return "form";
}
- //---------------------------------------------------------------------
void OFormExport::exportSubTags()
{
if ( m_bCreateConnectionResourceElement && m_xProps.is() )
@@ -2156,12 +2083,10 @@ namespace xmloff
m_rContext.exportCollectionElements(xCollection);
}
- //---------------------------------------------------------------------
void OFormExport::exportAttributes()
{
sal_Int32 i=0;
- // ---------------------
// the string properties
{
static const FormAttributes eStringPropertyIds[] =
@@ -2301,8 +2226,6 @@ namespace xmloff
OAttributeMetaData::getFormAttributeName(faDetailFiels),
PROPERTY_DETAILFIELDS);
}
-//.........................................................................
} // namespace xmloff
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */