summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-12-05 08:52:15 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-12-05 08:56:52 +0200
commitd9cf110dae8030c93c4cc7909b30c779b523359f (patch)
tree6052278a786391544e2d51da43a496b6932b1828 /fpicker
parent54c08da6c7d9f8fc28ac6c5fd15fdfbe8b0cfc03 (diff)
Bye bye ODMA
SUSE has no interest in it any longer, and I doubt anybody else has either.
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/Library_fpicker.mk6
-rw-r--r--fpicker/Library_fps_odma.mk60
-rw-r--r--fpicker/Module_fpicker.mk1
-rw-r--r--fpicker/source/generic/fpicker.cxx4
-rw-r--r--fpicker/source/odma/ODMAFilePicker.cxx534
-rw-r--r--fpicker/source/odma/ODMAFilePicker.hxx218
-rw-r--r--fpicker/source/odma/fps_odma.component16
-rw-r--r--fpicker/source/odma/fps_odma.cxx44
8 files changed, 0 insertions, 883 deletions
diff --git a/fpicker/Library_fpicker.mk b/fpicker/Library_fpicker.mk
index 0a85dd4a00ae..a5cfbb7cf66c 100644
--- a/fpicker/Library_fpicker.mk
+++ b/fpicker/Library_fpicker.mk
@@ -41,12 +41,6 @@ $(eval $(call gb_Library_use_libraries,fpicker,\
$(gb_UWINAPI) \
))
-ifeq ($(OS),WNT)
-$(eval $(call gb_Library_use_static_libraries,fpicker,\
- odma_lib \
-))
-endif
-
$(eval $(call gb_Library_add_exception_objects,fpicker,\
fpicker/source/generic/fpicker \
))
diff --git a/fpicker/Library_fps_odma.mk b/fpicker/Library_fps_odma.mk
deleted file mode 100644
index 17c0ff13935a..000000000000
--- a/fpicker/Library_fps_odma.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
-#
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2011 Matúš Kukan <matus.kukan@gmail.com> (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,fps_odma))
-
-$(eval $(call gb_Library_set_componentfile,fps_odma,fpicker/source/odma/fps_odma))
-
-$(eval $(call gb_Library_use_sdk_api,fps_odma))
-
-$(eval $(call gb_Library_use_libraries,fps_odma,\
- comphelper \
- cppu \
- cppuhelper \
- sal \
- svl \
- svt \
- tk \
- tl \
- ucbhelper \
- utl \
- vcl \
- $(gb_UWINAPI) \
-))
-
-ifeq ($(OS),WNT)
-$(eval $(call gb_Library_use_static_libraries,fps_odma,\
- odma_lib \
-))
-endif
-
-$(eval $(call gb_Library_add_exception_objects,fps_odma,\
- fpicker/source/odma/fps_odma \
- fpicker/source/odma/ODMAFilePicker \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/fpicker/Module_fpicker.mk b/fpicker/Module_fpicker.mk
index 8a4ac0a71a7c..311af4ef5e9c 100644
--- a/fpicker/Module_fpicker.mk
+++ b/fpicker/Module_fpicker.mk
@@ -41,7 +41,6 @@ endif
ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,fpicker,\
- Library_fps_odma \
Library_fps \
WinResTarget_fps \
))
diff --git a/fpicker/source/generic/fpicker.cxx b/fpicker/source/generic/fpicker.cxx
index 43f584589f06..960e029a8433 100644
--- a/fpicker/source/generic/fpicker.cxx
+++ b/fpicker/source/generic/fpicker.cxx
@@ -32,7 +32,6 @@
#define GradientStyle_RECT BLA_GradientStyle_RECT
#include <windows.h>
#undef GradientStyle_RECT
-#include <odma_lib.hxx>
#endif
using css::uno::Reference;
@@ -58,9 +57,6 @@ static OUString FilePicker_getSystemPickerServiceName()
return OUString (RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.ui.dialogs.SystemFilePicker"));
#endif
#ifdef WNT
- if (SvtMiscOptions().TryODMADialog() && ::odma::DMSsAvailable()) {
- return OUString (RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.ui.dialogs.ODMAFilePicker"));
- }
return OUString (RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.ui.dialogs.Win32FilePicker"));
#endif
}
diff --git a/fpicker/source/odma/ODMAFilePicker.cxx b/fpicker/source/odma/ODMAFilePicker.cxx
deleted file mode 100644
index f94daee727ee..000000000000
--- a/fpicker/source/odma/ODMAFilePicker.cxx
+++ /dev/null
@@ -1,534 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * Copyright 2010 Novell, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "ODMAFilePicker.hxx"
-
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/StringPair.hpp>
-#include <com/sun/star/ui/dialogs/FilePreviewImageFormats.hpp>
-#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-
-#include <comphelper/sequence.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <ucbhelper/content.hxx>
-#include <unotools/ucbhelper.hxx>
-
-#ifndef ODMA_LIB_HXX
-#include <windows.h>
-#include <odma_lib.hxx>
-#endif
-
-// using ----------------------------------------------------------------
-
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::ui::dialogs;
-using namespace ::com::sun::star::ucb;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::util;
-using namespace ::utl;
-
-//------------------------------------------------------------------------------------
-// class ODMAFilePicker
-//------------------------------------------------------------------------------------
-ODMAFilePicker::ODMAFilePicker( const Reference < XComponentContext >& rxContext ) :
- cppu::WeakComponentImplHelper9<
- XFilterManager,
- XFilterGroupManager,
- XFilePickerControlAccess,
- XFilePickerNotifier,
- XFilePreview,
- XInitialization,
- XCancellable,
- XEventListener,
- XServiceInfo>( m_rbHelperMtx ),
- m_xContext( rxContext ),
- m_bMultiSelectionMode( sal_False ),
- m_aDefaultName( ),
- m_aFiles( ),
- m_nDialogKind( OPEN )
-{
- m_bUseDMS = ::odma::DMSsAvailable();
- m_xSystemFilePicker = rxContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.ui.dialogs.Win32FilePicker", rxContext);
-}
-
-// XExecutableDialog functions
-
-void SAL_CALL ODMAFilePicker::setTitle( const ::rtl::OUString& aTitle )
- throw (RuntimeException)
-{
- Reference< XExecutableDialog > xExecutableDialog( m_xSystemFilePicker, UNO_QUERY );
- xExecutableDialog->setTitle( aTitle);
-}
-
-inline bool is_current_process_window(HWND hwnd)
-{
- DWORD pid;
- GetWindowThreadProcessId(hwnd, &pid);
- return (pid == GetCurrentProcessId());
-}
-
-HWND choose_parent_window()
-{
- HWND hwnd_parent = GetForegroundWindow();
- if (!is_current_process_window(hwnd_parent))
- hwnd_parent = GetDesktopWindow();
- return hwnd_parent;
-}
-
-sal_Int16 SAL_CALL ODMAFilePicker::execute( )
- throw (RuntimeException)
-{
- ODMSTATUS status;
- ODMHANDLE handle;
- WORD count = 0;
- DWORD flags;
-
- status = NODMRegisterApp( &handle, ODM_API_VERSION, const_cast<char*>("sodma"), (DWORD) choose_parent_window( ), NULL );
- if (status == ODM_SUCCESS)
- {
- if (m_nDialogKind == OPEN)
- {
- const int MAXDOCS = 10;
- char docids[ODM_DOCID_MAX*MAXDOCS+1];
- WORD docidslen = sizeof( docids );
-
- flags = 0;
- if (m_bMultiSelectionMode)
- count = MAXDOCS;
- else
- count = 1;
- status = NODMSelectDocEx( handle, docids, &docidslen, &count, &flags, NULL );
- if (status == ODM_SUCCESS)
- {
- // GroupWise doesn't set docidslen or count, so
- // calculate number of document IDs manually
- char *p = docids;
- count = 0;
- while (*p) {
- count++;
- p += strlen( p ) + 1;
- }
- }
- else if (status == ODM_E_NOSUPPORT)
- {
- status = NODMSelectDoc( handle, docids, &flags );
- if (status == ODM_SUCCESS)
- count = 1;
- }
- NODMUnRegisterApp( handle );
- if (status == ODM_SUCCESS)
- {
- rtl::OUString *strings = new rtl::OUString[count];
- int i;
- char *p = docids;
-
- for (i = 0; i < count; i++) {
- // Insane API... the first element is a full URI, the rest
- // are just the "basenames" in the same "directory".
- if (i == 0)
- strings[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.odma:/" )) + rtl::OUString::createFromAscii( p );
- else
- strings[i] = rtl::OUString::createFromAscii( p );
- p += strlen( p );
- }
-
- m_aFiles = Sequence< rtl::OUString >( strings, count );
- delete[] strings;
- return ExecutableDialogResults::OK;
- }
- }
- else /* m_nDialogKind == SAVE */
- {
- char newdocid[ODM_DOCID_MAX+1];
-
- if (m_aDefaultName.getLength() == 0 ||
- !m_aDefaultName.matchIgnoreAsciiCaseAsciiL( "::ODMA\\", 7, 0 ))
- {
- char tempdocid[ODM_DOCID_MAX+1];
-
- status = NODMNewDoc( handle, tempdocid, ODM_SILENT, NULL, NULL );
- if (status == ODM_SUCCESS)
- status = NODMSaveAs( handle, tempdocid, newdocid, NULL, NULL, NULL );
- }
- else
- {
- rtl::OString sDefaultName = rtl::OUStringToOString( m_aDefaultName, RTL_TEXTENCODING_ASCII_US );
- status = NODMSaveAs( handle,
- const_cast<sal_Char*>( sDefaultName.getStr() ),
- newdocid, NULL, NULL, NULL );
- }
-
- NODMUnRegisterApp( handle );
- if (status == ODM_SUCCESS)
- {
- rtl::OUString s( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.odma:/" )) +
- rtl::OUString::createFromAscii( newdocid ) );
- // Create a Content for the odma URL so that
- // odma::ContentProvider will learn about the DOCID we
- // just created.
- ucbhelper::Content content( s, Reference< XCommandEnvironment >(), m_xContext );
- m_aFiles = Sequence< rtl::OUString >( &s, 1 );
- return ExecutableDialogResults::OK;
- }
- }
- }
- if (status == ODM_E_APPSELECT)
- {
- m_bUseDMS = sal_False;
-
- Reference< XExecutableDialog > xExecutableDialog( m_xSystemFilePicker, UNO_QUERY );
- return xExecutableDialog->execute();
- }
-
- // Fallback
- return ExecutableDialogResults::CANCEL;
-}
-
-// XFilePicker functions
-
-void SAL_CALL ODMAFilePicker::setMultiSelectionMode( sal_Bool bMode )
- throw( RuntimeException )
-{
- m_bMultiSelectionMode = bMode;
-
- Reference< XFilePicker > xFilePicker( m_xSystemFilePicker, UNO_QUERY );
- xFilePicker->setMultiSelectionMode( bMode );
-}
-
-void SAL_CALL ODMAFilePicker::setDefaultName( const rtl::OUString& aName )
- throw( RuntimeException )
-{
- // When editing a document from DMS, and doing Save As, this is
- // called twice, first with the complete DOCID, the second time
- // with the "extension" removed. Of course, this is bogus, as
- // DOCIDs should be treated as opaque strings, they don't have
- // "extensions".
-
- // In the GroupWise case a DOCID is like
- // ::ODMA\GRPWISE\FOO1.BAR.FOO-Bla_bla:12345.12 where the final
- // dot separates the version number, not an "extension".
- //
- // So ignore the second call.
- //
- // The second call without "extension" is done if the
- // XFilePickerControlAccess is set to have auto-extension turned
- // on. (See sfx2/source/dialog/filedlghelper.cxx:
- // FileDialogHelper_Impl::implInitializeFileName().) Thus we could
- // alternatively make sure that a getValue call to get
- // ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION returns
- // false. But that might be hard as we don't know in advance
- // whether the user will click the "use application dialog"
- // button. If so, we indeed do use auto-extensions.
- //
- // Yes, this is ugly, relying on knowing details on how this
- // function will be called.
-
- if ( m_aDefaultName.getLength() == 0 )
- m_aDefaultName = aName;
-
- Reference< XFilePicker > xFilePicker( m_xSystemFilePicker, UNO_QUERY );
- xFilePicker->setDefaultName( aName );
-}
-
-void SAL_CALL ODMAFilePicker::setDisplayDirectory( const rtl::OUString& aDirectory )
- throw( IllegalArgumentException, RuntimeException )
-{
- m_aDisplayDirectory = aDirectory;
-
- Reference< XFilePicker > xFilePicker( m_xSystemFilePicker, UNO_QUERY );
- xFilePicker->setDisplayDirectory( aDirectory );
-}
-
-rtl::OUString SAL_CALL ODMAFilePicker::getDisplayDirectory( )
- throw( RuntimeException )
-{
- if (m_bUseDMS)
- return m_aDisplayDirectory;
-
- Reference< XFilePicker > xFilePicker( m_xSystemFilePicker, UNO_QUERY );
- return xFilePicker->getDisplayDirectory();
-}
-
-Sequence< rtl::OUString > SAL_CALL ODMAFilePicker::getFiles( )
- throw( RuntimeException )
-{
- if (m_bUseDMS)
- return m_aFiles;
-
- Reference< XFilePicker > xFilePicker( m_xSystemFilePicker, UNO_QUERY );
- return xFilePicker->getFiles();
-}
-
-// XFilePickerControlAccess functions
-
-void SAL_CALL ODMAFilePicker::setValue( sal_Int16 nElementID,
- sal_Int16 nControlAction,
- const Any& rValue )
- throw( RuntimeException )
-{
- Reference< XFilePickerControlAccess > xFilePickerControlAccess( m_xSystemFilePicker, UNO_QUERY );
- xFilePickerControlAccess->setValue( nElementID, nControlAction, rValue );
-}
-
-Any SAL_CALL ODMAFilePicker::getValue( sal_Int16 nElementID, sal_Int16 nControlAction )
- throw( RuntimeException )
-{
- Reference< XFilePickerControlAccess > xFilePickerControlAccess( m_xSystemFilePicker, UNO_QUERY );
- return xFilePickerControlAccess->getValue( nElementID, nControlAction );
-}
-
-void SAL_CALL ODMAFilePicker::setLabel( sal_Int16 nLabelID, const rtl::OUString& rValue )
- throw ( RuntimeException )
-{
- Reference< XFilePickerControlAccess > xFilePickerControlAccess( m_xSystemFilePicker, UNO_QUERY );
- xFilePickerControlAccess->setLabel( nLabelID, rValue );
-}
-
-rtl::OUString SAL_CALL ODMAFilePicker::getLabel( sal_Int16 nLabelID )
- throw ( RuntimeException )
-{
- Reference< XFilePickerControlAccess > xFilePickerControlAccess( m_xSystemFilePicker, UNO_QUERY );
- return xFilePickerControlAccess->getLabel( nLabelID );
-}
-
-void SAL_CALL ODMAFilePicker::enableControl( sal_Int16 nElementID, sal_Bool bEnable )
- throw( RuntimeException )
-{
- Reference< XFilePickerControlAccess > xFilePickerControlAccess( m_xSystemFilePicker, UNO_QUERY );
- xFilePickerControlAccess->enableControl( nElementID, bEnable );
-}
-
-// XFilePickerNotifier functions
-
-void SAL_CALL ODMAFilePicker::addFilePickerListener( const Reference< XFilePickerListener >& xListener )
- throw ( RuntimeException )
-{
- Reference< XFilePickerNotifier > xFilePickerNotifier( m_xSystemFilePicker, UNO_QUERY );
- xFilePickerNotifier->addFilePickerListener( xListener );
-}
-
-void SAL_CALL ODMAFilePicker::removeFilePickerListener( const Reference< XFilePickerListener >& xListener )
- throw ( RuntimeException )
-{
- Reference< XFilePickerNotifier > xFilePickerNotifier( m_xSystemFilePicker, UNO_QUERY );
- xFilePickerNotifier->removeFilePickerListener( xListener );
-}
-
-// XFilePreview functions
-
-Sequence< sal_Int16 > SAL_CALL ODMAFilePicker::getSupportedImageFormats( )
- throw ( RuntimeException )
-{
- Reference< XFilePreview > xFilePreview( m_xSystemFilePicker, UNO_QUERY );
- return xFilePreview->getSupportedImageFormats();
-}
-
-sal_Int32 SAL_CALL ODMAFilePicker::getTargetColorDepth( )
- throw ( RuntimeException )
-{
- Reference< XFilePreview > xFilePreview( m_xSystemFilePicker, UNO_QUERY );
- return xFilePreview->getTargetColorDepth();
-}
-
-sal_Int32 SAL_CALL ODMAFilePicker::getAvailableWidth( )
- throw ( RuntimeException )
-{
- Reference< XFilePreview > xFilePreview( m_xSystemFilePicker, UNO_QUERY );
- return xFilePreview->getAvailableWidth();
-}
-
-sal_Int32 SAL_CALL ODMAFilePicker::getAvailableHeight( )
- throw ( RuntimeException )
-{
- Reference< XFilePreview > xFilePreview( m_xSystemFilePicker, UNO_QUERY );
- return xFilePreview->getAvailableHeight();
-}
-
-void SAL_CALL ODMAFilePicker::setImage( sal_Int16 aImageFormat, const Any& rImage )
- throw ( IllegalArgumentException, RuntimeException )
-{
- Reference< XFilePreview > xFilePreview( m_xSystemFilePicker, UNO_QUERY );
- xFilePreview->setImage( aImageFormat, rImage);
-}
-
-sal_Bool SAL_CALL ODMAFilePicker::setShowState( sal_Bool bShowState )
- throw ( RuntimeException )
-{
- Reference< XFilePreview > xFilePreview( m_xSystemFilePicker, UNO_QUERY );
- return xFilePreview->setShowState( bShowState);
-}
-
-sal_Bool SAL_CALL ODMAFilePicker::getShowState( )
- throw ( RuntimeException )
-{
- Reference< XFilePreview > xFilePreview( m_xSystemFilePicker, UNO_QUERY );
- return xFilePreview->getShowState();
-}
-
-// XFilterGroupManager functions
-
-void SAL_CALL ODMAFilePicker::appendFilterGroup( const ::rtl::OUString& sGroupTitle,
- const Sequence< StringPair >& aFilters )
- throw ( IllegalArgumentException, RuntimeException )
-{
- Reference< XFilterGroupManager > xFilterGroupManager( m_xSystemFilePicker, UNO_QUERY );
- xFilterGroupManager->appendFilterGroup( sGroupTitle, aFilters );
-}
-
-// XFilterManager functions
-
-void SAL_CALL ODMAFilePicker::appendFilter( const rtl::OUString& aTitle,
- const rtl::OUString& aFilter )
- throw( IllegalArgumentException, RuntimeException )
-{
- Reference< XFilterManager > xFilterManager( m_xSystemFilePicker, UNO_QUERY );
- xFilterManager->appendFilter( aTitle, aFilter );
-}
-
-void SAL_CALL ODMAFilePicker::setCurrentFilter( const rtl::OUString& aTitle )
- throw( IllegalArgumentException, RuntimeException )
-{
- Reference< XFilterManager > xFilterManager( m_xSystemFilePicker, UNO_QUERY );
- xFilterManager->setCurrentFilter( aTitle );
-}
-
-rtl::OUString SAL_CALL ODMAFilePicker::getCurrentFilter( )
- throw( RuntimeException )
-{
- Reference< XFilterManager > xFilterManager( m_xSystemFilePicker, UNO_QUERY );
- return xFilterManager->getCurrentFilter();
-}
-
-// XInitialization functions
-
-void SAL_CALL ODMAFilePicker::initialize( const Sequence< Any >& aArguments )
- throw ( Exception, RuntimeException )
-{
- if (aArguments.getLength( ) > 0)
- {
- Any aAny = aArguments[0];
-
- if ( (aAny.getValueType() == ::getCppuType((sal_Int16*)0)) ||
- (aAny.getValueType() == ::getCppuType((sal_Int8*)0)) )
- {
- sal_Int16 nTemplateId = -1;
- aAny >>= nTemplateId;
-
- switch (nTemplateId) {
- case TemplateDescription::FILEOPEN_SIMPLE:
- case TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE:
- case TemplateDescription::FILEOPEN_PLAY:
- case TemplateDescription::FILEOPEN_READONLY_VERSION:
- case TemplateDescription::FILEOPEN_LINK_PREVIEW:
- m_nDialogKind = OPEN;
- break;
- default:
- m_nDialogKind = SAVE;
- }
- }
- }
-
- Reference< XInitialization > xInitialization( m_xSystemFilePicker, UNO_QUERY );
- xInitialization->initialize( aArguments );
-}
-
-// XCancellable functions
-
-void SAL_CALL ODMAFilePicker::cancel( )
- throw( ::com::sun::star::uno::RuntimeException )
-{
- Reference< XCancellable > xCancellable( m_xSystemFilePicker, UNO_QUERY );
- xCancellable->cancel();
-}
-
-// XEventListener functions
-
-void SAL_CALL ODMAFilePicker::disposing( const ::com::sun::star::lang::EventObject& aEvent )
- throw( RuntimeException )
-{
- Reference< XEventListener > xEventListener( m_xSystemFilePicker, UNO_QUERY );
- xEventListener->disposing( aEvent );
-}
-
-// XServiceInfo functions
-
-rtl::OUString SAL_CALL ODMAFilePicker::getImplementationName( )
- throw( RuntimeException )
-{
- return impl_getStaticImplementationName();
-}
-
-sal_Bool SAL_CALL ODMAFilePicker::supportsService( const rtl::OUString& sServiceName )
- throw( RuntimeException )
-{
- Sequence< rtl::OUString > seqServiceNames = getSupportedServiceNames();
- const rtl::OUString* pArray = seqServiceNames.getConstArray();
- for ( sal_Int32 i = 0; i < seqServiceNames.getLength(); i++ )
- {
- if ( sServiceName == pArray[i] )
- {
- return sal_True ;
- }
- }
- return sal_False ;
-}
-
-Sequence< rtl::OUString > SAL_CALL ODMAFilePicker::getSupportedServiceNames( )
- throw( RuntimeException )
-{
- return impl_getStaticSupportedServiceNames();
-}
-
-Sequence< rtl::OUString > ODMAFilePicker::impl_getStaticSupportedServiceNames( )
-{
- Sequence< OUString > s(1);
- s[0] = "com.sun.star.ui.dialogs.SystemFilePicker";
- return s;
-}
-
-rtl::OUString ODMAFilePicker::impl_getStaticImplementationName( )
-{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svtools.ODMAFilePicker" ));
-}
-
-Reference< XInterface > SAL_CALL ODMAFilePicker::impl_createInstance(
- const Reference< XComponentContext >& rxContext)
- throw( Exception )
-{
- return Reference< XInterface >( *new ODMAFilePicker( rxContext ) );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/odma/ODMAFilePicker.hxx b/fpicker/source/odma/ODMAFilePicker.hxx
deleted file mode 100644
index dee0bddacba6..000000000000
--- a/fpicker/source/odma/ODMAFilePicker.hxx
+++ /dev/null
@@ -1,218 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * Copyright 2010 Novell, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_ODMA_FILEPICKER_HXX
-#define INCLUDED_ODMA_FILEPICKER_HXX
-
-#include <cppuhelper/compbase9.hxx>
-
-#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
-#include <com/sun/star/ui/dialogs/XFilePickerNotifier.hpp>
-#include <com/sun/star/ui/dialogs/XFilePreview.hpp>
-#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
-#include <com/sun/star/ui/dialogs/XFilterGroupManager.hpp>
-#include <com/sun/star/ui/dialogs/XFilePickerListener.hpp>
-#include <com/sun/star/util/XCancellable.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-
-// class ODMAFilePicker ---------------------------------------------------
-
-class ODMAFilePicker :
- public cppu::WeakComponentImplHelper9<
- ::com::sun::star::ui::dialogs::XFilterManager,
- ::com::sun::star::ui::dialogs::XFilterGroupManager,
- ::com::sun::star::ui::dialogs::XFilePickerControlAccess,
- ::com::sun::star::ui::dialogs::XFilePickerNotifier,
- ::com::sun::star::ui::dialogs::XFilePreview,
- ::com::sun::star::lang::XInitialization,
- ::com::sun::star::util::XCancellable,
- ::com::sun::star::lang::XEventListener,
- ::com::sun::star::lang::XServiceInfo >
-{
-private:
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
- m_xContext;
- sal_Bool m_bUseDMS;
- sal_Bool m_bMultiSelectionMode;
- rtl::OUString m_aDefaultName;
- rtl::OUString m_aDisplayDirectory;
- ::com::sun::star::uno::Sequence< rtl::OUString > m_aFiles;
- enum { OPEN, SAVE } m_nDialogKind;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xSystemFilePicker;
-
-protected:
- ::osl::Mutex m_rbHelperMtx;
-
-public:
-
- ODMAFilePicker( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
-
- // XFilterManager functions
-
- virtual void SAL_CALL appendFilter( const ::rtl::OUString& aTitle,
- const ::rtl::OUString& aFilter )
- throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle )
- throw( ::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException );
-
- virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- // XFilterGroupManager functions
-
- virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aFilters )
- throw (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException );
-
- // XFilePickerControlAccess functions
-
- virtual void SAL_CALL setValue( sal_Int16 nControlID,
- sal_Int16 nControlAction,
- const ::com::sun::star::uno::Any& aValue )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 nControlID,
- sal_Int16 nControlAction )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setLabel( sal_Int16 nControlID,
- const ::rtl::OUString& aValue )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 nControlID )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL enableControl( sal_Int16 nControlID,
- sal_Bool bEnable )
- throw( ::com::sun::star::uno::RuntimeException );
-
- // XFilePicker functions
-
- virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
- throw( ::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException );
-
- virtual ::rtl::OUString SAL_CALL getDisplayDirectory( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- // XExecutableDialog functions
-
- virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
- throw (::com::sun::star::uno::RuntimeException);
-
- virtual sal_Int16 SAL_CALL execute( )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XFilePickerNotifier functions
-
- virtual void SAL_CALL addFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL removeFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- // XFilePreview functions
-
- virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedImageFormats( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- virtual sal_Int32 SAL_CALL getTargetColorDepth( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- virtual sal_Int32 SAL_CALL getAvailableWidth( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- virtual sal_Int32 SAL_CALL getAvailableHeight( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setImage( sal_Int16 aImageFormat,
- const ::com::sun::star::uno::Any& aImage )
- throw ( ::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException );
-
- virtual sal_Bool SAL_CALL setShowState( sal_Bool bShowState )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- virtual sal_Bool SAL_CALL getShowState( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- // XInitialization functions
-
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw ( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
-
- // XCancellable functions
-
- virtual void SAL_CALL cancel( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- // XEventListener functions
-
- using cppu::WeakComponentImplHelperBase::disposing;
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
- throw( ::com::sun::star::uno::RuntimeException );
-
- // XServiceInfo functions
-
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- /* Helper for XServiceInfo */
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > impl_getStaticSupportedServiceNames( );
- static ::rtl::OUString impl_getStaticImplementationName( );
-
- /* Helper for registry */
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_createInstance ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
- throw( ::com::sun::star::uno::Exception );
-};
-
-#endif // INCLUDED_ODMA_FILEPICKER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/odma/fps_odma.component b/fpicker/source/odma/fps_odma.component
deleted file mode 100644
index 62e15776a124..000000000000
--- a/fpicker/source/odma/fps_odma.component
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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/.
- *
--->
-
-<component loader="com.sun.star.loader.SharedLibrary" prefix="fps_odma"
- xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.svtools.ODMAFilePicker">
- <service name="com.sun.star.ui.dialogs.SystemFilePicker"/>
- </implementation>
-</component>
diff --git a/fpicker/source/odma/fps_odma.cxx b/fpicker/source/odma/fps_odma.cxx
deleted file mode 100644
index c8dce67d4c50..000000000000
--- a/fpicker/source/odma/fps_odma.cxx
+++ /dev/null
@@ -1,44 +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 "sal/types.h"
-
-#include "cppuhelper/implementationentry.hxx"
-
-#include "ODMAFilePicker.hxx"
-
-static cppu::ImplementationEntry g_entries[] =
-{
- {
- ODMAFilePicker::impl_createInstance,
- ODMAFilePicker::impl_getStaticImplementationName,
- ODMAFilePicker::impl_getStaticSupportedServiceNames,
- cppu::createSingleComponentFactory, 0, 0
- },
- { 0, 0, 0, 0, 0, 0 }
-};
-
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL fps_odma_component_getFactory (
- const sal_Char * pImplementationName, void * pServiceManager, void * pRegistryKey)
-{
- return cppu::component_getFactoryHelper (
- pImplementationName, pServiceManager, pRegistryKey, g_entries);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */