summaryrefslogtreecommitdiff
path: root/framework/source/xml
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:19:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:22 +0100
commitb98352996c24a3b21c52c32d62d0a7fdbc8e4246 (patch)
tree3f4a8c74e2bce383274ae6c0308d0db3c80161ff /framework/source/xml
parent564fe23374fa544c34875da0dd695cb8a939f0f2 (diff)
framework: Use appropriate OUString functions on string constants
Change-Id: I5da5cd3254102c742021b3e7b4e1f907ca897ca5
Diffstat (limited to 'framework/source/xml')
-rw-r--r--framework/source/xml/acceleratorconfigurationreader.cxx16
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx32
2 files changed, 24 insertions, 24 deletions
diff --git a/framework/source/xml/acceleratorconfigurationreader.cxx b/framework/source/xml/acceleratorconfigurationreader.cxx
index a098cd4975ff..346d84a074ff 100644
--- a/framework/source/xml/acceleratorconfigurationreader.cxx
+++ b/framework/source/xml/acceleratorconfigurationreader.cxx
@@ -231,9 +231,9 @@ AcceleratorConfigurationReader::EXMLElement AcceleratorConfigurationReader::impl
{
AcceleratorConfigurationReader::EXMLElement eElement;
- if (sElement.equals(NS_ELEMENT_ACCELERATORLIST))
+ if (sElement == "http://openoffice.org/2001/accel^acceleratorlist")
eElement = E_ELEMENT_ACCELERATORLIST;
- else if (sElement.equals(NS_ELEMENT_ITEM))
+ else if (sElement == "http://openoffice.org/2001/accel^item")
eElement = E_ELEMENT_ITEM;
else
throw css::uno::RuntimeException(
@@ -247,17 +247,17 @@ AcceleratorConfigurationReader::EXMLAttribute AcceleratorConfigurationReader::im
{
AcceleratorConfigurationReader::EXMLAttribute eAttribute;
- if (sAttribute.equals(NS_ATTRIBUTE_KEYCODE))
+ if (sAttribute == "http://openoffice.org/2001/accel^code")
eAttribute = E_ATTRIBUTE_KEYCODE;
- else if (sAttribute.equals(NS_ATTRIBUTE_MOD_SHIFT))
+ else if (sAttribute == "http://openoffice.org/2001/accel^shift")
eAttribute = E_ATTRIBUTE_MOD_SHIFT;
- else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD1))
+ else if (sAttribute == "http://openoffice.org/2001/accel^mod1")
eAttribute = E_ATTRIBUTE_MOD_MOD1;
- else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD2))
+ else if (sAttribute == "http://openoffice.org/2001/accel^mod2")
eAttribute = E_ATTRIBUTE_MOD_MOD2;
- else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD3))
+ else if (sAttribute == "http://openoffice.org/2001/accel^mod3")
eAttribute = E_ATTRIBUTE_MOD_MOD3;
- else if (sAttribute.equals(NS_ATTRIBUTE_URL))
+ else if (sAttribute == "http://www.w3.org/1999/xlink^href")
eAttribute = E_ATTRIBUTE_URL;
else
throw css::uno::RuntimeException(
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index ac52c558783a..6ca2a9d4f7ff 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -602,11 +602,11 @@ OWriteImagesDocumentHandler::OWriteImagesDocumentHandler(
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY );
- m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA );
- m_aXMLImageNS = OUString( XMLNS_IMAGE_PREFIX );
- m_aXMLXlinkNS = OUString( XMLNS_XLINK_PREFIX );
- m_aAttributeXlinkType = OUString( ATTRIBUTE_XLINK_TYPE );
- m_aAttributeValueSimple = OUString( ATTRIBUTE_XLINK_TYPE_VALUE );
+ m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
+ m_aXMLImageNS = XMLNS_IMAGE_PREFIX;
+ m_aXMLXlinkNS = XMLNS_XLINK_PREFIX;
+ m_aAttributeXlinkType = ATTRIBUTE_XLINK_TYPE;
+ m_aAttributeValueSimple = ATTRIBUTE_XLINK_TYPE_VALUE;
}
OWriteImagesDocumentHandler::~OWriteImagesDocumentHandler()
@@ -677,23 +677,23 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor*
m_aAttributeType,
m_aAttributeValueSimple );
- pList->AddAttribute( m_aXMLXlinkNS + OUString( ATTRIBUTE_HREF ),
+ pList->AddAttribute( m_aXMLXlinkNS + ATTRIBUTE_HREF,
m_aAttributeType,
pImageList->aURL );
if ( pImageList->nMaskMode == ImageMaskMode_Bitmap )
{
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKMODE ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKMODE,
m_aAttributeType,
OUString( ATTRIBUTE_MASKMODE_BITMAP ) );
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKURL ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKURL,
m_aAttributeType,
pImageList->aMaskURL );
if ( !pImageList->aHighContrastMaskURL.isEmpty() )
{
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_HIGHCONTRASTMASKURL ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_HIGHCONTRASTMASKURL,
m_aAttributeType,
pImageList->aHighContrastMaskURL );
}
@@ -706,18 +706,18 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor*
aColorStrBuffer.appendAscii( "#" );
aColorStrBuffer.append( OUString::number( nValue, 16 ));
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKCOLOR ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKCOLOR,
m_aAttributeType,
aColorStrBuffer.makeStringAndClear() );
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKMODE ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKMODE,
m_aAttributeType,
OUString( ATTRIBUTE_MASKMODE_COLOR ) );
}
if ( !pImageList->aHighContrastURL.isEmpty() )
{
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_HIGHCONTRASTURL ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_HIGHCONTRASTURL,
m_aAttributeType,
pImageList->aHighContrastURL );
}
@@ -742,11 +742,11 @@ void OWriteImagesDocumentHandler::WriteImage( const ImageItemDescriptor* pImage
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_BITMAPINDEX ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_BITMAPINDEX,
m_aAttributeType,
OUString::number( pImage->nIndex ) );
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_COMMAND ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_COMMAND,
m_aAttributeType,
pImage->aCommandURL );
@@ -787,14 +787,14 @@ void OWriteImagesDocumentHandler::WriteExternalImage( const ExternalImageItemDes
if ( !pExternalImage->aURL.isEmpty() )
{
- pList->AddAttribute( m_aXMLXlinkNS + OUString( ATTRIBUTE_HREF ),
+ pList->AddAttribute( m_aXMLXlinkNS + ATTRIBUTE_HREF,
m_aAttributeType,
pExternalImage->aURL );
}
if ( !pExternalImage->aCommandURL.isEmpty() )
{
- pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_COMMAND ),
+ pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_COMMAND,
m_aAttributeType,
pExternalImage->aCommandURL );
}