1259368188 1259368188
关注数: 14 粉丝数: 15 发帖数: 310 关注贴吧数: 0
求注释. 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 谢谢大侠了.
1 下一页