summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-15 11:05:19 +0200
committerNoel Grandin <noel@peralex.com>2013-11-19 10:29:31 +0200
commit610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 (patch)
tree6eab2639cb8104ca54daa3f7a2ebd83ef1566cf0 /sw
parent2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (diff)
remove unnecessary use of OUString constructor when assigning
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/dumpfilter.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/filter/html/htmlcss1.cxx6
-rw-r--r--sw/source/filter/xml/xmlexp.cxx14
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx10
-rw-r--r--sw/source/ui/uiview/view.cxx24
-rw-r--r--sw/source/ui/uno/unodoc.cxx6
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx2
-rw-r--r--sw/source/ui/vba/vbacheckbox.cxx2
9 files changed, 33 insertions, 35 deletions
diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx
index fb0800612afb..c6275c3221b9 100644
--- a/sw/source/core/layout/dumpfilter.cxx
+++ b/sw/source/core/layout/dumpfilter.cxx
@@ -28,7 +28,7 @@ OUString SAL_CALL LayoutDumpFilter_getImplementationName() throw( uno::RuntimeEx
uno::Sequence< OUString > SAL_CALL LayoutDumpFilter_getSupportedServiceNames() throw( uno::RuntimeException )
{
uno::Sequence< OUString > aSeq( 1 );
- aSeq[0] = OUString( "com.sun.star.document.ExportFilter" );
+ aSeq[0] = "com.sun.star.document.ExportFilter";
return aSeq;
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 2d9086121986..8ba76e410507 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2438,7 +2438,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl(
if (bExcept )
{
uno::RuntimeException aExcept;
- aExcept.Message = OUString( "No default value for: " ) + pNames[nProp];
+ aExcept.Message = "No default value for: " + pNames[nProp];
throw aExcept;
}
}
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index e51fdf9a2fac..ea8ea42a0634 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -248,7 +248,7 @@ void SwCSS1Parser::SetLinkCharFmts()
bBodyVLinkSet |= bColorSet;
}
- OUString sTmp = OUString( OOO_STRING_SVTOOLS_HTML_anchor ) + ":" + "link";
+ OUString sTmp = OOO_STRING_SVTOOLS_HTML_anchor ":link";
pStyleEntry = GetTag( sTmp );
if( pStyleEntry )
@@ -262,7 +262,7 @@ void SwCSS1Parser::SetLinkCharFmts()
bBodyLinkSet |= bColorSet;
}
- sTmp = OUString( OOO_STRING_SVTOOLS_HTML_anchor ) + ":" + "visited";
+ sTmp = OOO_STRING_SVTOOLS_HTML_anchor ":visited";
pStyleEntry = GetTag( sTmp );
if( pStyleEntry )
@@ -1542,7 +1542,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
{
do
{
- aName = OUString( "first-letter" ) + " " + OUString::number( (sal_Int32)(++nDropCapCnt) );
+ aName = "first-letter " + OUString::number( (sal_Int32)(++nDropCapCnt) );
}
while( pDoc->FindCharFmtByName(aName) );
}
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 1a1e200546f6..a971029b61a8 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -360,7 +360,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
sal_Int32 nIndex = 0;
Reference < XIndexContainer > xBox = IndexedPropertyValues::create( comphelper::getProcessComponentContext() );
- pValue[nIndex].Name = OUString( "Views");
+ pValue[nIndex].Name = "Views";
pValue[nIndex++].Value <<= xBox;
SwDoc *pDoc = getDoc();
@@ -370,16 +370,16 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
OSL_ENSURE( bTwip, "Map unit for visible area is not in TWIPS!" );
- pValue[nIndex].Name = OUString( "ViewAreaTop");
+ pValue[nIndex].Name = "ViewAreaTop";
pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.Top() ) : rRect.Top();
- pValue[nIndex].Name = OUString( "ViewAreaLeft");
+ pValue[nIndex].Name = "ViewAreaLeft";
pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.Left() ) : rRect.Left();
- pValue[nIndex].Name = OUString( "ViewAreaWidth");
+ pValue[nIndex].Name = "ViewAreaWidth";
pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.GetWidth() ) : rRect.GetWidth();
- pValue[nIndex].Name = OUString( "ViewAreaHeight");
+ pValue[nIndex].Name = "ViewAreaHeight";
pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.GetHeight() ) : rRect.GetHeight();
// "show redline mode" cannot simply be read from the document
@@ -397,11 +397,11 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
}
}
- pValue[nIndex].Name = OUString( "ShowRedlineChanges");
+ pValue[nIndex].Name = "ShowRedlineChanges";
pValue[nIndex++].Value.setValue( &bShowRedlineChanges, ::getBooleanCppuType() );
sal_Bool bInBrowse = pDoc->get(IDocumentSettingAccess::BROWSE_MODE);
- pValue[nIndex].Name = OUString( "InBrowseMode");
+ pValue[nIndex].Name = "InBrowseMode";
pValue[nIndex++].Value.setValue( &bInBrowse, ::getBooleanCppuType() );
if ( nIndex < NUM_EXPORTED_VIEW_SETTINGS )
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 948d5c776a36..5dd71951ecb7 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -77,8 +77,7 @@ SwTbxInsertCtrl::~SwTbxInsertCtrl()
void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException)
{
ToolBox& rTbx = GetToolBox();
- OUString aSlotURL( "slot:" );
- aSlotURL += OUString::number( nLastSlotId);
+ OUString aSlotURL = "slot:" + OUString::number( nLastSlotId);
Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() );
rTbx.SetItemImage(GetId(), aImage);
@@ -103,8 +102,7 @@ void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/,
if( nLastSlotId )
nId = nLastSlotId;
- OUString aSlotURL( "slot:" );
- aSlotURL += OUString::number( nId);
+ OUString aSlotURL = "slot:" + OUString::number( nId);
ToolBox& rBox = GetToolBox();
Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() );
rBox.SetItemImage(GetId(), aImage);
@@ -564,7 +562,7 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
SfxBoolItem aNext(FN_SCROLL_NEXT_PREV, NID_NEXT == nSet);
Any a;
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = OUString( "ScrollNextPrev" );
+ aArgs[0].Name = "ScrollNextPrev";
aNext.QueryValue( a );
aArgs[0].Value = a;
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ),
@@ -739,7 +737,7 @@ void SwZoomBox_Impl::Select()
{
Any a;
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = OUString( "PreviewZoom" );
+ aArgs[0].Name = "PreviewZoom";
aItem.QueryValue( a );
aArgs[0].Value = a;
SfxToolBoxControl::Dispatch(
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index c7930b8c1291..701ea542c54b 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1477,56 +1477,56 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
beans::PropertyValue *pValue = rSequence.getArray();
sal_uInt16 nViewID( GetViewFrame()->GetCurViewId());
- pValue->Name = OUString( "ViewId" );
+ pValue->Name = "ViewId";
OUStringBuffer sBuffer ( OUString( "view" ) );
::sax::Converter::convertNumber(sBuffer, static_cast<sal_Int32>(nViewID));
pValue->Value <<= sBuffer.makeStringAndClear();
pValue++;nIndex++;
- pValue->Name = OUString( "ViewLeft" );
+ pValue->Name = "ViewLeft";
pValue->Value <<= TWIP_TO_MM100 ( rRect.Left() );
pValue++;nIndex++;
- pValue->Name = OUString( "ViewTop" );
+ pValue->Name = "ViewTop";
pValue->Value <<= TWIP_TO_MM100 ( rRect.Top() );
pValue++;nIndex++;
- pValue->Name = OUString( "VisibleLeft" );
+ pValue->Name = "VisibleLeft";
pValue->Value <<= TWIP_TO_MM100 ( rVis.Left() );
pValue++;nIndex++;
- pValue->Name = OUString( "VisibleTop" );
+ pValue->Name = "VisibleTop";
pValue->Value <<= TWIP_TO_MM100 ( rVis.Top() );
pValue++;nIndex++;
- pValue->Name = OUString( "VisibleRight" );
+ pValue->Name = "VisibleRight";
pValue->Value <<= TWIP_TO_MM100 ( bBrowse ? LONG_MIN : rVis.Right() );
pValue++;nIndex++;
- pValue->Name = OUString( "VisibleBottom" );
+ pValue->Name = "VisibleBottom";
pValue->Value <<= TWIP_TO_MM100 ( bBrowse ? LONG_MIN : rVis.Bottom() );
pValue++;nIndex++;
- pValue->Name = OUString( "ZoomType" );
+ pValue->Name = "ZoomType";
const sal_Int16 nZoomType = static_cast< sal_Int16 >(m_pWrtShell->GetViewOptions()->GetZoomType());
pValue->Value <<= nZoomType;
pValue++;nIndex++;
- pValue->Name = OUString( "ViewLayoutColumns" );
+ pValue->Name = "ViewLayoutColumns";
const sal_Int16 nViewLayoutColumns = static_cast< sal_Int16 >(m_pWrtShell->GetViewOptions()->GetViewLayoutColumns());
pValue->Value <<= nViewLayoutColumns;
pValue++;nIndex++;
- pValue->Name = OUString( "ViewLayoutBookMode" );
+ pValue->Name = "ViewLayoutBookMode";
const sal_Bool bIsViewLayoutBookMode = m_pWrtShell->GetViewOptions()->IsViewLayoutBookMode();
pValue->Value.setValue( &bIsViewLayoutBookMode, ::getBooleanCppuType() );
pValue++;nIndex++;
- pValue->Name = OUString( "ZoomFactor" );
+ pValue->Name = "ZoomFactor";
pValue->Value <<= static_cast < sal_Int16 > (m_pWrtShell->GetViewOptions()->GetZoom());
pValue++;nIndex++;
- pValue->Name = OUString( "IsSelectedFrame" );
+ pValue->Name = "IsSelectedFrame";
const sal_Bool bIsSelected = FRMTYPE_NONE == m_pWrtShell->GetSelFrmType() ? sal_False : sal_True;
pValue->Value.setValue ( &bIsSelected, ::getBooleanCppuType() );
nIndex++;
diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx
index a190eff2f41f..60f31baaa639 100644
--- a/sw/source/ui/uno/unodoc.cxx
+++ b/sw/source/ui/uno/unodoc.cxx
@@ -37,7 +37,7 @@ uno::Sequence< OUString > SAL_CALL SwTextDocument_getSupportedServiceNames() thr
// resolved by rtti!
uno::Sequence< OUString > aRet ( 1 );
OUString* pArray = aRet.getArray();
- pArray[0] = OUString( "com.sun.star.text.TextDocument" );
+ pArray[0] = "com.sun.star.text.TextDocument";
return aRet;
}
@@ -66,7 +66,7 @@ uno::Sequence< OUString > SAL_CALL SwWebDocument_getSupportedServiceNames() thro
// resolved by rtti!
uno::Sequence< OUString > aRet ( 1 );
OUString* pArray = aRet.getArray();
- pArray[0] = OUString( "com.sun.star.text.WebDocument" );
+ pArray[0] = "com.sun.star.text.WebDocument";
return aRet;
}
@@ -93,7 +93,7 @@ uno::Sequence< OUString > SAL_CALL SwGlobalDocument_getSupportedServiceNames() t
{
uno::Sequence< OUString > aRet ( 1 );
OUString* pArray = aRet.getArray();
- pArray[0] = OUString( "com.sun.star.text.GlobalDocument" );
+ pArray[0] = "com.sun.star.text.GlobalDocument";
return aRet;
}
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index 87bd107c4e59..01a8985c6961 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -155,7 +155,7 @@ sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
aViewLayout.QueryValue( a );
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs( 1 );
- aArgs[0].Name = OUString( "ViewLayout" );
+ aArgs[0].Name = "ViewLayout";
aArgs[0].Value = a;
execute( aArgs );
diff --git a/sw/source/ui/vba/vbacheckbox.cxx b/sw/source/ui/vba/vbacheckbox.cxx
index f5d6e9c9ee29..90e6ba981572 100644
--- a/sw/source/ui/vba/vbacheckbox.cxx
+++ b/sw/source/ui/vba/vbacheckbox.cxx
@@ -79,7 +79,7 @@ SwVbaCheckBox::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = OUString( "ooo.vba.word.CheckBox" );
+ aServiceNames[ 0 ] = "ooo.vba.word.CheckBox";
}
return aServiceNames;
}