Kaydet (Commit) 0dea3b74 authored tarafından Matteo Casalin's avatar Matteo Casalin

OUString: constify and avoid temporaries

Change-Id: I730649c2233e719cbfab86411a1e45240ea6d2d9
üst f4497c56
...@@ -113,7 +113,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) ...@@ -113,7 +113,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
Reference<XPropertySet> rInfoSet = getExportInfo(); Reference<XPropertySet> rInfoSet = getExportInfo();
if( rInfoSet.is() ) if( rInfoSet.is() )
{ {
OUString sAutoTextMode("AutoTextMode"); const OUString sAutoTextMode("AutoTextMode");
if( rInfoSet->getPropertySetInfo()->hasPropertyByName( if( rInfoSet->getPropertySetInfo()->hasPropertyByName(
sAutoTextMode ) ) sAutoTextMode ) )
{ {
...@@ -166,9 +166,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) ...@@ -166,9 +166,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
sal_uInt16 nIdx = pUnknown->GetFirstNamespaceIndex(); sal_uInt16 nIdx = pUnknown->GetFirstNamespaceIndex();
while( USHRT_MAX != nIdx ) while( USHRT_MAX != nIdx )
{ {
const OUString& rPrefix = _GetNamespaceMap().Add( pUnknown->GetPrefix( nIdx ),
pUnknown->GetPrefix( nIdx );
_GetNamespaceMap().Add( rPrefix,
pUnknown->GetNamespace( nIdx ), pUnknown->GetNamespace( nIdx ),
XML_NAMESPACE_UNKNOWN ); XML_NAMESPACE_UNKNOWN );
nIdx = pUnknown->GetNextNamespaceIndex( nIdx ); nIdx = pUnknown->GetNextNamespaceIndex( nIdx );
...@@ -284,9 +282,8 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) ...@@ -284,9 +282,8 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
Reference<XPropertySet> rInfoSet = getExportInfo(); Reference<XPropertySet> rInfoSet = getExportInfo();
if( rInfoSet.is() ) if( rInfoSet.is() )
{ {
OUString sShowChanges("ShowChanges");
bSaveRedline = ! rInfoSet->getPropertySetInfo()->hasPropertyByName( bSaveRedline = ! rInfoSet->getPropertySetInfo()->hasPropertyByName(
sShowChanges ); "ShowChanges" );
} }
} }
sal_uInt16 nRedlineMode = 0; sal_uInt16 nRedlineMode = 0;
...@@ -385,7 +382,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) ...@@ -385,7 +382,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
Reference<XPropertySet> xInfoSet( getExportInfo() ); Reference<XPropertySet> xInfoSet( getExportInfo() );
if ( xInfoSet.is() ) if ( xInfoSet.is() )
{ {
OUString sShowChanges( "ShowChanges" ); const OUString sShowChanges( "ShowChanges" );
if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) ) if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) )
{ {
bShowRedlineChanges = *(sal_Bool*) xInfoSet-> bShowRedlineChanges = *(sal_Bool*) xInfoSet->
...@@ -478,9 +475,7 @@ void SwXMLExport::_ExportContent() ...@@ -478,9 +475,7 @@ void SwXMLExport::_ExportContent()
Reference<XPropertySet> xPropSet(GetModel(), UNO_QUERY); Reference<XPropertySet> xPropSet(GetModel(), UNO_QUERY);
if (xPropSet.is()) if (xPropSet.is())
{ {
OUString sTwoDigitYear("TwoDigitYear"); Any aAny = xPropSet->getPropertyValue( "TwoDigitYear" );
Any aAny = xPropSet->getPropertyValue( sTwoDigitYear );
aAny <<= (sal_Int16)1930; aAny <<= (sal_Int16)1930;
sal_Int16 nYear = 0; sal_Int16 nYear = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment