summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-09-01 12:44:39 -0300
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-09-05 22:13:17 +0000
commitc75af8578d921040e1baf8414edd7239969bcd45 (patch)
tree2c9310a3da94d1859fd80f03a7217bbfec938b67 /xmlscript
parent72fa23ba0e13e6cf8a7ffb0476863d4399af0da1 (diff)
kill RTL_CONSTASCII_USTRINGPARAM in xmlscript
Plus rtl::OUString cleanup Only on rebased files Change-Id: Icddaa20742cc45f08e5a48790447fcf8865f4bd6 Reviewed-on: https://gerrit.libreoffice.org/527 Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br> Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/inc/xmlscript/xml_helper.hxx22
-rw-r--r--xmlscript/inc/xmlscript/xmllib_imexp.hxx6
-rw-r--r--xmlscript/inc/xmlscript/xmlmod_imexp.hxx8
-rw-r--r--xmlscript/source/inc/misc.hxx5
-rw-r--r--xmlscript/source/xml_helper/xml_impctx.cxx31
-rw-r--r--xmlscript/source/xmldlg_imexp/exp_share.hxx60
-rw-r--r--xmlscript/source/xmldlg_imexp/imp_share.hxx234
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx18
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx1120
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx520
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx1234
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx500
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_export.cxx163
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_import.cxx194
-rw-r--r--xmlscript/source/xmllib_imexp/imp_share.hxx8
-rw-r--r--xmlscript/source/xmllib_imexp/xmllib_export.cxx61
-rw-r--r--xmlscript/source/xmllib_imexp/xmllib_import.cxx79
-rw-r--r--xmlscript/source/xmlmod_imexp/imp_share.hxx3
-rw-r--r--xmlscript/source/xmlmod_imexp/xmlmod_export.cxx19
-rw-r--r--xmlscript/source/xmlmod_imexp/xmlmod_import.cxx34
-rw-r--r--xmlscript/test/imexp.cxx14
21 files changed, 1457 insertions, 2876 deletions
diff --git a/xmlscript/inc/xmlscript/xml_helper.hxx b/xmlscript/inc/xmlscript/xml_helper.hxx
index 1c7ee37e8ddd..5d3c747452ae 100644
--- a/xmlscript/inc/xmlscript/xml_helper.hxx
+++ b/xmlscript/inc/xmlscript/xml_helper.hxx
@@ -42,7 +42,7 @@ class XMLSCRIPT_DLLPUBLIC XMLElement
: public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XAttributeList >
{
public:
- inline XMLElement( ::rtl::OUString const & name )
+ inline XMLElement( OUString const & name )
SAL_THROW(())
: _name( name )
{}
@@ -67,7 +67,7 @@ public:
@param rAttrName qname of attribute
@param rValue value string of element
*/
- void SAL_CALL addAttribute( ::rtl::OUString const & rAttrName, ::rtl::OUString const & rValue )
+ void SAL_CALL addAttribute( OUString const & rAttrName, OUString const & rValue )
SAL_THROW(());
/** Gets the tag name (qname) of element.
@@ -75,7 +75,7 @@ public:
@return
qname of element
*/
- inline ::rtl::OUString SAL_CALL getName() SAL_THROW(())
+ inline OUString SAL_CALL getName() SAL_THROW(())
{ return _name; }
/** Dumps out element (and all sub elements).
@@ -94,22 +94,22 @@ public:
// XAttributeList
virtual sal_Int16 SAL_CALL getLength()
throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getNameByIndex( sal_Int16 nPos )
+ virtual OUString SAL_CALL getNameByIndex( sal_Int16 nPos )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getTypeByIndex( sal_Int16 nPos )
+ virtual OUString SAL_CALL getTypeByIndex( sal_Int16 nPos )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getTypeByName( ::rtl::OUString const & rName )
+ virtual OUString SAL_CALL getTypeByName( OUString const & rName )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getValueByIndex( sal_Int16 nPos )
+ virtual OUString SAL_CALL getValueByIndex( sal_Int16 nPos )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getValueByName( ::rtl::OUString const & rName )
+ virtual OUString SAL_CALL getValueByName( OUString const & rName )
throw (::com::sun::star::uno::RuntimeException);
protected:
- ::rtl::OUString _name;
+ OUString _name;
- ::std::vector< ::rtl::OUString > _attrNames;
- ::std::vector< ::rtl::OUString > _attrValues;
+ ::std::vector< OUString > _attrNames;
+ ::std::vector< OUString > _attrValues;
::std::vector< ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList > > _subElems;
diff --git a/xmlscript/inc/xmlscript/xmllib_imexp.hxx b/xmlscript/inc/xmlscript/xmllib_imexp.hxx
index 5a5d30569d0b..6470e6cba7d1 100644
--- a/xmlscript/inc/xmlscript/xmllib_imexp.hxx
+++ b/xmlscript/inc/xmlscript/xmllib_imexp.hxx
@@ -35,12 +35,12 @@ namespace xmlscript
// functionality from xmlscript
struct XMLSCRIPT_DLLPUBLIC LibDescriptor
{
- ::rtl::OUString aName;
- ::rtl::OUString aStorageURL;
+ OUString aName;
+ OUString aStorageURL;
sal_Bool bLink;
sal_Bool bReadOnly;
sal_Bool bPasswordProtected;
- ::com::sun::star::uno::Sequence< ::rtl::OUString > aElementNames;
+ ::com::sun::star::uno::Sequence< OUString > aElementNames;
sal_Bool bPreload;
};
diff --git a/xmlscript/inc/xmlscript/xmlmod_imexp.hxx b/xmlscript/inc/xmlscript/xmlmod_imexp.hxx
index 58fdd910189a..ed3368acb4f6 100644
--- a/xmlscript/inc/xmlscript/xmlmod_imexp.hxx
+++ b/xmlscript/inc/xmlscript/xmlmod_imexp.hxx
@@ -34,10 +34,10 @@ namespace xmlscript
// functionality from xmlscript
struct XMLSCRIPT_DLLPUBLIC ModuleDescriptor
{
- ::rtl::OUString aName;
- ::rtl::OUString aLanguage;
- ::rtl::OUString aCode;
- ::rtl::OUString aModuleType; // VBA
+ OUString aName;
+ OUString aLanguage;
+ OUString aCode;
+ OUString aModuleType; // VBA
};
XMLSCRIPT_DLLPUBLIC void
diff --git a/xmlscript/source/inc/misc.hxx b/xmlscript/source/inc/misc.hxx
index 6c04f4b8775c..459e53e2e763 100644
--- a/xmlscript/source/inc/misc.hxx
+++ b/xmlscript/source/inc/misc.hxx
@@ -22,9 +22,6 @@
#include "com/sun/star/uno/Any.hxx"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
-
namespace xmlscript
{
@@ -35,7 +32,7 @@ inline void extract_throw( T * p, ::com::sun::star::uno::Any const & a )
if (! (a >>= *p))
{
throw ::com::sun::star::uno::RuntimeException(
- OUSTR("expected ") + ::getCppuType( p ).getTypeName(),
+ "expected " + ::getCppuType( p ).getTypeName(),
::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface>() );
}
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 6fe71cb0f0f7..252c35e5d987 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -45,15 +45,13 @@ const sal_Int32 UID_UNKNOWN = -1;
Sequence< OUString > getSupportedServiceNames_DocumentHandlerImpl()
{
- OUString name( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.xml.input.SaxDocumentHandler") );
+ OUString name( "com.sun.star.xml.input.SaxDocumentHandler" );
return Sequence< OUString >( &name, 1 );
}
OUString getImplementationName_DocumentHandlerImpl()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.xml.input.SaxDocumentHandler") );
+ return OUString( "com.sun.star.comp.xml.input.SaxDocumentHandler" );
}
typedef ::boost::unordered_map< OUString, sal_Int32, OUStringHash > t_OUString2LongMap;
@@ -191,14 +189,12 @@ DocumentHandlerImpl::DocumentHandlerImpl(
bool bSingleThreadedUse )
: m_xRoot( xRoot ),
m_uid_count( 0 ),
- m_sXMLNS_PREFIX_UNKNOWN(
- RTL_CONSTASCII_USTRINGPARAM("<<< unknown prefix >>>") ),
- m_sXMLNS( RTL_CONSTASCII_USTRINGPARAM("xmlns") ),
+ m_sXMLNS_PREFIX_UNKNOWN( "<<< unknown prefix >>>" ),
+ m_sXMLNS( "xmlns" ),
m_nLastURI_lookup( UID_UNKNOWN ),
- m_aLastURI_lookup( RTL_CONSTASCII_USTRINGPARAM("<<< unknown URI >>>") ),
+ m_aLastURI_lookup( "<<< unknown URI >>>" ),
m_nLastPrefix_lookup( UID_UNKNOWN ),
- m_aLastPrefix_lookup(
- RTL_CONSTASCII_USTRINGPARAM("<<< unknown URI >>>") ),
+ m_aLastPrefix_lookup( "<<< unknown URI >>>" ),
m_nSkipElements( 0 ),
m_pMutex( 0 )
{
@@ -473,10 +469,7 @@ void DocumentHandlerImpl::initialize(
}
else
{
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "missing root instance!") ),
- Reference< XInterface >() );
+ throw RuntimeException( "missing root instance!", Reference< XInterface >() );
}
}
@@ -504,9 +497,7 @@ OUString DocumentHandlerImpl::getUriByUid( sal_Int32 Uid )
if (iPos->second == Uid)
return iPos->first;
}
- throw container::NoSuchElementException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no such xmlns uid!") ),
- static_cast< OWeakObject * >(this) );
+ throw container::NoSuchElementException( "no such xmlns uid!" , static_cast< OWeakObject * >(this) );
}
@@ -516,8 +507,7 @@ OUString DocumentHandlerImpl::getUriByUid( sal_Int32 Uid )
void DocumentHandlerImpl::startDocument()
throw (xml::sax::SAXException, RuntimeException)
{
- m_xRoot->startDocument(
- static_cast< xml::input::XNamespaceMapping * >( this ) );
+ m_xRoot->startDocument( static_cast< xml::input::XNamespaceMapping * >( this ) );
}
//______________________________________________________________________________
@@ -606,8 +596,7 @@ void DocumentHandlerImpl::startElement(
{
OUString const & rQAttributeName = pQNames[ nPos ];
OSL_ENSURE(
- rQAttributeName.compareToAscii(
- RTL_CONSTASCII_STRINGPARAM("xmlns:") ) != 0,
+ rQAttributeName.compareToAscii( "xmlns:" ) != 0,
"### unexpected xmlns!" );
// collect attribute's uid and current prefix
diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx
index 902f6a60f373..f2cbd45298f1 100644
--- a/xmlscript/source/xmldlg_imexp/exp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx
@@ -53,7 +53,7 @@ struct Style
short _all;
short _set;
- ::rtl::OUString _id;
+ OUString _id;
inline Style( short all_ ) SAL_THROW(())
: _fontRelief( css::awt::FontRelief::NONE )
@@ -71,7 +71,7 @@ class StyleBag
public:
~StyleBag() SAL_THROW(());
- ::rtl::OUString getStyleId( Style const & rStyle ) SAL_THROW(());
+ OUString getStyleId( Style const & rStyle ) SAL_THROW(());
void dump( css::uno::Reference< css::xml::sax::XExtendedDocumentHandler >
const & xOut );
@@ -88,7 +88,7 @@ public:
inline ElementDescriptor(
css::uno::Reference< css::beans::XPropertySet > const & xProps,
css::uno::Reference< css::beans::XPropertyState > const & xPropState,
- ::rtl::OUString const & name, css::uno::Reference< css::frame::XModel > const & xDocument )
+ OUString const & name, css::uno::Reference< css::frame::XModel > const & xDocument )
SAL_THROW(())
: XMLElement( name )
, _xProps( xProps )
@@ -96,65 +96,65 @@ public:
, _xDocument( xDocument )
{}
inline ElementDescriptor(
- ::rtl::OUString const & name )
+ OUString const & name )
SAL_THROW(())
: XMLElement( name )
{}
template<typename T>
inline void read(
- ::rtl::OUString const & propName, ::rtl::OUString const & attrName,
+ OUString const & propName, OUString const & attrName,
bool forceAttribute = false );
template<typename T>
- inline bool readProp( T * ret, ::rtl::OUString const & rPropName );
- css::uno::Any readProp( ::rtl::OUString const & rPropName );
+ inline bool readProp( T * ret, OUString const & rPropName );
+ css::uno::Any readProp( OUString const & rPropName );
void readDefaults( bool supportPrintable = true, bool supportVisible = true );
void readStringAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
inline void readDoubleAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName )
+ OUString const & rPropName, OUString const & rAttrName )
{ read<double>( rPropName, rAttrName ); }
inline void readLongAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
bool forceAttribute = false )
{ read<sal_Int32>( rPropName, rAttrName, forceAttribute ); }
void readHexLongAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
inline void readShortAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName )
+ OUString const & rPropName, OUString const & rAttrName )
{ read<sal_Int32>( rPropName, rAttrName ); }
inline void readBoolAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName )
+ OUString const & rPropName, OUString const & rAttrName )
{ read<sal_Bool>( rPropName, rAttrName ); }
void readAlignAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readVerticalAlignAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readImageURLAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readImageAlignAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readImagePositionAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readDateFormatAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readTimeFormatAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readOrientationAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readButtonTypeAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readLineEndFormatAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readSelectionTypeAttr(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName );
+ OUString const & rPropName, OUString const & rAttrName );
void readDataAwareAttr(
- ::rtl::OUString const & rAttrName );
+ OUString const & rAttrName );
inline void addBoolAttr(
- ::rtl::OUString const & rAttrName, sal_Bool bValue )
- { addAttribute( rAttrName, ::rtl::OUString::valueOf(bValue) ); }
+ OUString const & rAttrName, sal_Bool bValue )
+ { addAttribute( rAttrName, OUString::valueOf(bValue) ); }
void addNumberFormatAttr(
css::uno::Reference< css::beans::XPropertySet >
const & xFormatProperties );
@@ -218,7 +218,7 @@ public:
template<typename T>
inline void ElementDescriptor::read(
- ::rtl::OUString const & propName, ::rtl::OUString const & attrName,
+ OUString const & propName, OUString const & attrName,
bool forceAttribute )
{
if (forceAttribute ||
@@ -228,7 +228,7 @@ inline void ElementDescriptor::read(
css::uno::Any a( _xProps->getPropertyValue( propName ) );
T v = T();
if (a >>= v)
- addAttribute( attrName, ::rtl::OUString::valueOf(v) );
+ addAttribute( attrName, OUString::valueOf(v) );
else
OSL_FAIL( "### unexpected property type!" );
}
@@ -236,7 +236,7 @@ inline void ElementDescriptor::read(
template<typename T>
inline bool ElementDescriptor::readProp(
- T * ret, ::rtl::OUString const & rPropName )
+ T * ret, OUString const & rPropName )
{
_xProps->getPropertyValue( rPropName ) >>= *ret;
return css::beans::PropertyState_DEFAULT_VALUE !=
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index d986afd1bcca..3f306b7f4e9c 100644
--- a/xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -43,7 +43,7 @@ namespace css = ::com::sun::star;
namespace xmlscript
{
-inline sal_Int32 toInt32( ::rtl::OUString const & rStr ) SAL_THROW(())
+inline sal_Int32 toInt32( OUString const & rStr ) SAL_THROW(())
{
sal_Int32 nVal;
if (rStr.getLength() > 2 && rStr[ 0 ] == '0' && rStr[ 1 ] == 'x')
@@ -54,11 +54,11 @@ inline sal_Int32 toInt32( ::rtl::OUString const & rStr ) SAL_THROW(())
}
inline bool getBoolAttr(
- sal_Bool * pRet, ::rtl::OUString const & rAttrName,
+ sal_Bool * pRet, OUString const & rAttrName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
sal_Int32 nUid )
{
- ::rtl::OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) );
+ OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) );
if (!aValue.isEmpty())
{
if ( aValue == "true" )
@@ -74,7 +74,7 @@ inline bool getBoolAttr(
else
{
throw css::xml::sax::SAXException(
- rAttrName + OUSTR(": no boolean value (true|false)!"),
+ rAttrName + ": no boolean value (true|false)!",
css::uno::Reference<css::uno::XInterface>(), css::uno::Any() );
}
}
@@ -82,7 +82,7 @@ inline bool getBoolAttr(
}
inline bool getStringAttr(
- ::rtl::OUString * pRet, ::rtl::OUString const & rAttrName,
+ OUString * pRet, OUString const & rAttrName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
sal_Int32 nUid )
{
@@ -91,11 +91,11 @@ inline bool getStringAttr(
}
inline bool getLongAttr(
- sal_Int32 * pRet, ::rtl::OUString const & rAttrName,
+ sal_Int32 * pRet, OUString const & rAttrName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
sal_Int32 nUid )
{
- ::rtl::OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) );
+ OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) );
if (!aValue.isEmpty())
{
*pRet = toInt32( aValue );
@@ -116,7 +116,7 @@ struct DialogImport
css::uno::Reference< css::uno::XComponentContext > _xContext;
css::uno::Reference< css::util::XNumberFormatsSupplier > _xSupplier;
- ::boost::shared_ptr< ::std::vector< ::rtl::OUString > > _pStyleNames;
+ ::boost::shared_ptr< ::std::vector< OUString > > _pStyleNames;
::boost::shared_ptr< ::std::vector< css::uno::Reference< css::xml::input::XElement > > > _pStyles;
css::uno::Reference< css::container::XNameContainer > _xDialogModel;
@@ -128,18 +128,18 @@ struct DialogImport
public:
inline bool isEventElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName )
+ sal_Int32 nUid, OUString const & rLocalName )
{
return ((XMLNS_SCRIPT_UID == nUid && (rLocalName == "event" || rLocalName == "listener-event" )) ||
(XMLNS_DIALOGS_UID == nUid && rLocalName == "event" ));
}
void addStyle(
- ::rtl::OUString const & rStyleId,
+ OUString const & rStyleId,
css::uno::Reference< css::xml::input::XElement > const & xStyle )
SAL_THROW(());
css::uno::Reference< css::xml::input::XElement > getStyle(
- ::rtl::OUString const & rStyleId ) const
+ OUString const & rStyleId ) const
SAL_THROW(());
inline css::uno::Reference< css::uno::XComponentContext >
@@ -151,7 +151,7 @@ public:
css::uno::Reference<css::uno::XComponentContext> const & xContext,
css::uno::Reference<css::container::XNameContainer>
const & xDialogModel,
- ::boost::shared_ptr< ::std::vector< ::rtl::OUString > >& pStyleNames,
+ ::boost::shared_ptr< ::std::vector< OUString > >& pStyleNames,
::boost::shared_ptr< ::std::vector< css::uno::Reference< css::xml::input::XElement > > >& pStyles,
css::uno::Reference<css::frame::XModel> const & xDoc )
SAL_THROW(())
@@ -186,14 +186,14 @@ public:
virtual void SAL_CALL endDocument()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL processingInstruction(
- ::rtl::OUString const & rTarget, ::rtl::OUString const & rData )
+ OUString const & rTarget, OUString const & rData )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL setDocumentLocator(
css::uno::Reference< css::xml::sax::XLocator > const & xLocator )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startRootElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
};
@@ -207,12 +207,12 @@ protected:
ElementBase * _pParent;
sal_Int32 _nUid;
- ::rtl::OUString _aLocalName;
+ OUString _aLocalName;
css::uno::Reference< css::xml::input::XAttributes > _xAttributes;
public:
ElementBase(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(());
@@ -222,25 +222,25 @@ public:
// XElement
virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL getParent()
throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getLocalName()
+ virtual OUString SAL_CALL getLocalName()
throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getUid()
throw (css::uno::RuntimeException);
virtual css::uno::Reference< css::xml::input::XAttributes >
SAL_CALL getAttributes() throw (css::uno::RuntimeException);
virtual void SAL_CALL ignorableWhitespace(
- ::rtl::OUString const & rWhitespaces )
+ OUString const & rWhitespaces )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL characters( ::rtl::OUString const & rChars )
+ virtual void SAL_CALL characters( OUString const & rChars )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL processingInstruction(
- ::rtl::OUString const & Target, ::rtl::OUString const & Data )
+ OUString const & Target, OUString const & Data )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
};
@@ -252,12 +252,12 @@ class StylesElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline StylesElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -290,7 +290,7 @@ class StyleElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
@@ -312,7 +312,7 @@ public:
css::uno::Reference< css::beans::XPropertySet > const & xProps );
inline StyleElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -329,20 +329,20 @@ public:
class MenuPopupElement
: public ElementBase
{
- ::std::vector< ::rtl::OUString > _itemValues;
+ ::std::vector< OUString > _itemValues;
::std::vector< sal_Int16 > _itemSelected;
public:
- css::uno::Sequence< ::rtl::OUString > getItemValues();
+ css::uno::Sequence< OUString > getItemValues();
css::uno::Sequence< sal_Int16 > getSelectedItems();
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline MenuPopupElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -362,10 +362,10 @@ protected:
::std::vector< css::uno::Reference< css::xml::input::XElement > > _events;
- ::rtl::OUString getControlId(
+ OUString getControlId(
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
- ::rtl::OUString getControlModelName(
- rtl::OUString const& rDefaultModel,
+ OUString getControlModelName(
+ OUString const& rDefaultModel,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
css::uno::Reference< css::xml::input::XElement > getStyle(
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
@@ -374,7 +374,7 @@ public:
SAL_THROW(()) { return &_events; }
ControlElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(());
@@ -386,13 +386,13 @@ class ImportContext
protected:
DialogImport * _pImport;
css::uno::Reference< css::beans::XPropertySet > _xControlModel;
- ::rtl::OUString _aId;
+ OUString _aId;
public:
inline ImportContext(
DialogImport * pImport,
css::uno::Reference< css::beans::XPropertySet > const & xControlModel_,
- ::rtl::OUString const & id )
+ OUString const & id )
: _pImport( pImport ),
_xControlModel( xControlModel_ ),
_aId( id )
@@ -410,61 +410,61 @@ public:
const & rEvents );
bool importStringProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importDoubleProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importBooleanProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importShortProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importLongProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importLongProperty(
sal_Int32 nOffset,
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importHexLongProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importAlignProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importVerticalAlignProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
- bool importImageURLProperty( rtl::OUString const & rPropName, rtl::OUString const & rAttrName,
+ bool importImageURLProperty( OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes );
bool importImageAlignProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importImagePositionProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importDateFormatProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importTimeFormatProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importOrientationProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importButtonTypeProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importLineEndFormatProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importSelectionTypeProperty(
- ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName,
+ OUString const & rPropName, OUString const & rAttrName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
bool importDataAwareProperty(
- ::rtl::OUString const & rPropName,
+ OUString const & rPropName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes );
};
@@ -474,7 +474,7 @@ class ControlImportContext : public ImportContext
public:
inline ControlImportContext(
DialogImport * pImport,
- ::rtl::OUString const & rId, ::rtl::OUString const & rControlName )
+ OUString const & rId, OUString const & rControlName )
: ImportContext(
pImport,
css::uno::Reference< css::beans::XPropertySet >(
@@ -483,7 +483,7 @@ public:
{}
inline ControlImportContext(
DialogImport * pImport,
- const css::uno::Reference< css::beans::XPropertySet >& xProps, ::rtl::OUString const & rControlName )
+ const css::uno::Reference< css::beans::XPropertySet >& xProps, OUString const & rControlName )
: ImportContext(
pImport,
xProps,
@@ -505,14 +505,14 @@ class WindowElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline WindowElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -529,7 +529,7 @@ public:
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline EventElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -544,12 +544,12 @@ class BulletinBoardElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
BulletinBoardElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(());
@@ -562,14 +562,14 @@ class ButtonElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline ButtonElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -584,14 +584,14 @@ class CheckBoxElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline CheckBoxElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -607,14 +607,14 @@ class ComboBoxElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline ComboBoxElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -630,14 +630,14 @@ class MenuListElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline MenuListElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -652,12 +652,12 @@ class RadioElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline RadioElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -673,14 +673,14 @@ class RadioGroupElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline RadioGroupElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -692,19 +692,19 @@ public:
class TitledBoxElement
: public BulletinBoardElement
{
- ::rtl::OUString _label;
+ OUString _label;
::std::vector< css::uno::Reference< css::xml::input::XElement > > _radios;
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline TitledBoxElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -719,14 +719,14 @@ class TextElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline TextElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -740,14 +740,14 @@ class FixedHyperLinkElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline FixedHyperLinkElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -761,14 +761,14 @@ class TextFieldElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline TextFieldElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -783,14 +783,14 @@ class ImageControlElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline ImageControlElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -805,14 +805,14 @@ class FileControlElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline FileControlElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -827,14 +827,14 @@ class TreeControlElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline TreeControlElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -849,14 +849,14 @@ class CurrencyFieldElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline CurrencyFieldElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -871,14 +871,14 @@ class DateFieldElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline DateFieldElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -893,14 +893,14 @@ class NumericFieldElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline NumericFieldElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -915,14 +915,14 @@ class TimeFieldElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline TimeFieldElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -937,14 +937,14 @@ class PatternFieldElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline PatternFieldElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -959,14 +959,14 @@ class FormattedFieldElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline FormattedFieldElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -981,14 +981,14 @@ class FixedLineElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline FixedLineElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -1003,14 +1003,14 @@ class ScrollBarElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline ScrollBarElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -1026,14 +1026,14 @@ class SpinButtonElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline SpinButtonElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -1048,20 +1048,20 @@ class MultiPage
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline MultiPage(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{
- m_xContainer.set( _pImport->_xDialogModelFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ), css::uno::UNO_QUERY );
+ m_xContainer.set( _pImport->_xDialogModelFactory->createInstance( "com.sun.star.awt.UnoMultiPageModel" ), css::uno::UNO_QUERY );
}
private:
css::uno::Reference< css::container::XNameContainer > m_xContainer;
@@ -1071,18 +1071,18 @@ private:
class Frame
: public ControlElement
{
- ::rtl::OUString _label;
+ OUString _label;
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline Frame(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
@@ -1099,20 +1099,20 @@ class Page
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline Page(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{
- m_xContainer.set( _pImport->_xDialogModelFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoPageModel") ) ), css::uno::UNO_QUERY );
+ m_xContainer.set( _pImport->_xDialogModelFactory->createInstance( "com.sun.star.awt.UnoPageModel" ), css::uno::UNO_QUERY );
}
private:
css::uno::Reference< css::container::XNameContainer > m_xContainer;
@@ -1125,14 +1125,14 @@ class ProgressBarElement
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
+ sal_Int32 nUid, OUString const & rLocalName,
css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
virtual void SAL_CALL endElement()
throw (css::xml::sax::SAXException, css::uno::RuntimeException);
inline ProgressBarElement(
- ::rtl::OUString const & rLocalName,
+ OUString const & rLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW(())
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
index 7f84f74755e6..b01b6dcf63b2 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
@@ -68,18 +68,16 @@ Reference< io::XInputStreamProvider > SAL_CALL exportDialogModel(
Reference< lang::XMultiComponentFactory > xSMgr( xContext->getServiceManager() );
if (! xSMgr.is())
{
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no service manager available!") ),
+ throw RuntimeException("no service manager available!",
Reference< XInterface >() );
}
Reference< xml::sax::XExtendedDocumentHandler > xHandler( xSMgr->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ), xContext ), UNO_QUERY );
+ "com.sun.star.xml.sax.Writer", xContext ), UNO_QUERY );
OSL_ASSERT( xHandler.is() );
if (! xHandler.is())
{
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("could not create sax-writer component!") ),
+ throw RuntimeException("could not create sax-writer component!",
Reference< XInterface >() );
}
@@ -103,18 +101,16 @@ void SAL_CALL importDialogModel(
Reference< lang::XMultiComponentFactory > xSMgr( xContext->getServiceManager() );
if (! xSMgr.is())
{
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no service manager available!") ),
+ throw RuntimeException("no service manager available!",
Reference< XInterface >() );
}
Reference< xml::sax::XParser > xParser( xSMgr->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ), xContext ), UNO_QUERY );
+ "com.sun.star.xml.sax.Parser", xContext ), UNO_QUERY );
OSL_ASSERT( xParser.is() );
if (! xParser.is())
{
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("could not create sax-parser component!") ),
+ throw RuntimeException("could not create sax-parser component!",
Reference< XInterface >() );
}
@@ -123,7 +119,7 @@ void SAL_CALL importDialogModel(
xml::sax::InputSource source;
source.aInputStream = xInput;
- source.sSystemId = OUString( RTL_CONSTASCII_USTRINGPARAM("virtual file") );
+ source.sSystemId = "virtual file";
xParser->parseStream( source );
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index 042ca8eb78f5..a8c026ed94e0 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -40,10 +40,10 @@ namespace xmlscript
static inline bool readBorderProps(
ElementDescriptor * element, Style & style )
{
- if (element->readProp( &style._border, OUSTR("Border") )) {
+ if (element->readProp( &style._border, "Border" )) {
if (style._border == BORDER_SIMPLE /* simple */)
{
- if (element->readProp( &style._borderColor, OUSTR("BorderColor") ))
+ if (element->readProp( &style._borderColor, "BorderColor" ))
style._border = BORDER_SIMPLE_COLOR;
}
return true;
@@ -54,11 +54,11 @@ static inline bool readBorderProps(
static inline bool readFontProps( ElementDescriptor * element, Style & style )
{
bool ret = element->readProp(
- &style._descr, OUSTR("FontDescriptor") );
+ &style._descr, "FontDescriptor" );
ret |= element->readProp(
- &style._fontEmphasisMark, OUSTR("FontEmphasisMark") );
+ &style._fontEmphasisMark, "FontEmphasisMark" );
ret |= element->readProp(
- &style._fontRelief, OUSTR("FontRelief") );
+ &style._fontRelief, "FontRelief" );
return ret;
}
@@ -67,34 +67,32 @@ void ElementDescriptor::readMultiPageModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id" , all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiPageValue") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- Any aDecorationAny( _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Decoration") ) ) );
+ readLongAttr( "MultiPageValue", XMLNS_DIALOGS_PREFIX ":value" );
+ Any aDecorationAny( _xProps->getPropertyValue( "Decoration" ) );
bool bDecoration = sal_True;
if ( (aDecorationAny >>= bDecoration) && !bDecoration )
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":withtabs") ), OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":withtabs", "false" );
readEvents();
uno::Reference< container::XNameContainer > xPagesContainer( _xProps, uno::UNO_QUERY );
if ( xPagesContainer.is() && xPagesContainer->getElementNames().getLength() )
{
- ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":bulletinboard") ), _xDocument );
+ ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument );
pElem->readBullitinBoard( all_styles );
addSubElement( pElem );
}
@@ -105,36 +103,32 @@ void ElementDescriptor::readFrameModel( StyleBag * all_styles )
// collect styles
Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
OUString aTitle;
- if ( readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ) ) >>= aTitle)
+ if ( readProp( "Label" ) >>= aTitle)
{
- ElementDescriptor * title = new ElementDescriptor(
- _xProps, _xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":title") ), _xDocument );
- title->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ),
- aTitle );
+ ElementDescriptor * title = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":title", _xDocument );
+ title->addAttribute( XMLNS_DIALOGS_PREFIX ":value", aTitle );
addSubElement( title );
}
uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY );
if ( xControlContainer.is() && xControlContainer->getElementNames().getLength() )
{
- ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":bulletinboard") ), _xDocument );
+ ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument );
pElem->readBullitinBoard( all_styles );
addSubElement( pElem );
}
@@ -145,30 +139,27 @@ void ElementDescriptor::readPageModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- rtl::OUString aTitle;
- readStringAttr(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":title") ) );
+ OUString aTitle;
+ readStringAttr( "Title", XMLNS_DIALOGS_PREFIX ":title" );
uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY );
if ( xControlContainer.is() && xControlContainer->getElementNames().getLength() )
{
- ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":bulletinboard") ), _xDocument );
+ ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument );
pElem->readBullitinBoard( all_styles );
addSubElement( pElem );
}
@@ -180,66 +171,54 @@ void ElementDescriptor::readButtonModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultButton") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":default") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readVerticalAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("VerticalAlign") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":valign") ) );
- readButtonTypeAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("PushButtonType") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":button-type") ) );
- readImageURLAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageURL") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-src") ) );
-
-
- readImagePositionAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImagePosition") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-position") ) );
- readImageAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageAlign") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-align") ) );
- if (extract_throw<bool>( _xProps->getPropertyValue( OUSTR("Repeat") ) ))
- readLongAttr( OUSTR("RepeatDelay"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":repeat"), true /* force */ );
- if (extract_throw<bool>( _xProps->getPropertyValue( OUSTR("Toggle") ) ))
- addAttribute( OUSTR(XMLNS_DIALOGS_PREFIX ":toggled"), OUSTR("1") );
- readBoolAttr( OUSTR("FocusOnClick"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":grab-focus") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiLine") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multiline") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "DefaultButton", XMLNS_DIALOGS_PREFIX ":default" );
+ readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
+ readButtonTypeAttr( "PushButtonType", XMLNS_DIALOGS_PREFIX ":button-type" );
+ readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
+
+
+ readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" );
+ readImageAlignAttr( "ImageAlign", XMLNS_DIALOGS_PREFIX ":image-align" );
+
+ if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
+ readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
+
+ if (extract_throw<bool>( _xProps->getPropertyValue( "Toggle" ) ))
+ addAttribute( XMLNS_DIALOGS_PREFIX ":toggled", "1" );
+
+ readBoolAttr( "FocusOnClick", XMLNS_DIALOGS_PREFIX ":grab-focus" );
+ readBoolAttr( "MultiLine",XMLNS_DIALOGS_PREFIX ":multiline" );
// State
sal_Int16 nState = 0;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("State") ) ) >>= nState)
+ if (readProp( "State" ) >>= nState)
{
switch (nState)
{
case 0:
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":checked") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "false" );
break;
case 1:
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":checked") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" );
break;
default:
OSL_FAIL( "### unexpected radio state!" );
@@ -255,57 +234,46 @@ void ElementDescriptor::readCheckBoxModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 | 0x40 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
- if (readProp( OUSTR("VisualEffect") ) >>= aStyle._visualEffect)
+ if (readProp( "VisualEffect" ) >>= aStyle._visualEffect)
aStyle._set |= 0x40;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readVerticalAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("VerticalAlign") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":valign") ) );
- readImageURLAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageURL") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-src") ) );
- readImagePositionAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImagePosition") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-position") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiLine") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multiline") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
+ readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
+ readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" );
+ readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
sal_Bool bTriState = sal_False;
- if ((readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TriState") ) ) >>= bTriState) && bTriState)
+ if ((readProp( "TriState" ) >>= bTriState) && bTriState)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tristate") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":tristate", "true" );
}
sal_Int16 nState = 0;
- if (_xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("State") ) ) >>= nState)
+ if (_xProps->getPropertyValue( "State" ) >>= nState)
{
switch (nState)
{
case 0:
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":checked") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "false" );
break;
case 1:
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":checked") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" );
break;
case 2: // tristate=true exported, checked omitted => dont know!
OSL_ENSURE( bTriState, "### detected tristate value, but TriState is not set!" );
@@ -323,11 +291,11 @@ void ElementDescriptor::readComboBoxModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -335,51 +303,35 @@ void ElementDescriptor::readComboBoxModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Autocomplete") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":autocomplete") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Dropdown") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MaxTextLen") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":maxlength") ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("LineCount") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":linecount") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readBoolAttr( "Autocomplete", XMLNS_DIALOGS_PREFIX ":autocomplete" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":spin" );
+ readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" );
+ readShortAttr( "LineCount", XMLNS_DIALOGS_PREFIX ":linecount" );
// Cell Range, Ref Cell etc.
- readDataAwareAttr( OUSTR(XMLNS_DIALOGS_PREFIX ":linked-cell") );
- readDataAwareAttr( OUSTR( XMLNS_DIALOGS_PREFIX ":source-cell-range") );
+ readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
+ readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":source-cell-range" );
// string item list
Sequence< OUString > itemValues;
- if ((readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("StringItemList") ) ) >>= itemValues) &&
- itemValues.getLength() > 0)
+ if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.getLength() > 0)
{
- ElementDescriptor * popup = new ElementDescriptor(
- _xProps, _xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":menupopup") ), _xDocument );
+ ElementDescriptor * popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument );
OUString const * pItemValues = itemValues.getConstArray();
for ( sal_Int32 nPos = 0; nPos < itemValues.getLength(); ++nPos )
{
- ElementDescriptor * item = new ElementDescriptor(
- _xProps, _xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":menuitem") ), _xDocument );
- item->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ),
- pItemValues[ nPos ] );
+ ElementDescriptor * item = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menuitem", _xDocument );
+ item->addAttribute( XMLNS_DIALOGS_PREFIX ":value", pItemValues[ nPos ] );
popup->addSubElement( item );
}
@@ -393,11 +345,11 @@ void ElementDescriptor::readListBoxModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -405,57 +357,43 @@ void ElementDescriptor::readListBoxModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiSelection") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multiselection") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Dropdown") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("LineCount") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":linecount") ) );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readDataAwareAttr( OUSTR(XMLNS_DIALOGS_PREFIX ":linked-cell") );
- readDataAwareAttr( OUSTR( XMLNS_DIALOGS_PREFIX ":source-cell-range") );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "MultiSelection", XMLNS_DIALOGS_PREFIX ":multiselection" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":spin" );
+ readShortAttr( "LineCount", XMLNS_DIALOGS_PREFIX ":linecount" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
+ readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":source-cell-range" );
// string item list
Sequence< OUString > itemValues;
- if ((readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("StringItemList") ) ) >>= itemValues) &&
- itemValues.getLength() > 0)
+ if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.getLength() > 0)
{
- ElementDescriptor * popup = new ElementDescriptor(
- _xProps, _xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":menupopup") ), _xDocument );
+ ElementDescriptor * popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument );
OUString const * pItemValues = itemValues.getConstArray();
sal_Int32 nPos;
for ( nPos = 0; nPos < itemValues.getLength(); ++nPos )
{
- ElementDescriptor * item = new ElementDescriptor(
- _xProps, _xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":menuitem") ), _xDocument );
- item->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ),
- pItemValues[ nPos ] );
+ ElementDescriptor * item = new ElementDescriptor(_xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menuitem", _xDocument );
+ item->addAttribute( XMLNS_DIALOGS_PREFIX ":value", pItemValues[ nPos ] );
popup->addSubElement( item );
}
Sequence< sal_Int16 > selected;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") ) ) >>= selected)
+ if (readProp( "SelectedItems" ) >>= selected)
{
sal_Int16 const * pSelected = selected.getConstArray();
for ( nPos = selected.getLength(); nPos--; )
{
ElementDescriptor * item = static_cast< ElementDescriptor * >(
popup->getSubElement( pSelected[ nPos ] ).get() );
- item->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":selected") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
+ item->addAttribute( XMLNS_DIALOGS_PREFIX ":selected", "true" );
}
}
@@ -469,60 +407,49 @@ void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 | 0x40 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
- if (readProp( OUSTR("VisualEffect") ) >>= aStyle._visualEffect)
+ if (readProp( "VisualEffect" ) >>= aStyle._visualEffect)
aStyle._set |= 0x40;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id" , all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readVerticalAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("VerticalAlign") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":valign") ) );
- readImageURLAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageURL") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-src") ) );
- readImagePositionAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImagePosition") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-position") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiLine") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multiline") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("GroupName") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":group-name") ) );
+ readBoolAttr("Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
+ readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
+ readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" );
+ readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
+ readStringAttr( "GroupName", XMLNS_DIALOGS_PREFIX ":group-name" );
sal_Int16 nState = 0;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("State") ) ) >>= nState)
+ if (readProp( "State" ) >>= nState)
{
switch (nState)
{
case 0:
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":checked") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) );
+ addAttribute(XMLNS_DIALOGS_PREFIX ":checked", "false" );
break;
case 1:
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":checked") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" );
break;
default:
OSL_FAIL( "### unexpected radio state!" );
break;
}
}
- readDataAwareAttr( OUSTR(XMLNS_DIALOGS_PREFIX ":linked-cell") );
+ readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -531,29 +458,25 @@ void ElementDescriptor::readGroupBoxModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x2 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
OUString aTitle;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ) ) >>= aTitle)
+ if (readProp( "Label" ) >>= aTitle)
{
- ElementDescriptor * title = new ElementDescriptor(
- _xProps, _xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":title") ), _xDocument );
- title->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ),
- aTitle );
+ ElementDescriptor * title = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":title", _xDocument );
+ title->addAttribute( XMLNS_DIALOGS_PREFIX ":value", aTitle );
addSubElement( title );
}
@@ -565,11 +488,11 @@ void ElementDescriptor::readFixedTextModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -577,24 +500,17 @@ void ElementDescriptor::readFixedTextModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readVerticalAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("VerticalAlign") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":valign") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiLine") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multiline") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("NoLabel") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":nolabel") ) );
+ readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
+ readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "NoLabel", XMLNS_DIALOGS_PREFIX ":nolabel" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -603,11 +519,11 @@ void ElementDescriptor::readFixedHyperLinkModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -615,28 +531,19 @@ void ElementDescriptor::readFixedHyperLinkModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("URL") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":url") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Description") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":description") ) );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readVerticalAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("VerticalAlign") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":valign") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiLine") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multiline") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("NoLabel") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":nolabel") ) );
+ readStringAttr( "Label",XMLNS_DIALOGS_PREFIX ":value" );
+ readStringAttr( "URL", XMLNS_DIALOGS_PREFIX ":url" );
+ readStringAttr( "Description", XMLNS_DIALOGS_PREFIX ":description" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
+ readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "NoLabel", XMLNS_DIALOGS_PREFIX ":nolabel" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -645,11 +552,11 @@ void ElementDescriptor::readEditModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -657,42 +564,29 @@ void ElementDescriptor::readEditModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("HardLineBreaks") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":hard-linebreaks") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("HScroll") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":hscroll") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("VScroll") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":vscroll") ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MaxTextLen") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":maxlength") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiLine") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multiline") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readLineEndFormatAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("LineEndFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":lineend-format") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readBoolAttr( "HardLineBreaks", XMLNS_DIALOGS_PREFIX ":hard-linebreaks" );
+ readBoolAttr( "HScroll", XMLNS_DIALOGS_PREFIX ":hscroll" );
+ readBoolAttr( "VScroll", XMLNS_DIALOGS_PREFIX ":vscroll" );
+ readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" );
+ readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" );
+ readLineEndFormatAttr( "LineEndFormat", XMLNS_DIALOGS_PREFIX ":lineend-format" );
sal_Int16 nEcho = 0;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("EchoChar") ) ) >>= nEcho)
+ if (readProp( "EchoChar" ) >>= nEcho)
{
sal_Unicode cEcho = (sal_Unicode)nEcho;
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":echochar") ),
- OUString( &cEcho, 1 ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":echochar", OUString( &cEcho, 1 ) );
}
- readDataAwareAttr( OUSTR(XMLNS_DIALOGS_PREFIX ":linked-cell") );
+ readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -701,24 +595,20 @@ void ElementDescriptor::readImageControlModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x4 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleImage") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":scale-image") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readImageURLAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageURL") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":src") ) );
+ readBoolAttr( "ScaleImage", XMLNS_DIALOGS_PREFIX ":scale-image" );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":src" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -727,11 +617,11 @@ void ElementDescriptor::readFileControlModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -739,20 +629,15 @@ void ElementDescriptor::readFileControlModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -761,35 +646,26 @@ void ElementDescriptor::readTreeControlModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readSelectionTypeAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionType") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":selectiontype") ) );
-
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("RootDisplayed") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":rootdisplayed") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ShowsHandles") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":showshandles") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ShowsRootHandles") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":showsroothandles") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Editable") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":editable") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("InvokesStopNodeEditing") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":invokesstopnodeediting") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("RowHeight") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":rowheight") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readSelectionTypeAttr( "SelectionType", XMLNS_DIALOGS_PREFIX ":selectiontype" );
+
+ readBoolAttr( "RootDisplayed", XMLNS_DIALOGS_PREFIX ":rootdisplayed" );
+ readBoolAttr( "ShowsHandles", XMLNS_DIALOGS_PREFIX ":showshandles" );
+ readBoolAttr( "ShowsRootHandles", XMLNS_DIALOGS_PREFIX ":showsroothandles" );
+ readBoolAttr( "Editable", XMLNS_DIALOGS_PREFIX ":editable" );
+ readBoolAttr( "InvokesStopNodeEditing", XMLNS_DIALOGS_PREFIX ":invokesstopnodeediting" );
+ readLongAttr( "RowHeight", XMLNS_DIALOGS_PREFIX ":rowheight" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -798,11 +674,11 @@ void ElementDescriptor::readCurrencyFieldModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -810,44 +686,27 @@ void ElementDescriptor::readCurrencyFieldModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("StrictFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":strict-format") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("CurrencySymbol") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":currency-symbol") ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("DecimalAccuracy") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":decimal-accuracy") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ShowThousandsSeparator") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":thousands-separator") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Value") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ValueMin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-min") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ValueMax") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-max") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ValueStep") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-step") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
- if (extract_throw<bool>( _xProps->getPropertyValue( OUSTR("Repeat") ) ))
- readLongAttr( OUSTR("RepeatDelay"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":repeat"), true /* force */ );
- readBoolAttr(
- OUString( RTL_CONSTASCII_USTRINGPARAM("PrependCurrencySymbol") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":prepend-symbol") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EnforceFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":enforce-format") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
+ readStringAttr( "CurrencySymbol", XMLNS_DIALOGS_PREFIX ":currency-symbol" );
+ readShortAttr( "DecimalAccuracy", XMLNS_DIALOGS_PREFIX ":decimal-accuracy" );
+ readBoolAttr( "ShowThousandsSeparator", XMLNS_DIALOGS_PREFIX ":thousands-separator" );
+ readDoubleAttr( "Value", XMLNS_DIALOGS_PREFIX ":value" );
+ readDoubleAttr( "ValueMin", XMLNS_DIALOGS_PREFIX ":value-min" );
+ readDoubleAttr( "ValueMax", XMLNS_DIALOGS_PREFIX ":value-max" );
+ readDoubleAttr( "ValueStep", XMLNS_DIALOGS_PREFIX ":value-step" );
+ readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
+ if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
+ readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
+ readBoolAttr("PrependCurrencySymbol", XMLNS_DIALOGS_PREFIX ":prepend-symbol" );
+ readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -856,11 +715,11 @@ void ElementDescriptor::readDateFieldModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -868,41 +727,26 @@ void ElementDescriptor::readDateFieldModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("StrictFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":strict-format") ) );
- readDateFormatAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("DateFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":date-format") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("DateShowCentury") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":show-century") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Date") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("DateMin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-min") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("DateMax") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-max") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
- if (extract_throw<bool>( _xProps->getPropertyValue( OUSTR("Repeat") ) ))
- readLongAttr( OUSTR("RepeatDelay"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":repeat"), true /* force */ );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Dropdown") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":dropdown") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":text") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EnforceFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":enforce-format") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
+ readDateFormatAttr( "DateFormat", XMLNS_DIALOGS_PREFIX ":date-format" );
+ readBoolAttr( "DateShowCentury", XMLNS_DIALOGS_PREFIX ":show-century" );
+ readLongAttr( "Date", XMLNS_DIALOGS_PREFIX ":value" );
+ readLongAttr( "DateMin", XMLNS_DIALOGS_PREFIX ":value-min" );
+ readLongAttr( "DateMax", XMLNS_DIALOGS_PREFIX ":value-max" );
+ readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
+ if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
+ readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
+ readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":dropdown" );
+ readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" );
+ readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -911,11 +755,11 @@ void ElementDescriptor::readNumericFieldModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -923,39 +767,25 @@ void ElementDescriptor::readNumericFieldModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("StrictFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":strict-format") ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("DecimalAccuracy") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":decimal-accuracy") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ShowThousandsSeparator") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":thousands-separator") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Value") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ValueMin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-min") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ValueMax") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-max") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ValueStep") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-step") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
- if (extract_throw<bool>( _xProps->getPropertyValue( OUSTR("Repeat") ) ))
- readLongAttr( OUSTR("RepeatDelay"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":repeat"), true /* force */ );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EnforceFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":enforce-format") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
+ readShortAttr( "DecimalAccuracy", XMLNS_DIALOGS_PREFIX ":decimal-accuracy" );
+ readBoolAttr( "ShowThousandsSeparator", XMLNS_DIALOGS_PREFIX ":thousands-separator" );
+ readDoubleAttr( "Value", XMLNS_DIALOGS_PREFIX ":value" );
+ readDoubleAttr( "ValueMin", XMLNS_DIALOGS_PREFIX ":value-min" );
+ readDoubleAttr( "ValueMax", XMLNS_DIALOGS_PREFIX ":value-max" );
+ readDoubleAttr( "ValueStep", XMLNS_DIALOGS_PREFIX ":value-step" );
+ readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
+ if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
+ readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
+ readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -964,11 +794,11 @@ void ElementDescriptor::readTimeFieldModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -976,37 +806,24 @@ void ElementDescriptor::readTimeFieldModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("StrictFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":strict-format") ) );
- readTimeFormatAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("TimeFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":time-format") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Time") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("TimeMin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-min") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("TimeMax") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-max") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
- if (extract_throw<bool>( _xProps->getPropertyValue( OUSTR("Repeat") ) ))
- readLongAttr( OUSTR("RepeatDelay"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":repeat"), true /* force */ );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":text") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EnforceFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":enforce-format") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop");
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
+ readTimeFormatAttr( "TimeFormat", XMLNS_DIALOGS_PREFIX ":time-format" );
+ readLongAttr( "Time", XMLNS_DIALOGS_PREFIX ":value" );
+ readLongAttr( "TimeMin", XMLNS_DIALOGS_PREFIX ":value-min" );
+ readLongAttr( "TimeMax", XMLNS_DIALOGS_PREFIX ":value-max" );
+ readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
+ if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
+ readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
+ readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" );
+ readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -1015,11 +832,11 @@ void ElementDescriptor::readPatternFieldModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -1027,28 +844,19 @@ void ElementDescriptor::readPatternFieldModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("StrictFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":strict-format") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MaxTextLen") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":maxlength") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EditMask") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":edit-mask") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("LiteralMask") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":literal-mask") ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
+ readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" );
+ readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" );
+ readStringAttr( "EditMask", XMLNS_DIALOGS_PREFIX ":edit-mask" );
+ readStringAttr( "LiteralMask", XMLNS_DIALOGS_PREFIX ":literal-mask" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -1057,11 +865,11 @@ void ElementDescriptor::readFormattedFieldModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
@@ -1069,71 +877,51 @@ void ElementDescriptor::readFormattedFieldModel( StyleBag * all_styles )
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":readonly") ) );
- readBoolAttr( OUSTR("HideInactiveSelection"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":hide-inactive-selection") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("StrictFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":strict-format") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":text") ) );
- readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("MaxTextLen") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":maxlength") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
- if (extract_throw<bool>( _xProps->getPropertyValue( OUSTR("Repeat") ) ))
- readLongAttr( OUSTR("RepeatDelay"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":repeat"), true /* force */ );
-
- Any a( readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("EffectiveDefault") ) ) );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
+ readBoolAttr( "HideInactiveSelection",XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
+ readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
+ readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" );
+ readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
+ readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" );
+ readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
+ if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
+ readLongAttr( "RepeatDelay",XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
+
+ Any a( readProp( "EffectiveDefault" ) );
switch (a.getValueTypeClass())
{
case TypeClass_DOUBLE:
- addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-default") ),
- OUString::valueOf( *(double const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", OUString::valueOf( *(double const *)a.getValue() ) );
break;
case TypeClass_STRING:
- addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-default") ),
- *(OUString const *)a.getValue() );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", *(OUString const *)a.getValue() );
break;
default:
break;
}
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EffectiveMin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-min") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EffectiveMax") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-max") ) );
- readDoubleAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EffectiveValue") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
+ readDoubleAttr( "EffectiveMin", XMLNS_DIALOGS_PREFIX ":value-min" );
+ readDoubleAttr( "EffectiveMax", XMLNS_DIALOGS_PREFIX ":value-max" );
+ readDoubleAttr( "EffectiveValue", XMLNS_DIALOGS_PREFIX ":value" );
// format spec
sal_Int32 nKey = 0;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("FormatKey") ) ) >>= nKey)
+ if (readProp( "FormatKey" ) >>= nKey)
{
Reference< util::XNumberFormatsSupplier > xSupplier;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("FormatsSupplier") ) ) >>= xSupplier)
+ if (readProp( "FormatsSupplier" ) >>= xSupplier)
{
addNumberFormatAttr(
xSupplier->getNumberFormats()->getByKey( nKey ) );
}
}
- readBoolAttr(
- OUString( RTL_CONSTASCII_USTRINGPARAM("TreatAsNumber") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":treat-as-number") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("EnforceFormat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":enforce-format") ) );
+ readBoolAttr( "TreatAsNumber", XMLNS_DIALOGS_PREFIX ":treat-as-number" );
+ readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
readEvents();
}
@@ -1143,36 +931,27 @@ void ElementDescriptor::readSpinButtonModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x4 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readOrientationAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Orientation") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SpinIncrement") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":increment") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SpinValue") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":curval") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SpinValueMax") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":maxval") ) );
- readLongAttr( OUSTR("SpinValueMin"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":minval") );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Repeat") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":repeat") ) );
- readLongAttr( OUSTR("RepeatDelay"), OUSTR(XMLNS_DIALOGS_PREFIX ":repeat-delay") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readHexLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SymbolColor") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":symbol-color") ) );
- readDataAwareAttr( OUSTR(XMLNS_DIALOGS_PREFIX ":linked-cell") );
+ readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" );
+ readLongAttr( "SpinIncrement", XMLNS_DIALOGS_PREFIX ":increment" );
+ readLongAttr( "SpinValue", XMLNS_DIALOGS_PREFIX ":curval" );
+ readLongAttr( "SpinValueMax", XMLNS_DIALOGS_PREFIX ":maxval" );
+ readLongAttr( "SpinValueMin", XMLNS_DIALOGS_PREFIX ":minval" );
+ readLongAttr( "Repeat", XMLNS_DIALOGS_PREFIX ":repeat" );
+ readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat-delay" );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readHexLongAttr( "SymbolColor", XMLNS_DIALOGS_PREFIX ":symbol-color" );
+ readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
readEvents();
}
@@ -1182,24 +961,21 @@ void ElementDescriptor::readFixedLineModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x2 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readOrientationAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Orientation") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
+ readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
+ readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -1208,26 +984,22 @@ void ElementDescriptor::readProgressBarModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x4 | 0x10 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("FillColor") ) ) >>= aStyle._descr)
+ if (readProp( "FillColor" ) >>= aStyle._descr)
aStyle._set |= 0x10;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ProgressValueMin") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-min") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ProgressValueMax") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-max") ) );
+ readLongAttr( "ProgressValue", XMLNS_DIALOGS_PREFIX ":value" );
+ readLongAttr( "ProgressValueMin", XMLNS_DIALOGS_PREFIX ":value-min" );
+ readLongAttr( "ProgressValueMax", XMLNS_DIALOGS_PREFIX ":value-max" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -1236,40 +1008,29 @@ void ElementDescriptor::readScrollBarModel( StyleBag * all_styles )
{
// collect styles
Style aStyle( 0x1 | 0x4 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
if (readBorderProps( this, aStyle ))
aStyle._set |= 0x4;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults();
- readOrientationAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Orientation") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("BlockIncrement") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":pageincrement") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("LineIncrement") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":increment") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ScrollValue") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":curpos") ) );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":maxpos") ) );
- readLongAttr( OUSTR("ScrollValueMin"),
- OUSTR(XMLNS_DIALOGS_PREFIX ":minpos") );
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("VisibleSize") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":visible-size") ) );
- readLongAttr( OUSTR("RepeatDelay"), OUSTR(XMLNS_DIALOGS_PREFIX ":repeat") );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
- readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("LiveScroll") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":live-scroll") ) );
- readHexLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SymbolColor") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":symbol-color") ) );
- readDataAwareAttr( OUSTR(XMLNS_DIALOGS_PREFIX ":linked-cell") );
+ readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" );
+ readLongAttr( "BlockIncrement", XMLNS_DIALOGS_PREFIX ":pageincrement" );
+ readLongAttr( "LineIncrement", XMLNS_DIALOGS_PREFIX ":increment" );
+ readLongAttr( "ScrollValue", XMLNS_DIALOGS_PREFIX ":curpos" );
+ readLongAttr( "ScrollValueMax", XMLNS_DIALOGS_PREFIX ":maxpos" );
+ readLongAttr( "ScrollValueMin", XMLNS_DIALOGS_PREFIX ":minpos" );
+ readLongAttr( "VisibleSize", XMLNS_DIALOGS_PREFIX ":visible-size" );
+ readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat" );
+ readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
+ readBoolAttr( "LiveScroll", XMLNS_DIALOGS_PREFIX ":live-scroll" );
+ readHexLongAttr( "SymbolColor", XMLNS_DIALOGS_PREFIX ":symbol-color" );
+ readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
readEvents();
}
//__________________________________________________________________________________________________
@@ -1277,49 +1038,36 @@ void ElementDescriptor::readDialogModel( StyleBag * all_styles )
SAL_THROW( (Exception) )
{
// collect elements
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("xmlns:" XMLNS_DIALOGS_PREFIX) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_URI) ) );
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("xmlns:" XMLNS_SCRIPT_PREFIX) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_URI) ) );
+ addAttribute( "xmlns:" XMLNS_DIALOGS_PREFIX, XMLNS_DIALOGS_URI );
+ addAttribute( "xmlns:" XMLNS_SCRIPT_PREFIX, XMLNS_SCRIPT_URI );
// collect styles
Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= aStyle._backgroundColor)
+ if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
aStyle._set |= 0x1;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ) ) >>= aStyle._textColor)
+ if (readProp( "TextColor" ) >>= aStyle._textColor)
aStyle._set |= 0x2;
- if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ) ) >>= aStyle._textLineColor)
+ if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
aStyle._set |= 0x20;
if (readFontProps( this, aStyle ))
aStyle._set |= 0x8;
if (aStyle._set)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ),
- all_styles->getStyleId( aStyle ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
}
// collect elements
readDefaults( false, false );
- readBoolAttr(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Closeable") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":closeable") ) );
- readBoolAttr(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Moveable") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":moveable") ) );
- readBoolAttr(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Sizeable") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":resizeable") ) );
- readStringAttr(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":title") ) );
-
- Any aDecorationAny( _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Decoration") ) ) );
+ readBoolAttr("Closeable", XMLNS_DIALOGS_PREFIX ":closeable" );
+ readBoolAttr( "Moveable", XMLNS_DIALOGS_PREFIX ":moveable" );
+ readBoolAttr( "Sizeable", XMLNS_DIALOGS_PREFIX ":resizeable" );
+ readStringAttr( "Title", XMLNS_DIALOGS_PREFIX ":title" );
+
+ Any aDecorationAny( _xProps->getPropertyValue( "Decoration" ) );
bool bDecoration = sal_False;
if ( (aDecorationAny >>= bDecoration) && !bDecoration )
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":withtitlebar") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) );
- readImageURLAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageURL") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-src") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":withtitlebar", "false" );
+ readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
readEvents();
}
@@ -1357,19 +1105,15 @@ void ElementDescriptor::readBullitinBoard( StyleBag * all_styles )
ElementDescriptor * pElem = 0;
// group up radio buttons
- if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlRadioButtonModel") ) ) )
+ if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) )
{
if (! pRadioGroup) // open radiogroup
{
- pRadioGroup = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":radiogroup") ), _xDocument );
+ pRadioGroup = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":radiogroup", _xDocument );
all_elements.push_back( pRadioGroup );
}
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":radio") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":radio", _xDocument );
pElem->readRadioButtonModel( all_styles );
pRadioGroup->addSubElement( pElem );
}
@@ -1377,173 +1121,125 @@ void ElementDescriptor::readBullitinBoard( StyleBag * all_styles )
{
pRadioGroup = 0; // close radiogroup
- if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlButtonModel") ) ) )
+ if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlButtonModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":button") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":button", _xDocument );
pElem->readButtonModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":checkbox") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":checkbox", _xDocument );
pElem->readCheckBoxModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlComboBoxModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":combobox") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":combobox", _xDocument );
pElem->readComboBoxModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlListBoxModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":menulist") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":menulist", _xDocument );
pElem->readListBoxModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":titledbox") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":titledbox", _xDocument );
pElem->readGroupBoxModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoMultiPageModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multipage") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":multipage", _xDocument );
pElem->readMultiPageModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoFrameModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoFrameModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":frame") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":frame", _xDocument );
pElem->readFrameModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoPageModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoPageModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":page") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":page", _xDocument );
pElem->readPageModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":text") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":text", _xDocument );
pElem->readFixedTextModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlEditModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlEditModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":textfield") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":textfield", _xDocument );
pElem->readEditModel( all_styles );
}
// FixedHyperLink
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedHyperlinkModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":linklabel") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":linklabel", _xDocument );
pElem->readFixedHyperLinkModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlImageControlModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":img") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":img", _xDocument );
pElem->readImageControlModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFileControlModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFileControlModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":filecontrol") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":filecontrol", _xDocument );
pElem->readFileControlModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.tree.TreeControlModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.tree.TreeControlModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":treecontrol") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":treecontrol", _xDocument );
pElem->readTreeControlModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCurrencyFieldModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCurrencyFieldModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":currencyfield") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":currencyfield", _xDocument );
pElem->readCurrencyFieldModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlDateFieldModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlDateFieldModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":datefield") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":datefield", _xDocument );
pElem->readDateFieldModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlNumericFieldModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlNumericFieldModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":numericfield") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":numericfield", _xDocument );
pElem->readNumericFieldModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlTimeFieldModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlTimeFieldModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":timefield") ) , _xDocument);
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":timefield", _xDocument);
pElem->readTimeFieldModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlPatternFieldModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlPatternFieldModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":patternfield") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":patternfield", _xDocument );
pElem->readPatternFieldModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFormattedFieldModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":formattedfield") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":formattedfield", _xDocument );
pElem->readFormattedFieldModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedLineModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedLineModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":fixedline") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":fixedline", _xDocument );
pElem->readFixedLineModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlScrollBarModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlScrollBarModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":scrollbar") ), _xDocument );
+ pElem = new ElementDescriptor(xProps, xPropState, XMLNS_DIALOGS_PREFIX ":scrollbar", _xDocument );
pElem->readScrollBarModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlSpinButtonModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlSpinButtonModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spinbutton") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":spinbutton", _xDocument );
pElem->readSpinButtonModel( all_styles );
}
- else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ) ) )
+ else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlProgressBarModel" ) )
{
- pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":progressmeter") ), _xDocument );
+ pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":progressmeter", _xDocument );
pElem->readProgressBarModel( all_styles );
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 89348e716732..daaf6a27e0a0 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -71,11 +71,10 @@ namespace xmlscript
//__________________________________________________________________________________________________
Reference< xml::sax::XAttributeList > Style::createElement()
{
- ElementDescriptor * pStyle = new ElementDescriptor(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style") ) );
+ ElementDescriptor * pStyle = new ElementDescriptor( XMLNS_DIALOGS_PREFIX ":style" );
// style-id
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":style-id") ), _id );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", _id );
// background-color
if (_set & 0x1)
@@ -84,8 +83,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
buf.append( (sal_Unicode)'0' );
buf.append( (sal_Unicode)'x' );
buf.append( OUString::valueOf( (sal_Int64)(sal_uInt64)_backgroundColor, 16 ) );
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":background-color") ),
- buf.makeStringAndClear() );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":background-color", buf.makeStringAndClear() );
}
// text-color
@@ -95,8 +93,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
buf.append( (sal_Unicode)'0' );
buf.append( (sal_Unicode)'x' );
buf.append( OUString::valueOf( (sal_Int64)(sal_uInt64)_textColor, 16 ) );
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":text-color") ),
- buf.makeStringAndClear() );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":text-color", buf.makeStringAndClear() );
}
// textline-color
@@ -106,8 +103,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
buf.append( (sal_Unicode)'0' );
buf.append( (sal_Unicode)'x' );
buf.append( OUString::valueOf( (sal_Int64)(sal_uInt64)_textLineColor, 16 ) );
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":textline-color") ),
- buf.makeStringAndClear() );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":textline-color", buf.makeStringAndClear() );
}
// fill-color
@@ -117,8 +113,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
buf.append( (sal_Unicode)'0' );
buf.append( (sal_Unicode)'x' );
buf.append( OUString::valueOf( (sal_Int64)(sal_uInt64)_fillColor, 16 ) );
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":fill-color") ),
- buf.makeStringAndClear() );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":fill-color", buf.makeStringAndClear() );
}
// border
@@ -127,24 +122,19 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_border)
{
case BORDER_NONE:
- pStyle->addAttribute( OUSTR(XMLNS_DIALOGS_PREFIX ":border"),
- OUSTR("none") );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":border", "none" );
break;
case BORDER_3D:
- pStyle->addAttribute( OUSTR(XMLNS_DIALOGS_PREFIX ":border"),
- OUSTR("3d") );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":border", "3d" );
break;
case BORDER_SIMPLE:
- pStyle->addAttribute( OUSTR(XMLNS_DIALOGS_PREFIX ":border"),
- OUSTR("simple") );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":border", "simple" );
break;
case BORDER_SIMPLE_COLOR: {
OUStringBuffer buf;
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") );
- buf.append( OUString::valueOf(
- (sal_Int64)(sal_uInt64)_borderColor, 16 ) );
- pStyle->addAttribute( OUSTR(XMLNS_DIALOGS_PREFIX ":border"),
- buf.makeStringAndClear() );
+ buf.appendAscii( "0x" );
+ buf.append( OUString::valueOf((sal_Int64)(sal_uInt64)_borderColor, 16 ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":border", buf.makeStringAndClear() );
break;
}
default:
@@ -159,16 +149,13 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_visualEffect)
{
case awt::VisualEffect::NONE:
- pStyle->addAttribute( OUSTR(XMLNS_DIALOGS_PREFIX ":look"),
- OUSTR("none") );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":look", "none" );
break;
case awt::VisualEffect::LOOK3D:
- pStyle->addAttribute( OUSTR(XMLNS_DIALOGS_PREFIX ":look"),
- OUSTR("3d") );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":look", "3d" );
break;
case awt::VisualEffect::FLAT:
- pStyle->addAttribute( OUSTR(XMLNS_DIALOGS_PREFIX ":look"),
- OUSTR("simple") );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":look", "simple" );
break;
default:
OSL_FAIL( "### unexpected visual effect value!" );
@@ -184,26 +171,22 @@ Reference< xml::sax::XAttributeList > Style::createElement()
// dialog:font-name CDATA #IMPLIED
if (def_descr.Name != _descr.Name)
{
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-name") ),
- _descr.Name );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-name", _descr.Name );
}
// dialog:font-height %numeric; #IMPLIED
if (def_descr.Height != _descr.Height)
{
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-height") ),
- OUString::valueOf( (sal_Int32)_descr.Height ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-height", OUString::valueOf( (sal_Int32)_descr.Height ) );
}
// dialog:font-width %numeric; #IMPLIED
if (def_descr.Width != _descr.Width)
{
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-width") ),
- OUString::valueOf( (sal_Int32)_descr.Width ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-width", OUString::valueOf( (sal_Int32)_descr.Width ) );
}
// dialog:font-stylename CDATA #IMPLIED
if (def_descr.StyleName != _descr.StyleName)
{
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-stylename") ),
- _descr.StyleName );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-stylename", _descr.StyleName );
}
// dialog:font-family "(decorative|modern|roman|script|swiss|system)" #IMPLIED
if (def_descr.Family != _descr.Family)
@@ -211,28 +194,22 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_descr.Family)
{
case awt::FontFamily::DECORATIVE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-family") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("decorative") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "decorative" );
break;
case awt::FontFamily::MODERN:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-family") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("modern") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "modern" );
break;
case awt::FontFamily::ROMAN:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-family") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("roman") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "roman" );
break;
case awt::FontFamily::SCRIPT:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-family") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("script") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "script" );
break;
case awt::FontFamily::SWISS:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-family") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("swiss") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "swiss" );
break;
case awt::FontFamily::SYSTEM:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-family") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("system") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "system" );
break;
default:
OSL_FAIL( "### unexpected font-family!" );
@@ -245,44 +222,34 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_descr.CharSet)
{
case awt::CharSet::ANSI:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("ansi") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ansi" );
break;
case awt::CharSet::MAC:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("mac") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "mac" );
break;
case awt::CharSet::IBMPC_437:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("ibmpc_437") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_437" );
break;
case awt::CharSet::IBMPC_850:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("ibmpc_850") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_850" );
break;
case awt::CharSet::IBMPC_860:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("ibmpc_860") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_860" );
break;
case awt::CharSet::IBMPC_861:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("ibmpc_861") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_861" );
break;
case awt::CharSet::IBMPC_863:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("ibmpc_863") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_863" );
break;
case awt::CharSet::IBMPC_865:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("ibmpc_865") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_865" );
break;
case awt::CharSet::SYSTEM:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("system") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "system" );
break;
case awt::CharSet::SYMBOL:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charset") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("symbol") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "symbol" );
break;
default:
OSL_FAIL( "### unexpected font-charset!" );
@@ -295,12 +262,10 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_descr.Pitch)
{
case awt::FontPitch::FIXED:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-pitch") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("fixed") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-pitch", "fixed" );
break;
case awt::FontPitch::VARIABLE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-pitch") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("variable") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-pitch", "variable" );
break;
default:
OSL_FAIL( "### unexpected font-pitch!" );
@@ -310,14 +275,12 @@ Reference< xml::sax::XAttributeList > Style::createElement()
// dialog:font-charwidth CDATA #IMPLIED
if (def_descr.CharacterWidth != _descr.CharacterWidth)
{
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-charwidth") ),
- OUString::valueOf( (float)_descr.CharacterWidth ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charwidth", OUString::valueOf( (float)_descr.CharacterWidth ) );
}
// dialog:font-weight CDATA #IMPLIED
if (def_descr.Weight != _descr.Weight)
{
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-weight") ),
- OUString::valueOf( (float)_descr.Weight ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-weight", OUString::valueOf( (float)_descr.Weight ) );
}
// dialog:font-slant "(oblique|italic|reverse_oblique|reverse_italic)" #IMPLIED
if (def_descr.Slant != _descr.Slant)
@@ -325,20 +288,16 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_descr.Slant)
{
case awt::FontSlant_OBLIQUE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-slant") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("oblique") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "oblique" );
break;
case awt::FontSlant_ITALIC:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-slant") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("italic") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "italic" );
break;
case awt::FontSlant_REVERSE_OBLIQUE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-slant") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("reverse_oblique") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "reverse_oblique" );
break;
case awt::FontSlant_REVERSE_ITALIC:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-slant") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("reverse_italic") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "reverse_italic" );
break;
default:
OSL_FAIL( "### unexpected font-slant!" );
@@ -351,72 +310,55 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_descr.Underline)
{
case awt::FontUnderline::SINGLE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("single") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "single" );
break;
case awt::FontUnderline::DOUBLE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("double") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "double" );
break;
case awt::FontUnderline::DOTTED:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("dotted") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "dotted" );
break;
case awt::FontUnderline::DASH:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("dash") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "dash" );
break;
case awt::FontUnderline::LONGDASH:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("longdash") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "longdash" );
break;
case awt::FontUnderline::DASHDOT:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("dashdot") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "dashdot" );
break;
case awt::FontUnderline::DASHDOTDOT:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("dashdotdot") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "dashdotdot" );
break;
case awt::FontUnderline::SMALLWAVE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("smallwave") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "smallwave" );
break;
case awt::FontUnderline::WAVE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("wave") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "wave" );
break;
case awt::FontUnderline::DOUBLEWAVE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("doublewave") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "doublewave" );
break;
case awt::FontUnderline::BOLD:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("bold") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bold" );
break;
case awt::FontUnderline::BOLDDOTTED:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("bolddotted") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bolddotted" );
break;
case awt::FontUnderline::BOLDDASH:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("bolddash") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bolddash" );
break;
case awt::FontUnderline::BOLDLONGDASH:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("boldlongdash") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "boldlongdash" );
break;
case awt::FontUnderline::BOLDDASHDOT:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("bolddashdot") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bolddashdot" );
break;
case awt::FontUnderline::BOLDDASHDOTDOT:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("bolddashdotdot") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bolddashdotdot" );
break;
case awt::FontUnderline::BOLDWAVE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-underline") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("boldwave") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "boldwave" );
break;
default:
OSL_FAIL( "### unexpected font-underline!" );
@@ -429,24 +371,19 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_descr.Strikeout)
{
case awt::FontStrikeout::SINGLE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-strikeout") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("single") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "single" );
break;
case awt::FontStrikeout::DOUBLE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-strikeout") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("double") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "double" );
break;
case awt::FontStrikeout::BOLD:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-strikeout") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("bold") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "bold" );
break;
case awt::FontStrikeout::SLASH:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-strikeout") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("slash") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "slash" );
break;
case awt::FontStrikeout::X:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-strikeout") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("x") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "x" );
break;
default:
OSL_FAIL( "### unexpected font-strikeout!" );
@@ -456,20 +393,17 @@ Reference< xml::sax::XAttributeList > Style::createElement()
// dialog:font-orientation CDATA #IMPLIED
if (def_descr.Orientation != _descr.Orientation)
{
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-orientation") ),
- OUString::valueOf( (float)_descr.Orientation ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-orientation", OUString::valueOf( (float)_descr.Orientation ) );
}
// dialog:font-kerning %boolean; #IMPLIED
if ((def_descr.Kerning != sal_False) != (_descr.Kerning != sal_False))
{
- pStyle->addBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-kerning") ),
- _descr.Kerning );
+ pStyle->addBoolAttr( XMLNS_DIALOGS_PREFIX ":font-kerning", _descr.Kerning );
}
// dialog:font-wordlinemode %boolean; #IMPLIED
if ((def_descr.WordLineMode != sal_False) != (_descr.WordLineMode != sal_False))
{
- pStyle->addBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-wordlinemode") ),
- _descr.WordLineMode );
+ pStyle->addBoolAttr( XMLNS_DIALOGS_PREFIX ":font-wordlinemode", _descr.WordLineMode );
}
// dialog:font-type "(raster|device|scalable)" #IMPLIED
if (def_descr.Type != _descr.Type)
@@ -477,16 +411,13 @@ Reference< xml::sax::XAttributeList > Style::createElement()
switch (_descr.Type)
{
case awt::FontType::RASTER:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-type") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("raster") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-type", "raster" );
break;
case awt::FontType::DEVICE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-type") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("device") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-type", "device" );
break;
case awt::FontType::SCALABLE:
- pStyle->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-type") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("scalable") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-type", "scalable" );
break;
default:
OSL_FAIL( "### unexpected font-type!" );
@@ -501,14 +432,10 @@ Reference< xml::sax::XAttributeList > Style::createElement()
case awt::FontRelief::NONE: // dont export default
break;
case awt::FontRelief::EMBOSSED:
- pStyle->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-relief") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("embossed") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-relief", "embossed" );
break;
case awt::FontRelief::ENGRAVED:
- pStyle->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-relief") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("engraved") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-relief", "engraved" );
break;
default:
OSL_FAIL( "### unexpected font-relief!" );
@@ -520,34 +447,22 @@ Reference< xml::sax::XAttributeList > Style::createElement()
case awt::FontEmphasisMark::NONE: // dont export default
break;
case awt::FontEmphasisMark::DOT:
- pStyle->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-emphasismark") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("dot") ) );
+ pStyle->addAttribute(XMLNS_DIALOGS_PREFIX ":font-emphasismark", "dot" );
break;
case awt::FontEmphasisMark::CIRCLE:
- pStyle->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-emphasismark") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("circle") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "circle" );
break;
case awt::FontEmphasisMark::DISC:
- pStyle->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-emphasismark") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("disc") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "disc" );
break;
case awt::FontEmphasisMark::ACCENT:
- pStyle->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-emphasismark") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("accent") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "accent" );
break;
case awt::FontEmphasisMark::ABOVE:
- pStyle->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-emphasismark") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("above") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "above" );
break;
case awt::FontEmphasisMark::BELOW:
- pStyle->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":font-emphasismark") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("below") ) );
+ pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "below" );
break;
default:
OSL_FAIL( "### unexpected font-emphasismark!" );
@@ -567,12 +482,10 @@ void ElementDescriptor::addNumberFormatAttr(
Reference< beans::XPropertyState > xState( xFormatProperties, UNO_QUERY );
OUString sFormat;
lang::Locale locale;
- OSL_VERIFY( xFormatProperties->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("FormatString") ) ) >>= sFormat );
- OSL_VERIFY( xFormatProperties->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Locale") ) ) >>= locale );
+ OSL_VERIFY( xFormatProperties->getPropertyValue( "FormatString" ) >>= sFormat );
+ OSL_VERIFY( xFormatProperties->getPropertyValue( "Locale" ) >>= locale );
- addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":format-code") ),
- sFormat );
+ addAttribute(XMLNS_DIALOGS_PREFIX ":format-code", sFormat );
// format-locale
OUStringBuffer buf( 48 );
@@ -587,9 +500,7 @@ void ElementDescriptor::addNumberFormatAttr(
buf.append( locale.Variant );
}
}
- addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":format-locale") ),
- buf.makeStringAndClear() );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":format-locale", buf.makeStringAndClear() );
}
//__________________________________________________________________________________________________
Any ElementDescriptor::readProp( OUString const & rPropName )
@@ -645,40 +556,40 @@ void ElementDescriptor::readDateFormatAttr( OUString const & rPropName, OUString
switch (*(sal_Int16 const *)a.getValue())
{
case 0:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("system_short") ) );
+ addAttribute( rAttrName, "system_short" );
break;
case 1:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("system_short_YY") ) );
+ addAttribute( rAttrName, "system_short_YY" );
break;
case 2:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("system_short_YYYY") ) );
+ addAttribute( rAttrName, "system_short_YYYY" );
break;
case 3:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("system_long") ) );
+ addAttribute( rAttrName, "system_long" );
break;
case 4:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_DDMMYY") ) );
+ addAttribute( rAttrName, "short_DDMMYY" );
break;
case 5:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_MMDDYY") ) );
+ addAttribute( rAttrName, "short_MMDDYY" );
break;
case 6:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_YYMMDD") ) );
+ addAttribute( rAttrName, "short_YYMMDD" );
break;
case 7:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_DDMMYYYY") ) );
+ addAttribute( rAttrName, "short_DDMMYYYY" );
break;
case 8:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_MMDDYYYY") ) );
+ addAttribute( rAttrName, "short_MMDDYYYY" );
break;
case 9:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_YYYYMMDD") ) );
+ addAttribute( rAttrName, "short_YYYYMMDD" );
break;
case 10:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_YYMMDD_DIN5008") ) );
+ addAttribute( rAttrName, "short_YYMMDD_DIN5008" );
break;
case 11:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_YYYYMMDD_DIN5008") ) );
+ addAttribute( rAttrName, "short_YYYYMMDD_DIN5008" );
break;
default:
OSL_FAIL( "### unexpected date format!" );
@@ -698,22 +609,22 @@ void ElementDescriptor::readTimeFormatAttr( OUString const & rPropName, OUString
switch (*(sal_Int16 const *)a.getValue())
{
case 0:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("24h_short") ) );
+ addAttribute( rAttrName, "24h_short" );
break;
case 1:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("24h_long") ) );
+ addAttribute( rAttrName, "24h_long" );
break;
case 2:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("12h_short") ) );
+ addAttribute( rAttrName, "12h_short" );
break;
case 3:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("12h_long") ) );
+ addAttribute( rAttrName, "12h_long" );
break;
case 4:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("Duration_short") ) );
+ addAttribute( rAttrName, "Duration_short" );
break;
case 5:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("Duration_long") ) );
+ addAttribute( rAttrName, "Duration_long" );
break;
default:
OSL_FAIL( "### unexpected time format!" );
@@ -733,13 +644,13 @@ void ElementDescriptor::readAlignAttr( OUString const & rPropName, OUString cons
switch (*(sal_Int16 const *)a.getValue())
{
case 0:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("left") ) );
+ addAttribute( rAttrName, "left" );
break;
case 1:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("center") ) );
+ addAttribute( rAttrName, "center" );
break;
case 2:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right") ) );
+ addAttribute( rAttrName, "right" );
break;
default:
OSL_FAIL( "### illegal alignment value!" );
@@ -761,13 +672,13 @@ void ElementDescriptor::readVerticalAlignAttr( OUString const & rPropName, OUStr
switch (eAlign)
{
case style::VerticalAlignment_TOP:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("top") ) );
+ addAttribute( rAttrName, "top" );
break;
case style::VerticalAlignment_MIDDLE:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("center") ) );
+ addAttribute( rAttrName, "center" );
break;
case style::VerticalAlignment_BOTTOM:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
+ addAttribute( rAttrName, "bottom" );
break;
default:
OSL_FAIL( "### illegal vertical alignment value!" );
@@ -781,7 +692,7 @@ void ElementDescriptor::readImageURLAttr( OUString const & rPropName, OUString c
{
if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState( rPropName ))
{
- rtl::OUString sURL;
+ OUString sURL;
_xProps->getPropertyValue( rPropName ) >>= sURL;
if ( !sURL.isEmpty() && sURL.compareToAscii( XMLSCRIPT_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( XMLSCRIPT_GRAPHOBJ_URLPREFIX ) ) == 0 )
@@ -794,7 +705,7 @@ void ElementDescriptor::readImageURLAttr( OUString const & rPropName, OUString c
::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
uno::Reference< document::XGraphicObjectResolver > xGraphicResolver;
- aContext.createComponentWithArguments( OUSTR( "com.sun.star.comp.Svx.GraphicExportHelper" ), aArgs, xGraphicResolver );
+ aContext.createComponentWithArguments( "com.sun.star.comp.Svx.GraphicExportHelper" , aArgs, xGraphicResolver );
if ( xGraphicResolver.is() )
sURL = xGraphicResolver->resolveGraphicObjectURL( sURL );
}
@@ -814,16 +725,16 @@ void ElementDescriptor::readImageAlignAttr( OUString const & rPropName, OUString
switch (*(sal_Int16 const *)a.getValue())
{
case 0:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("left") ) );
+ addAttribute( rAttrName, "left" );
break;
case 1:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("top") ) );
+ addAttribute( rAttrName, "top" );
break;
case 2:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right") ) );
+ addAttribute( rAttrName, "right" );
break;
case 3:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
+ addAttribute( rAttrName, "bottom" );
break;
default:
OSL_FAIL( "### illegal image alignment value!" );
@@ -843,43 +754,43 @@ void ElementDescriptor::readImagePositionAttr( OUString const & rPropName, OUStr
switch (*(sal_Int16 const *)a.getValue())
{
case awt::ImagePosition::LeftTop:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("left-top") ) );
+ addAttribute( rAttrName, "left-top" );
break;
case awt::ImagePosition::LeftCenter:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("left-center") ) );
+ addAttribute( rAttrName, "left-center" );
break;
case awt::ImagePosition::LeftBottom:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("left-bottom") ) );
+ addAttribute( rAttrName, "left-bottom" );
break;
case awt::ImagePosition::RightTop:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right-top") ) );
+ addAttribute( rAttrName, "right-top" );
break;
case awt::ImagePosition::RightCenter:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right-center") ) );
+ addAttribute( rAttrName, "right-center" );
break;
case awt::ImagePosition::RightBottom:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right-bottom") ) );
+ addAttribute( rAttrName, "right-bottom" );
break;
case awt::ImagePosition::AboveLeft:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("top-left") ) );
+ addAttribute( rAttrName, "top-left" );
break;
case awt::ImagePosition::AboveCenter:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("top-center") ) );
+ addAttribute( rAttrName, "top-center" );
break;
case awt::ImagePosition::AboveRight:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("top-right") ) );
+ addAttribute( rAttrName, "top-right" );
break;
case awt::ImagePosition::BelowLeft:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom-left") ) );
+ addAttribute( rAttrName, "bottom-left" );
break;
case awt::ImagePosition::BelowCenter:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom-center") ) );
+ addAttribute( rAttrName, "bottom-center" );
break;
case awt::ImagePosition::BelowRight:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom-right") ) );
+ addAttribute( rAttrName, "bottom-right" );
break;
case awt::ImagePosition::Centered:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("center") ) );
+ addAttribute( rAttrName, "center" );
break;
default:
OSL_FAIL( "### illegal image position value!" );
@@ -899,16 +810,16 @@ void ElementDescriptor::readButtonTypeAttr( OUString const & rPropName, OUString
switch (*(sal_Int16 const *)a.getValue())
{
case awt::PushButtonType_STANDARD:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("standard") ) );
+ addAttribute( rAttrName, "standard" );
break;
case awt::PushButtonType_OK:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("ok") ) );
+ addAttribute( rAttrName, "ok" );
break;
case awt::PushButtonType_CANCEL:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("cancel") ) );
+ addAttribute( rAttrName, "cancel" );
break;
case awt::PushButtonType_HELP:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("help") ) );
+ addAttribute( rAttrName, "help" );
break;
default:
OSL_FAIL( "### illegal button-type value!" );
@@ -928,10 +839,10 @@ void ElementDescriptor::readOrientationAttr( OUString const & rPropName, OUStrin
switch (*(sal_Int32 const *)a.getValue())
{
case 0:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("horizontal") ) );
+ addAttribute( rAttrName, "horizontal" );
break;
case 1:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("vertical") ) );
+ addAttribute( rAttrName, "vertical" );
break;
default:
OSL_FAIL( "### illegal orientation value!" );
@@ -951,13 +862,13 @@ void ElementDescriptor::readLineEndFormatAttr( OUString const & rPropName, OUStr
switch (*(sal_Int16 const *)a.getValue())
{
case awt::LineEndFormat::CARRIAGE_RETURN:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("carriage-return") ) );
+ addAttribute( rAttrName, "carriage-return" );
break;
case awt::LineEndFormat::LINE_FEED:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("line-feed") ) );
+ addAttribute( rAttrName, "line-feed" );
break;
case awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("carriage-return-line-feed") ) );
+ addAttribute( rAttrName, "carriage-return-line-feed" );
break;
default:
OSL_FAIL( "### illegal line end format value!" );
@@ -975,23 +886,23 @@ void ElementDescriptor::readDataAwareAttr( OUString const & rAttrName )
Reference< form::binding::XBindableValue > xBinding( _xProps, UNO_QUERY );
- if ( xFac.is() && xBinding.is() && rAttrName.equals( OUSTR(XMLNS_DIALOGS_PREFIX ":linked-cell") ) )
+ if ( xFac.is() && xBinding.is() && rAttrName.equals( XMLNS_DIALOGS_PREFIX ":linked-cell" ) )
{
try
{
- Reference< beans::XPropertySet > xConvertor( xFac->createInstance( OUSTR( "com.sun.star.table.CellAddressConversion" )), uno::UNO_QUERY );
+ Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellAddressConversion" ), uno::UNO_QUERY );
Reference< beans::XPropertySet > xBindable( xBinding->getValueBinding(), UNO_QUERY );
if ( xBindable.is() )
{
table::CellAddress aAddress;
- xBindable->getPropertyValue( OUSTR("BoundCell") ) >>= aAddress;
- xConvertor->setPropertyValue( OUSTR("Address"), makeAny( aAddress ) );
- rtl::OUString sAddress;
- xConvertor->getPropertyValue( OUSTR("PersistentRepresentation") ) >>= sAddress;
+ xBindable->getPropertyValue( "BoundCell" ) >>= aAddress;
+ xConvertor->setPropertyValue( "Address", makeAny( aAddress ) );
+ OUString sAddress;
+ xConvertor->getPropertyValue( "PersistentRepresentation" ) >>= sAddress;
if ( !sAddress.isEmpty() )
addAttribute( rAttrName, sAddress );
- OSL_TRACE( "*** Bindable value %s", rtl::OUStringToOString( sAddress, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_TRACE( "*** Bindable value %s", OUStringToOString( sAddress, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -1000,23 +911,22 @@ void ElementDescriptor::readDataAwareAttr( OUString const & rAttrName )
}
}
Reference< form::binding::XListEntrySink > xEntrySink( _xProps, UNO_QUERY );
- if ( xEntrySink.is() && rAttrName.equals( OUSTR( XMLNS_DIALOGS_PREFIX ":source-cell-range") ) )
+ if ( xEntrySink.is() && rAttrName.equals( XMLNS_DIALOGS_PREFIX ":source-cell-range" ) )
{
Reference< beans::XPropertySet > xListSource( xEntrySink->getListEntrySource(), UNO_QUERY );
if ( xListSource.is() )
{
try
{
- Reference< beans::XPropertySet > xConvertor( xFac->createInstance( OUSTR( "com.sun.star.table.CellRangeAddressConversion" )), uno::UNO_QUERY );
+ Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellRangeAddressConversion" ), uno::UNO_QUERY );
table::CellRangeAddress aAddress;
- xListSource->getPropertyValue( OUSTR( "CellRange" ) ) >>= aAddress;
+ xListSource->getPropertyValue( "CellRange" ) >>= aAddress;
- rtl::OUString sAddress;
- xConvertor->setPropertyValue( OUSTR("Address"), makeAny( aAddress ) );
- xConvertor->getPropertyValue( OUSTR("PersistentRepresentation") ) >>= sAddress;
- OSL_TRACE("**** cell range source list %s",
- rtl::OUStringToOString( sAddress, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OUString sAddress;
+ xConvertor->setPropertyValue( "Address", makeAny( aAddress ) );
+ xConvertor->getPropertyValue( "PersistentRepresentation" ) >>= sAddress;
+ OSL_TRACE("**** cell range source list %s", OUStringToOString( sAddress, RTL_TEXTENCODING_UTF8 ).getStr() );
if ( !sAddress.isEmpty() )
addAttribute( rAttrName, sAddress );
}
@@ -1041,16 +951,16 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr
switch (eSelectionType)
{
case ::view::SelectionType_NONE:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("none") ) );
+ addAttribute( rAttrName, "none" );
break;
case ::view::SelectionType_SINGLE:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("single") ) );
+ addAttribute( rAttrName, "single" );
break;
case ::view::SelectionType_MULTI:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("multi") ) );
+ addAttribute( rAttrName, "multi" );
break;
case ::view::SelectionType_RANGE:
- addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("range") ) );
+ addAttribute( rAttrName, "range" );
break;
default:
OSL_FAIL( "### illegal selection type value!" );
@@ -1062,7 +972,7 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr
//__________________________________________________________________________________________________
void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible )
{
- Any a( _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) );
+ Any a( _xProps->getPropertyValue( "Name" ) );
// The following is a hack to allow 'form' controls to override the default
// control supported by dialogs. This should work well for both vba support and
@@ -1075,28 +985,25 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible
// is only an implementation detail here, in the future some other
// method ( perhaps a custom prop ) could be used instead.
Reference< lang::XServiceInfo > xSrvInfo( _xProps, UNO_QUERY );
- if ( xSrvInfo.is() && xSrvInfo->supportsService( OUSTR("com.sun.star.form.FormComponent" ) ) )
+ if ( xSrvInfo.is() && xSrvInfo->supportsService( "com.sun.star.form.FormComponent" ) )
{
Reference< io::XPersistObject > xPersist( _xProps, UNO_QUERY );
if ( xPersist.is() )
{
OUString sCtrlName = xPersist->getServiceName();
if ( !sCtrlName.isEmpty() )
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":control-implementation") ), sCtrlName );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":control-implementation", sCtrlName );
}
}
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ),
- * reinterpret_cast< const OUString * >( a.getValue() ) );
- readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("TabIndex") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tab-index") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":id", * reinterpret_cast< const OUString * >( a.getValue() ) );
+ readShortAttr( "TabIndex", XMLNS_DIALOGS_PREFIX ":tab-index" );
sal_Bool bEnabled = sal_False;
- if (_xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Enabled") ) ) >>= bEnabled)
+ if (_xProps->getPropertyValue( "Enabled" ) >>= bEnabled)
{
if (! bEnabled)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":disabled") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":disabled", "true" );
}
}
else
@@ -1107,14 +1014,13 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible
sal_Bool bVisible = sal_True;
if (supportVisible) try
{
- if (_xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("EnableVisible") ) ) >>= bVisible)
+ if (_xProps->getPropertyValue("EnableVisible" ) >>= bVisible)
{
// only write out the non default case
if (! bVisible)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":visible") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":visible", "false" );
}
}
}
@@ -1123,45 +1029,35 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible
DBG_UNHANDLED_EXCEPTION();
}
// force writing of pos/size
- a = _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("PositionX") ) );
+ a = _xProps->getPropertyValue( "PositionX" );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":left") ),
- OUString::valueOf( *(sal_Int32 const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":left", OUString::valueOf( *(sal_Int32 const *)a.getValue() ) );
}
- a = _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("PositionY") ) );
+ a = _xProps->getPropertyValue( "PositionY" );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":top") ),
- OUString::valueOf( *(sal_Int32 const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":top", OUString::valueOf( *(sal_Int32 const *)a.getValue() ) );
}
- a = _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) );
+ a = _xProps->getPropertyValue( "Width" );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":width") ),
- OUString::valueOf( *(sal_Int32 const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":width", OUString::valueOf( *(sal_Int32 const *)a.getValue() ) );
}
- a = _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ) );
+ a = _xProps->getPropertyValue( "Height" );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":height") ),
- OUString::valueOf( *(sal_Int32 const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":height", OUString::valueOf( *(sal_Int32 const *)a.getValue() ) );
}
if (supportPrintable)
{
- readBoolAttr(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Printable") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":printable") ) );
+ readBoolAttr( "Printable", XMLNS_DIALOGS_PREFIX ":printable" );
}
- readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Step") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":page") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tag") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tag") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("HelpText") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":help-text") ) );
- readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("HelpURL") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":help-url") ) );
+ readLongAttr( "Step", XMLNS_DIALOGS_PREFIX ":page" );
+ readStringAttr( "Tag", XMLNS_DIALOGS_PREFIX ":tag" );
+ readStringAttr( "HelpText", XMLNS_DIALOGS_PREFIX ":help-text" );
+ readStringAttr( "HelpURL", XMLNS_DIALOGS_PREFIX ":help-url" );
}
struct StringTriple
@@ -1200,14 +1096,8 @@ void ElementDescriptor::readEvents()
if (descr.AddListenerParam.isEmpty())
{
// detection of event-name
- ::rtl::OString listenerType(
- ::rtl::OUStringToOString(
- descr.ListenerType,
- RTL_TEXTENCODING_ASCII_US ) );
- ::rtl::OString eventMethod(
- ::rtl::OUStringToOString(
- descr.EventMethod,
- RTL_TEXTENCODING_ASCII_US ) );
+ OString listenerType( OUStringToOString( descr.ListenerType, RTL_TEXTENCODING_ASCII_US ) );
+ OString eventMethod( OUStringToOString( descr.EventMethod, RTL_TEXTENCODING_ASCII_US ) );
StringTriple const * p = g_pEventTranslations;
while (p->first)
{
@@ -1226,32 +1116,22 @@ void ElementDescriptor::readEvents()
if (!aEventName.isEmpty()) // script:event
{
- pElem = new ElementDescriptor(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":event") ) );
+ pElem = new ElementDescriptor( XMLNS_SCRIPT_PREFIX ":event" );
xElem = pElem;
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":event-name") ),
- aEventName );
+ pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":event-name", aEventName );
}
else // script:listener-event
{
- pElem = new ElementDescriptor(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":listener-event") ) );
+ pElem = new ElementDescriptor( XMLNS_SCRIPT_PREFIX ":listener-event" );
xElem = pElem;
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":listener-type") ),
- descr.ListenerType );
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":listener-method") ),
- descr.EventMethod );
+ pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":listener-type", descr.ListenerType );
+ pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":listener-method", descr.EventMethod );
if (!descr.AddListenerParam.isEmpty())
{
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":listener-param") ),
- descr.AddListenerParam );
+ pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":listener-param", descr.AddListenerParam );
}
}
if ( descr.ScriptType == "StarBasic" )
@@ -1260,31 +1140,21 @@ void ElementDescriptor::readEvents()
sal_Int32 nIndex = descr.ScriptCode.indexOf( (sal_Unicode)':' );
if (nIndex >= 0)
{
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":location") ),
- descr.ScriptCode.copy( 0, nIndex ) );
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":macro-name") ),
- descr.ScriptCode.copy( nIndex +1 ) );
+ pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":location", descr.ScriptCode.copy( 0, nIndex ) );
+ pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":macro-name", descr.ScriptCode.copy( nIndex +1 ) );
}
else
{
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":macro-name") ),
- descr.ScriptCode );
+ pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":macro-name", descr.ScriptCode );
}
}
else
{
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":macro-name") ),
- descr.ScriptCode );
+ pElem->addAttribute(XMLNS_SCRIPT_PREFIX ":macro-name", descr.ScriptCode );
}
// language
- pElem->addAttribute(
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":language") ),
- descr.ScriptType );
+ pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":language", descr.ScriptType );
addSubElement( xElem );
}
@@ -1416,7 +1286,7 @@ void StyleBag::dump( Reference< xml::sax::XExtendedDocumentHandler > const & xOu
{
if (! _styles.empty())
{
- OUString aStylesName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":styles") );
+ OUString aStylesName( XMLNS_DIALOGS_PREFIX ":styles" );
xOut->ignorableWhitespace( OUString() );
xOut->startElement( aStylesName, Reference< xml::sax::XAttributeList >() );
// export styles
@@ -1446,22 +1316,20 @@ void SAL_CALL exportDialogModel(
Reference< beans::XPropertyState > xPropState( xProps, UNO_QUERY );
OSL_ASSERT( xPropState.is() );
- ElementDescriptor * pElem = new ElementDescriptor(
- xProps, xPropState,
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":bulletinboard") ), xDocument );
+ ElementDescriptor * pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", xDocument );
Reference< xml::sax::XAttributeList > xElem( pElem );
pElem->readBullitinBoard( &all_styles );
xOut->startDocument();
- OUString aDocTypeStr( RTL_CONSTASCII_USTRINGPARAM(
+ OUString aDocTypeStr(
"<!DOCTYPE dlg:window PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\""
- " \"dialog.dtd\">" ) );
+ " \"dialog.dtd\">" );
xOut->unknown( aDocTypeStr );
xOut->ignorableWhitespace( OUString() );
- OUString aWindowName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":window") );
+ OUString aWindowName( XMLNS_DIALOGS_PREFIX ":window" );
ElementDescriptor * pWindow = new ElementDescriptor( xProps, xPropState, aWindowName, xDocument );
Reference< xml::sax::XAttributeList > xWindow( pWindow );
pWindow->readDialogModel( &all_styles );
@@ -1475,7 +1343,7 @@ void SAL_CALL exportDialogModel(
if ( xDialogModel->getElementNames().getLength() )
{
// open up bulletinboard
- OUString aBBoardName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":bulletinboard") );
+ OUString aBBoardName( XMLNS_DIALOGS_PREFIX ":bulletinboard" );
xOut->ignorableWhitespace( OUString() );
xOut->startElement( aBBoardName, xElem );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index 9e577fb214e2..8bd9edbe7735 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -45,12 +45,11 @@ Reference< xml::input::XElement > Frame::startChildElement(
throw (xml::sax::SAXException, RuntimeException)
{
if ( !m_xContainer.is() )
- m_xContainer.set( _pImport->_xDialogModelFactory->createInstance( rtl::OUString( "com.sun.star.awt.UnoFrameModel" ) ), UNO_QUERY );
+ m_xContainer.set( _pImport->_xDialogModelFactory->createInstance( "com.sun.star.awt.UnoFrameModel" ), UNO_QUERY );
// event
if (_pImport->isEventElement( nUid, rLocalName ))
{
- return new EventElement(
- nUid, rLocalName, xAttributes, this, _pImport );
+ return new EventElement( nUid, rLocalName, xAttributes, this, _pImport );
}
else if ( rLocalName == "bulletinboard" )
{
@@ -61,21 +60,14 @@ Reference< xml::input::XElement > Frame::startChildElement(
}
else if ( rLocalName == "title" )
{
- getStringAttr( &_label,
- OUString( "value" ),
- xAttributes,
- _pImport->XMLNS_DIALOGS_UID );
+ getStringAttr( &_label, "value", xAttributes, _pImport->XMLNS_DIALOGS_UID );
- return new ElementBase(
- _pImport->XMLNS_DIALOGS_UID,
- rLocalName, xAttributes, this, _pImport );
+ return new ElementBase( _pImport->XMLNS_DIALOGS_UID, rLocalName, xAttributes, this, _pImport );
}
else
{
OSL_TRACE("****** ARGGGGG!!!! **********");
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -84,7 +76,7 @@ void Frame::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
if ( !m_xContainer.is() )
- m_xContainer.set( _pImport->_xDialogModelFactory->createInstance( rtl::OUString( "com.sun.star.awt.UnoFrameModel" ) ), UNO_QUERY );
+ m_xContainer.set( _pImport->_xDialogModelFactory->createInstance( "com.sun.star.awt.UnoFrameModel" ), UNO_QUERY );
Reference< beans::XPropertySet > xProps( m_xContainer, UNO_QUERY_THROW );
// _pImport is what we need to add to ( e.g. the dialog in this case )
ControlImportContext ctx( _pImport, xProps, getControlId( _xAttributes ) );
@@ -103,8 +95,7 @@ void Frame::endElement()
ctx.importDefaults( 0, 0, _xAttributes ); // inherited from BulletinBoardElement
if (!_label.isEmpty())
{
- xControlModel->setPropertyValue( OUString( "Label" ),
- makeAny( _label ) );
+ xControlModel->setPropertyValue( "Label" , makeAny( _label ) );
}
ctx.importEvents( _events );
// avoid ring-reference:
@@ -135,9 +126,7 @@ Reference< xml::input::XElement > MultiPage::startChildElement(
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -162,13 +151,8 @@ void MultiPage::endElement()
}
ctx.importDefaults( 0, 0, _xAttributes ); // inherited from BulletinBoardElement
- ctx.importLongProperty( OUString( "MultiPageValue" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUString( "Decoration" ),
- OUString( "withtabs" ),
- _xAttributes );
+ ctx.importLongProperty("MultiPageValue" , "value", _xAttributes );
+ ctx.importBooleanProperty( "Decoration", "withtabs", _xAttributes) ;
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -196,9 +180,7 @@ Reference< xml::input::XElement > Page::startChildElement(
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -254,9 +236,7 @@ Reference< xml::input::XElement > ProgressBarElement::startChildElement(
void ProgressBarElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlProgressBarModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlProgressBarModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -269,15 +249,9 @@ void ProgressBarElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importLongProperty( OUString( "ProgressValue" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "ProgressValueMin" ),
- OUString( "value-min" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "ProgressValueMax" ),
- OUString( "value-max" ),
- _xAttributes );
+ ctx.importLongProperty( "ProgressValue", "value", _xAttributes );
+ ctx.importLongProperty( "ProgressValueMin", "value-min", _xAttributes );
+ ctx.importLongProperty( "ProgressValueMax", "value-max", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -300,18 +274,14 @@ Reference< xml::input::XElement > ScrollBarElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void ScrollBarElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- getControlModelName( OUString( "com.sun.star.awt.UnoControlScrollBarModel" ), _xAttributes ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlScrollBarModel" , _xAttributes ) );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -323,39 +293,19 @@ void ScrollBarElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importOrientationProperty( OUString( "Orientation" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "BlockIncrement" ),
- OUString( "pageincrement" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "LineIncrement" ),
- OUString( "increment" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "ScrollValue" ),
- OUString( "curpos" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "ScrollValueMax" ),
- OUString( "maxpos" ),
- _xAttributes );
- ctx.importLongProperty( OUSTR("ScrollValueMin"), OUSTR("minpos"),
- _xAttributes );
- ctx.importLongProperty( OUString( "VisibleSize" ),
- OUString( "visible-size" ),
- _xAttributes );
- ctx.importLongProperty( OUSTR("RepeatDelay"), OUSTR("repeat"),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "LiveScroll" ),
- OUString( "live-scroll" ),
- _xAttributes );
- ctx.importHexLongProperty( OUString( "SymbolColor" ),
- OUString( "symbol-color" ),
- _xAttributes );
-
- ctx.importDataAwareProperty( OUSTR("linked-cell" ), _xAttributes );
+ ctx.importOrientationProperty( "Orientation" , "align", _xAttributes );
+ ctx.importLongProperty( "BlockIncrement" , "pageincrement" , _xAttributes );
+ ctx.importLongProperty( "LineIncrement" , "increment" , _xAttributes );
+ ctx.importLongProperty( "ScrollValue" ,"curpos", _xAttributes );
+ ctx.importLongProperty( "ScrollValueMax" , "maxpos" , _xAttributes );
+ ctx.importLongProperty( "ScrollValueMin","minpos", _xAttributes );
+ ctx.importLongProperty( "VisibleSize", "visible-size", _xAttributes );
+ ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop" , _xAttributes );
+ ctx.importBooleanProperty( "LiveScroll", "live-scroll", _xAttributes );
+ ctx.importHexLongProperty( "SymbolColor", "symbol-color", _xAttributes );
+
+ ctx.importDataAwareProperty( "linked-cell" , _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -378,18 +328,14 @@ Reference< xml::input::XElement > SpinButtonElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void SpinButtonElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- getControlModelName( OUString( "com.sun.star.awt.UnoControlSpinButtonModel" ), _xAttributes ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlSpinButtonModel", _xAttributes ) );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -401,26 +347,16 @@ void SpinButtonElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importOrientationProperty( OUString( "Orientation" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "SpinIncrement" ),
- OUString( "increment" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "SpinValue" ),
- OUString( "curval" ),_xAttributes );
- ctx.importLongProperty( OUString( "SpinValueMax" ),
- OUString( "maxval" ), _xAttributes );
- ctx.importLongProperty( OUSTR("SpinValueMin"), OUSTR("minval"),
- _xAttributes );
- ctx.importLongProperty( OUSTR("Repeat"), OUSTR("repeat"), _xAttributes );
- ctx.importLongProperty( OUSTR("RepeatDelay"), OUSTR("repeat-delay"),
-_xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ), _xAttributes );
- ctx.importHexLongProperty( OUString( "SymbolColor" ),
- OUString( "symbol-color" ), _xAttributes );
- ctx.importDataAwareProperty( OUSTR("linked-cell" ), _xAttributes );
+ ctx.importOrientationProperty( "Orientation", "align", _xAttributes );
+ ctx.importLongProperty("SpinIncrement", "increment", _xAttributes );
+ ctx.importLongProperty("SpinValue", "curval" ,_xAttributes );
+ ctx.importLongProperty("SpinValueMax", "maxval", _xAttributes );
+ ctx.importLongProperty( "SpinValueMin","minval",_xAttributes );
+ ctx.importLongProperty( "Repeat", "repeat", _xAttributes );
+ ctx.importLongProperty( "RepeatDelay", "repeat-delay",_xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importHexLongProperty( "SymbolColor", "symbol-color" , _xAttributes );
+ ctx.importDataAwareProperty( "linked-cell" , _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -443,18 +379,14 @@ Reference< xml::input::XElement > FixedLineElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void FixedLineElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlFixedLineModel" ) );
+ ControlImportContext ctx(_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFixedLineModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -467,12 +399,8 @@ void FixedLineElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importStringProperty( OUString( "Label" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importOrientationProperty( OUString( "Orientation" ),
- OUString( "align" ),
- _xAttributes );
+ ctx.importStringProperty( "Label", "value", _xAttributes );
+ ctx.importOrientationProperty( "Orientation", "align", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -495,18 +423,14 @@ Reference< xml::input::XElement > PatternFieldElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void PatternFieldElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlPatternFieldModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlPatternFieldModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -521,30 +445,14 @@ void PatternFieldElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "StrictFormat" ),
- OUString( "strict-format" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importStringProperty( OUString( "Text" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importShortProperty( OUString( "MaxTextLen" ),
- OUString( "maxlength" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "EditMask" ),
- OUString( "edit-mask" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "LiteralMask" ),
- OUString( "literal-mask" ),
- _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly" , _xAttributes );
+ ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes );
+ ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes );
+ ctx.importStringProperty( "Text", "value", _xAttributes );
+ ctx.importShortProperty( "MaxTextLen", "maxlength", _xAttributes );
+ ctx.importStringProperty( "EditMask", "edit-mask", _xAttributes );
+ ctx.importStringProperty( "LiteralMask", "literal-mask", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -567,18 +475,14 @@ Reference< xml::input::XElement > FormattedFieldElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void FormattedFieldElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlFormattedFieldModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFormattedFieldModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -593,84 +497,43 @@ void FormattedFieldElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "StrictFormat" ),
- OUString( "strict-format" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "EffectiveMin" ),
- OUString( "value-min" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "EffectiveMax" ),
- OUString( "value-max" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "EffectiveValue" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "Text" ),
- OUString( "text" ),
- _xAttributes );
- ctx.importShortProperty( OUString( "MaxTextLen" ),
- OUString( "maxlength" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Spin" ),
- OUString( "spin" ),
- _xAttributes );
- if (ctx.importLongProperty( OUSTR("RepeatDelay"), OUSTR("repeat"),
- _xAttributes ))
- ctx.getControlModel()->setPropertyValue(
- OUSTR("Repeat"), makeAny(true) );
-
- OUString sDefault(
- _xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( "value-default" ) ) );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly" , _xAttributes );
+ ctx.importBooleanProperty( "StrictFormat", "strict-format" , _xAttributes );
+ ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes );
+ ctx.importAlignProperty( "Align" , "align" , _xAttributes );
+ ctx.importDoubleProperty( "EffectiveMin", "value-min" , _xAttributes );
+ ctx.importDoubleProperty( "EffectiveMax", "value-max", _xAttributes);
+ ctx.importDoubleProperty( "EffectiveValue", "value", _xAttributes );
+ ctx.importStringProperty( "Text", "text", _xAttributes );
+ ctx.importShortProperty( "MaxTextLen", "maxlength", _xAttributes );
+ ctx.importBooleanProperty( "Spin", "spin", _xAttributes );
+ if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes ))
+ ctx.getControlModel()->setPropertyValue( "Repeat" , makeAny(true) );
+
+ OUString sDefault(_xAttributes->getValueByUidName(_pImport->XMLNS_DIALOGS_UID, "value-default") );
if (!sDefault.isEmpty())
{
double d = sDefault.toDouble();
- if (d != 0.0 ||
- sDefault.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("0") ) ||
- sDefault.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("0.0") ))
+ if (d != 0.0 || sDefault == "0" || sDefault == "0.0" )
{
- ctx.getControlModel()->setPropertyValue(
- OUString( "EffectiveDefault" ),
- makeAny( d ) );
+ ctx.getControlModel()->setPropertyValue( "EffectiveDefault", makeAny( d ) );
}
else // treat as string
{
- ctx.getControlModel()->setPropertyValue(
- OUString( "EffectiveDefault" ),
- makeAny( sDefault ) );
+ ctx.getControlModel()->setPropertyValue( "EffectiveDefault", makeAny( sDefault ) );
}
}
// format spec
- ctx.getControlModel()->setPropertyValue(
- OUString( "FormatsSupplier" ),
- makeAny( _pImport->getNumberFormatsSupplier() ) );
-
- OUString sFormat(
- _xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( "format-code" ) ) );
+ ctx.getControlModel()->setPropertyValue("FormatsSupplier", makeAny( _pImport->getNumberFormatsSupplier() ) );
+
+ OUString sFormat( _xAttributes->getValueByUidName(_pImport->XMLNS_DIALOGS_UID, "format-code" ) );
if (!sFormat.isEmpty())
{
lang::Locale locale;
- OUString sLocale(
- _xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( "format-locale" ) ) );
+ OUString sLocale( _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, "format-locale" ) );
if (!sLocale.isEmpty())
{
// split locale
@@ -705,8 +568,7 @@ void FormattedFieldElement::endElement()
{
nKey = xFormats->addNew( sFormat, locale );
}
- ctx.getControlModel()->setPropertyValue(
- OUString( "FormatKey" ), makeAny( nKey ) );
+ ctx.getControlModel()->setPropertyValue("FormatKey", makeAny( nKey ) );
}
catch (const util::MalformedNumberFormatException & exc)
{
@@ -715,15 +577,10 @@ void FormattedFieldElement::endElement()
throw xml::sax::SAXException( exc.Message, Reference< XInterface >(), Any() );
}
}
- ctx.importBooleanProperty(
- OUString( "TreatAsNumber" ),
- OUString( "treat-as-number" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "EnforceFormat" ),
- OUString( "enforce-format" ),
- _xAttributes );
+ ctx.importBooleanProperty("TreatAsNumber", "treat-as-number" , _xAttributes );
+ ctx.importBooleanProperty("EnforceFormat", "enforce-format", _xAttributes );
- ctx.importDataAwareProperty( OUSTR("linked-cell" ), _xAttributes );
+ ctx.importDataAwareProperty( "linked-cell" , _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -746,18 +603,14 @@ Reference< xml::input::XElement > TimeFieldElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void TimeFieldElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlTimeFieldModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlTimeFieldModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -772,43 +625,19 @@ void TimeFieldElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "StrictFormat" ),
- OUString( "strict-format" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importTimeFormatProperty( OUString( "TimeFormat" ),
- OUString( "time-format" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "Time" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "TimeMin" ),
- OUString( "value-min" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "TimeMax" ),
- OUString( "value-max" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Spin" ),
- OUString( "spin" ),
- _xAttributes );
- if (ctx.importLongProperty( OUSTR("RepeatDelay"), OUSTR("repeat"),
- _xAttributes ))
- ctx.getControlModel()->setPropertyValue(
- OUSTR("Repeat"), makeAny(true) );
- ctx.importStringProperty( OUString( "Text" ),
- OUString( "text" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "EnforceFormat" ),
- OUString( "enforce-format" ),
- _xAttributes );
+ ctx.importBooleanProperty("Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty("ReadOnly", "readonly", _xAttributes );
+ ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes );
+ ctx.importBooleanProperty("HideInactiveSelection","hide-inactive-selection", _xAttributes );
+ ctx.importTimeFormatProperty( "TimeFormat", "time-format", _xAttributes );
+ ctx.importLongProperty( "Time", "value", _xAttributes );
+ ctx.importLongProperty( "TimeMin", "value-min", _xAttributes );
+ ctx.importLongProperty( "TimeMax", "value-max", _xAttributes );
+ ctx.importBooleanProperty( "Spin", "spin", _xAttributes );
+ if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes ))
+ ctx.getControlModel()->setPropertyValue("Repeat", makeAny(true) );
+ ctx.importStringProperty( "Text", "text" , _xAttributes );
+ ctx.importBooleanProperty( "EnforceFormat", "enforce-format" , _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
@@ -832,18 +661,14 @@ Reference< xml::input::XElement > NumericFieldElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void NumericFieldElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlNumericFieldModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlNumericFieldModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -858,46 +683,20 @@ void NumericFieldElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "StrictFormat" ),
- OUString( "strict-format" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importShortProperty( OUString( "DecimalAccuracy" ),
- OUString( "decimal-accuracy" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ShowThousandsSeparator" ),
- OUString( "thousands-separator" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "Value" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "ValueMin" ),
- OUString( "value-min" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "ValueMax" ),
- OUString( "value-max" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "ValueStep" ),
- OUString( "value-step" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Spin" ),
- OUString( "spin" ),
- _xAttributes );
- if (ctx.importLongProperty( OUSTR("RepeatDelay"), OUSTR("repeat"),
- _xAttributes ))
- ctx.getControlModel()->setPropertyValue(
- OUSTR("Repeat"), makeAny(true) );
- ctx.importBooleanProperty( OUString( "EnforceFormat" ),
- OUString( "enforce-format" ),
- _xAttributes );
+ ctx.importBooleanProperty( "Tabstop","tabstop",_xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly",_xAttributes );
+ ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes );
+ ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes );
+ ctx.importShortProperty( "DecimalAccuracy", "decimal-accuracy", _xAttributes );
+ ctx.importBooleanProperty( "ShowThousandsSeparator", "thousands-separator", _xAttributes );
+ ctx.importDoubleProperty( "Value", "value", _xAttributes );
+ ctx.importDoubleProperty( "ValueMin", "value-min", _xAttributes );
+ ctx.importDoubleProperty( "ValueMax", "value-max", _xAttributes );
+ ctx.importDoubleProperty( "ValueStep", "value-step", _xAttributes );
+ ctx.importBooleanProperty( "Spin", "spin", _xAttributes );
+ if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes ))
+ ctx.getControlModel()->setPropertyValue("Repeat", makeAny(true) );
+ ctx.importBooleanProperty( "EnforceFormat", "enforce-format", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -920,18 +719,14 @@ Reference< xml::input::XElement > DateFieldElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void DateFieldElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlDateFieldModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlDateFieldModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -946,49 +741,21 @@ void DateFieldElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "StrictFormat" ),
- OUString( "strict-format" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importDateFormatProperty( OUString( "DateFormat" ),
- OUString( "date-format" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "DateShowCentury" ),
- OUString( "show-century" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "Date" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "DateMin" ),
- OUString( "value-min" ),
- _xAttributes );
- ctx.importLongProperty( OUString( "DateMax" ),
- OUString( "value-max" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Spin" ),
- OUString( "spin" ),
- _xAttributes );
- if (ctx.importLongProperty( OUSTR("RepeatDelay"), OUSTR("repeat"),
- _xAttributes ))
- ctx.getControlModel()->setPropertyValue(
- OUSTR("Repeat"), makeAny(true) );
- ctx.importBooleanProperty( OUString( "Dropdown" ),
- OUString( "dropdown" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "Text" ),
- OUString( "text" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "EnforceFormat" ),
- OUString( "enforce-format" ),
- _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes );
+ ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes );
+ ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes );
+ ctx.importDateFormatProperty( "DateFormat", "date-format", _xAttributes );
+ ctx.importBooleanProperty( "DateShowCentury", "show-century", _xAttributes );
+ ctx.importLongProperty( "Date", "value", _xAttributes );
+ ctx.importLongProperty( "DateMin", "value-min", _xAttributes );
+ ctx.importLongProperty( "DateMax", "value-max", _xAttributes );
+ ctx.importBooleanProperty( "Spin", "spin", _xAttributes );
+ if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes ))
+ ctx.getControlModel()->setPropertyValue( "Repeat", makeAny(true) );
+ ctx.importBooleanProperty( "Dropdown", "dropdown", _xAttributes );
+ ctx.importStringProperty( "Text", "text", _xAttributes );
+ ctx.importBooleanProperty( "EnforceFormat", "enforce-format", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -1011,18 +778,14 @@ Reference< xml::input::XElement > CurrencyFieldElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!" , Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void CurrencyFieldElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlCurrencyFieldModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlCurrencyFieldModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -1037,52 +800,22 @@ void CurrencyFieldElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "StrictFormat" ),
- OUString( "strict-format" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importStringProperty( OUString( "CurrencySymbol" ),
- OUString( "currency-symbol" ),
- _xAttributes );
- ctx.importShortProperty( OUString( "DecimalAccuracy" ),
- OUString( "decimal-accuracy" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ShowThousandsSeparator" ),
- OUString( "thousands-separator" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "Value" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "ValueMin" ),
- OUString( "value-min" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "ValueMax" ),
- OUString( "value-max" ),
- _xAttributes );
- ctx.importDoubleProperty( OUString( "ValueStep" ),
- OUString( "value-step" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Spin" ),
- OUString( "spin" ),
- _xAttributes );
- if (ctx.importLongProperty( OUSTR("RepeatDelay"), OUSTR("repeat"),
- _xAttributes ))
- ctx.getControlModel()->setPropertyValue(
- OUSTR("Repeat"), makeAny(true) );
- ctx.importBooleanProperty( OUString( "PrependCurrencySymbol" ),
- OUString( "prepend-symbol" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "EnforceFormat" ),
- OUString( "enforce-format" ),
- _xAttributes );
+ ctx.importBooleanProperty("Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly" , _xAttributes );
+ ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes );
+ ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes );
+ ctx.importStringProperty( "CurrencySymbol", "currency-symbol", _xAttributes );
+ ctx.importShortProperty( "DecimalAccuracy", "decimal-accuracy", _xAttributes );
+ ctx.importBooleanProperty( "ShowThousandsSeparator", "thousands-separator", _xAttributes );
+ ctx.importDoubleProperty( "Value", "value", _xAttributes );
+ ctx.importDoubleProperty( "ValueMin", "value-min", _xAttributes );
+ ctx.importDoubleProperty( "ValueMax", "value-max", _xAttributes );
+ ctx.importDoubleProperty( "ValueStep", "value-step", _xAttributes );
+ ctx.importBooleanProperty( "Spin", "spin", _xAttributes );
+ if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes ))
+ ctx.getControlModel()->setPropertyValue( "Repeat", makeAny(true) );
+ ctx.importBooleanProperty( "PrependCurrencySymbol", "prepend-symbol", _xAttributes );
+ ctx.importBooleanProperty( "EnforceFormat", "enforce-format", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -1105,18 +838,14 @@ Reference< xml::input::XElement > FileControlElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void FileControlElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlFileControlModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFileControlModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -1131,18 +860,10 @@ void FileControlElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importStringProperty( OUString( "Text" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty("HideInactiveSelection","hide-inactive-selection", _xAttributes );
+ ctx.importStringProperty( "Text", "value", _xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -1164,18 +885,14 @@ Reference< xml::input::XElement > TreeControlElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void TreeControlElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.tree.TreeControlModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.tree.TreeControlModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -1187,30 +904,14 @@ void TreeControlElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importSelectionTypeProperty( OUString( "SelectionType" ),
- OUString( "selectiontype" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "RootDisplayed" ),
- OUString( "rootdisplayed" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ShowsHandles" ),
- OUString( "showshandles" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ShowsRootHandles" ),
- OUString( "showsroothandles" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Editable" ),
- OUString( "editable" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "RowHeight" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "InvokesStopNodeEditing" ),
- OUString( "invokesstopnodeediting" ),
- _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importSelectionTypeProperty( "SelectionType", "selectiontype", _xAttributes );
+ ctx.importBooleanProperty( "RootDisplayed", "rootdisplayed", _xAttributes );
+ ctx.importBooleanProperty( "ShowsHandles", "showshandles", _xAttributes );
+ ctx.importBooleanProperty( "ShowsRootHandles", "showsroothandles" ,_xAttributes );
+ ctx.importBooleanProperty( "Editable", "editable", _xAttributes );
+ ctx.importBooleanProperty( "RowHeight", "readonly", _xAttributes );
+ ctx.importBooleanProperty( "InvokesStopNodeEditing", "invokesstopnodeediting", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
@@ -1234,18 +935,14 @@ Reference< xml::input::XElement > ImageControlElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!" , Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void ImageControlElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlImageControlModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlImageControlModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -1257,16 +954,12 @@ void ImageControlElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "ScaleImage" ),
- OUString( "scale-image" ),
- _xAttributes );
- rtl::OUString sURL = _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, OUSTR( "src" ) );
+ ctx.importBooleanProperty( "ScaleImage", "scale-image", _xAttributes );
+ OUString sURL = _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, "src" );
Reference< document::XStorageBasedDocument > xDocStorage( _pImport->getDocOwner(), UNO_QUERY );
- ctx.importImageURLProperty( OUSTR( "ImageURL" ), OUSTR( "src" ), _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
+ ctx.importImageURLProperty( "ImageURL" , "src" , _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -1289,18 +982,14 @@ Reference< xml::input::XElement > TextElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void TextElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlFixedTextModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFixedTextModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -1315,24 +1004,12 @@ void TextElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importStringProperty( OUString( "Label" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importVerticalAlignProperty( OUString( "VerticalAlign" ),
- OUString( "valign" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "MultiLine" ),
- OUString( "multiline" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "NoLabel" ),
- OUString( "nolabel" ),
- _xAttributes );
+ ctx.importStringProperty( "Label", "value", _xAttributes );
+ ctx.importAlignProperty( "Align", "align", _xAttributes );
+ ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes );
+ ctx.importBooleanProperty( "MultiLine", "multiline" ,_xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty( "NoLabel", "nolabel", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -1354,18 +1031,14 @@ Reference< xml::input::XElement > FixedHyperLinkElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!" , Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void FixedHyperLinkElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFixedHyperlinkModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -1380,31 +1053,15 @@ void FixedHyperLinkElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importStringProperty( OUString( "Label" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "URL" ),
- OUString( "url" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "Description" ),
- OUString( "description" ),
- _xAttributes );
-
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importVerticalAlignProperty( OUString( "VerticalAlign" ),
- OUString( "valign" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "MultiLine" ),
- OUString( "multiline" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "NoLabel" ),
- OUString( "nolabel" ),
- _xAttributes );
+ ctx.importStringProperty( "Label", "value", _xAttributes );
+ ctx.importStringProperty( "URL", "url", _xAttributes );
+ ctx.importStringProperty( "Description", "description", _xAttributes );
+
+ ctx.importAlignProperty( "Align", "align" ,_xAttributes );
+ ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes );
+ ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty( "NoLabel", "nolabel", _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -1427,18 +1084,14 @@ Reference< xml::input::XElement > TextFieldElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void TextFieldElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlEditModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlEditModel" );
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
@@ -1453,50 +1106,23 @@ void TextFieldElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "HardLineBreaks" ),
- OUString( "hard-linebreaks" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "HScroll" ),
- OUString( "hscroll" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "VScroll" ),
- OUString( "vscroll" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importShortProperty( OUString( "MaxTextLen" ),
- OUString( "maxlength" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "MultiLine" ),
- OUString( "multiline" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "Text" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importLineEndFormatProperty( OUString( "LineEndFormat" ),
- OUString( "lineend-format" ),
- _xAttributes );
+ ctx.importBooleanProperty("Tabstop", "tabstop", _xAttributes );
+ ctx.importAlignProperty( "Align", "align", _xAttributes );
+ ctx.importBooleanProperty( "HardLineBreaks", "hard-linebreaks", _xAttributes );
+ ctx.importBooleanProperty( "HScroll", "hscroll" ,_xAttributes );
+ ctx.importBooleanProperty( "VScroll", "vscroll", _xAttributes );
+ ctx.importBooleanProperty("HideInactiveSelection", "hide-inactive-selection", _xAttributes );
+ ctx.importShortProperty( "MaxTextLen", "maxlength", _xAttributes );
+ ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes );
+ ctx.importStringProperty( "Text", "value", _xAttributes );
+ ctx.importLineEndFormatProperty( "LineEndFormat", "lineend-format", _xAttributes );
OUString aValue;
- if (getStringAttr( &aValue,
- OUString( "echochar" ),
- _xAttributes,
- _pImport->XMLNS_DIALOGS_UID ) &&
- !aValue.isEmpty() )
+ if (getStringAttr( &aValue, "echochar", _xAttributes, _pImport->XMLNS_DIALOGS_UID ) && !aValue.isEmpty() )
{
OSL_ENSURE( aValue.getLength() == 1, "### more than one character given for echochar!" );
sal_Int16 nChar = (sal_Int16)aValue[ 0 ];
- xControlModel->setPropertyValue( OUString( "EchoChar" ),
- makeAny( nChar ) );
+ xControlModel->setPropertyValue( "EchoChar", makeAny( nChar ) );
}
ctx.importEvents( _events );
@@ -1521,21 +1147,14 @@ Reference< xml::input::XElement > TitledBoxElement::startChildElement(
}
else if (_pImport->XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( "illegal namespace!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// title
else if ( rLocalName == "title" )
{
- getStringAttr( &_label,
- OUString( "value" ),
- xAttributes,
- _pImport->XMLNS_DIALOGS_UID );
+ getStringAttr( &_label, "value", xAttributes, _pImport->XMLNS_DIALOGS_UID );
- return new ElementBase(
- _pImport->XMLNS_DIALOGS_UID,
- rLocalName, xAttributes, this, _pImport );
+ return new ElementBase( _pImport->XMLNS_DIALOGS_UID, rLocalName, xAttributes, this, _pImport );
}
// radio
else if ( rLocalName == "radio" )
@@ -1562,9 +1181,7 @@ void TitledBoxElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlGroupBoxModel" ) );
+ ControlImportContext ctx(_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlGroupBoxModel" );
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
@@ -1580,8 +1197,7 @@ void TitledBoxElement::endElement()
if (!_label.isEmpty())
{
- xControlModel->setPropertyValue( OUString( "Label" ),
- makeAny( _label ) );
+ xControlModel->setPropertyValue( "Label", makeAny( _label ) );
}
ctx.importEvents( _events );
@@ -1594,12 +1210,9 @@ void TitledBoxElement::endElement()
for ( size_t nPos = 0; nPos < _radios.size(); ++nPos )
{
Reference< xml::input::XElement > xRadio( _radios[ nPos ] );
- Reference< xml::input::XAttributes > xAttributes(
- xRadio->getAttributes() );
+ Reference< xml::input::XAttributes > xAttributes( xRadio->getAttributes() );
- ControlImportContext ctx(
- _pImport, getControlId( xAttributes ),
- getControlModelName( OUString( "com.sun.star.awt.UnoControlRadioButtonModel" ), xAttributes ) );
+ ControlImportContext ctx( _pImport, getControlId( xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlRadioButtonModel", xAttributes ) );
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
Reference< xml::input::XElement > xStyle( getStyle( xAttributes ) );
@@ -1614,42 +1227,23 @@ void TitledBoxElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- xAttributes );
- ctx.importStringProperty( OUString( "Label" ),
- OUString( "value" ),
- xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- xAttributes );
- ctx.importVerticalAlignProperty( OUString( "VerticalAlign" ),
- OUString( "valign" ),
- xAttributes );
- ctx.importImageURLProperty( OUSTR( "ImageURL" ), OUSTR( "image-src" ), _xAttributes );
- ctx.importImagePositionProperty( OUString( "ImagePosition" ),
- OUString( "image-position" ),
- xAttributes );
- ctx.importBooleanProperty( OUString( "MultiLine" ),
- OUString( "multiline" ),
- xAttributes );
- ctx.importStringProperty( OUString( "GroupName" ),
- OUString( "group-name" ),
- xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", xAttributes );
+ ctx.importStringProperty( "Label", "value", xAttributes );
+ ctx.importAlignProperty( "Align", "align", xAttributes );
+ ctx.importVerticalAlignProperty( "VerticalAlign", "valign", xAttributes );
+ ctx.importImageURLProperty( "ImageURL" , "image-src" , _xAttributes );
+ ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes );
+ ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes );
+ ctx.importStringProperty( "GroupName", "group-name", xAttributes );
sal_Int16 nVal = 0;
sal_Bool bChecked = sal_False;
- if (getBoolAttr( &bChecked,
- OUString( "checked" ),
- xAttributes,
- _pImport->XMLNS_DIALOGS_UID ) &&
- bChecked)
+ if (getBoolAttr( &bChecked, "checked", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked)
{
nVal = 1;
}
- xControlModel->setPropertyValue( OUString( "State" ),
- makeAny( nVal ) );
- ctx.importDataAwareProperty( OUSTR("linked-cell" ), xAttributes );
+ xControlModel->setPropertyValue( "State", makeAny( nVal ) );
+ ctx.importDataAwareProperty( "linked-cell" , xAttributes );
::std::vector< Reference< xml::input::XElement > > * radioEvents =
static_cast< RadioElement * >( xRadio.get() )->getEvents();
ctx.importEvents( *radioEvents );
@@ -1678,9 +1272,7 @@ Reference< xml::input::XElement > RadioElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() );
}
}
@@ -1695,9 +1287,7 @@ Reference< xml::input::XElement > RadioGroupElement::startChildElement(
{
if (_pImport->XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( "illegal namespace!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// radio
else if ( rLocalName == "radio" )
@@ -1711,9 +1301,7 @@ Reference< xml::input::XElement > RadioGroupElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected radio element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected radio element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -1726,9 +1314,7 @@ void RadioGroupElement::endElement()
Reference< xml::input::XAttributes > xAttributes(
xRadio->getAttributes() );
- ControlImportContext ctx(
- _pImport, getControlId( xAttributes ),
- getControlModelName( OUString( "com.sun.star.awt.UnoControlRadioButtonModel" ), xAttributes ) );
+ ControlImportContext ctx( _pImport, getControlId( xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlRadioButtonModel", xAttributes ) );
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
Reference< xml::input::XElement > xStyle( getStyle( xAttributes ) );
@@ -1743,42 +1329,23 @@ void RadioGroupElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- xAttributes );
- ctx.importStringProperty( OUString( "Label" ),
- OUString( "value" ),
- xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- xAttributes );
- ctx.importVerticalAlignProperty( OUString( "VerticalAlign" ),
- OUString( "valign" ),
- xAttributes );
- ctx.importImageURLProperty( OUSTR( "ImageURL" ), OUSTR( "image-src" ), xAttributes );
- ctx.importImagePositionProperty( OUString( "ImagePosition" ),
- OUString( "image-position" ),
- xAttributes );
- ctx.importBooleanProperty( OUString( "MultiLine" ),
- OUString( "multiline" ),
- xAttributes );
- ctx.importStringProperty( OUString( "GroupName" ),
- OUString( "group-name" ),
- xAttributes );
+ ctx.importBooleanProperty("Tabstop", "tabstop", xAttributes );
+ ctx.importStringProperty( "Label", "value", xAttributes );
+ ctx.importAlignProperty( "Align", "align", xAttributes );
+ ctx.importVerticalAlignProperty( "VerticalAlign", "valign", xAttributes );
+ ctx.importImageURLProperty( "ImageURL" , "image-src" , xAttributes );
+ ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes );
+ ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes );
+ ctx.importStringProperty( "GroupName", "group-name", xAttributes );
sal_Int16 nVal = 0;
sal_Bool bChecked = sal_False;
- if (getBoolAttr( &bChecked,
- OUString( "checked" ),
- xAttributes,
- _pImport->XMLNS_DIALOGS_UID ) &&
- bChecked)
+ if (getBoolAttr( &bChecked, "checked", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked)
{
nVal = 1;
}
- xControlModel->setPropertyValue( OUString( "State" ),
- makeAny( nVal ) );
+ xControlModel->setPropertyValue( "State", makeAny( nVal ) );
- ctx.importDataAwareProperty( OUSTR("linked-cell" ), xAttributes );
+ ctx.importDataAwareProperty( "linked-cell", xAttributes );
::std::vector< Reference< xml::input::XElement > > * radioEvents =
static_cast< RadioElement * >( xRadio.get() )->getEvents();
@@ -1803,41 +1370,28 @@ Reference< xml::input::XElement > MenuPopupElement::startChildElement(
{
if (_pImport->XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( "illegal namespace!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// menuitem
else if ( rLocalName == "menuitem" )
{
- OUString aValue(
- xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( "value" ) ) );
+ OUString aValue( xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID,"value" ) );
OSL_ENSURE( !aValue.isEmpty(), "### menuitem has no value?" );
if (!aValue.isEmpty())
{
_itemValues.push_back( aValue );
- OUString aSel(
- xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( "selected" ) ) );
- if (!aSel.isEmpty() && aSel.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("true") ))
+ OUString aSel( xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, "selected" ) );
+ if (!aSel.isEmpty() && aSel == "true")
{
- _itemSelected.push_back(
- static_cast<sal_Int16>(_itemValues.size()) -1 );
+ _itemSelected.push_back( static_cast<sal_Int16>(_itemValues.size()) -1 );
}
}
- return new ElementBase(
- _pImport->XMLNS_DIALOGS_UID,
- rLocalName, xAttributes, this, _pImport );
+ return new ElementBase( _pImport->XMLNS_DIALOGS_UID, rLocalName, xAttributes, this, _pImport );
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected menuitem!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("expected menuitem!" , Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -1879,9 +1433,7 @@ Reference< xml::input::XElement > MenuListElement::startChildElement(
}
else if (_pImport->XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( "illegal namespace!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// menupopup
else if ( rLocalName == "menupopup" )
@@ -1891,19 +1443,14 @@ Reference< xml::input::XElement > MenuListElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event or menupopup element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event or menupopup element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void MenuListElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
-
- getControlModelName( OUString( "com.sun.star.awt.UnoControlListBoxModel" ), _xAttributes ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlListBoxModel", _xAttributes ) );
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
@@ -1918,33 +1465,21 @@ void MenuListElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "MultiSelection" ),
- OUString( "multiselection" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Dropdown" ),
- OUString( "spin" ),
- _xAttributes );
- ctx.importShortProperty( OUString( "LineCount" ),
- OUString( "linecount" ),
- _xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- _xAttributes );
- bool bHasLinkedCell = ctx.importDataAwareProperty( OUSTR("linked-cell" ), _xAttributes );
- bool bHasSrcRange = ctx.importDataAwareProperty( OUSTR("source-cell-range" ), _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty( "MultiSelection", "multiselection", _xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes );
+ ctx.importBooleanProperty( "Dropdown", "spin", _xAttributes );
+ ctx.importShortProperty( "LineCount", "linecount", _xAttributes );
+ ctx.importAlignProperty( "Align", "align", _xAttributes );
+ bool bHasLinkedCell = ctx.importDataAwareProperty( "linked-cell" , _xAttributes );
+ bool bHasSrcRange = ctx.importDataAwareProperty( "source-cell-range" , _xAttributes );
if (_popup.is())
{
MenuPopupElement * p = static_cast< MenuPopupElement * >( _popup.get() );
if ( !bHasSrcRange )
- xControlModel->setPropertyValue( OUString( "StringItemList" ), makeAny( p->getItemValues() ) );
+ xControlModel->setPropertyValue( "StringItemList", makeAny( p->getItemValues() ) );
if ( !bHasLinkedCell )
- xControlModel->setPropertyValue( OUString( "SelectedItems" ), makeAny( p->getSelectedItems() ) );
+ xControlModel->setPropertyValue( "SelectedItems", makeAny( p->getSelectedItems() ) );
}
ctx.importEvents( _events );
@@ -1969,9 +1504,7 @@ Reference< xml::input::XElement > ComboBoxElement::startChildElement(
}
else if (_pImport->XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( "illegal namespace!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// menupopup
else if ( rLocalName == "menupopup" )
@@ -1981,18 +1514,14 @@ Reference< xml::input::XElement > ComboBoxElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event or menupopup element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event or menupopup element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void ComboBoxElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- getControlModelName( OUString( "com.sun.star.awt.UnoControlComboBoxModel" ), _xAttributes ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlComboBoxModel", _xAttributes ) );
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
@@ -2007,40 +1536,21 @@ void ComboBoxElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "ReadOnly" ),
- OUString( "readonly" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Autocomplete" ),
- OUString( "autocomplete" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "Dropdown" ),
- OUString( "spin" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUSTR("HideInactiveSelection"), OUSTR("hide-inactive-selection"),
- _xAttributes );
- ctx.importShortProperty( OUString( "MaxTextLen" ),
- OUString( "maxlength" ),
- _xAttributes );
- ctx.importShortProperty( OUString( "LineCount" ),
- OUString( "linecount" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "Text" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importDataAwareProperty( OUSTR("linked-cell" ), _xAttributes );
- bool bHasSrcRange = ctx.importDataAwareProperty( OUSTR("source-cell-range" ), _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes );
+ ctx.importBooleanProperty( "Autocomplete", "autocomplete", _xAttributes );
+ ctx.importBooleanProperty( "Dropdown", "spin", _xAttributes );
+ ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes );
+ ctx.importShortProperty( "MaxTextLen", "maxlength" ,_xAttributes );
+ ctx.importShortProperty( "LineCount", "linecount" ,_xAttributes );
+ ctx.importStringProperty( "Text", "value", _xAttributes );
+ ctx.importAlignProperty( "Align", "align", _xAttributes );
+ ctx.importDataAwareProperty( "linked-cell" , _xAttributes );
+ bool bHasSrcRange = ctx.importDataAwareProperty( "source-cell-range" , _xAttributes );
if (_popup.is() && !bHasSrcRange )
{
MenuPopupElement * p = static_cast< MenuPopupElement * >( _popup.get() );
- xControlModel->setPropertyValue( OUString( "StringItemList" ),
- makeAny( p->getItemValues() ) );
+ xControlModel->setPropertyValue( "StringItemList", makeAny( p->getItemValues() ) );
}
ctx.importEvents( _events );
@@ -2065,18 +1575,14 @@ Reference< xml::input::XElement > CheckBoxElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void CheckBoxElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlCheckBoxModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlCheckBoxModel" );
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
@@ -2091,52 +1597,31 @@ void CheckBoxElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "Label" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importVerticalAlignProperty( OUString( "VerticalAlign" ),
- OUString( "valign" ),
- _xAttributes );
- ctx.importImageURLProperty( OUSTR( "ImageURL" ), OUSTR( "image-src" ), _xAttributes );
- ctx.importImagePositionProperty( OUString( "ImagePosition" ),
- OUString( "image-position" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "MultiLine" ),
- OUString( "multiline" ),
- _xAttributes );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importStringProperty( "Label", "value", _xAttributes );
+ ctx.importAlignProperty( "Align", "align", _xAttributes );
+ ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes );
+ ctx.importImageURLProperty( "ImageURL" , "image-src" , _xAttributes );
+ ctx.importImagePositionProperty( "ImagePosition", "image-position", _xAttributes );
+ ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes );
sal_Bool bTriState = sal_False;
- if (getBoolAttr( &bTriState,
- OUString( "tristate" ),
- _xAttributes,
- _pImport->XMLNS_DIALOGS_UID ))
+ if (getBoolAttr( &bTriState, "tristate", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
- xControlModel->setPropertyValue( OUString( "TriState" ),
- makeAny( bTriState ) );
+ xControlModel->setPropertyValue( "TriState", makeAny( bTriState ) );
}
sal_Bool bChecked = sal_False;
- if (getBoolAttr( &bChecked,
- OUString( "checked" ),
- _xAttributes,
- _pImport->XMLNS_DIALOGS_UID ))
+ if (getBoolAttr( &bChecked, "checked", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
// has "checked" attribute
sal_Int16 nVal = (bChecked ? 1 : 0);
- xControlModel->setPropertyValue( OUString( "State" ),
- makeAny( nVal ) );
+ xControlModel->setPropertyValue( "State", makeAny( nVal ) );
}
else
{
sal_Int16 nVal = (bTriState ? 2 : 0); // if tristate set, but checked omitted => dont know!
- xControlModel->setPropertyValue( OUString( "State" ),
- makeAny( nVal ) );
+ xControlModel->setPropertyValue( "State", makeAny( nVal ) );
}
ctx.importEvents( _events );
@@ -2161,18 +1646,14 @@ Reference< xml::input::XElement > ButtonElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected event element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
void ButtonElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
- ControlImportContext ctx(
- _pImport, getControlId( _xAttributes ),
- OUString( "com.sun.star.awt.UnoControlButtonModel" ) );
+ ControlImportContext ctx( _pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlButtonModel" );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
if (xStyle.is())
@@ -2186,56 +1667,28 @@ void ButtonElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
- ctx.importBooleanProperty( OUString( "Tabstop" ),
- OUString( "tabstop" ),
- _xAttributes );
- ctx.importStringProperty( OUString( "Label" ),
- OUString( "value" ),
- _xAttributes );
- ctx.importAlignProperty( OUString( "Align" ),
- OUString( "align" ),
- _xAttributes );
- ctx.importVerticalAlignProperty( OUString( "VerticalAlign" ),
- OUString( "valign" ),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "DefaultButton" ),
- OUString( "default" ),
- _xAttributes );
- ctx.importButtonTypeProperty( OUString( "PushButtonType" ),
- OUString( "button-type" ),
- _xAttributes );
- ctx.importImageURLProperty( OUSTR( "ImageURL" ), OUSTR( "image-src" ), _xAttributes );
- ctx.importImagePositionProperty( OUString( "ImagePosition" ),
- OUString( "image-position" ),
- _xAttributes );
- ctx.importImageAlignProperty( OUString( "ImageAlign" ),
- OUString( "image-align" ),
- _xAttributes );
- if (ctx.importLongProperty( OUSTR("RepeatDelay"), OUSTR("repeat"),
- _xAttributes ))
- ctx.getControlModel()->setPropertyValue(
- OUSTR("Repeat"), makeAny(true) );
+ ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes );
+ ctx.importStringProperty( "Label", "value", _xAttributes );
+ ctx.importAlignProperty( "Align", "align", _xAttributes );
+ ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes );
+ ctx.importBooleanProperty( "DefaultButton", "default", _xAttributes );
+ ctx.importButtonTypeProperty( "PushButtonType", "button-type", _xAttributes );
+ ctx.importImageURLProperty( "ImageURL" , "image-src" , _xAttributes );
+ ctx.importImagePositionProperty( "ImagePosition", "image-position", _xAttributes );
+ ctx.importImageAlignProperty( "ImageAlign", "image-align", _xAttributes );
+ if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes ))
+ ctx.getControlModel()->setPropertyValue( "Repeat", makeAny(true) );
sal_Int32 toggled = 0;
- if (getLongAttr( &toggled, OUSTR("toggled"), _xAttributes,
- _pImport->XMLNS_DIALOGS_UID ) && toggled == 1)
- ctx.getControlModel()->setPropertyValue(OUSTR("Toggle"), makeAny(true));
- ctx.importBooleanProperty( OUSTR("FocusOnClick"), OUSTR("grab-focus"),
- _xAttributes );
- ctx.importBooleanProperty( OUString( "MultiLine" ),
- OUString( "multiline" ),
- _xAttributes );
+ if (getLongAttr( &toggled, "toggled", _xAttributes, _pImport->XMLNS_DIALOGS_UID ) && toggled == 1)
+ ctx.getControlModel()->setPropertyValue( "Toggle" , makeAny(true));
+ ctx.importBooleanProperty( "FocusOnClick", "grab-focus", _xAttributes );
+ ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes );
// State
sal_Bool bChecked = sal_False;
- if (getBoolAttr(
- &bChecked,
- OUString( "checked" ),
- _xAttributes,
- _pImport->XMLNS_DIALOGS_UID ) &&
- bChecked)
+ if (getBoolAttr( &bChecked, "checked", _xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked)
{
sal_Int16 nVal = 1;
- ctx.getControlModel()->setPropertyValue(
- OUString( "State" ), makeAny( nVal ) );
+ ctx.getControlModel()->setPropertyValue( "State" , makeAny( nVal ) );
}
ctx.importEvents( _events );
@@ -2255,9 +1708,7 @@ Reference< xml::input::XElement > BulletinBoardElement::startChildElement(
{
if (_pImport->XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( "illegal namespace!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("illegal namespace!", Reference< XInterface >(), Any() );
}
// button
else if ( rLocalName == "button" )
@@ -2387,9 +1838,7 @@ Reference< xml::input::XElement > BulletinBoardElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected styles, bulletinboard or bulletinboard element, not: " ) + rLocalName,
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected styles, bulletinboard or bulletinboard element, not: " + rLocalName, Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -2400,17 +1849,12 @@ BulletinBoardElement::BulletinBoardElement(
SAL_THROW(())
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{
- OUString aValue(
- _xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( "left" ) ) );
+ OUString aValue( _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, "left" ) );
if (!aValue.isEmpty())
{
_nBasePosX += toInt32( aValue );
}
- aValue = _xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( "top" ) );
+ aValue = _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, "top" );
if (!aValue.isEmpty())
{
_nBasePosY += toInt32( aValue );
@@ -2426,28 +1870,21 @@ Reference< xml::input::XElement > StyleElement::startChildElement(
Reference< xml::input::XAttributes > const & /*xAttributes*/ )
throw (xml::sax::SAXException, RuntimeException)
{
- throw xml::sax::SAXException(
- OUString( "unexpected sub elements of style!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "unexpected sub elements of style!", Reference< XInterface >(), Any() );
}
//__________________________________________________________________________________________________
void StyleElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
Reference< xml::input::XAttributes > xStyle;
- OUString aStyleId(
- _xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( "style-id" ) ) );
+ OUString aStyleId( _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, "style-id" ) );
if (!aStyleId.isEmpty())
{
_pImport->addStyle( aStyleId, this );
}
else
{
- throw xml::sax::SAXException(
- OUString( "missing style-id attribute!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "missing style-id attribute!", Reference< XInterface >(), Any() );
}
}
@@ -2462,9 +1899,7 @@ Reference< xml::input::XElement > StylesElement::startChildElement(
{
if (_pImport->XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( "illegal namespace!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// style
else if ( rLocalName == "style" )
@@ -2473,9 +1908,7 @@ Reference< xml::input::XElement > StylesElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected style element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected style element!", Reference< XInterface >(), Any() );
}
}
@@ -2495,9 +1928,7 @@ Reference< xml::input::XElement > WindowElement::startChildElement(
}
else if (_pImport->XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( "illegal namespace!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// styles
else if ( rLocalName == "styles" )
@@ -2511,9 +1942,7 @@ Reference< xml::input::XElement > WindowElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( "expected styles ot bulletinboard element!" ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected styles ot bulletinboard element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -2535,27 +1964,12 @@ void WindowElement::endElement()
}
ctx.importDefaults( 0, 0, _xAttributes, false );
- ctx.importBooleanProperty(
- OUString( "Closeable" ),
- OUString( "closeable" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUString( "Moveable" ),
- OUString( "moveable" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUString( "Sizeable" ),
- OUString( "resizeable" ),
- _xAttributes );
- ctx.importStringProperty(
- OUString( "Title" ),
- OUString( "title" ),
- _xAttributes );
- ctx.importBooleanProperty(
- OUString( "Decoration" ),
- OUString( "withtitlebar" ),
- _xAttributes );
- ctx.importImageURLProperty( OUSTR( "ImageURL" ), OUSTR( "image-src" ), _xAttributes );
+ ctx.importBooleanProperty( "Closeable", "closeable", _xAttributes );
+ ctx.importBooleanProperty( "Moveable", "moveable", _xAttributes );
+ ctx.importBooleanProperty("Sizeable", "resizeable", _xAttributes );
+ ctx.importStringProperty("Title", "title", _xAttributes );
+ ctx.importBooleanProperty("Decoration", "withtitlebar", _xAttributes );
+ ctx.importImageURLProperty( "ImageURL" , "image-src" , _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index 580e8dd2f325..6fec94bf13a1 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -93,10 +93,7 @@ ControlElement::ControlElement(
Reference< xml::input::XElement > ControlElement::getStyle(
Reference< xml::input::XAttributes > const & xAttributes )
{
- OUString aStyleId(
- xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("style-id") ) ) );
+ OUString aStyleId( xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID,"style-id" ) );
if (!aStyleId.isEmpty())
{
return _pImport->getStyle( aStyleId );
@@ -107,15 +104,10 @@ Reference< xml::input::XElement > ControlElement::getStyle(
OUString ControlElement::getControlId(
Reference< xml::input::XAttributes > const & xAttributes )
{
- OUString aId(
- xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("id") ) ) );
+ OUString aId( xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, "id" ) );
if (aId.isEmpty())
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("missing id attribute!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "missing id attribute!", Reference< XInterface >(), Any() );
}
return aId;
}
@@ -125,9 +117,7 @@ OUString ControlElement::getControlModelName(
Reference< xml::input::XAttributes > const & xAttributes )
{
OUString aModel;
- aModel = xAttributes->getValueByUidName(
- _pImport->XMLNS_DIALOGS_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("control-implementation") ) );
+ aModel = xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, "control-implementation");
if (aModel.isEmpty())
aModel = rDefaultModel;
return aModel;
@@ -144,23 +134,17 @@ bool StyleElement::importTextColorStyle(
{
if ((_hasValue & 0x2) != 0)
{
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ),
- makeAny( _textColor ) );
+ xProps->setPropertyValue("TextColor", makeAny( _textColor ) );
return true;
}
return false;
}
_inited |= 0x2;
- if (getLongAttr( &_textColor,
- OUString( RTL_CONSTASCII_USTRINGPARAM("text-color") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getLongAttr( &_textColor, "text-color", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_hasValue |= 0x2;
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("TextColor") ),
- makeAny( _textColor ) );
+ xProps->setPropertyValue( "TextColor", makeAny( _textColor ) );
return true;
}
return false;
@@ -173,23 +157,17 @@ bool StyleElement::importTextLineColorStyle(
{
if ((_hasValue & 0x20) != 0)
{
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ),
- makeAny( _textLineColor ) );
+ xProps->setPropertyValue( "TextLineColor", makeAny( _textLineColor ) );
return true;
}
return false;
}
_inited |= 0x20;
- if (getLongAttr( &_textLineColor,
- OUString( RTL_CONSTASCII_USTRINGPARAM("textline-color") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getLongAttr( &_textLineColor, "textline-color", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_hasValue |= 0x20;
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("TextLineColor") ),
- makeAny( _textLineColor ) );
+ xProps->setPropertyValue( "TextLineColor", makeAny( _textLineColor ) );
return true;
}
return false;
@@ -202,23 +180,17 @@ bool StyleElement::importFillColorStyle(
{
if ((_hasValue & 0x10) != 0)
{
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("FillColor") ), makeAny( _fillColor ) );
+ xProps->setPropertyValue( "FillColor", makeAny( _fillColor ) );
return true;
}
return false;
}
_inited |= 0x10;
- if (getLongAttr(
- &_fillColor,
- OUString( RTL_CONSTASCII_USTRINGPARAM("fill-color") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getLongAttr( &_fillColor, "fill-color", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_hasValue |= 0x10;
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("FillColor") ),
- makeAny( _fillColor ) );
+ xProps->setPropertyValue( "FillColor", makeAny( _fillColor ) );
return true;
}
return false;
@@ -231,22 +203,17 @@ bool StyleElement::importBackgroundColorStyle(
{
if ((_hasValue & 0x1) != 0)
{
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ), makeAny( _backgroundColor ) );
+ xProps->setPropertyValue( "BackgroundColor", makeAny( _backgroundColor ) );
return true;
}
return false;
}
_inited |= 0x1;
- if (getLongAttr(
- &_backgroundColor,
- OUString( RTL_CONSTASCII_USTRINGPARAM("background-color") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getLongAttr( &_backgroundColor, "background-color", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_hasValue |= 0x1;
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ), makeAny( _backgroundColor ) );
+ xProps->setPropertyValue( "BackgroundColor", makeAny( _backgroundColor ) );
return true;
}
return false;
@@ -260,12 +227,9 @@ bool StyleElement::importBorderStyle(
{
if ((_hasValue & 0x4) != 0)
{
- xProps->setPropertyValue(
- OUSTR("Border"), makeAny( _border == BORDER_SIMPLE_COLOR
- ? BORDER_SIMPLE : _border ) );
+ xProps->setPropertyValue( "Border", makeAny( _border == BORDER_SIMPLE_COLOR ? BORDER_SIMPLE : _border ) );
if (_border == BORDER_SIMPLE_COLOR)
- xProps->setPropertyValue( OUSTR("BorderColor"),
- makeAny(_borderColor) );
+ xProps->setPropertyValue( "BorderColor", makeAny(_borderColor) );
return true;
}
return false;
@@ -273,9 +237,8 @@ bool StyleElement::importBorderStyle(
_inited |= 0x4;
OUString aValue;
- if (getStringAttr(
- &aValue, OUSTR("border"),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID )) {
+ if (getStringAttr(&aValue, "border", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ {
if ( aValue == "none" )
_border = BORDER_NONE;
else if ( aValue == "3d" )
@@ -301,8 +264,7 @@ bool StyleElement::importVisualEffectStyle(
{
if ((_hasValue & 0x40) != 0)
{
- xProps->setPropertyValue( OUSTR("VisualEffect"),
- makeAny(_visualEffect) );
+ xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) );
return true;
}
return false;
@@ -310,8 +272,7 @@ bool StyleElement::importVisualEffectStyle(
_inited |= 0x40;
OUString aValue;
- if (getStringAttr( &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("look") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "look", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "none" )
{
@@ -329,8 +290,7 @@ bool StyleElement::importVisualEffectStyle(
OSL_ASSERT( 0 );
_hasValue |= 0x40;
- xProps->setPropertyValue( OUSTR("VisualEffect"),
- makeAny(_visualEffect) );
+ xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) );
}
return false;
}
@@ -339,12 +299,9 @@ bool StyleElement::importVisualEffectStyle(
void StyleElement::setFontProperties(
Reference< beans::XPropertySet > const & xProps )
{
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("FontDescriptor") ), makeAny( _descr ) );
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("FontEmphasisMark") ), makeAny( _fontEmphasisMark ) );
- xProps->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("FontRelief") ), makeAny( _fontRelief ) );
+ xProps->setPropertyValue("FontDescriptor", makeAny( _descr ) );
+ xProps->setPropertyValue("FontEmphasisMark", makeAny( _fontEmphasisMark ) );
+ xProps->setPropertyValue("FontRelief", makeAny( _fontRelief ) );
}
//__________________________________________________________________________________________________
bool StyleElement::importFontStyle(
@@ -365,36 +322,25 @@ bool StyleElement::importFontStyle(
bool bFontImport;
// dialog:font-name CDATA #IMPLIED
- bFontImport = getStringAttr(
- &_descr.Name, OUString( RTL_CONSTASCII_USTRINGPARAM("font-name") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID );
+ bFontImport = getStringAttr( &_descr.Name, "font-name", _xAttributes, _pImport->XMLNS_DIALOGS_UID );
// dialog:font-height %numeric; #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-height") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-height", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_descr.Height = (sal_Int16)toInt32( aValue );
bFontImport = true;
}
// dialog:font-width %numeric; #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-width") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr(&aValue, "font-width", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_descr.Width = (sal_Int16)toInt32( aValue );
bFontImport = true;
}
// dialog:font-stylename CDATA #IMPLIED
- bFontImport |= getStringAttr(
- &_descr.StyleName,
- OUString( RTL_CONSTASCII_USTRINGPARAM("font-stylename") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID );
+ bFontImport |= getStringAttr( &_descr.StyleName, "font-stylename", _xAttributes, _pImport->XMLNS_DIALOGS_UID );
// dialog:font-family "(decorative|modern|roman|script|swiss|system)" #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-family") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr(&aValue, "font-family", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "decorative" )
{
@@ -422,17 +368,13 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-family style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("invalid font-family style!", Reference< XInterface >(), Any() );
}
bFontImport = true;
}
// dialog:font-charset "(ansi|mac|ibmpc_437|ibmpc_850|ibmpc_860|ibmpc_861|ibmpc_863|ibmpc_865|system|symbol)" #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-charset") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr(&aValue, "font-charset", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "ansi" )
{
@@ -476,17 +418,13 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-charset style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("invalid font-charset style!", Reference< XInterface >(), Any() );
}
bFontImport = true;
}
// dialog:font-pitch "(fixed|variable)" #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-pitch") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-pitch", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "fixed" )
{
@@ -498,34 +436,26 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-pitch style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("invalid font-pitch style!", Reference< XInterface >(), Any() );
}
bFontImport = true;
}
// dialog:font-charwidth CDATA #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-charwidth") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-charwidth", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_descr.CharacterWidth = aValue.toFloat();
bFontImport = true;
}
// dialog:font-weight CDATA #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-weight") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-weight", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_descr.Weight = aValue.toFloat();
bFontImport = true;
}
// dialog:font-slant "(oblique|italic|reverse_oblique|reverse_italic)" #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-slant") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-slant", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "oblique" )
{
@@ -545,17 +475,13 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-slant style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("invalid font-slant style!", Reference< XInterface >(), Any() );
}
bFontImport = true;
}
// dialog:font-underline "(single|double|dotted|dash|longdash|dashdot|dashdotdot|smallwave|wave|doublewave|bold|bolddotted|bolddash|boldlongdash|bolddashdot|bolddashdotdot|boldwave)" #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-underline") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-underline", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "single" )
{
@@ -627,17 +553,13 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-underline style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("invalid font-underline style!", Reference< XInterface >(), Any() );
}
bFontImport = true;
}
// dialog:font-strikeout "(single|double|bold|slash|x)" #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-strikeout") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-strikeout", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "single" )
{
@@ -661,37 +583,24 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-strikeout style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid font-strikeout style!" , Reference< XInterface >(), Any() );
}
bFontImport = true;
}
// dialog:font-orientation CDATA #IMPLIED
- if (getStringAttr(
- &aValue,
- OUString( RTL_CONSTASCII_USTRINGPARAM("font-orientation") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-orientation", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
_descr.Orientation = aValue.toFloat();
bFontImport = true;
}
// dialog:font-kerning %boolean; #IMPLIED
- bFontImport |= getBoolAttr(
- &_descr.Kerning,
- OUString( RTL_CONSTASCII_USTRINGPARAM("font-kerning") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID );
+ bFontImport |= getBoolAttr( &_descr.Kerning, "font-kerning", _xAttributes, _pImport->XMLNS_DIALOGS_UID );
// dialog:font-wordlinemode %boolean; #IMPLIED
- bFontImport |= getBoolAttr(
- &_descr.WordLineMode,
- OUString( RTL_CONSTASCII_USTRINGPARAM("font-wordlinemode") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID );
+ bFontImport |= getBoolAttr( &_descr.WordLineMode,"font-wordlinemode", _xAttributes, _pImport->XMLNS_DIALOGS_UID );
// dialog:font-type "(raster|device|scalable)" #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-type") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-type", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "raster" )
{
@@ -707,18 +616,14 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-type style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid font-type style!", Reference< XInterface >(), Any() );
}
bFontImport = true;
}
// additional properties which are not part of the FontDescriptor struct
// dialog:font-relief (none|embossed|engraved) #IMPLIED
- if (getStringAttr(
- &aValue, OUString( RTL_CONSTASCII_USTRINGPARAM("font-relief") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr( &aValue, "font-relief", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "none" )
{
@@ -734,17 +639,12 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-relief style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("invalid font-relief style!", Reference< XInterface >(), Any() );
}
bFontImport = true;
}
// dialog:font-emphasismark (none|dot|circle|disc|accent|above|below) #IMPLIED
- if (getStringAttr(
- &aValue,
- OUString( RTL_CONSTASCII_USTRINGPARAM("font-emphasismark") ),
- _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (getStringAttr(&aValue, "font-emphasismark", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "none" )
{
@@ -776,9 +676,7 @@ bool StyleElement::importFontStyle(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid font-emphasismark style!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid font-emphasismark style!", Reference< XInterface >(), Any() );
}
bFontImport = true;
}
@@ -930,9 +828,7 @@ bool ImportContext::importAlignProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid align value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("invalid align value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( nAlign ) );
@@ -966,9 +862,7 @@ bool ImportContext::importVerticalAlignProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid vertical align value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid vertical align value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( eAlign ) );
@@ -992,10 +886,10 @@ bool ImportContext::importImageURLProperty(
uno::Sequence< Any > aArgs( 1 );
aArgs[ 0 ] <<= xDocStorage->getDocumentStorage();
::comphelper::ComponentContext aContext( _pImport->getComponentContext() );
- aContext.createComponentWithArguments( OUSTR( "com.sun.star.comp.Svx.GraphicImportHelper" ), aArgs, xGraphicResolver );
+ aContext.createComponentWithArguments( "com.sun.star.comp.Svx.GraphicImportHelper" , aArgs, xGraphicResolver );
if ( xGraphicResolver.is() )
{
- rtl::OUString aTmp( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
+ OUString aTmp("vnd.sun.star.Package:");
aTmp += sURL;
try
{
@@ -1029,9 +923,9 @@ bool ImportContext::importImageURLProperty(
{
OUString sLinkedCell;
OUString sCellRange;
- if ( rPropName.equals( OUSTR("linked-cell" ) ) )
+ if ( rPropName.equals( "linked-cell" ) )
sLinkedCell = xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, rPropName );
- if ( rPropName.equals( OUSTR( "source-cell-range" ) ) )
+ if ( rPropName.equals( "source-cell-range" ) )
sCellRange = xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, rPropName );
bool bRes = false;
Reference< lang::XMultiServiceFactory > xFac( _pImport->getDocOwner(), UNO_QUERY );
@@ -1041,20 +935,20 @@ bool ImportContext::importImageURLProperty(
if ( !sLinkedCell.isEmpty() )
{
Reference< form::binding::XBindableValue > xBindable( getControlModel(), uno::UNO_QUERY );
- Reference< beans::XPropertySet > xConvertor( xFac->createInstance( OUSTR( "com.sun.star.table.CellAddressConversion" )), uno::UNO_QUERY );
+ Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellAddressConversion" ), uno::UNO_QUERY );
if ( xBindable.is() && xConvertor.is() )
{
table::CellAddress aAddress;
- xConvertor->setPropertyValue( OUSTR( "PersistentRepresentation" ), uno::makeAny( sLinkedCell ) );
- xConvertor->getPropertyValue( OUSTR( "Address" ) ) >>= aAddress;
+ xConvertor->setPropertyValue( "PersistentRepresentation" , uno::makeAny( sLinkedCell ) );
+ xConvertor->getPropertyValue( "Address" ) >>= aAddress;
beans::NamedValue aArg1;
- aArg1.Name = OUSTR("BoundCell");
+ aArg1.Name = "BoundCell";
aArg1.Value <<= aAddress;
uno::Sequence< uno::Any > aArgs(1);
aArgs[ 0 ] <<= aArg1;
- uno::Reference< form::binding::XValueBinding > xBinding( xFac->createInstanceWithArguments( OUSTR("com.sun.star.table.CellValueBinding" ), aArgs ), uno::UNO_QUERY );
+ uno::Reference< form::binding::XValueBinding > xBinding( xFac->createInstanceWithArguments( "com.sun.star.table.CellValueBinding" , aArgs ), uno::UNO_QUERY );
xBindable->setValueBinding( xBinding );
bRes = true;
}
@@ -1063,20 +957,20 @@ bool ImportContext::importImageURLProperty(
if ( !sCellRange.isEmpty() )
{
Reference< form::binding::XListEntrySink > xListEntrySink( getControlModel(), uno::UNO_QUERY );
- Reference< beans::XPropertySet > xConvertor( xFac->createInstance( OUSTR( "com.sun.star.table.CellRangeAddressConversion" )), uno::UNO_QUERY );
+ Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellRangeAddressConversion" ), uno::UNO_QUERY );
if ( xListEntrySink.is() && xConvertor.is() )
{
table::CellRangeAddress aAddress;
- xConvertor->setPropertyValue( OUSTR( "PersistentRepresentation" ), uno::makeAny( sCellRange ) );
- xConvertor->getPropertyValue( OUSTR( "Address" ) ) >>= aAddress;
+ xConvertor->setPropertyValue( "PersistentRepresentation" , uno::makeAny( sCellRange ) );
+ xConvertor->getPropertyValue( "Address" ) >>= aAddress;
beans::NamedValue aArg1;
- aArg1.Name = OUSTR("CellRange");
+ aArg1.Name = "CellRange";
aArg1.Value <<= aAddress;
uno::Sequence< uno::Any > aArgs(1);
aArgs[ 0 ] <<= aArg1;
- uno::Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( OUSTR("com.sun.star.table.CellRangeListSource" ), aArgs ), uno::UNO_QUERY );
+ uno::Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( "com.sun.star.table.CellRangeListSource" , aArgs ), uno::UNO_QUERY );
xListEntrySink->setListEntrySource( xSource );
bRes = true;
}
@@ -1113,9 +1007,7 @@ bool ImportContext::importImageAlignProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid image align value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid image align value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( nAlign ) );
@@ -1188,9 +1080,7 @@ bool ImportContext::importImagePositionProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid image position value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid image position value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( nPosition ) );
@@ -1227,9 +1117,7 @@ bool ImportContext::importButtonTypeProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid button-type value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid button-type value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( nButtonType ) );
@@ -1298,9 +1186,7 @@ bool ImportContext::importDateFormatProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid date-format value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid date-format value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( nFormat ) );
@@ -1345,9 +1231,7 @@ bool ImportContext::importTimeFormatProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid time-format value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid time-format value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( nFormat ) );
@@ -1376,9 +1260,7 @@ bool ImportContext::importOrientationProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid orientation value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid orientation value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( nOrient ) );
@@ -1411,9 +1293,7 @@ bool ImportContext::importLineEndFormatProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid line end format value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid line end format value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( nFormat ) );
@@ -1451,9 +1331,7 @@ bool ImportContext::importSelectionTypeProperty(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("invalid selection type value!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "invalid selection type value!", Reference< XInterface >(), Any() );
}
_xControlModel->setPropertyValue( rPropName, makeAny( eSelectionType ) );
@@ -1529,40 +1407,23 @@ void ImportContext::importEvents(
EventElement * pEventElement = static_cast< EventElement * >( rEvents[ nPos ].get() );
sal_Int32 nUid = pEventElement->getUid();
OUString aLocalName( pEventElement->getLocalName() );
- Reference< xml::input::XAttributes > xAttributes(
- pEventElement->getAttributes() );
+ Reference< xml::input::XAttributes > xAttributes( pEventElement->getAttributes() );
// nowadays script events
if (_pImport->XMLNS_SCRIPT_UID == nUid)
{
- if (!getStringAttr( &descr.ScriptType,
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "language") ),
- xAttributes,
- _pImport->XMLNS_SCRIPT_UID ) ||
- !getStringAttr( &descr.ScriptCode,
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "macro-name") ),
- xAttributes,
- _pImport->XMLNS_SCRIPT_UID ))
+ if (!getStringAttr( &descr.ScriptType, "language" , xAttributes, _pImport->XMLNS_SCRIPT_UID ) ||
+ !getStringAttr( &descr.ScriptCode, "macro-name", xAttributes, _pImport->XMLNS_SCRIPT_UID ))
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "missing language or macro-name "
- "attribute(s) of event!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "missing language or macro-name attribute(s) of event!", Reference< XInterface >(), Any() );
}
if ( descr.ScriptType == "StarBasic" )
{
OUString aLocation;
- if (getStringAttr( &aLocation,
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "location") ),
- xAttributes,
- _pImport->XMLNS_SCRIPT_UID ))
+ if (getStringAttr( &aLocation, "location", xAttributes, _pImport->XMLNS_SCRIPT_UID ))
{
// prepend location
- ::rtl::OUStringBuffer buf;
+ OUStringBuffer buf;
buf.append( aLocation );
buf.append( (sal_Unicode)':' );
buf.append( descr.ScriptCode );
@@ -1576,8 +1437,8 @@ void ImportContext::importEvents(
// the protocol ) and fix it up!!
if ( descr.ScriptCode.indexOf( ':' ) == -1 )
{
- ::rtl::OUStringBuffer buf;
- buf.append( OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:" ) ) );
+ OUStringBuffer buf;
+ buf.append( "vnd.sun.star.script:" );
buf.append( descr.ScriptCode );
descr.ScriptCode = buf.makeStringAndClear();
}
@@ -1587,24 +1448,13 @@ void ImportContext::importEvents(
if ( aLocalName == "event" )
{
OUString aEventName;
- if (! getStringAttr(
- &aEventName,
- OUString(
- RTL_CONSTASCII_USTRINGPARAM("event-name") ),
- xAttributes,
- _pImport->XMLNS_SCRIPT_UID ))
+ if (! getStringAttr( &aEventName, "event-name", xAttributes, _pImport->XMLNS_SCRIPT_UID ))
{
- throw xml::sax::SAXException(
- OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "missing event-name attribute!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "missing event-name attribute!", Reference< XInterface >(), Any() );
}
// lookup in table
- ::rtl::OString str(
- ::rtl::OUStringToOString(
- aEventName, RTL_TEXTENCODING_ASCII_US ) );
+ OString str( OUStringToOString( aEventName, RTL_TEXTENCODING_ASCII_US ) );
StringTriple const * p = g_pEventTranslations;
while (p->first)
{
@@ -1623,82 +1473,40 @@ void ImportContext::importEvents(
if (! p->first)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no matching event-name found!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "no matching event-name found!", Reference< XInterface >(), Any() );
}
}
else // script:listener-event element
{
- OSL_ASSERT( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("listener-event") ) );
-
- if (!getStringAttr(
- &descr.ListenerType,
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "listener-type") ),
- xAttributes,
- _pImport->XMLNS_SCRIPT_UID ) ||
- !getStringAttr(
- &descr.EventMethod,
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "listener-method") ),
- xAttributes, _pImport->XMLNS_SCRIPT_UID ))
+ OSL_ASSERT( aLocalName == "listener-event" );
+
+ if (!getStringAttr( &descr.ListenerType, "listener-type" , xAttributes, _pImport->XMLNS_SCRIPT_UID ) ||
+ !getStringAttr( &descr.EventMethod , "listener-method", xAttributes, _pImport->XMLNS_SCRIPT_UID ))
{
- throw xml::sax::SAXException(
- OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "missing listener-type or "
- "listener-method attribute(s)!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("missing listener-type or listener-method attribute(s)!", Reference< XInterface >(), Any() );
}
// optional listener param
- getStringAttr(
- &descr.AddListenerParam,
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "listener-param") ),
- xAttributes, _pImport->XMLNS_SCRIPT_UID );
+ getStringAttr( &descr.AddListenerParam, "listener-param", xAttributes, _pImport->XMLNS_SCRIPT_UID );
}
}
else // deprecated dlg:event element
{
- OSL_ASSERT(
- _pImport->XMLNS_DIALOGS_UID == nUid &&
- aLocalName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("event") ) );
-
- if (!getStringAttr( &descr.ListenerType,
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "listener-type") ),
- xAttributes,
- _pImport->XMLNS_DIALOGS_UID ) ||
- !getStringAttr( &descr.EventMethod,
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "event-method") ),
- xAttributes,
- _pImport->XMLNS_DIALOGS_UID ))
+ OSL_ASSERT( _pImport->XMLNS_DIALOGS_UID == nUid && aLocalName == "event" );
+
+ if (!getStringAttr( &descr.ListenerType, "listener-type", xAttributes, _pImport->XMLNS_DIALOGS_UID ) ||
+ !getStringAttr( &descr.EventMethod, "event-method", xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("missing listener-type or event-method attribute(s)!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("missing listener-type or event-method attribute(s)!", Reference< XInterface >(), Any() );
}
- getStringAttr(
- &descr.ScriptType,
- OUString( RTL_CONSTASCII_USTRINGPARAM("script-type") ),
- xAttributes, _pImport->XMLNS_DIALOGS_UID );
- getStringAttr(
- &descr.ScriptCode,
- OUString( RTL_CONSTASCII_USTRINGPARAM("script-code") ),
- xAttributes, _pImport->XMLNS_DIALOGS_UID );
- getStringAttr(
- &descr.AddListenerParam,
- OUString( RTL_CONSTASCII_USTRINGPARAM("param") ),
- xAttributes, _pImport->XMLNS_DIALOGS_UID );
+ getStringAttr( &descr.ScriptType, "script-type", xAttributes, _pImport->XMLNS_DIALOGS_UID );
+ getStringAttr( &descr.ScriptCode, "script-code", xAttributes, _pImport->XMLNS_DIALOGS_UID );
+ getStringAttr( &descr.AddListenerParam, "param", xAttributes, _pImport->XMLNS_DIALOGS_UID );
}
- ::rtl::OUStringBuffer buf;
+ OUStringBuffer buf;
buf.append( descr.ListenerType );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("::") );
+ buf.appendAscii( "::" );
buf.append( descr.EventMethod );
xEvents->insertByName( buf.makeStringAndClear(), makeAny( descr ) );
}
@@ -1711,34 +1519,22 @@ void ImportContext::importDefaults(
Reference< xml::input::XAttributes > const & xAttributes,
bool supportPrintable )
{
- _xControlModel->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ),
- makeAny( _aId ) );
+ _xControlModel->setPropertyValue( "Name", makeAny( _aId ) );
- importShortProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("TabIndex") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("tab-index") ),
- xAttributes );
+ importShortProperty( "TabIndex", "tab-index", xAttributes );
sal_Bool bDisable = sal_False;
- if (getBoolAttr(
- &bDisable, OUString( RTL_CONSTASCII_USTRINGPARAM("disabled") ),
- xAttributes, _pImport->XMLNS_DIALOGS_UID ) &&
- bDisable)
+ if (getBoolAttr( &bDisable,"disabled", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bDisable)
{
- _xControlModel->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Enabled") ), makeAny( sal_False ) );
+ _xControlModel->setPropertyValue( "Enabled", makeAny( sal_False ) );
}
sal_Bool bVisible = sal_True;
- if (getBoolAttr(
- &bVisible, OUString( RTL_CONSTASCII_USTRINGPARAM("visible") ),
- xAttributes, _pImport->XMLNS_DIALOGS_UID ) && !bVisible)
+ if (getBoolAttr( &bVisible, "visible", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && !bVisible)
{
try
{
-
- _xControlModel->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("EnableVisible") ), makeAny( sal_False ) );
+ _xControlModel->setPropertyValue( "EnableVisible", makeAny( sal_False ) );
}
catch( Exception& )
{
@@ -1746,55 +1542,29 @@ void ImportContext::importDefaults(
}
}
- if (!importLongProperty( nBaseX,
- OUString( RTL_CONSTASCII_USTRINGPARAM("PositionX") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("left") ),
- xAttributes ) ||
- !importLongProperty( nBaseY,
- OUString( RTL_CONSTASCII_USTRINGPARAM("PositionY") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("top") ),
- xAttributes ) ||
- !importLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("width") ),
- xAttributes ) ||
- !importLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("height") ),
- xAttributes ))
+ if (!importLongProperty( nBaseX, "PositionX", "left", xAttributes ) ||
+ !importLongProperty( nBaseY, "PositionY", "top", xAttributes ) ||
+ !importLongProperty( "Width", "width", xAttributes ) ||
+ !importLongProperty( "Height", "height", xAttributes ))
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("missing pos size attribute(s)!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "missing pos size attribute(s)!", Reference< XInterface >(), Any() );
}
if (supportPrintable)
{
- importBooleanProperty(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Printable") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("printable") ),
- xAttributes );
+ importBooleanProperty("Printable", "printable", xAttributes );
}
sal_Int32 nLong;
- if (! getLongAttr(
- &nLong,
- OUString( RTL_CONSTASCII_USTRINGPARAM("page") ),
- xAttributes, _pImport->XMLNS_DIALOGS_UID ))
+ if (! getLongAttr( &nLong, "page", xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
nLong = 0;
}
- _xControlModel->setPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("Step") ),
- makeAny( nLong ) );
-
- importStringProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Tag") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("tag") ),
- xAttributes );
- importStringProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("HelpText") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("help-text") ),
- xAttributes );
- importStringProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("HelpURL") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("help-url") ),
- xAttributes );
+ _xControlModel->setPropertyValue( "Step", makeAny( nLong ) );
+
+ importStringProperty("Tag", "tag", xAttributes );
+ importStringProperty( "HelpText", "help-text", xAttributes );
+ importStringProperty( "HelpURL", "help-url", xAttributes );
}
//##################################################################################################
@@ -1853,9 +1623,7 @@ Reference< xml::input::XElement > ElementBase::startChildElement(
Reference< xml::input::XAttributes > const & /*xAttributes*/ )
throw (xml::sax::SAXException, RuntimeException)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("unexpected element!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "unexpected element!", Reference< XInterface >(), Any() );
}
//__________________________________________________________________________________________________
@@ -1905,10 +1673,8 @@ void DialogImport::startDocument(
Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping )
throw (xml::sax::SAXException, RuntimeException)
{
- XMLNS_DIALOGS_UID = xNamespaceMapping->getUidByUri(
- OUSTR(XMLNS_DIALOGS_URI) );
- XMLNS_SCRIPT_UID = xNamespaceMapping->getUidByUri(
- OUSTR(XMLNS_SCRIPT_URI) );
+ XMLNS_DIALOGS_UID = xNamespaceMapping->getUidByUri( XMLNS_DIALOGS_URI );
+ XMLNS_SCRIPT_UID = xNamespaceMapping->getUidByUri( XMLNS_SCRIPT_URI );
}
//__________________________________________________________________________________________________
void DialogImport::endDocument()
@@ -1938,9 +1704,7 @@ Reference< xml::input::XElement > DialogImport::startRootElement(
{
if (XMLNS_DIALOGS_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal namespace!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// window
else if ( rLocalName == "window" )
@@ -1949,10 +1713,7 @@ Reference< xml::input::XElement > DialogImport::startRootElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "illegal root element (expected window) given: ") ) +
- rLocalName, Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal root element (expected window) given: " + rLocalName, Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -1970,10 +1731,7 @@ Reference< util::XNumberFormatsSupplier > const & DialogImport::getNumberFormats
{
Reference< XComponentContext > xContext( getComponentContext() );
Reference< util::XNumberFormatsSupplier > xSupplier(
- xContext->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.util.NumberFormatsSupplier") ),
- xContext ), UNO_QUERY );
+ xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.util.NumberFormatsSupplier", xContext ), UNO_QUERY );
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if (! _xSupplier.is())
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index dad6a42acb98..83800209dc72 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -41,15 +41,15 @@ namespace xmlscript
// component operations
// =============================================================================
- ::rtl::OUString getImplementationName_XMLBasicExporter()
+ OUString getImplementationName_XMLBasicExporter()
{
- static ::rtl::OUString* pImplName = 0;
+ static OUString* pImplName = 0;
if ( !pImplName )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pImplName )
{
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.xmlscript.XMLBasicExporter" ) );
+ static OUString aImplName( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
pImplName = &aImplName;
}
}
@@ -58,16 +58,16 @@ namespace xmlscript
// -----------------------------------------------------------------------------
- Sequence< ::rtl::OUString > getSupportedServiceNames_XMLBasicExporter()
+ Sequence< OUString > getSupportedServiceNames_XMLBasicExporter()
{
- static Sequence< ::rtl::OUString >* pNames = 0;
+ static Sequence< OUString >* pNames = 0;
if ( !pNames )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pNames )
{
- static Sequence< ::rtl::OUString > aNames(1);
- aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.XMLBasicExporter" ) );
+ static Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLBasicExporter";
pNames = &aNames;
}
}
@@ -76,15 +76,15 @@ namespace xmlscript
// -----------------------------------------------------------------------------
- ::rtl::OUString getImplementationName_XMLOasisBasicExporter()
+ OUString getImplementationName_XMLOasisBasicExporter()
{
- static ::rtl::OUString* pImplName = 0;
+ static OUString* pImplName = 0;
if ( !pImplName )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pImplName )
{
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" ) );
+ static OUString aImplName( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" );
pImplName = &aImplName;
}
}
@@ -93,16 +93,16 @@ namespace xmlscript
// -----------------------------------------------------------------------------
- Sequence< ::rtl::OUString > getSupportedServiceNames_XMLOasisBasicExporter()
+ Sequence< OUString > getSupportedServiceNames_XMLOasisBasicExporter()
{
- static Sequence< ::rtl::OUString >* pNames = 0;
+ static Sequence< OUString >* pNames = 0;
if ( !pNames )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pNames )
{
- static Sequence< ::rtl::OUString > aNames(1);
- aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.XMLOasisBasicExporter" ) );
+ static Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicExporter";
pNames = &aNames;
}
}
@@ -130,11 +130,11 @@ namespace xmlscript
// XServiceInfo
// -----------------------------------------------------------------------------
- sal_Bool XMLBasicExporterBase::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
+ sal_Bool XMLBasicExporterBase::supportsService( const OUString& rServiceName ) throw (RuntimeException)
{
- Sequence< ::rtl::OUString > aNames( getSupportedServiceNames() );
- const ::rtl::OUString* pNames = aNames.getConstArray();
- const ::rtl::OUString* pEnd = pNames + aNames.getLength();
+ Sequence< OUString > aNames( getSupportedServiceNames() );
+ const OUString* pNames = aNames.getConstArray();
+ const OUString* pEnd = pNames + aNames.getLength();
for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
;
@@ -155,16 +155,12 @@ namespace xmlscript
if ( !m_xHandler.is() )
{
- throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMLBasicExporterBase::initialize: invalid argument format!" ) ),
- Reference< XInterface >() );
+ throw RuntimeException( "XMLBasicExporterBase::initialize: invalid argument format!", Reference< XInterface >() );
}
}
else
{
- throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMLBasicExporterBase::initialize: invalid number of arguments!" ) ),
- Reference< XInterface >() );
+ throw RuntimeException( "XMLBasicExporterBase::initialize: invalid number of arguments!", Reference< XInterface >() );
}
}
@@ -181,9 +177,7 @@ namespace xmlscript
if ( !m_xModel.is() )
{
- throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMLBasicExporter::setSourceDocument: no document model!" ) ),
- Reference< XInterface >(), 1 );
+ throw IllegalArgumentException( "XMLBasicExporter::setSourceDocument: no document model!", Reference< XInterface >(), 1 );
}
}
@@ -205,35 +199,33 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
m_xHandler->startDocument();
// ooo/script prefix and URI
- ::rtl::OUString aPrefix;
- ::rtl::OUString aURI;
+ OUString aPrefix;
+ OUString aURI;
if ( m_bOasis )
{
- aPrefix = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_OOO_PREFIX ) );
- aURI = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_OOO_URI ) );
+ aPrefix = XMLNS_OOO_PREFIX;
+ aURI = XMLNS_OOO_URI;
}
else
{
- aPrefix = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_SCRIPT_PREFIX ) );
- aURI = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_SCRIPT_URI ) );
+ aPrefix = XMLNS_SCRIPT_PREFIX;
+ aURI = XMLNS_SCRIPT_URI;
}
// ooo/script:libraries element
- ::rtl::OUString aLibContElementName( aPrefix );
- aLibContElementName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":libraries" ) );
+ OUString aLibContElementName( aPrefix );
+ aLibContElementName += ":libraries";
XMLElement* pLibContElement = new XMLElement( aLibContElementName );
Reference< xml::sax::XAttributeList > xLibContAttribs( pLibContElement );
// ooo/script namespace attribute
- pLibContElement->addAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "xmlns:" ) ) + aPrefix,
- aURI );
+ pLibContElement->addAttribute( "xmlns:" + aPrefix, aURI );
// xlink namespace attribute
- pLibContElement->addAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "xmlns:" XMLNS_XLINK_PREFIX ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK_URI ) ) );
+ pLibContElement->addAttribute( "xmlns:" XMLNS_XLINK_PREFIX, XMLNS_XLINK_URI );
// <ooo/script:libraries...
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->startElement( aLibContElementName, xLibContAttribs );
Reference< script::XLibraryContainer2 > xLibContainer;
@@ -248,82 +240,76 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
// try the "BasicLibraries" property (old-style, for compatibility)
Reference< beans::XPropertySet > xPSet( m_xModel, UNO_QUERY );
if ( xPSet.is() )
- xPSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicLibraries" ) ) ) >>= xLibContainer;
+ xPSet->getPropertyValue("BasicLibraries" ) >>= xLibContainer;
}
OSL_ENSURE( xLibContainer.is(), "XMLBasicExporterBase::filter: nowhere to export to!" );
if ( xLibContainer.is() )
{
- Sequence< ::rtl::OUString > aLibNames = xLibContainer->getElementNames();
+ Sequence< OUString > aLibNames = xLibContainer->getElementNames();
sal_Int32 nLibCount = aLibNames.getLength();
- const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
+ const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; ++i )
{
- ::rtl::OUString aLibName( pLibNames[i] );
+ OUString aLibName( pLibNames[i] );
if ( xLibContainer->hasByName( aLibName ) )
{
- ::rtl::OUString aTrueStr( RTL_CONSTASCII_USTRINGPARAM( "true" ) );
+ OUString aTrueStr( "true" );
if ( xLibContainer->isLibraryLink( aLibName ) )
{
// ooo/script:library-linked element
- ::rtl::OUString aLibElementName( aPrefix );
- aLibElementName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":library-linked" ) );
+ OUString aLibElementName( aPrefix );
+ aLibElementName += ":library-linked";
XMLElement* pLibElement = new XMLElement( aLibElementName );
Reference< xml::sax::XAttributeList > xLibAttribs;
xLibAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement );
// ooo/script:name attribute
- pLibElement->addAttribute( aPrefix + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":name" ) ),
- aLibName );
+ pLibElement->addAttribute( aPrefix + ":name", aLibName );
- ::rtl::OUString aLinkURL( xLibContainer->getLibraryLinkURL( aLibName ) );
+ OUString aLinkURL( xLibContainer->getLibraryLinkURL( aLibName ) );
if ( !aLinkURL.isEmpty() )
{
// xlink:href attribute
- pLibElement->addAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK_PREFIX ":href" ) ),
- aLinkURL );
+ pLibElement->addAttribute( XMLNS_XLINK_PREFIX ":href", aLinkURL );
// xlink:type attribute
- pLibElement->addAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK_PREFIX ":type" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "simple" ) ) );
+ pLibElement->addAttribute( XMLNS_XLINK_PREFIX ":type", "simple" );
}
if ( xLibContainer->isLibraryReadOnly( aLibName ) )
{
// ooo/script:readonly attribute
- pLibElement->addAttribute( aPrefix + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":readonly" ) ),
- aTrueStr );
+ pLibElement->addAttribute( aPrefix + ":readonly", aTrueStr );
}
// <ooo/script:library-linked...
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->startElement( aLibElementName, xLibAttribs );
// ...ooo/script:library-linked>
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->endElement( aLibElementName );
}
else
{
// ooo/script:library-embedded element
- ::rtl::OUString aLibElementName( aPrefix );
- aLibElementName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":library-embedded" ) );
+ OUString aLibElementName( aPrefix );
+ aLibElementName += ":library-embedded";
XMLElement* pLibElement = new XMLElement( aLibElementName );
Reference< xml::sax::XAttributeList > xLibAttribs;
xLibAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement );
// ooo/script:name attribute
- pLibElement->addAttribute( aPrefix + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":name" ) ),
- aLibName );
+ pLibElement->addAttribute( aPrefix + ":name", aLibName );
if ( xLibContainer->isLibraryReadOnly( aLibName ) )
{
// ooo/script:readonly attribute
- pLibElement->addAttribute( aPrefix + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":readonly" ) ),
- aTrueStr );
+ pLibElement->addAttribute( aPrefix + ":readonly", aTrueStr );
}
// TODO: password protected libraries
@@ -332,7 +318,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
continue;
// <ooo/script:library-embedded...
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->startElement( aLibElementName, xLibAttribs );
if ( !xLibContainer->isLibraryLoaded( aLibName ) )
@@ -343,61 +329,60 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
if ( xLib.is() )
{
- Sequence< ::rtl::OUString > aModNames = xLib->getElementNames();
+ Sequence< OUString > aModNames = xLib->getElementNames();
sal_Int32 nModCount = aModNames.getLength();
- const ::rtl::OUString* pModNames = aModNames.getConstArray();
+ const OUString* pModNames = aModNames.getConstArray();
for ( sal_Int32 j = 0 ; j < nModCount ; ++j )
{
- ::rtl::OUString aModName( pModNames[j] );
+ OUString aModName( pModNames[j] );
if ( xLib->hasByName( aModName ) )
{
// ooo/script:module element
- ::rtl::OUString aModElementName( aPrefix );
- aModElementName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":module" ) );
+ OUString aModElementName( aPrefix );
+ aModElementName += ":module";
XMLElement* pModElement = new XMLElement( aModElementName );
Reference< xml::sax::XAttributeList > xModAttribs;
xModAttribs = static_cast< xml::sax::XAttributeList* >( pModElement );
// ooo/script:name attribute
- pModElement->addAttribute( aPrefix + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":name" ) ),
- aModName );
+ pModElement->addAttribute( aPrefix + ":name", aModName );
// <ooo/script:module...
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->startElement( aModElementName, xModAttribs );
// ooo/script:source-code element
- ::rtl::OUString aSourceElementName( aPrefix );
- aSourceElementName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":source-code" ) );
+ OUString aSourceElementName( aPrefix );
+ aSourceElementName += ":source-code";
XMLElement* pSourceElement = new XMLElement( aSourceElementName );
Reference< xml::sax::XAttributeList > xSourceAttribs;
xSourceAttribs = static_cast< xml::sax::XAttributeList* >( pSourceElement );
// <ooo/script:source-code...
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->startElement( aSourceElementName, xSourceAttribs );
// module data
// TODO: write encrypted data for password protected libraries
- ::rtl::OUString aSource;
+ OUString aSource;
xLib->getByName( aModName ) >>= aSource;
m_xHandler->characters( aSource );
// TODO: <ooo/script:byte-code>
// ...ooo/script:source-code>
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->endElement( aSourceElementName );
// ...ooo/script:module>
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->endElement( aModElementName );
}
}
}
// ...ooo/script:library-embedded>
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->endElement( aLibElementName );
}
}
@@ -405,7 +390,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
}
// ...ooo/script:libraries>
- m_xHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xHandler->ignorableWhitespace( OUString() );
m_xHandler->endElement( aLibContElementName );
m_xHandler->endDocument();
@@ -414,25 +399,25 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
catch ( const container::NoSuchElementException& e )
{
OSL_TRACE( "XMLBasicExporterBase::filter: caught NoSuchElementException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
bReturn = sal_False;
}
catch ( const lang::IllegalArgumentException& e )
{
OSL_TRACE( "XMLBasicExporterBase::filter: caught IllegalArgumentException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
bReturn = sal_False;
}
catch ( const lang::WrappedTargetException& e )
{
OSL_TRACE( "XMLBasicExporterBase::filter: caught WrappedTargetException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
bReturn = sal_False;
}
catch ( const xml::sax::SAXException& e )
{
OSL_TRACE( "XMLBasicExporterBase::filter: caught SAXException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
bReturn = sal_False;
}
@@ -469,14 +454,14 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
// XServiceInfo
// -----------------------------------------------------------------------------
- ::rtl::OUString XMLBasicExporter::getImplementationName( ) throw (RuntimeException)
+ OUString XMLBasicExporter::getImplementationName( ) throw (RuntimeException)
{
return getImplementationName_XMLBasicExporter();
}
// -----------------------------------------------------------------------------
- Sequence< ::rtl::OUString > XMLBasicExporter::getSupportedServiceNames( ) throw (RuntimeException)
+ Sequence< OUString > XMLBasicExporter::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_XMLBasicExporter();
}
@@ -501,14 +486,14 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
// XServiceInfo
// -----------------------------------------------------------------------------
- ::rtl::OUString XMLOasisBasicExporter::getImplementationName( ) throw (RuntimeException)
+ OUString XMLOasisBasicExporter::getImplementationName( ) throw (RuntimeException)
{
return getImplementationName_XMLOasisBasicExporter();
}
// -----------------------------------------------------------------------------
- Sequence< ::rtl::OUString > XMLOasisBasicExporter::getSupportedServiceNames( ) throw (RuntimeException)
+ Sequence< OUString > XMLOasisBasicExporter::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_XMLOasisBasicExporter();
}
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index 0402436b355a..34eadcbb52ad 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -40,7 +40,7 @@ namespace xmlscript
// BasicElementBase
// =============================================================================
- BasicElementBase::BasicElementBase( const ::rtl::OUString& rLocalName,
+ BasicElementBase::BasicElementBase( const OUString& rLocalName,
const Reference< xml::input::XAttributes >& xAttributes,
BasicElementBase* pParent, BasicImport* pImport )
:m_pImport( pImport )
@@ -66,13 +66,13 @@ namespace xmlscript
// -----------------------------------------------------------------------------
- bool BasicElementBase::getBoolAttr( sal_Bool* pRet, const ::rtl::OUString& rAttrName,
+ bool BasicElementBase::getBoolAttr( sal_Bool* pRet, const OUString& rAttrName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes,
sal_Int32 nUid )
{
if ( xAttributes.is() )
{
- ::rtl::OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) );
+ OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) );
if ( !aValue.isEmpty() )
{
if ( aValue == "true" )
@@ -87,9 +87,7 @@ namespace xmlscript
}
else
{
- throw xml::sax::SAXException(
- rAttrName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": no boolean value (true|false)!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException(rAttrName + ": no boolean value (true|false)!", Reference< XInterface >(), Any() );
}
}
}
@@ -108,7 +106,7 @@ namespace xmlscript
// -----------------------------------------------------------------------------
- ::rtl::OUString BasicElementBase::getLocalName()
+ OUString BasicElementBase::getLocalName()
throw (RuntimeException)
{
return m_aLocalName;
@@ -136,18 +134,16 @@ namespace xmlscript
// -----------------------------------------------------------------------------
Reference< xml::input::XElement > BasicElementBase::startChildElement(
- sal_Int32 /*nUid*/, const ::rtl::OUString& /*rLocalName*/,
+ sal_Int32 /*nUid*/, const OUString& /*rLocalName*/,
const Reference< xml::input::XAttributes >& /*xAttributes*/ )
throw (xml::sax::SAXException, RuntimeException)
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unexpected element!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("unexpected element!", Reference< XInterface >(), Any() );
}
// -----------------------------------------------------------------------------
-void BasicElementBase::characters( const ::rtl::OUString& /*rChars*/ )
+void BasicElementBase::characters( const OUString& /*rChars*/ )
throw (xml::sax::SAXException, RuntimeException)
{
// not used, all characters ignored
@@ -155,14 +151,14 @@ void BasicElementBase::characters( const ::rtl::OUString& /*rChars*/ )
// -----------------------------------------------------------------------------
-void BasicElementBase::ignorableWhitespace( const ::rtl::OUString& /*rWhitespaces*/ )
+void BasicElementBase::ignorableWhitespace( const OUString& /*rWhitespaces*/ )
throw (xml::sax::SAXException, RuntimeException)
{
}
// -----------------------------------------------------------------------------
-void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/, const ::rtl::OUString& /*rData*/ )
+void BasicElementBase::processingInstruction( const OUString& /*rTarget*/, const OUString& /*rData*/ )
throw (xml::sax::SAXException, RuntimeException)
{
}
@@ -179,7 +175,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// BasicLibrariesElement
// =============================================================================
- BasicLibrariesElement::BasicLibrariesElement( const ::rtl::OUString& rLocalName,
+ BasicLibrariesElement::BasicLibrariesElement( const OUString& rLocalName,
const Reference< xml::input::XAttributes >& xAttributes,
BasicElementBase* pParent, BasicImport* pImport,
const Reference< script::XLibraryContainer2 >& rxLibContainer )
@@ -193,7 +189,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// -----------------------------------------------------------------------------
Reference< xml::input::XElement > BasicLibrariesElement::startChildElement(
- sal_Int32 nUid, const ::rtl::OUString& rLocalName,
+ sal_Int32 nUid, const OUString& rLocalName,
const Reference< xml::input::XAttributes >& xAttributes )
throw (xml::sax::SAXException, RuntimeException)
{
@@ -201,26 +197,18 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
if ( nUid != m_pImport->XMLNS_UID )
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal namespace!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
else if ( rLocalName == "library-linked" )
{
if ( xAttributes.is() )
{
- ::rtl::OUString aName = xAttributes->getValueByUidName(
- m_pImport->XMLNS_UID,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "name" ) ) );
+ OUString aName = xAttributes->getValueByUidName( m_pImport->XMLNS_UID, "name" );
- ::rtl::OUString aStorageURL = xAttributes->getValueByUidName(
- m_pImport->XMLNS_XLINK_UID,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "href" ) ) );
+ OUString aStorageURL = xAttributes->getValueByUidName(m_pImport->XMLNS_XLINK_UID, "href" );
sal_Bool bReadOnly = sal_False;
- getBoolAttr( &bReadOnly,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "readonly" ) ),
- xAttributes, m_pImport->XMLNS_UID );
+ getBoolAttr( &bReadOnly,"readonly", xAttributes, m_pImport->XMLNS_UID );
if ( m_xLibContainer.is() )
{
@@ -234,12 +222,12 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
catch ( const container::ElementExistException& e )
{
OSL_TRACE( "BasicLibrariesElement::startChildElement: caught ElementExceptionExist reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
catch ( const lang::IllegalArgumentException& e )
{
OSL_TRACE( "BasicLibrariesElement::startChildElement: caught IllegalArgumentException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
}
@@ -250,14 +238,10 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
if ( xAttributes.is() )
{
- ::rtl::OUString aName = xAttributes->getValueByUidName(
- m_pImport->XMLNS_UID,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "name" ) ) );
+ OUString aName = xAttributes->getValueByUidName( m_pImport->XMLNS_UID, "name" );
sal_Bool bReadOnly = sal_False;
- getBoolAttr( &bReadOnly,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "readonly" ) ),
- xAttributes, m_pImport->XMLNS_UID );
+ getBoolAttr( &bReadOnly, "readonly", xAttributes, m_pImport->XMLNS_UID );
if ( m_xLibContainer.is() )
{
@@ -280,16 +264,14 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
catch ( const lang::IllegalArgumentException& e )
{
OSL_TRACE( "BasicLibrariesElement::startChildElement: caught IllegalArgumentException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
}
}
else
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "expected library-linked or library-embedded element!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected library-linked or library-embedded element!", Reference< XInterface >(), Any() );
}
return xElement;
@@ -307,11 +289,11 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// BasicEmbeddedLibraryElement
// =============================================================================
- BasicEmbeddedLibraryElement::BasicEmbeddedLibraryElement( const ::rtl::OUString& rLocalName,
+ BasicEmbeddedLibraryElement::BasicEmbeddedLibraryElement( const OUString& rLocalName,
const Reference< xml::input::XAttributes >& xAttributes,
BasicElementBase* pParent, BasicImport* pImport,
const Reference< script::XLibraryContainer2 >& rxLibContainer,
- const ::rtl::OUString& rLibName, bool bReadOnly )
+ const OUString& rLibName, bool bReadOnly )
:BasicElementBase( rLocalName, xAttributes, pParent, pImport )
,m_xLibContainer( rxLibContainer )
,m_aLibName( rLibName )
@@ -325,7 +307,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
catch ( const lang::WrappedTargetException& e )
{
OSL_TRACE( "BasicEmbeddedLibraryElement CTOR: caught WrappedTargetException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
@@ -334,7 +316,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// -----------------------------------------------------------------------------
Reference< xml::input::XElement > BasicEmbeddedLibraryElement::startChildElement(
- sal_Int32 nUid, const ::rtl::OUString& rLocalName,
+ sal_Int32 nUid, const OUString& rLocalName,
const Reference< xml::input::XAttributes >& xAttributes )
throw (xml::sax::SAXException, RuntimeException)
{
@@ -342,17 +324,13 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
if ( nUid != m_pImport->XMLNS_UID )
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal namespace!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
else if ( rLocalName == "module" )
{
if ( xAttributes.is() )
{
- ::rtl::OUString aName = xAttributes->getValueByUidName(
- m_pImport->XMLNS_UID,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "name" ) ) );
+ OUString aName = xAttributes->getValueByUidName(m_pImport->XMLNS_UID, "name" );
if ( m_xLib.is() && !aName.isEmpty() )
xElement.set( new BasicModuleElement( rLocalName, xAttributes, this, m_pImport, m_xLib, aName ) );
@@ -360,9 +338,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
}
else
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "expected module element!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected module element!", Reference< XInterface >(), Any() );
}
return xElement;
@@ -382,10 +358,10 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// BasicModuleElement
// =============================================================================
- BasicModuleElement::BasicModuleElement( const ::rtl::OUString& rLocalName,
+ BasicModuleElement::BasicModuleElement( const OUString& rLocalName,
const Reference< xml::input::XAttributes >& xAttributes,
BasicElementBase* pParent, BasicImport* pImport,
- const Reference< container::XNameContainer >& rxLib, const ::rtl::OUString& rName )
+ const Reference< container::XNameContainer >& rxLib, const OUString& rName )
:BasicElementBase( rLocalName, xAttributes, pParent, pImport )
,m_xLib( rxLib )
,m_aName( rName )
@@ -397,7 +373,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// -----------------------------------------------------------------------------
Reference< xml::input::XElement > BasicModuleElement::startChildElement(
- sal_Int32 nUid, const ::rtl::OUString& rLocalName,
+ sal_Int32 nUid, const OUString& rLocalName,
const Reference< xml::input::XAttributes >& xAttributes )
throw (xml::sax::SAXException, RuntimeException)
{
@@ -407,9 +383,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
if ( nUid != m_pImport->XMLNS_UID )
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal namespace!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
else if ( rLocalName == "source-code" )
{
@@ -423,9 +397,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
}
else
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "expected source-code element!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected source-code element!", Reference< XInterface >(), Any() );
}
return xElement;
@@ -443,10 +415,10 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// BasicSourceCodeElement
// =============================================================================
- BasicSourceCodeElement::BasicSourceCodeElement( const ::rtl::OUString& rLocalName,
+ BasicSourceCodeElement::BasicSourceCodeElement( const OUString& rLocalName,
const Reference< xml::input::XAttributes >& xAttributes,
BasicElementBase* pParent, BasicImport* pImport,
- const Reference< container::XNameContainer >& rxLib, const ::rtl::OUString& rName )
+ const Reference< container::XNameContainer >& rxLib, const OUString& rName )
:BasicElementBase( rLocalName, xAttributes, pParent, pImport )
,m_xLib( rxLib )
,m_aName( rName )
@@ -457,7 +429,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// XElement
// -----------------------------------------------------------------------------
- void BasicSourceCodeElement::characters( const ::rtl::OUString& rChars )
+ void BasicSourceCodeElement::characters( const OUString& rChars )
throw (xml::sax::SAXException, RuntimeException)
{
m_aBuffer.append( rChars );
@@ -480,17 +452,17 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
catch ( const container::ElementExistException& e )
{
OSL_TRACE( "BasicSourceCodeElement::endElement: caught ElementExceptionExist reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
catch ( const lang::IllegalArgumentException& e )
{
OSL_TRACE( "BasicSourceCodeElement::endElement: caught IllegalArgumentException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
catch ( const lang::WrappedTargetException& e )
{
OSL_TRACE( "BasicSourceCodeElement::endElement: caught WrappedTargetException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
@@ -520,13 +492,13 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
{
if ( xNamespaceMapping.is() )
{
- ::rtl::OUString aURI;
+ OUString aURI;
if ( m_bOasis )
- aURI = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_OOO_URI ) );
+ aURI = XMLNS_OOO_URI;
else
- aURI = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_SCRIPT_URI ) );
+ aURI = XMLNS_SCRIPT_URI;
XMLNS_UID = xNamespaceMapping->getUidByUri( aURI );
- XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK_URI ) ) );
+ XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri( XMLNS_XLINK_URI );
}
}
@@ -539,7 +511,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
// -----------------------------------------------------------------------------
-void BasicImport::processingInstruction( const ::rtl::OUString& /*rTarget*/, const ::rtl::OUString& /*rData*/ )
+void BasicImport::processingInstruction( const OUString& /*rTarget*/, const OUString& /*rData*/ )
throw (xml::sax::SAXException, RuntimeException)
{
}
@@ -553,7 +525,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- Reference< xml::input::XElement > BasicImport::startRootElement( sal_Int32 nUid, const ::rtl::OUString& rLocalName,
+ Reference< xml::input::XElement > BasicImport::startRootElement( sal_Int32 nUid, const OUString& rLocalName,
Reference< xml::input::XAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException)
{
@@ -561,9 +533,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
if ( nUid != XMLNS_UID )
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal namespace!" ) ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
else if ( rLocalName == "libraries" )
{
@@ -579,7 +549,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// try the "BasicLibraries" property (old-style, for compatibility)
Reference< beans::XPropertySet > xPSet( m_xModel, UNO_QUERY );
if ( xPSet.is() )
- xPSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicLibraries" ) ) ) >>= xLibContainer;
+ xPSet->getPropertyValue("BasicLibraries" ) >>= xLibContainer;
}
OSL_ENSURE( xLibContainer.is(), "BasicImport::startRootElement: nowhere to import to!" );
@@ -591,9 +561,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
}
else
{
- throw xml::sax::SAXException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal root element (expected libraries) given: " ) ) +
- rLocalName, Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("illegal root element (expected libraries) given: " + rLocalName, Reference< XInterface >(), Any() );
}
return xElement;
@@ -604,15 +572,15 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// component operations
// =============================================================================
- ::rtl::OUString getImplementationName_XMLBasicImporter()
+ OUString getImplementationName_XMLBasicImporter()
{
- static ::rtl::OUString* pImplName = 0;
+ static OUString* pImplName = 0;
if ( !pImplName )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pImplName )
{
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.xmlscript.XMLBasicImporter" ) );
+ static OUString aImplName( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
pImplName = &aImplName;
}
}
@@ -621,16 +589,16 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- Sequence< ::rtl::OUString > getSupportedServiceNames_XMLBasicImporter()
+ Sequence< OUString > getSupportedServiceNames_XMLBasicImporter()
{
- static Sequence< ::rtl::OUString >* pNames = 0;
+ static Sequence< OUString >* pNames = 0;
if ( !pNames )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pNames )
{
- static Sequence< ::rtl::OUString > aNames(1);
- aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.XMLBasicImporter" ) );
+ static Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLBasicImporter";
pNames = &aNames;
}
}
@@ -639,15 +607,15 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- ::rtl::OUString getImplementationName_XMLOasisBasicImporter()
+ OUString getImplementationName_XMLOasisBasicImporter()
{
- static ::rtl::OUString* pImplName = 0;
+ static OUString* pImplName = 0;
if ( !pImplName )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pImplName )
{
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" ) );
+ static OUString aImplName( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" );
pImplName = &aImplName;
}
}
@@ -656,16 +624,16 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- Sequence< ::rtl::OUString > getSupportedServiceNames_XMLOasisBasicImporter()
+ Sequence< OUString > getSupportedServiceNames_XMLOasisBasicImporter()
{
- static Sequence< ::rtl::OUString >* pNames = 0;
+ static Sequence< OUString >* pNames = 0;
if ( !pNames )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pNames )
{
- static Sequence< ::rtl::OUString > aNames(1);
- aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.XMLOasisBasicImporter" ) );
+ static Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicImporter";
pNames = &aNames;
}
}
@@ -693,11 +661,11 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// XServiceInfo
// -----------------------------------------------------------------------------
- sal_Bool XMLBasicImporterBase::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
+ sal_Bool XMLBasicImporterBase::supportsService( const OUString& rServiceName ) throw (RuntimeException)
{
- Sequence< ::rtl::OUString > aNames( getSupportedServiceNames() );
- const ::rtl::OUString* pNames = aNames.getConstArray();
- const ::rtl::OUString* pEnd = pNames + aNames.getLength();
+ Sequence< OUString > aNames( getSupportedServiceNames() );
+ const OUString* pNames = aNames.getConstArray();
+ const OUString* pEnd = pNames + aNames.getLength();
for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
;
@@ -717,9 +685,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
if ( !m_xModel.is() )
{
- throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMLBasicExporter::setTargetDocument: no document model!" ) ),
- Reference< XInterface >(), 1 );
+ throw IllegalArgumentException( "XMLBasicExporter::setTargetDocument: no document model!", Reference< XInterface >(), 1 );
}
if ( m_xContext.is() )
@@ -730,9 +696,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
Reference < xml::input::XRoot > xRoot( new BasicImport( m_xModel, m_bOasis ) );
Sequence < Any > aArgs( 1 );
aArgs[0] <<= xRoot;
- m_xHandler.set( xSMgr->createInstanceWithArgumentsAndContext(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.input.SaxDocumentHandler" ) ),
- aArgs, m_xContext ), UNO_QUERY );
+ m_xHandler.set( xSMgr->createInstanceWithArgumentsAndContext("com.sun.star.xml.input.SaxDocumentHandler", aArgs, m_xContext ), UNO_QUERY );
}
}
}
@@ -763,7 +727,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- void XMLBasicImporterBase::startElement( const ::rtl::OUString& aName,
+ void XMLBasicImporterBase::startElement( const OUString& aName,
const Reference< xml::sax::XAttributeList >& xAttribs )
throw (xml::sax::SAXException, RuntimeException)
{
@@ -775,7 +739,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- void XMLBasicImporterBase::endElement( const ::rtl::OUString& aName )
+ void XMLBasicImporterBase::endElement( const OUString& aName )
throw (xml::sax::SAXException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -786,7 +750,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- void XMLBasicImporterBase::characters( const ::rtl::OUString& aChars )
+ void XMLBasicImporterBase::characters( const OUString& aChars )
throw (xml::sax::SAXException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -797,7 +761,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- void XMLBasicImporterBase::ignorableWhitespace( const ::rtl::OUString& aWhitespaces )
+ void XMLBasicImporterBase::ignorableWhitespace( const OUString& aWhitespaces )
throw (xml::sax::SAXException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -808,8 +772,8 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// -----------------------------------------------------------------------------
- void XMLBasicImporterBase::processingInstruction( const ::rtl::OUString& aTarget,
- const ::rtl::OUString& aData )
+ void XMLBasicImporterBase::processingInstruction( const OUString& aTarget,
+ const OUString& aData )
throw (xml::sax::SAXException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -849,14 +813,14 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// XServiceInfo
// -----------------------------------------------------------------------------
- ::rtl::OUString XMLBasicImporter::getImplementationName( ) throw (RuntimeException)
+ OUString XMLBasicImporter::getImplementationName( ) throw (RuntimeException)
{
return getImplementationName_XMLBasicImporter();
}
// -----------------------------------------------------------------------------
- Sequence< ::rtl::OUString > XMLBasicImporter::getSupportedServiceNames( ) throw (RuntimeException)
+ Sequence< OUString > XMLBasicImporter::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_XMLBasicImporter();
}
@@ -881,14 +845,14 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
// XServiceInfo
// -----------------------------------------------------------------------------
- ::rtl::OUString XMLOasisBasicImporter::getImplementationName( ) throw (RuntimeException)
+ OUString XMLOasisBasicImporter::getImplementationName( ) throw (RuntimeException)
{
return getImplementationName_XMLOasisBasicImporter();
}
// -----------------------------------------------------------------------------
- Sequence< ::rtl::OUString > XMLOasisBasicImporter::getSupportedServiceNames( ) throw (RuntimeException)
+ Sequence< OUString > XMLOasisBasicImporter::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_XMLOasisBasicImporter();
}
diff --git a/xmlscript/source/xmllib_imexp/imp_share.hxx b/xmlscript/source/xmllib_imexp/imp_share.hxx
index a3d8b4ac2602..bbeeea6bcc31 100644
--- a/xmlscript/source/xmllib_imexp/imp_share.hxx
+++ b/xmlscript/source/xmllib_imexp/imp_share.hxx
@@ -32,8 +32,6 @@
#include <vector>
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
using namespace ::rtl;
using namespace ::std;
@@ -75,11 +73,7 @@ inline bool getBoolAttr(
}
else
{
- throw xml::sax::SAXException(
- rAttrName +
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- ": no boolean value (true|false)!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException(rAttrName + ": no boolean value (true|false)!", Reference< XInterface >(), Any() );
}
}
return false;
diff --git a/xmlscript/source/xmllib_imexp/xmllib_export.cxx b/xmlscript/source/xmllib_imexp/xmllib_export.cxx
index 469638d77dd1..9f0cb742cf91 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_export.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_export.cxx
@@ -45,58 +45,51 @@ SAL_CALL exportLibraryContainer(
{
xOut->startDocument();
- OUString aDocTypeStr( RTL_CONSTASCII_USTRINGPARAM(
+ OUString aDocTypeStr(
"<!DOCTYPE library:libraries PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\""
- " \"libraries.dtd\">" ) );
+ " \"libraries.dtd\">" );
xOut->unknown( aDocTypeStr );
xOut->ignorableWhitespace( OUString() );
- OUString aLibrariesName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":libraries") );
+ OUString aLibrariesName( XMLNS_LIBRARY_PREFIX ":libraries" );
XMLElement* pLibsElement = new XMLElement( aLibrariesName );
Reference< xml::sax::XAttributeList > xAttributes( pLibsElement );
- pLibsElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("xmlns:" XMLNS_LIBRARY_PREFIX) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_URI) ) );
- pLibsElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("xmlns:" XMLNS_XLINK_PREFIX) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_XLINK_URI) ) );
+ pLibsElement->addAttribute( "xmlns:" XMLNS_LIBRARY_PREFIX, XMLNS_LIBRARY_URI );
+ pLibsElement->addAttribute( "xmlns:" XMLNS_XLINK_PREFIX, XMLNS_XLINK_URI );
xOut->ignorableWhitespace( OUString() );
xOut->startElement( aLibrariesName, xAttributes );
- rtl::OUString sTrueStr(aTrueStr);
- rtl::OUString sFalseStr(aFalseStr);
+ OUString sTrueStr(aTrueStr);
+ OUString sFalseStr(aFalseStr);
int nLibCount = pLibArray->mnLibCount;
for( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
LibDescriptor& rLib = pLibArray->mpLibs[i];
- OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":library") );
+ OUString aLibraryName( XMLNS_LIBRARY_PREFIX ":library" );
XMLElement* pLibElement = new XMLElement( aLibraryName );
Reference< xml::sax::XAttributeList > xLibElementAttribs;
xLibElementAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement );
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":name") ),
- rLib.aName );
+ pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", rLib.aName );
if( !rLib.aStorageURL.isEmpty() )
{
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_XLINK_PREFIX ":href") ),
- rLib.aStorageURL );
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_XLINK_PREFIX ":type") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("simple") ) );
+ pLibElement->addAttribute( XMLNS_XLINK_PREFIX ":href", rLib.aStorageURL );
+ pLibElement->addAttribute( XMLNS_XLINK_PREFIX ":type", "simple" );
}
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":link") ),
- rLib.bLink ? sTrueStr : sFalseStr );
+ pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":link", rLib.bLink ? sTrueStr : sFalseStr );
if( rLib.bLink )
{
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":readonly") ),
- rLib.bReadOnly ? sTrueStr : sFalseStr );
+ pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":readonly", rLib.bReadOnly ? sTrueStr : sFalseStr );
}
pLibElement->dump( xOut.get() );
@@ -118,34 +111,30 @@ SAL_CALL exportLibrary(
{
xOut->startDocument();
- OUString aDocTypeStr( RTL_CONSTASCII_USTRINGPARAM(
+ OUString aDocTypeStr(
"<!DOCTYPE library:library PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\""
- " \"library.dtd\">" ) );
+ " \"library.dtd\">" );
xOut->unknown( aDocTypeStr );
xOut->ignorableWhitespace( OUString() );
- OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":library") );
+ OUString aLibraryName( XMLNS_LIBRARY_PREFIX ":library" );
XMLElement* pLibElement = new XMLElement( aLibraryName );
Reference< xml::sax::XAttributeList > xAttributes( pLibElement );
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("xmlns:" XMLNS_LIBRARY_PREFIX) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_URI) ) );
+ pLibElement->addAttribute( "xmlns:" XMLNS_LIBRARY_PREFIX, XMLNS_LIBRARY_URI );
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":name") ),
- rLib.aName );
+ pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", rLib.aName );
- rtl::OUString sTrueStr(aTrueStr);
- rtl::OUString sFalseStr(aFalseStr);
+ OUString sTrueStr(aTrueStr);
+ OUString sFalseStr(aFalseStr);
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":readonly") ),
- rLib.bReadOnly ? sTrueStr : sFalseStr );
+ pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":readonly", rLib.bReadOnly ? sTrueStr : sFalseStr );
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":passwordprotected") ),
- rLib.bPasswordProtected ? sTrueStr : sFalseStr );
+ pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":passwordprotected", rLib.bPasswordProtected ? sTrueStr : sFalseStr );
if( rLib.bPreload )
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":preload") ), sTrueStr );
+ pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":preload", sTrueStr );
sal_Int32 nElementCount = rLib.aElementNames.getLength();
if( nElementCount )
@@ -153,11 +142,11 @@ SAL_CALL exportLibrary(
const OUString* pElementNames = rLib.aElementNames.getConstArray();
for( sal_Int32 i = 0 ; i < nElementCount ; i++ )
{
- XMLElement* pElement = new XMLElement( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":element" ) ) );
+ XMLElement* pElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":element" );
Reference< xml::sax::XAttributeList > xElementAttribs;
xElementAttribs = static_cast< xml::sax::XAttributeList* >( pElement );
- pElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":name") ),
+ pElement->addAttribute( OUString( XMLNS_LIBRARY_PREFIX ":name" ),
pElementNames[i] );
pLibElement->addSubElement( pElement );
diff --git a/xmlscript/source/xmllib_imexp/xmllib_import.cxx b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
index 11de9a427c69..0a0e08bae9e4 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_import.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
@@ -80,9 +80,7 @@ Reference< xml::input::XElement > LibElementBase::startChildElement(
Reference< xml::input::XAttributes > const & /*xAttributes*/ )
throw (xml::sax::SAXException, RuntimeException)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("unexpected element!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("unexpected element!", Reference< XInterface >(), Any() );
}
//__________________________________________________________________________________________________
@@ -129,10 +127,8 @@ void LibraryImport::startDocument(
Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping )
throw (xml::sax::SAXException, RuntimeException)
{
- XMLNS_LIBRARY_UID = xNamespaceMapping->getUidByUri(
- OUSTR(XMLNS_LIBRARY_URI) );
- XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri(
- OUSTR(XMLNS_XLINK_URI) );
+ XMLNS_LIBRARY_UID = xNamespaceMapping->getUidByUri( XMLNS_LIBRARY_URI );
+ XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri( XMLNS_XLINK_URI );
}
//__________________________________________________________________________________________________
void LibraryImport::endDocument()
@@ -159,9 +155,7 @@ Reference< xml::input::XElement > LibraryImport::startRootElement(
{
if (XMLNS_LIBRARY_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal namespace!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
else if ( mpLibArray && rLocalName == "libraries" )
{
@@ -172,28 +166,16 @@ Reference< xml::input::XElement > LibraryImport::startRootElement(
LibDescriptor& aDesc = *mpLibDesc;
aDesc.bLink = aDesc.bReadOnly = aDesc.bPasswordProtected = aDesc.bPreload = sal_False;
- aDesc.aName = xAttributes->getValueByUidName(
- XMLNS_LIBRARY_UID, OUString( RTL_CONSTASCII_USTRINGPARAM("name") ) );
- getBoolAttr(
- &aDesc.bReadOnly,
- OUString( RTL_CONSTASCII_USTRINGPARAM("readonly") ), xAttributes,
- XMLNS_LIBRARY_UID );
- getBoolAttr(
- &aDesc.bPasswordProtected,
- OUString( RTL_CONSTASCII_USTRINGPARAM("passwordprotected") ),
- xAttributes, XMLNS_LIBRARY_UID );
- getBoolAttr(
- &aDesc.bPreload,
- OUString( RTL_CONSTASCII_USTRINGPARAM("preload") ),
- xAttributes, XMLNS_LIBRARY_UID );
+ aDesc.aName = xAttributes->getValueByUidName(XMLNS_LIBRARY_UID, "name" );
+ getBoolAttr( &aDesc.bReadOnly, "readonly", xAttributes, XMLNS_LIBRARY_UID );
+ getBoolAttr( &aDesc.bPasswordProtected, "passwordprotected", xAttributes, XMLNS_LIBRARY_UID );
+ getBoolAttr( &aDesc.bPreload, "preload", xAttributes, XMLNS_LIBRARY_UID );
return new LibraryElement( rLocalName, xAttributes, 0, this );
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal root element (expected libraries) given: ") ) +
- rLocalName, Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal root element (expected libraries) given: " + rLocalName, Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -217,9 +199,7 @@ Reference< xml::input::XElement > LibrariesElement::startChildElement(
{
if (_pImport->XMLNS_LIBRARY_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal namespace!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// library
else if ( rLocalName == "library" )
@@ -227,33 +207,18 @@ Reference< xml::input::XElement > LibrariesElement::startChildElement(
LibDescriptor aDesc;
aDesc.bLink = aDesc.bReadOnly = aDesc.bPasswordProtected = aDesc.bPreload = sal_False;
- aDesc.aName = xAttributes->getValueByUidName(
- _pImport->XMLNS_LIBRARY_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("name") ) );
- aDesc.aStorageURL = xAttributes->getValueByUidName(
- _pImport->XMLNS_XLINK_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("href") ) );
- getBoolAttr(
- &aDesc.bLink,
- OUString( RTL_CONSTASCII_USTRINGPARAM("link") ),
- xAttributes, _pImport->XMLNS_LIBRARY_UID );
- getBoolAttr(
- &aDesc.bReadOnly,
- OUString( RTL_CONSTASCII_USTRINGPARAM("readonly") ),
- xAttributes, _pImport->XMLNS_LIBRARY_UID );
- getBoolAttr(
- &aDesc.bPasswordProtected,
- OUString( RTL_CONSTASCII_USTRINGPARAM("passwordprotected") ),
- xAttributes, _pImport->XMLNS_LIBRARY_UID );
+ aDesc.aName = xAttributes->getValueByUidName(_pImport->XMLNS_LIBRARY_UID, "name" );
+ aDesc.aStorageURL = xAttributes->getValueByUidName( _pImport->XMLNS_XLINK_UID, "href" );
+ getBoolAttr(&aDesc.bLink, "link", xAttributes, _pImport->XMLNS_LIBRARY_UID );
+ getBoolAttr(&aDesc.bReadOnly, "readonly", xAttributes, _pImport->XMLNS_LIBRARY_UID );
+ getBoolAttr(&aDesc.bPasswordProtected, "passwordprotected", xAttributes, _pImport->XMLNS_LIBRARY_UID );
mLibDescriptors.push_back( aDesc );
return new LibraryElement( rLocalName, xAttributes, this, _pImport );
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("expected styles ot bulletinboard element!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected styles ot bulletinboard element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
@@ -279,16 +244,12 @@ Reference< xml::input::XElement > LibraryElement::startChildElement(
{
if (_pImport->XMLNS_LIBRARY_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal namespace!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// library
else if ( rLocalName == "element" )
{
- OUString aValue( xAttributes->getValueByUidName(
- _pImport->XMLNS_LIBRARY_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("name") ) ) );
+ OUString aValue( xAttributes->getValueByUidName(_pImport->XMLNS_LIBRARY_UID, "name" ) );
if (!aValue.isEmpty())
mElements.push_back( aValue );
@@ -296,9 +257,7 @@ Reference< xml::input::XElement > LibraryElement::startChildElement(
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("expected styles ot bulletinboard element!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "expected styles ot bulletinboard element!", Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
diff --git a/xmlscript/source/xmlmod_imexp/imp_share.hxx b/xmlscript/source/xmlmod_imexp/imp_share.hxx
index 272111889a4f..abf5f0ac3abf 100644
--- a/xmlscript/source/xmlmod_imexp/imp_share.hxx
+++ b/xmlscript/source/xmlmod_imexp/imp_share.hxx
@@ -33,9 +33,6 @@
#include <vector>
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
-
using namespace ::rtl;
using namespace ::std;
using namespace ::com::sun::star;
diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx
index c1c6a7169bd9..6036cc8afa95 100644
--- a/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx
+++ b/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx
@@ -24,7 +24,6 @@
using namespace com::sun::star::uno;
using namespace com::sun::star;
-using ::rtl::OUString;
namespace xmlscript
{
@@ -39,26 +38,22 @@ SAL_CALL exportScriptModule(
{
xOut->startDocument();
- OUString aDocTypeStr( RTL_CONSTASCII_USTRINGPARAM(
+ OUString aDocTypeStr(
"<!DOCTYPE script:module PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\""
- " \"module.dtd\">" ) );
+ " \"module.dtd\">");
xOut->unknown( aDocTypeStr );
xOut->ignorableWhitespace( OUString() );
- OUString aModuleName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":module") );
+ OUString aModuleName( XMLNS_SCRIPT_PREFIX ":module" );
XMLElement* pModElement = new XMLElement( aModuleName );
Reference< xml::sax::XAttributeList > xAttributes( pModElement );
- pModElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("xmlns:" XMLNS_SCRIPT_PREFIX) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_URI) ) );
+ pModElement->addAttribute( "xmlns:" XMLNS_SCRIPT_PREFIX, XMLNS_SCRIPT_URI );
- pModElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":name") ),
- rMod.aName );
- pModElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":language") ),
- rMod.aLanguage );
+ pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":name", rMod.aName );
+ pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":language", rMod.aLanguage );
if( !rMod.aModuleType.isEmpty() )
- pModElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":moduleType") ),
- rMod.aModuleType );
+ pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":moduleType", rMod.aModuleType );
xOut->ignorableWhitespace( OUString() );
xOut->startElement( aModuleName, xAttributes );
diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
index ae8b996b80a8..ec13ec5bfb5e 100644
--- a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
+++ b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
@@ -80,9 +80,7 @@ Reference< xml::input::XElement > ModuleElement::startChildElement(
Reference< xml::input::XAttributes > const & /*xAttributes*/ )
throw (xml::sax::SAXException, RuntimeException)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("unexpected element!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("unexpected element!", Reference< XInterface >(), Any() );
}
//__________________________________________________________________________________________________
@@ -129,12 +127,9 @@ void ModuleImport::startDocument(
Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping )
throw (xml::sax::SAXException, RuntimeException)
{
- XMLNS_SCRIPT_UID = xNamespaceMapping->getUidByUri(
- OUSTR(XMLNS_SCRIPT_URI) );
- XMLNS_LIBRARY_UID = xNamespaceMapping->getUidByUri(
- OUSTR(XMLNS_LIBRARY_URI) );
- XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri(
- OUSTR(XMLNS_XLINK_URI) );
+ XMLNS_SCRIPT_UID = xNamespaceMapping->getUidByUri( XMLNS_SCRIPT_URI );
+ XMLNS_LIBRARY_UID = xNamespaceMapping->getUidByUri( XMLNS_LIBRARY_URI );
+ XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri( XMLNS_XLINK_URI );
}
//__________________________________________________________________________________________________
@@ -163,31 +158,20 @@ Reference< xml::input::XElement > ModuleImport::startRootElement(
{
if (XMLNS_SCRIPT_UID != nUid)
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal namespace!") ),
- Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() );
}
// window
else if ( rLocalName == "module" )
{
- mrModuleDesc.aName = xAttributes->getValueByUidName(
- XMLNS_SCRIPT_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("name") ) );
- mrModuleDesc.aLanguage = xAttributes->getValueByUidName(
- XMLNS_SCRIPT_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("language") ) );
- mrModuleDesc.aModuleType = xAttributes->getValueByUidName(
- XMLNS_SCRIPT_UID,
- OUString( RTL_CONSTASCII_USTRINGPARAM("moduleType") ) );
+ mrModuleDesc.aName = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "name" );
+ mrModuleDesc.aLanguage = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "language" );
+ mrModuleDesc.aModuleType = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "moduleType" );
return new ModuleElement( rLocalName, xAttributes, 0, this );
}
else
{
- throw xml::sax::SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "illegal root element (expected module) given: ") ) +
- rLocalName, Reference< XInterface >(), Any() );
+ throw xml::sax::SAXException("illegal root element (expected module) given: " + rLocalName, Reference< XInterface >(), Any() );
}
}
//__________________________________________________________________________________________________
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index a5e4eb13022f..0b1c90c9deca 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -73,8 +73,7 @@ Reference< XComponentContext > createInitialComponentContext(
inst_dir.pData, &file_url.pData );
OSL_ASSERT( osl_File_E_None == rc );
- ::rtl::OUString unorc = file_url + OUString(
- RTL_CONSTASCII_USTRINGPARAM("/program/" SAL_CONFIGFILE("uno")) );
+ OUString unorc = file_url + OUString("/program/" SAL_CONFIGFILE("uno") );
return defaultBootstrap_InitialComponentContext( unorc );
}
@@ -108,15 +107,14 @@ Reference< container::XNameContainer > importFile(
::fclose( f );
Reference< container::XNameContainer > xModel( xContext->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ), xContext ), UNO_QUERY );
+ "com.sun.star.awt.UnoControlDialogModel", xContext ), UNO_QUERY );
::xmlscript::importDialogModel( ::xmlscript::createInputStream( bytes ), xModel, xContext );
return xModel;
}
else
{
- throw Exception( OUString( RTL_CONSTASCII_USTRINGPARAM("### Cannot read file!") ),
- Reference< XInterface >() );
+ throw Exception( "### Cannot read file!", Reference< XInterface >() );
}
}
@@ -178,8 +176,7 @@ void MyApp::Main()
{
::comphelper::setProcessServiceFactory( xMSF );
- Reference< awt::XToolkit> xToolkit( xMSF->createInstance(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.ExtToolkit" ) ) ), UNO_QUERY );
+ Reference< awt::XToolkit> xToolkit( xMSF->createInstance( "com.sun.star.awt.ExtToolkit" ), UNO_QUERY );
// import dialogs
OString aParam1( OUStringToOString(
@@ -189,8 +186,7 @@ void MyApp::Main()
importFile( aParam1.getStr(), xContext ) );
OSL_ASSERT( xModel.is() );
- Reference< awt::XControl > xDlg( xMSF->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialog" ) ) ), UNO_QUERY );
+ Reference< awt::XControl > xDlg( xMSF->createInstance( "com.sun.star.awt.UnoControlDialog" ), UNO_QUERY );
xDlg->setModel( Reference< awt::XControlModel >::query( xModel ) );
xDlg->createPeer( xToolkit, 0 );
Reference< awt::XDialog > xD( xDlg, UNO_QUERY );