Kaydet (Commit) 42645fe6 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

related tdf#96398 pull out more NPAPI-related code

Fixup windows PCH plus pulling out more code now unused due to NPAPI
removal. Follow-up to 4c18af27.

Change-Id: I8ad42a28139ceeab0cae1f608d55beb28c159db3
Reviewed-on: https://gerrit.libreoffice.org/20783Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 88f3c8f9
......@@ -33,7 +33,6 @@
#include <comphelper/processfactory.hxx>
#include "insdlg.hxx"
#include <plfilter.hxx>
#include <dialmgr.hxx>
#include <svtools/sores.hxx>
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <set>
#include <map>
#include <comphelper/processfactory.hxx>
#include <vcl/stdtext.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/plugin/PluginDescription.hpp>
#include <com/sun/star/plugin/PluginManager.hpp>
#include <com/sun/star/plugin/XPluginManager.hpp>
#include <plfilter.hxx>
using namespace std;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::plugin;
struct ltstr
{
bool operator()( const OUString& s1, const OUString& s2 ) const
{
return s1.compareTo( s2 ) < 0;
}
};
typedef set< OUString, ltstr > StrSet;
typedef map< OUString, StrSet, ltstr > FilterMap;
void fillNetscapePluginFilters( Sequence< OUString >& rPluginNames, Sequence< OUString >& rPluginTypes )
{
Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
Reference< XPluginManager > xPMgr( PluginManager::create(xContext) );
FilterMap aMap;
// sum up the mimetypes: one description, multiple extensions
Sequence<PluginDescription > aDescriptions( xPMgr->getPluginDescriptions() );
const PluginDescription * pDescriptions = aDescriptions.getConstArray();
for ( sal_uInt32 nPos = aDescriptions.getLength(); nPos--; )
{
const PluginDescription & rDescr = pDescriptions[nPos];
// consistency check for the do {} while loop below
if (rDescr.Extension.isEmpty())
continue;
StrSet& rTypes = aMap[ rDescr.Description ];
OUString aExtension( rDescr.Extension );
sal_Int32 nIndex = 0;
do
{
// no default plugins anymore
const OUString aExt( aExtension.getToken( 0, ';', nIndex ) );
if ( aExt != "*.*" )
rTypes.insert( aExt );
}
while ( nIndex >= 0 );
}
rPluginNames = Sequence< OUString >( aMap.size() );
rPluginTypes = Sequence< OUString >( aMap.size() );
OUString* pPluginNames = rPluginNames.getArray();
OUString* pPluginTypes = rPluginTypes.getArray();
int nIndex = 0;
for ( FilterMap::iterator iPos = aMap.begin(); iPos != aMap.end(); ++iPos )
{
OUString aText( (*iPos).first );
OUString aType;
StrSet& rTypes = (*iPos).second;
StrSet::iterator i = rTypes.begin();
while ( i != rTypes.end() )
{
aType += (*i);
++i;
if ( i != rTypes.end() )
aType += ";";
}
if ( !aType.isEmpty() )
{
aText += " (";
aText += aType;
aText += ")";
pPluginNames[nIndex] = aText;
pPluginTypes[nIndex] = aType;
nIndex++;
}
}
rPluginNames.realloc( nIndex );
rPluginTypes.realloc( nIndex );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_CUI_SOURCE_DIALOGS_PLFILTER_HXX
#define INCLUDED_CUI_SOURCE_DIALOGS_PLFILTER_HXX
#include <sal/config.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <rtl/ustring.hxx>
void fillNetscapePluginFilters(
css::uno::Sequence<OUString> & rNames,
css::uno::Sequence<OUString> & rTypes);
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SVX_PFILEDLG_HXX
#define INCLUDED_SVX_PFILEDLG_HXX
#include <sfx2/filedlghelper.hxx>
#include <svx/svxdllapi.h>
/*************************************************************************
|*
|* Filedialog to insert Plugin-Fileformats
|*
\************************************************************************/
class SVX_DLLPUBLIC SvxPluginFileDlg
{
private:
sfx2::FileDialogHelper maFileDlg;
public:
// with nKind = SID_INSERT_SOUND or
// nKind = SID_INSERT_VIDEO
SvxPluginFileDlg (vcl::Window *pParent, sal_uInt16 nKind );
~SvxPluginFileDlg ();
ErrCode Execute();
OUString GetPath() const;
void SetContext( sfx2::FileDialogHelper::Context eNewContext );
};
#endif // INCLUDED_SVX_PFILEDLG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -151,20 +151,6 @@
<value>PRIMARY SHOW IPACTIVATE PROPERTIES</value>
</prop>
</node>
<node oor:name="4CAA7761-6B8B-11CF-89CA-008029E4B0B1" oor:op="replace">
<prop oor:name="ObjectFactory">
<value>com.sun.star.embed.OOoSpecialEmbeddedObjectFactory</value>
</prop>
<prop oor:name="ObjectDocumentServiceName">
<value>com.sun.star.comp.sfx2.PluginObject</value>
</prop>
<prop oor:name="ObjectMiscStatus">
<value>2432</value>
</prop>
<prop oor:name="ObjectVerbs">
<value>PRIMARY SHOW IPACTIVATE PROPERTIES</value>
</prop>
</node>
<node oor:name="1A8A6701-DE58-11CF-89CA-008029E4B0B1" oor:op="replace">
<prop oor:name="ObjectFactory">
<value>com.sun.star.embed.OOoSpecialEmbeddedObjectFactory</value>
......
......@@ -28,7 +28,6 @@
#include <sfx2/docfile.hxx>
#include <svl/stritem.hxx>
#include <svx/svdoole2.hxx>
#include <svx/pfiledlg.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/syschild.hxx>
......
......@@ -26,7 +26,6 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svx/pfiledlg.hxx>
#include <svx/svditer.hxx>
#include <svx/svdmark.hxx>
#include <svx/svdograf.hxx>
......@@ -39,6 +38,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/filedlghelper.hxx>
#include <svtools/soerr.hxx>
#include <svl/rectitem.hxx>
#include <svl/slstitm.hxx>
......
......@@ -35,6 +35,7 @@
#include <svl/urihelper.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/filedlghelper.hxx>
#include <svtools/sores.hxx>
#include <svtools/insdlg.hxx>
#include <sfx2/request.hxx>
......@@ -42,7 +43,6 @@
#include <unotools/pathoptions.hxx>
#include <svtools/miscopt.hxx>
#include <svtools/embedhlp.hxx>
#include <svx/pfiledlg.hxx>
#include <svx/dialogs.hrc>
#include <sfx2/linkmgr.hxx>
#include <svx/linkwarn.hxx>
......
......@@ -56,7 +56,6 @@
#include <comphelper/processfactory.hxx>
#include <sfx2/request.hxx>
#include <svx/pfiledlg.hxx>
#include <svx/grafctrl.hxx>
#include <svtools/cliplistener.hxx>
#include <sfx2/viewfrm.hxx>
......
......@@ -78,10 +78,6 @@
constructor="com_sun_star_comp_sfx2_IFrameObject_get_implementation">
<service name="com.sun.star.frame.SpecialEmbeddedObject"/>
</implementation>
<implementation name="com.sun.star.comp.sfx2.PluginObject"
constructor="com_sun_star_comp_sfx2_PluginObject_get_implementation">
<service name="com.sun.star.frame.SpecialEmbeddedObject"/>
</implementation>
<implementation name="com.sun.star.comp.sfx2.SfxMacroLoader"
constructor="com_sun_star_comp_sfx2_SfxMacroLoader_get_implementation">
<service name="com.sun.star.frame.ProtocolHandler"/>
......
......@@ -277,24 +277,6 @@ ShapeSharedPtr ShapeImporter::createShape(
mnAscendingPrio,
mrContext);
}
else if( shapeType == "com.sun.star.drawing.PluginShape" )
{
// PropertyValues to copy from XShape to plugin
static const char* aPropertyValues[] =
{
"PluginURL",
"PluginMimeType",
"PluginCommands"
};
// (Netscape)Plugin shape. This is a special object
return createAppletShape( xCurrShape,
mnAscendingPrio,
"com.sun.star.comp.sfx2.PluginObject",
aPropertyValues,
SAL_N_ELEMENTS(aPropertyValues),
mrContext );
}
else if( shapeType == "com.sun.star.drawing.AppletShape" )
{
// PropertyValues to copy from XShape to applet
......
......@@ -51,7 +51,6 @@
#include <editeng/scripttypeitem.hxx>
#include <vcl/graphicfilter.hxx>
#include <sfx2/htmlmode.hxx>
#include <svx/pfiledlg.hxx>
#include <svtools/htmlcfg.hxx>
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
......
......@@ -225,7 +225,6 @@
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/plugin/PluginDescription.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/script/BasicErrorException.hpp>
#include <com/sun/star/script/ModuleInfo.hpp>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment