diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-12-07 13:27:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-12-07 15:57:46 +0000 |
commit | 74ca0e86063f698c8d36d935cd2b791c6b2874b4 (patch) | |
tree | 3317bc138d527a4697792e6c1176abb7da68c5fa /oox/source/drawingml | |
parent | 21ea372541a81972aa33cb2226dbc2ee3886e23a (diff) |
drop some static OUStrings
Change-Id: I41d5df892d8b710b82ed886b2390b53535b8a67b
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/customshapeproperties.cxx | 7 | ||||
-rw-r--r-- | oox/source/drawingml/shapepropertiescontext.cxx | 6 | ||||
-rw-r--r-- | oox/source/drawingml/table/tablecell.cxx | 16 | ||||
-rw-r--r-- | oox/source/drawingml/table/tableproperties.cxx | 4 |
4 files changed, 12 insertions, 21 deletions
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 8f313a0f0193..ea5dc1f32de9 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -98,10 +98,9 @@ static OUString GetConnectorShapeType( sal_Int32 nType ) OUString sType; switch( nType ) { - case XML_straightConnector1: { - static const OUString sStraightConnector1 = CREATE_OUSTRING( "mso-spt32" ); - sType = sStraightConnector1; - } break; + case XML_straightConnector1: + sType = "mso-spt32"; + break; default: break; } diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx index a10b8eab9e5e..e0fe19f450a4 100644 --- a/oox/source/drawingml/shapepropertiescontext.cxx +++ b/oox/source/drawingml/shapepropertiescontext.cxx @@ -75,15 +75,13 @@ Reference< XFastContextHandler > ShapePropertiesContext::createFastChildContext( // TODO: Move the following checks to a separate place or as a separate function if ( nToken == XML_line ) { - static const OUString sLineShape( "com.sun.star.drawing.LineShape" ); - mrShape.getServiceName() = sLineShape; + mrShape.getServiceName() = "com.sun.star.drawing.LineShape"; } if( ( nToken >= XML_bentConnector2 && nToken <= XML_bentConnector5 ) || ( nToken >= XML_curvedConnector2 && nToken <= XML_curvedConnector5 ) || nToken == XML_straightConnector1 ) { - static const OUString sCustomShape( "com.sun.star.drawing.CustomShape" ); - mrShape.getServiceName() = sCustomShape; + mrShape.getServiceName() = "com.sun.star.drawing.CustomShape"; } xRet.set( new PresetShapeGeometryContext( *this, xAttribs, *(mrShape.getCustomShapeProperties()) ) ); } diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 7394acb1abcf..d81f35012f5e 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -123,17 +123,11 @@ void applyTableStylePart( oox::drawingml::FillProperties& rFillProperties, void applyTableCellProperties( const Reference < ::com::sun::star::table::XCell >& rxCell, const TableCell& rTableCell ) { - static const OUString sTopBorder( RTL_CONSTASCII_USTRINGPARAM( "TextUpperDistance" ) ); - static const OUString sBottomBorder( RTL_CONSTASCII_USTRINGPARAM( "TextLowerDistance" ) ); - static const OUString sLeftBorder( RTL_CONSTASCII_USTRINGPARAM( "TextLeftDistance" ) ); - static const OUString sRightBorder( RTL_CONSTASCII_USTRINGPARAM( "TextRightDistance" ) ); - static const OUString sVerticalAdjust( RTL_CONSTASCII_USTRINGPARAM( "TextVerticalAdjust" ) ); - Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW ); - xPropSet->setPropertyValue( sTopBorder, Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) ); - xPropSet->setPropertyValue( sRightBorder, Any( static_cast< sal_Int32 >( rTableCell.getRightMargin() / 360 ) ) ); - xPropSet->setPropertyValue( sLeftBorder, Any( static_cast< sal_Int32 >( rTableCell.getLeftMargin() / 360 ) ) ); - xPropSet->setPropertyValue( sBottomBorder, Any( static_cast< sal_Int32 >( rTableCell.getBottomMargin() / 360 ) ) ); + xPropSet->setPropertyValue( "TextUpperDistance", Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) ); + xPropSet->setPropertyValue( "TextRightDistance", Any( static_cast< sal_Int32 >( rTableCell.getRightMargin() / 360 ) ) ); + xPropSet->setPropertyValue( "TextLeftDistance", Any( static_cast< sal_Int32 >( rTableCell.getLeftMargin() / 360 ) ) ); + xPropSet->setPropertyValue( "TextLowerDistance", Any( static_cast< sal_Int32 >( rTableCell.getBottomMargin() / 360 ) ) ); drawing::TextVerticalAdjust eVA; switch( rTableCell.getAnchorToken() ) @@ -145,7 +139,7 @@ void applyTableCellProperties( const Reference < ::com::sun::star::table::XCell default: case XML_t: eVA = drawing::TextVerticalAdjust_TOP; break; } - xPropSet->setPropertyValue( sVerticalAdjust, Any( eVA ) ); + xPropSet->setPropertyValue( "TextVerticalAdjust", Any( eVA ) ); } void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oox::drawingml::TextListStylePtr pMasterTextListStyle, diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index d480cc60e390..e9d7e5ee8c86 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -58,9 +58,9 @@ void CreateTableRows( uno::Reference< XTableRows > xTableRows, const std::vector xTableRows->insertByIndex( 0, rvTableRows.size() - 1 ); std::vector< TableRow >::const_iterator aTableRowIter( rvTableRows.begin() ); uno::Reference< container::XIndexAccess > xIndexAccess( xTableRows, UNO_QUERY_THROW ); + const OUString sHeight("Height"); for ( sal_Int32 n = 0; n < xIndexAccess->getCount(); n++ ) { - static const OUString sHeight("Height"); Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW ); xPropSet->setPropertyValue( sHeight, Any( static_cast< sal_Int32 >( aTableRowIter->getHeight() / 360 ) ) ); ++aTableRowIter; @@ -73,9 +73,9 @@ void CreateTableColumns( Reference< XTableColumns > xTableColumns, const std::ve xTableColumns->insertByIndex( 0, rvTableGrid.size() - 1 ); std::vector< sal_Int32 >::const_iterator aTableGridIter( rvTableGrid.begin() ); uno::Reference< container::XIndexAccess > xIndexAccess( xTableColumns, UNO_QUERY_THROW ); + const OUString sWidth("Width"); for ( sal_Int32 n = 0; n < xIndexAccess->getCount(); n++ ) { - static const OUString sWidth("Width"); Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW ); xPropSet->setPropertyValue( sWidth, Any( static_cast< sal_Int32 >( *aTableGridIter++ / 360 ) ) ); } |