summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-18 12:14:29 +0200
committerNoel Grandin <noel@peralex.com>2014-06-24 11:34:21 +0200
commite2080e70fe8b085f18e868e46340454720fa94ca (patch)
tree4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /svx
parentf910280b8704ed9c289150a4ca3c8d60e15d0d97 (diff)
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/charmapacc.cxx18
-rw-r--r--svx/source/unodraw/unoshape.cxx6
2 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index 5dddac9487d2..46db02efa01a 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -78,7 +78,7 @@ sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleChildCount( ) throw (
{
OExternalLockGuard aGuard( this );
ensureAlive();
- return ( mpParent->getScrollBar()->IsVisible() ) ? 2 : 1;
+ return ( mpParent->getScrollBar().IsVisible() ) ? 2 : 1;
}
uno::Reference< css::accessibility::XAccessible > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleAtPoint( const awt::Point& aPoint )
@@ -96,14 +96,14 @@ uno::Reference< css::accessibility::XAccessible > SAL_CALL SvxShowCharSetVirtual
m_pTable = new SvxShowCharSetAcc(this);
xRet = m_pTable;
}
- else if ( mpParent->getScrollBar()->IsVisible() )
+ else if ( mpParent->getScrollBar().IsVisible() )
{
- const Point aOutPos( mpParent->getScrollBar()->GetPosPixel() );
- const Size aScrollBar = mpParent->getScrollBar()->GetOutputSizePixel();
+ const Point aOutPos( mpParent->getScrollBar().GetPosPixel() );
+ const Size aScrollBar = mpParent->getScrollBar().GetOutputSizePixel();
Rectangle aRect(aOutPos,aScrollBar);
if ( aRect.IsInside(VCLPoint(aPoint)) )
- xRet = mpParent->getScrollBar()->GetAccessible();
+ xRet = mpParent->getScrollBar().GetAccessible();
}
return xRet;
}
@@ -128,8 +128,8 @@ Reference< XAccessible > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleChild(
{
OExternalLockGuard aGuard( this );
ensureAlive();
- if ( mpParent->getScrollBar()->IsVisible() && i == 0 )
- return mpParent->getScrollBar()->GetAccessible();
+ if ( mpParent->getScrollBar().IsVisible() && i == 0 )
+ return mpParent->getScrollBar().GetAccessible();
else if ( i == 1 )
{
if ( !m_xAcc.is() )
@@ -340,9 +340,9 @@ void SvxShowCharSetAcc::implSelect(sal_Int32 nAccessibleChildIndex, sal_Bool bSe
{
const Point aOutPos;//( m_pParent->getCharSetControl()->GetPosPixel() );
Size aOutSize( m_pParent->getCharSetControl()->GetOutputSizePixel());
- if ( m_pParent->getCharSetControl()->getScrollBar()->IsVisible() )
+ if ( m_pParent->getCharSetControl()->getScrollBar().IsVisible() )
{
- const Size aScrollBar = m_pParent->getCharSetControl()->getScrollBar()->GetOutputSizePixel();
+ const Size aScrollBar = m_pParent->getCharSetControl()->getScrollBar().GetOutputSizePixel();
aOutSize.Width() -= aScrollBar.Width();
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 0c2e6076ae53..6d344f60e455 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -615,8 +615,8 @@ void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet&
{
if(rPropSet.AreThereOwnUsrAnys())
{
- const SfxItemPropertyMap* pSrc = rPropSet.getPropertyMap();
- PropertyEntryVector_t aSrcPropVector = pSrc->getPropertyEntries();
+ const SfxItemPropertyMap& rSrc = rPropSet.getPropertyMap();
+ PropertyEntryVector_t aSrcPropVector = rSrc.getPropertyEntries();
PropertyEntryVector_t::const_iterator aSrcIt = aSrcPropVector.begin();
while(aSrcIt != aSrcPropVector.end())
{
@@ -662,7 +662,7 @@ void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet)
{
SfxItemSet aSet( mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END);
Reference< beans::XPropertySet > xShape( (OWeakObject*)this, UNO_QUERY );
- SvxItemPropertySet_ObtainSettingsFromPropertySet(rPropSet, aSet, xShape, mpPropSet->getPropertyMap() );
+ SvxItemPropertySet_ObtainSettingsFromPropertySet(rPropSet, aSet, xShape, &mpPropSet->getPropertyMap() );
mpObj->SetMergedItemSetAndBroadcast(aSet);