Kaydet (Commit) d25ab1c0 authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS frmcontrols01 (1.22.102); FILE MERGED

2003/10/22 13:17:44 fs 1.22.102.2: #21277# new implementations for exporting/importing scrollbar controls as form:value-range elements
2003/10/17 13:43:18 fs 1.22.102.1: #110714# GetRelativeReference does not accept empty URLs anymore
üst 6c847335
......@@ -2,9 +2,9 @@
*
* $RCSfile: propertyexport.cxx,v $
*
* $Revision: 1.22 $
* $Revision: 1.23 $
*
* last change: $Author: hr $ $Date: 2003-03-27 18:20:26 $
* last change: $Author: kz $ $Date: 2003-12-11 12:10:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -485,6 +485,30 @@ namespace xmloff
exportedProperty( _rPropertyName );
}
//---------------------------------------------------------------------
void OPropertyExport::exportInt32PropertyAttribute( const sal_uInt16 _nNamespaceKey, const sal_Char* _pAttributeName,
const ::rtl::OUString& _rPropertyName, const sal_Int32 _nDefault )
{
DBG_CHECK_PROPERTY( _rPropertyName, sal_Int32 );
// get the value
sal_Int32 nCurrentValue( _nDefault );
m_xProps->getPropertyValue( _rPropertyName ) >>= nCurrentValue;
// add the attribute
if ( _nDefault != nCurrentValue )
{
// let the formatter of the export context build a string
::rtl::OUStringBuffer sBuffer;
m_rContext.getGlobalContext().GetMM100UnitConverter().convertNumber( sBuffer, nCurrentValue );
AddAttribute( _nNamespaceKey, _pAttributeName, sBuffer.makeStringAndClear() );
}
// the property does not need to be handled anymore
exportedProperty( _rPropertyName );
}
//---------------------------------------------------------------------
void OPropertyExport::exportEnumPropertyAttribute(
const sal_uInt16 _nNamespaceKey, const sal_Char* _pAttributeName,
......@@ -541,7 +565,8 @@ namespace xmloff
DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString );
::rtl::OUString sTargetLocation = comphelper::getString(m_xProps->getPropertyValue(_sPropertyName));
sTargetLocation = m_rContext.getGlobalContext().GetRelativeReference(sTargetLocation);
if ( sTargetLocation.getLength() )
sTargetLocation = m_rContext.getGlobalContext().GetRelativeReference(sTargetLocation);
AddAttribute(getCommonControlAttributeNamespace(_nProperty), getCommonControlAttributeName(_nProperty), sTargetLocation);
exportedProperty(_sPropertyName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment