summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-13 15:04:48 +0200
committerNoel Grandin <noel@peralex.com>2014-03-13 15:05:31 +0200
commitfddde2b74a24b1e88e33940ee98f7fa2887dc58c (patch)
tree4cae7cb69b60c2c4628195caf36b7ec56e573c66 /vbahelper
parent22684273d58b1ae9146fcc6c8dfceb90ddf846d9 (diff)
xmloff,vbahelper: prefer passing OUString and OString by reference
Change-Id: I8b7e4284c122549c03edaa7f3963cbfb2024b3fc
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.hxx2
-rw-r--r--vbahelper/source/vbahelper/vbashapes.cxx9
-rw-r--r--vbahelper/source/vbahelper/vbatextframe.cxx4
5 files changed, 9 insertions, 10 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index e594f50d023e..5c11fbd30a1d 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -511,7 +511,7 @@ ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, con
}
OUString
-ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, const OUString _sElementName, const OUString& _sSuffixSeparator, sal_Int32 _nStartSuffix)
+ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, const OUString& _sElementName, const OUString& _sSuffixSeparator, sal_Int32 _nStartSuffix)
{
sal_Int32 a = _nStartSuffix;
OUString scompname = _sElementName;
diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx
index f6af27ec3e64..0a5c2e1f45c9 100644
--- a/vbahelper/source/vbahelper/vbalineformat.cxx
+++ b/vbahelper/source/vbahelper/vbalineformat.cxx
@@ -36,7 +36,7 @@ ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >&
}
sal_Int32
-ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( OUString sLineName )
+ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( const OUString& sLineName )
{
sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
if ( sLineName == "Small Arrow" || sLineName == "Arrow" || sLineName == "msArrowEnd" || sLineName == "Double Arrow")
diff --git a/vbahelper/source/vbahelper/vbalineformat.hxx b/vbahelper/source/vbahelper/vbalineformat.hxx
index 5b2c2bc1b866..a0e7d6fce2b0 100644
--- a/vbahelper/source/vbahelper/vbalineformat.hxx
+++ b/vbahelper/source/vbahelper/vbalineformat.hxx
@@ -36,7 +36,7 @@ private:
protected:
virtual OUString getServiceImplName();
virtual css::uno::Sequence<OUString> getServiceNames();
- sal_Int32 convertLineStartEndNameToArrowheadStyle( OUString sLineName );
+ sal_Int32 convertLineStartEndNameToArrowheadStyle( const OUString& sLineName );
OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (css::uno::RuntimeException);
public:
ScVbaLineFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx
index 0a0cdbcc1ad2..fff7dbb3efed 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -217,7 +217,7 @@ ScVbaShapes::SelectAll() throw (uno::RuntimeException, std::exception)
}
uno::Reference< drawing::XShape >
-ScVbaShapes::createShape( OUString service ) throw (css::uno::RuntimeException)
+ScVbaShapes::createShape( const OUString& service ) throw (css::uno::RuntimeException)
{
uno::Reference< lang::XMultiServiceFactory > xMSF( m_xModel, uno::UNO_QUERY_THROW );
uno::Reference< drawing::XShape > xShape( xMSF->createInstance( service ), uno::UNO_QUERY_THROW );
@@ -419,7 +419,7 @@ ScVbaShapes::setDefaultShapeProperties( uno::Reference< drawing::XShape > xShape
}
void
-ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShape, OUString sName )
+ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShape, const OUString& sName )
{
uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
try
@@ -432,12 +432,11 @@ ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShap
}
OUString
-ScVbaShapes::createName( OUString sName )
+ScVbaShapes::createName( const OUString& sName )
{
sal_Int32 nActNumber = 1 + m_nNewShapeCount;
m_nNewShapeCount++;
- sName += OUString::number( nActNumber );
- return sName;
+ return sName + OUString::number( nActNumber );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/vbahelper/vbatextframe.cxx b/vbahelper/source/vbahelper/vbatextframe.cxx
index 8f3e2024cc22..07e866698563 100644
--- a/vbahelper/source/vbahelper/vbatextframe.cxx
+++ b/vbahelper/source/vbahelper/vbatextframe.cxx
@@ -39,7 +39,7 @@ VbaTextFrame::setAsMSObehavior()
m_xPropertySet->setPropertyValue( "TextFitToSize", uno::makeAny( drawing::TextFitToSizeType_NONE ) );
}
-sal_Int32 VbaTextFrame::getMargin( OUString sMarginType )
+sal_Int32 VbaTextFrame::getMargin( const OUString& sMarginType )
{
sal_Int32 nMargin = 0;
uno::Any aMargin = m_xPropertySet->getPropertyValue( sMarginType );
@@ -47,7 +47,7 @@ sal_Int32 VbaTextFrame::getMargin( OUString sMarginType )
return nMargin;
}
-void VbaTextFrame::setMargin( OUString sMarginType, float fMargin )
+void VbaTextFrame::setMargin( const OUString& sMarginType, float fMargin )
{
sal_Int32 nMargin = Millimeter::getInHundredthsOfOneMillimeter( fMargin );
m_xPropertySet->setPropertyValue( sMarginType, uno::makeAny( nMargin ) );