summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-03-14 16:20:27 +0100
committerMichael Stahl <mstahl@redhat.com>2012-03-14 16:23:55 +0100
commit5142e628b563a9876e8884c5dd4914eff4a2f307 (patch)
tree36041fe6ccd1da7a8301d0a9fc19041ed3d6d52c /fpicker
parent813a57cb1afa16bb306ced96d367fa1f55906620 (diff)
fdo#47246: fpicker: merge fop library into fps:
Since nobody seems to know why these are separate, merge fop into fps. In case this untested change doesn't work out it should be reverted :)
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/Library_fop.mk67
-rw-r--r--fpicker/Library_fps.mk6
-rw-r--r--fpicker/Module_fpicker.mk1
-rw-r--r--fpicker/source/win32/filepicker/FPentry.cxx28
-rw-r--r--fpicker/source/win32/folderpicker/MtaFop.cxx2
-rw-r--r--fpicker/source/win32/fps.component (renamed from fpicker/util/fps.component)3
-rw-r--r--fpicker/util/fop.component34
7 files changed, 37 insertions, 104 deletions
diff --git a/fpicker/Library_fop.mk b/fpicker/Library_fop.mk
deleted file mode 100644
index 2d6091d103ab..000000000000
--- a/fpicker/Library_fop.mk
+++ /dev/null
@@ -1,67 +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,fop))
-
-$(eval $(call gb_Library_set_componentfile,fop,fpicker/util/fop))
-
-$(eval $(call gb_Library_add_api,fop,\
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_Library_add_defs,fop,\
- -DUNICODE \
- -D_UNICODE \
-))
-
-$(eval $(call gb_Library_add_linked_libs,fop,\
- comphelper \
- cppu \
- cppuhelper \
- sal \
- tl \
- vcl \
- advapi32 \
- gdi32 \
- ole32 \
- oleaut32 \
- shell32 \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,fop,\
- fpicker/source/win32/folderpicker/FolderPicker \
- fpicker/source/win32/folderpicker/Fopentry \
- fpicker/source/win32/folderpicker/MtaFop \
- fpicker/source/win32/folderpicker/WinFOPImpl \
- fpicker/source/win32/misc/AutoBuffer \
- fpicker/source/win32/misc/resourceprovider \
- fpicker/source/win32/misc/WinImplHelper \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index 3d8a0a560d17..e70bdf4a68ba 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -29,7 +29,7 @@ $(eval $(call gb_Library_Library,fps))
$(eval $(call gb_Library_add_nativeres,fps,fps/src))
-$(eval $(call gb_Library_set_componentfile,fps,fpicker/util/fps))
+$(eval $(call gb_Library_set_componentfile,fps,fpicker/source/win32/fps))
$(eval $(call gb_Library_add_api,fps,\
offapi \
@@ -93,6 +93,10 @@ $(eval $(call gb_Library_add_exception_objects,fps,\
fpicker/source/win32/filepicker/VistaFilePickerEventHandler \
fpicker/source/win32/filepicker/VistaFilePickerImpl \
fpicker/source/win32/filepicker/WinFileOpenImpl \
+ fpicker/source/win32/folderpicker/FolderPicker \
+ fpicker/source/win32/folderpicker/Fopentry \
+ fpicker/source/win32/folderpicker/MtaFop \
+ fpicker/source/win32/folderpicker/WinFOPImpl \
fpicker/source/win32/misc/AutoBuffer \
fpicker/source/win32/misc/resourceprovider \
fpicker/source/win32/misc/WinImplHelper \
diff --git a/fpicker/Module_fpicker.mk b/fpicker/Module_fpicker.mk
index 1f0696fde1b2..0491e540134f 100644
--- a/fpicker/Module_fpicker.mk
+++ b/fpicker/Module_fpicker.mk
@@ -44,7 +44,6 @@ endif
ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,fpicker,\
Library_fps_odma \
- Library_fop \
Library_fps \
Package_xml \
WinResTarget_fps \
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx
index 8213a57c2158..0242171c4d66 100644
--- a/fpicker/source/win32/filepicker/FPentry.cxx
+++ b/fpicker/source/win32/filepicker/FPentry.cxx
@@ -43,6 +43,10 @@
#include "../misc/WinImplHelper.hxx"
#include <stdio.h>
+#include "../folderpicker/FolderPicker.hxx"
+#include "../folderpicker/FOPServiceInfo.hxx"
+#include "../folderpicker/WinFOPImpl.hxx"
+
//-----------------------------------------------
// namespace directives
//-----------------------------------------------
@@ -87,6 +91,13 @@ static Reference< XInterface > SAL_CALL createInstance(
return xDlg;
}
+static Reference< XInterface > SAL_CALL
+createInstance_fop( const Reference< XMultiServiceFactory >& rServiceManager )
+{
+ return Reference< XInterface >( static_cast< XFolderPicker* >( new CFolderPicker( rServiceManager ) ) );
+}
+
+
extern "C"
{
@@ -112,6 +123,23 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
}
}
+ if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FOLDER_PICKER_IMPL_NAME ) ) )
+ {
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) );
+
+ Reference< XSingleServiceFactory > xFactory ( createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
+ OUString::createFromAscii( pImplName ),
+ createInstance_fop,
+ aSNS ) );
+ if ( xFactory.is() )
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+ }
+
return pRet;
}
diff --git a/fpicker/source/win32/folderpicker/MtaFop.cxx b/fpicker/source/win32/folderpicker/MtaFop.cxx
index 636a88fa5b5d..860e38d5ea17 100644
--- a/fpicker/source/win32/folderpicker/MtaFop.cxx
+++ b/fpicker/source/win32/folderpicker/MtaFop.cxx
@@ -53,7 +53,7 @@ typedef sal::systools::COMReference<IShellFolder> IShellFolderPtr;
namespace
{
- const char* FOLDERPICKER_SRV_DLL_NAME = "fop.dll";
+ const char* FOLDERPICKER_SRV_DLL_NAME = "fps.dll";
const char g_szWndClsName[] = "FopStaReqWnd###";
const char* CURRENT_INSTANCE = "CurrInst";
diff --git a/fpicker/util/fps.component b/fpicker/source/win32/fps.component
index cc18d211028c..ca8c0c3b5c73 100644
--- a/fpicker/util/fps.component
+++ b/fpicker/source/win32/fps.component
@@ -31,4 +31,7 @@
<implementation name="com.sun.star.ui.dialogs.Win32FilePicker">
<service name="com.sun.star.ui.dialogs.SystemFilePicker"/>
</implementation>
+ <implementation name="com.sun.star.ui.dialogs.Win32FolderPicker">
+ <service name="com.sun.star.ui.dialogs.SystemFolderPicker"/>
+ </implementation>
</component>
diff --git a/fpicker/util/fop.component b/fpicker/util/fop.component
deleted file mode 100644
index a31c096dd42a..000000000000
--- a/fpicker/util/fop.component
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--**********************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* 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.
-*
-**********************************************************************-->
-
-<component loader="com.sun.star.loader.SharedLibrary"
- xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.ui.dialogs.Win32FolderPicker">
- <service name="com.sun.star.ui.dialogs.SystemFolderPicker"/>
- </implementation>
-</component>