summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2015-12-18 02:30:18 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-12-18 01:58:23 +0000
commit42645fe67cac22e9a96bc4b34c4f85c09185d9d2 (patch)
tree17212eef1a2c1ad4e671e1a3fc7b9db8d96e683f /cui
parent88f3c8f995e04aaecc9c7fefe4fe347e87d5e05e (diff)
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 4c18af27bf95b332ee2006cfc0bbf469fb1a84d4. Change-Id: I8ad42a28139ceeab0cae1f608d55beb28c159db3 Reviewed-on: https://gerrit.libreoffice.org/20783 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/insdlg.cxx1
-rw-r--r--cui/source/dialogs/plfilter.cxx117
-rw-r--r--cui/source/dialogs/plfilter.hxx34
3 files changed, 0 insertions, 152 deletions
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index c85e392a11a3..3d8466d5a106 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -33,7 +33,6 @@
#include <comphelper/processfactory.hxx>
#include "insdlg.hxx"
-#include <plfilter.hxx>
#include <dialmgr.hxx>
#include <svtools/sores.hxx>
diff --git a/cui/source/dialogs/plfilter.cxx b/cui/source/dialogs/plfilter.cxx
deleted file mode 100644
index cdb606f0d67d..000000000000
--- a/cui/source/dialogs/plfilter.cxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- 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: */
diff --git a/cui/source/dialogs/plfilter.hxx b/cui/source/dialogs/plfilter.hxx
deleted file mode 100644
index f982fe0c2493..000000000000
--- a/cui/source/dialogs/plfilter.hxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- 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: */