summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorThorsten Behrens <thorsten.behrens@CIB.de>2015-12-17 19:30:22 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-12-17 19:45:00 +0000
commit06726aa39eaeba71701742d28a1a81bd1574f883 (patch)
treebd00ee353b3f914935223bf286d3f8966c985516 /cui
parent6dd7798f57dfb29cda4a6d164f4884071fdc7f35 (diff)
[API CHANGE] Remove NPAPI-related UNO API
Follow-up to 4c18af27bf95b332ee2006cfc0bbf469fb1a84d4, related to tdf#96398, removing more client code. The following published interfaces are removed: com::sun::star::mozilla::XPluginInstance com::sun::star::mozilla::XPluginInstanceNotifySink com::sun::star::mozilla::XPluginInstancePeer com::sun::star::mozilla::XPluginInstanceSyncPeer com::sun::star::mozilla::XPluginWindowPeer com::sun::star::plugin::PluginDescription com::sun::star::plugin::PluginException com::sun::star::plugin::PluginManager com::sun::star::plugin::PluginMode com::sun::star::plugin::PluginVariable com::sun::star::plugin::XPlugin com::sun::star::plugin::XPluginContext com::sun::star::plugin::XPluginManager Change-Id: I3818a23e0f46fd01bfe9be11b57f6a551c013441 Reviewed-on: https://gerrit.libreoffice.org/20780 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/Library_cui.mk1
-rw-r--r--cui/source/dialogs/insdlg.cxx127
-rw-r--r--cui/source/factory/dlgfact.cxx2
3 files changed, 0 insertions, 130 deletions
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 85a9bf034549..86cc3796e1b9 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -112,7 +112,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/dialogs/newtabledlg \
cui/source/dialogs/passwdomdlg \
cui/source/dialogs/pastedlg \
- cui/source/dialogs/plfilter \
cui/source/dialogs/postdlg \
cui/source/dialogs/scriptdlg \
cui/source/dialogs/sdrcelldlg \
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index f47208bef1c3..c85e392a11a3 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -359,133 +359,6 @@ uno::Reference< io::XInputStream > SvInsertOleDlg::GetIconIfIconified( OUString*
return uno::Reference< io::XInputStream >();
}
-IMPL_LINK_NOARG_TYPED(SvInsertPlugInDialog, BrowseHdl, Button*, void)
-{
- Sequence< OUString > aFilterNames, aFilterTypes;
- fillNetscapePluginFilters( aFilterNames, aFilterTypes );
-
- Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- Reference< XFilePicker3 > xFilePicker = ui::dialogs::FilePicker::createWithMode( xContext, ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
-
- // add the filters
- try
- {
- const OUString* pNames = aFilterNames.getConstArray();
- const OUString* pTypes = aFilterTypes.getConstArray();
- for( int i = 0; i < aFilterNames.getLength(); i++ )
- xFilePicker->appendFilter( pNames[i], pTypes[i] );
- }
- catch( IllegalArgumentException& )
- {
- DBG_ASSERT( false, "caught IllegalArgumentException when registering filter\n" );
- }
-
- if( xFilePicker->execute() == ExecutableDialogResults::OK )
- {
- Sequence< OUString > aPathSeq( xFilePicker->getSelectedFiles() );
- INetURLObject aObj( aPathSeq[0] );
- m_pEdFileurl->SetText(aObj.PathToFileName());
- }
-}
-
-
-
-SvInsertPlugInDialog::SvInsertPlugInDialog(vcl::Window* pParent,
- const uno::Reference < embed::XStorage >& xStorage)
- : InsertObjectDialog_Impl(pParent, "InsertPluginDialog", "cui/ui/insertplugin.ui", xStorage)
- , m_pURL(nullptr)
-{
- get(m_pEdFileurl, "urled");
- get(m_pBtnFileurl, "urlbtn");
- get(m_pEdPluginsOptions, "pluginoptions");
- m_pBtnFileurl->SetClickHdl(LINK(this, SvInsertPlugInDialog, BrowseHdl));
-}
-
-SvInsertPlugInDialog::~SvInsertPlugInDialog()
-{
- disposeOnce();
-}
-
-void SvInsertPlugInDialog::dispose()
-{
- delete m_pURL;
- m_pURL = nullptr;
- m_pEdFileurl.clear();
- m_pBtnFileurl.clear();
- m_pEdPluginsOptions.clear();
- InsertObjectDialog_Impl::dispose();
-}
-
-static void Plugin_ImplFillCommandSequence( const OUString& aCommands, uno::Sequence< beans::PropertyValue >& aCommandSequence )
-{
- sal_Int32 nEaten;
- SvCommandList aLst;
- aLst.AppendCommands( aCommands, &nEaten );
-
- const size_t nCount = aLst.size();
- aCommandSequence.realloc( nCount );
- for( size_t nIndex = 0; nIndex < nCount; nIndex++ )
- {
- aCommandSequence[nIndex].Name = aLst[ nIndex ].GetCommand();
- aCommandSequence[nIndex].Handle = -1;
- aCommandSequence[nIndex].Value = makeAny( aLst[ nIndex ].GetArgument() );
- aCommandSequence[nIndex].State = beans::PropertyState_DIRECT_VALUE;
- }
-}
-
-short SvInsertPlugInDialog::Execute()
-{
- short nRet = RET_OK;
- m_aCommands.clear();
- DBG_ASSERT( m_xStorage.is(), "No storage!");
- if ( m_xStorage.is() && ( nRet = Dialog::Execute() ) == RET_OK )
- {
- if ( !m_pURL )
- m_pURL = new INetURLObject();
- else
- *m_pURL = INetURLObject();
-
- m_aCommands = GetPlugInOptions();
- OUString aURL = GetPlugInFile();
-
- // URL can be a valid and absolute URL or a system file name
- m_pURL->SetSmartProtocol( INetProtocol::File );
- if ( aURL.isEmpty() || m_pURL->SetSmartURL( aURL ) )
- {
- // create a plugin object
- OUString aName;
- SvGlobalName aClassId( SO3_PLUGIN_CLASSID );
- m_xObj = aCnt.CreateEmbeddedObject( aClassId.GetByteSequence(), aName );
- }
-
- if ( m_xObj.is() )
- {
- // set properties from dialog
- if ( m_xObj->getCurrentState() == embed::EmbedStates::LOADED )
- m_xObj->changeState( embed::EmbedStates::RUNNING );
-
- uno::Reference < beans::XPropertySet > xSet( m_xObj->getComponent(), uno::UNO_QUERY );
- if ( xSet.is() )
- {
- xSet->setPropertyValue( "PluginURL",
- makeAny( OUString( m_pURL->GetMainURL( INetURLObject::NO_DECODE ) ) ) );
- uno::Sequence< beans::PropertyValue > aCommandSequence;
- Plugin_ImplFillCommandSequence( m_aCommands, aCommandSequence );
- xSet->setPropertyValue( "PluginCommands", makeAny( aCommandSequence ) );
- }
- }
- else
- {
- // PlugIn couldn't be created
- // global Resource from svtools (former so3 resource)
- OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_PLUGIN ) );
- aErr = aErr.replaceFirst( "%", aURL );
- ScopedVclPtrInstance<MessageDialog>::Create(this, aErr)->Execute();
- }
- }
-
- return nRet;
-}
SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog( vcl::Window *pParent,
const css::uno::Reference < css::embed::XStorage >& xStorage )
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index d32081248f73..b3a19ef054b2 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1553,8 +1553,6 @@ SfxAbstractInsertObjectDialog* AbstractDialogFactory_Impl::CreateInsertObjectDia
InsertObjectDialog_Impl* pDlg=nullptr;
if ( rCommand == ".uno:InsertObject" )
pDlg = VclPtr<SvInsertOleDlg>::Create( pParent, xStor, pList );
- else if ( rCommand == ".uno:InsertPlugin" )
- pDlg = VclPtr<SvInsertPlugInDialog>::Create( pParent, xStor );
else if ( rCommand == ".uno:InsertObjectFloatingFrame" )
pDlg = VclPtr<SfxInsertFloatingFrameDialog>::Create( pParent, xStor );