Kaydet (Commit) 3e828973 authored tarafından Noel Grandin's avatar Noel Grandin

improve the inlinesimplememberfunctions clang plugin

Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
üst ec95abf2
......@@ -515,17 +515,17 @@ protected:
/**_______________________________________________________________________________________________________
*/
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > impl_getComponentContext();
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > impl_getComponentContext() { return m_xComponentContext;}
/**_______________________________________________________________________________________________________
*/
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > impl_getPeerWindow();
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > impl_getPeerWindow() { return m_xPeerWindow;}
/**_______________________________________________________________________________________________________
*/
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > impl_getGraphicsPeer();
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > impl_getGraphicsPeer() { return m_xGraphicsPeer;}
/**_______________________________________________________________________________________________________
*/
......@@ -559,7 +559,7 @@ protected:
/**_______________________________________________________________________________________________________
*/
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > impl_getDelegator();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > impl_getDelegator() { return m_xDelegator;}
// private methods
......
......@@ -133,7 +133,7 @@ public:
/**_______________________________________________________________________________________________________
*/
operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() const;
operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() const { return ((OWeakObject*)this);}
/**_______________________________________________________________________________________________________
*/
......
......@@ -716,27 +716,6 @@ const OUString BaseControl::impl_getStaticImplementationName()
// protected method
const Reference< XComponentContext > BaseControl::impl_getComponentContext()
{
return m_xComponentContext;
}
// protected method
const Reference< XWindow > BaseControl::impl_getPeerWindow()
{
return m_xPeerWindow;
}
// protected method
const Reference< XGraphics > BaseControl::impl_getGraphicsPeer()
{
return m_xGraphicsPeer;
}
// protected method
WindowDescriptor* BaseControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer )
{
// - used from "createPeer()" to set the values of an ::com::sun::star::awt::WindowDescriptor !!!
......@@ -776,10 +755,6 @@ void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ )
// protected method
Reference< XInterface > BaseControl::impl_getDelegator()
{
return m_xDelegator;
}
// private method
......
......@@ -144,13 +144,6 @@ void SAL_CALL OMRCListenerMultiplexerHelper::release() throw()
OWeakObject::release();
}
// operator
OMRCListenerMultiplexerHelper::operator Reference< XInterface >() const
{
return ((OWeakObject*)this);
}
// container method
void OMRCListenerMultiplexerHelper::setPeer( const Reference< XWindow >& xPeer )
......
......@@ -135,16 +135,6 @@ void SAL_CALL OConnectionPointContainerHelper::unadvise( const Type&
m_aMultiTypeContainer.removeInterface( aType, xListener );
}
// public but impl method!
// Is necessary to get container member at OConnectionPoint-instance.
OMultiTypeInterfaceContainerHelper& OConnectionPointContainerHelper::impl_getMultiTypeContainer()
{
// Impl methods are not threadsafe!
// "Parent" function must do this.
return m_aMultiTypeContainer;
}
} // namespace unocontrols
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -178,20 +178,12 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xListener
) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
/**_________________________________________________________________________________________________________
@short
@descr
@seealso
@param
@return
@onerror
*/
// public but impl method!
// Is necessary to get container member at OConnectionPoint-instance.
// Impl methods are not threadsafe!
// "Parent" function must do this.
::cppu::OMultiTypeInterfaceContainerHelper& impl_getMultiTypeContainer() { return m_aMultiTypeContainer; }
::cppu::OMultiTypeInterfaceContainerHelper& impl_getMultiTypeContainer();
// private variables
......
......@@ -188,9 +188,9 @@ public:
throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
/**@return m_pCellVector*/
std::vector< AccessibleGridControlTableCell* >& getCellVector();
std::vector< AccessibleGridControlTableCell* >& getCellVector() { return m_pCellVector;}
/**@return m_xAccessCellVector*/
std::vector< com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible > >& getAccessibleCellVector();
std::vector< com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible > >& getAccessibleCellVector() { return m_pAccessCellVector;}
protected:
// internal virtual methods -----------------------------------------------
......
......@@ -389,15 +389,7 @@ Reference< XAccessibleTable > AccessibleGridControlTable::implGetHeaderBar(
return Reference< XAccessibleTable >( xRet, uno::UNO_QUERY );
}
std::vector< AccessibleGridControlTableCell* >& AccessibleGridControlTable::getCellVector()
{
return m_pCellVector;
}
std::vector< Reference< XAccessible > >& AccessibleGridControlTable::getAccessibleCellVector()
{
return m_pAccessCellVector;
}
} // namespace accessibility
......
......@@ -525,7 +525,7 @@ public:
void InsertEntry( const OUString& aStr );
void ClearListBox();
void SetTextSelection( const TextSelection& aSel );
const TextSelection& GetTextSelection() const;
const TextSelection& GetTextSelection() const { return aTextSelection;}
void ResizeAndPositionListBox();
void SelectFirstEntry(); //selects first entry in ListBox
void ClearAndHide();
......
......@@ -2819,10 +2819,6 @@ void CodeCompleteWindow::SetTextSelection( const TextSelection& aSel )
aTextSelection = aSel;
}
const TextSelection& CodeCompleteWindow::GetTextSelection() const
{
return aTextSelection;
}
void CodeCompleteWindow::ResizeAndPositionListBox()
{
......
......@@ -99,10 +99,6 @@ void LineNumberWindow::DoScroll(long nHorzScroll, long nVertScroll)
Window::Scroll(nHorzScroll, nVertScroll);
}
long& LineNumberWindow::GetCurYOffset()
{
return m_nCurYOffset;
}
bool LineNumberWindow::SyncYOffset()
{
......
......@@ -36,7 +36,7 @@ public:
void DoScroll( long nHorzScroll, long nVertScroll );
bool SyncYOffset();
long& GetCurYOffset();
long& GetCurYOffset() { return m_nCurYOffset;}
int GetWidth() { return m_nWidth;}
};
......
......@@ -73,15 +73,7 @@ namespace basegfx
return hypot( mfX, mfY );
}
double B2DVector::scalar( const B2DVector& rVec ) const
{
return((mfX * rVec.mfX) + (mfY * rVec.mfY));
}
double B2DVector::cross( const B2DVector& rVec ) const
{
return(mfX * rVec.getY() - mfY * rVec.getX());
}
double B2DVector::angle( const B2DVector& rVec ) const
{
......
......@@ -30,10 +30,6 @@ namespace basegfx
return *this;
}
double B2IVector::scalar( const B2IVector& rVec ) const
{
return((mnX * rVec.mnX) + (mnY * rVec.mnY));
}
B2IVector& B2IVector::operator*=( const B2DHomMatrix& rMat )
{
......
......@@ -1590,10 +1590,6 @@ bool BasicManager::IsBasicModified() const
return false;
}
std::vector<BasicError>& BasicManager::GetErrors()
{
return aErrors;
}
bool BasicManager::GetGlobalUNOConstant( const sal_Char* _pAsciiName, uno::Any& aOut )
{
......
......@@ -204,10 +204,6 @@ sal_Int32 PropertySetInfoImpl::GetIndex_Impl( const OUString &rPropName ) const
return pP ? sal::static_int_cast<sal_Int32>( pP - _aProps.getConstArray() ) : -1;
}
Sequence< Property > PropertySetInfoImpl::getProperties(void) throw()
{
return _aProps;
}
Property PropertySetInfoImpl::getPropertyByName(const OUString& Name) throw( RuntimeException )
{
......
......@@ -731,10 +731,6 @@ SbxVariable* SbModule::Find( const OUString& rName, SbxClassType t )
return pRes;
}
const OUString& SbModule::GetSource32() const
{
return aOUSource;
}
const OUString& SbModule::GetSource() const
{
......@@ -1800,10 +1796,6 @@ void SbModule::GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache)
}
}
SbxArrayRef SbModule::GetMethods()
{
return pMethods;
}
OUString SbModule::GetKeywordCase( const OUString& sKeyword ) const
{
......
......@@ -104,7 +104,7 @@ public:
PropertySetInfoImpl( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProps );
// XPropertySetInfo
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void) throw ();
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void) throw () { return _aProps;}
::com::sun::star::beans::Property SAL_CALL getPropertyByName(const OUString& Name)
throw( ::com::sun::star::uno::RuntimeException );
bool SAL_CALL hasPropertyByName(const OUString& Name)
......
......@@ -763,10 +763,6 @@ SbxDataType SbxValue::GetType() const
return SbxDataType( aData.eType & 0x0FFF );
}
SbxDataType SbxValue::GetFullType() const
{
return aData.eType;
}
bool SbxValue::SetType( SbxDataType t )
{
......
......@@ -63,10 +63,6 @@ BinaryAny & BinaryAny::operator =(BinaryAny const & other) throw () {
return *this;
}
uno_Any * BinaryAny::get() throw () {
return &data_;
}
css::uno::TypeDescription BinaryAny::getType() const throw () {
return css::uno::TypeDescription(data_.pType);
}
......
......@@ -47,7 +47,7 @@ public:
BinaryAny & operator =(BinaryAny const & other) throw ();
uno_Any * get() throw ();
uno_Any * get() throw () { return &data_; }
com::sun::star::uno::TypeDescription getType() const throw ();
......
......@@ -105,7 +105,7 @@ public:
~AttachThread();
rtl::ByteSequence getTid() throw ();
rtl::ByteSequence getTid() throw () { return tid_;}
private:
uno_ThreadPool threadPool_;
......@@ -124,9 +124,6 @@ AttachThread::~AttachThread() {
uno_releaseIdFromCurrentThread();
}
rtl::ByteSequence AttachThread::getTid() throw () {
return tid_;
}
class PopOutgoingRequest: private boost::noncopyable {
public:
......@@ -347,21 +344,8 @@ void Bridge::terminate(bool final) {
terminated_.set();
}
css::uno::Reference< css::connection::XConnection > Bridge::getConnection()
const
{
return connection_;
}
css::uno::Reference< css::bridge::XInstanceProvider > Bridge::getProvider()
const
{
return provider_;
}
css::uno::Mapping & Bridge::getCppToBinaryMapping() {
return cppToBinaryMapping_;
}
BinaryAny Bridge::mapCppToBinaryAny(css::uno::Any const & cppAny) {
css::uno::Any in(cppAny);
......
......@@ -91,12 +91,12 @@ public:
void terminate(bool final);
com::sun::star::uno::Reference< com::sun::star::connection::XConnection >
getConnection() const;
getConnection() const { return connection_;}
com::sun::star::uno::Reference< com::sun::star::bridge::XInstanceProvider >
getProvider() const;
getProvider() const { return provider_;}
com::sun::star::uno::Mapping & getCppToBinaryMapping();
com::sun::star::uno::Mapping & getCppToBinaryMapping() { return cppToBinaryMapping_;}
BinaryAny mapCppToBinaryAny(com::sun::star::uno::Any const & cppAny);
......
......@@ -73,13 +73,7 @@ Proxy::Proxy(
pDispatcher = &proxy_dispatchInterface;
}
OUString Proxy::getOid() const {
return oid_;
}
css::uno::TypeDescription Proxy::getType() const {
return type_;
}
void Proxy::do_acquire() {
if (osl_atomic_increment(&references_) == 1) {
......
......@@ -44,9 +44,9 @@ public:
rtl::Reference< Bridge > const & bridge, OUString const & oid,
com::sun::star::uno::TypeDescription const & type);
OUString getOid() const;
OUString getOid() const { return oid_;}
com::sun::star::uno::TypeDescription getType() const;