求注释.
c++吧
全部回复
仅看楼主
level 1
1259368188 楼主
Reference< XUIElement > SAL_CALL ToolPanelFactory::createUIElement( const ::rtl::OUString& i_rResourceURL, const Sequence< PropertyValue >& i_rArgs ) throw (NoSuchElementException, IllegalArgumentException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
if ( !i_rResourceURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/toolpanel/org.openoffice.example.colorpanel/" ) ) )
throw NoSuchElementException( i_rResourceURL, *this );
const ::rtl::OUString sColor( i_rResourceURL.copy( i_rResourceURL.lastIndexOf( '/' ) + 1 ) );
const sal_Int32 nPanelColor = sColor.toInt32( 16 );
// retrieve the parent window
Reference< XWindow > xParentWindow;
const PropertyValue* pArg = i_rArgs.getConstArray();
const PropertyValue* pArgEnd = i_rArgs.getConstArray() + i_rArgs.getLength();
for ( ; pArg != pArgEnd; ++pArg )
{
if ( pArg->Name.equalsAscii( "ParentWindow" ) )
{
xParentWindow.set( pArg->Value, UNO_QUERY );
break;
}
}
if ( !xParentWindow.is() )
{
OSL_ENSURE( false, "ToolPanelFactory::createUIElement: no parent window in the args!" );
throw IllegalArgumentException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No parent window provided in the creation arguments. Cannot create tool panel." ) ),
*this,
2
);
}
/// create the panel
Reference< XUIElement > xUIElement( new PanelUIElement( m_xContext, xParentWindow, i_rResourceURL, nPanelColor ) );
return xUIElement;
}
本人是用java开发,但是这个程序是c++写的要转入java 希望大侠写下每行写下注释.我好对着转成java 谢谢大侠了.
2013年08月31日 06点08分 1
1