summaryrefslogtreecommitdiff
path: root/embeddedobj/source/general
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
commit7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch)
tree623358cf25839219ef4fd90eea4f3eaa55389a1f /embeddedobj/source/general
parent0d5167915b47df7c3e450614ea50d845ba959df3 (diff)
Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC) is used to annotate legitimately unused parameters, so that static analysis tools can tell legitimately unused parameters from truly unnecessary ones. To that end, some patches for external modules are also added, that are only applied when compiling with GCC and add necessary __attribute__ ((unused)) in headers.
Diffstat (limited to 'embeddedobj/source/general')
-rw-r--r--embeddedobj/source/general/docholder.cxx4
-rw-r--r--embeddedobj/source/general/dummyobject.cxx9
2 files changed, 5 insertions, 8 deletions
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index c0b4990d3576..0d4a43ee636b 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -1222,7 +1222,7 @@ void SAL_CALL DocumentHolder::modified( const lang::EventObject& aEvent )
// if the component does not support document::XEventBroadcaster
// the modify notifications are used as workaround, but only for running state
if( aEvent.Source == m_xComponent && m_pEmbedObj && m_pEmbedObj->getCurrentState() == embed::EmbedStates::RUNNING )
- m_pEmbedObj->PostEvent_Impl( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ), aEvent.Source );
+ m_pEmbedObj->PostEvent_Impl( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ) );
}
//---------------------------------------------------------------------------
@@ -1237,7 +1237,7 @@ void SAL_CALL DocumentHolder::notifyEvent( const document::EventObject& Event )
&& !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAs" ) )
&& !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAsDone" ) )
&& !( Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnVisAreaChanged" ) ) && m_nNoResizeReact ) )
- m_pEmbedObj->PostEvent_Impl( Event.EventName, Event.Source );
+ m_pEmbedObj->PostEvent_Impl( Event.EventName );
}
}
diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx
index d5a7fc54f7ba..eac8a8aa94af 100644
--- a/embeddedobj/source/general/dummyobject.cxx
+++ b/embeddedobj/source/general/dummyobject.cxx
@@ -59,8 +59,7 @@ void ODummyEmbeddedObject::CheckInit()
}
//----------------------------------------------
-void ODummyEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName,
- const uno::Reference< uno::XInterface >& /*xSource*/ )
+void ODummyEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName )
{
if ( m_pInterfaceContainer )
{
@@ -411,8 +410,7 @@ void SAL_CALL ODummyEmbeddedObject::storeAsEntry( const uno::Reference< embed::X
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
- PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )),
- uno::Reference< uno::XInterface >( static_cast< cppu::OWeakObject* >( this ) ) );
+ PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )) );
m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName );
@@ -447,8 +445,7 @@ void SAL_CALL ODummyEmbeddedObject::saveCompleted( sal_Bool bUseNew )
m_xParentStorage = m_xNewParentStorage;
m_aEntryName = m_aNewEntryName;
- PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" )),
- uno::Reference< uno::XInterface >( static_cast< cppu::OWeakObject* >( this ) ) );
+ PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" )) );
}
m_xNewParentStorage = uno::Reference< embed::XStorage >();