diff options
Diffstat (limited to 'fpicker')
42 files changed, 534 insertions, 378 deletions
diff --git a/fpicker/inc/makefile.mk b/fpicker/inc/makefile.mk index 8d04d47bc3..cb4f1cbd66 100644 --- a/fpicker/inc/makefile.mk +++ b/fpicker/inc/makefile.mk @@ -40,8 +40,8 @@ TARGET=inc .IF "$(ENABLE_PCH)"!="" ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - + $(SLO)$/precompiled.pch \ + $(SLO)$/precompiled_ex.pch + .ENDIF # "$(ENABLE_PCH)"!="" diff --git a/fpicker/prj/build.lst b/fpicker/prj/build.lst index 04872c5354..017fae447b 100644 --- a/fpicker/prj/build.lst +++ b/fpicker/prj/build.lst @@ -1,4 +1,4 @@ -fp fpicker : l10n rdbmaker svtools NULL +fp fpicker : LIBXSLT:libxslt l10n rdbmaker svtools NULL fp fpicker\inc nmake - all fp_inc NULL fp fpicker\source\generic nmake - all fp_generic fp_inc NULL fp fpicker\source\office nmake - all fp_office fp_inc NULL diff --git a/fpicker/prj/d.lst b/fpicker/prj/d.lst index 33035f34c7..f16a913f3c 100644 --- a/fpicker/prj/d.lst +++ b/fpicker/prj/d.lst @@ -10,7 +10,10 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid ..\source\win32\filepicker\*.xml %_DEST%\xml%_EXT%\*.xml ..\source\win32\folderpicker\*.xml %_DEST%\xml%_EXT%\*.xml -..\source\unx\gnome\fps-gnome-ucd.txt %_DEST%\bin%_EXT%\fps-gnome-ucd.txt -..\source\unx\kde4\fps-kde4-ucd.txt %_DEST%\bin%_EXT%\fps-kde4-ucd.txt -..\source\aqua\fps-aqua-ucd.txt %_DEST%\bin%_EXT%\fps-aqua-ucd.txt -..\source\unx\kde_unx\fps-kde-ucd.txt %_DEST%\bin%_EXT%\fps-kde-ucd.txt +..\%__SRC%\misc\fop.component %_DEST%\xml%_EXT%\fop.component +..\%__SRC%\misc\fpicker.component %_DEST%\xml%_EXT%\fpicker.component +..\%__SRC%\misc\fps.component %_DEST%\xml%_EXT%\fps.component +..\%__SRC%\misc\fps_aqua.component %_DEST%\xml%_EXT%\fps_aqua.component +..\%__SRC%\misc\fps_gnome.component %_DEST%\xml%_EXT%\fps_gnome.component +..\%__SRC%\misc\fps_kde4.component %_DEST%\xml%_EXT%\fps_kde4.component +..\%__SRC%\misc\fps_office.component %_DEST%\xml%_EXT%\fps_office.component diff --git a/fpicker/source/aqua/FPentry.cxx b/fpicker/source/aqua/FPentry.cxx index 213ef9f513..9e08ef84fa 100644 --- a/fpicker/source/aqua/FPentry.cxx +++ b/fpicker/source/aqua/FPentry.cxx @@ -80,32 +80,6 @@ void SAL_CALL component_getImplementationEnvironment( // //------------------------------------------------ -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_True; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) )); - pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_REGKEY_NAME ) )); - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "InvalidRegistryException caught" ); - bRetVal = sal_False; - } - } - - return bRetVal; -} - -//------------------------------------------------ -// -//------------------------------------------------ - void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ ) { diff --git a/fpicker/source/aqua/NSURL_OOoAdditions.hxx b/fpicker/source/aqua/NSURL_OOoAdditions.hxx index 5198db8466..abe1091041 100644 --- a/fpicker/source/aqua/NSURL_OOoAdditions.hxx +++ b/fpicker/source/aqua/NSURL_OOoAdditions.hxx @@ -47,5 +47,4 @@ NSString* resolveAlias( NSString* i_pSystemPath ); #endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fpicker/source/aqua/fps-aqua-ucd.txt b/fpicker/source/aqua/fps-aqua-ucd.txt deleted file mode 100644 index d71e8f4a57..0000000000 --- a/fpicker/source/aqua/fps-aqua-ucd.txt +++ /dev/null @@ -1,13 +0,0 @@ -[ComponentDescriptor] -ImplementationName=com.sun.star.ui.dialogs.SalAquaFilePicker -ComponentName=fps_aqua.uno.dylib -LoaderName=com.sun.star.loader.SharedLibrary -[SupportedServices] -com.sun.star.ui.dialogs.AquaFilePicker - -[ComponentDescriptor] -ImplementationName=com.sun.star.ui.dialogs.SalAquaFolderPicker -ComponentName=fps_aqua.uno.dylib -LoaderName=com.sun.star.loader.SharedLibrary -[SupportedServices] -com.sun.star.ui.dialogs.AquaFolderPicker diff --git a/fpicker/source/aqua/fps_aqua.component b/fpicker/source/aqua/fps_aqua.component new file mode 100644 index 0000000000..a04443e37f --- /dev/null +++ b/fpicker/source/aqua/fps_aqua.component @@ -0,0 +1,37 @@ +<?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.SalAquaFilePicker"> + <service name="com.sun.star.ui.dialogs.AquaFilePicker"/> + </implementation> + <implementation name="com.sun.star.ui.dialogs.SalAquaFolderPicker"> + <service name="com.sun.star.ui.dialogs.AquaFolderPicker"/> + </implementation> +</component> diff --git a/fpicker/source/aqua/makefile.mk b/fpicker/source/aqua/makefile.mk index 10990e22d5..c3fc0ecd74 100644 --- a/fpicker/source/aqua/makefile.mk +++ b/fpicker/source/aqua/makefile.mk @@ -44,7 +44,7 @@ DLLPRE= .IF "$(GUIBASE)" != "aqua" dummy: - @echo "Nothing to build. GUIBASE == $(GUIBASE)" + @echo "Nothing to build. GUIBASE == $(GUIBASE)" .ELSE # we build for aqua CFLAGSCXX+=$(OBJCXXFLAGS) @@ -83,3 +83,11 @@ DEF1NAME=$(SHL1TARGET) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/fps_aqua.component + +$(MISC)/fps_aqua.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fps_aqua.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fps_aqua.component diff --git a/fpicker/source/generic/fpicker.component b/fpicker/source/generic/fpicker.component new file mode 100644 index 0000000000..7d44d006d9 --- /dev/null +++ b/fpicker/source/generic/fpicker.component @@ -0,0 +1,37 @@ +<?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.comp.fpicker.FilePicker"> + <service name="com.sun.star.ui.dialogs.FilePicker"/> + </implementation> + <implementation name="com.sun.star.comp.fpicker.FolderPicker"> + <service name="com.sun.star.ui.dialogs.FolderPicker"/> + </implementation> +</component> diff --git a/fpicker/source/generic/fpicker.cxx b/fpicker/source/generic/fpicker.cxx index cf2251faf6..6636a6c195 100644 --- a/fpicker/source/generic/fpicker.cxx +++ b/fpicker/source/generic/fpicker.cxx @@ -233,13 +233,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( - void * pServiceManager, void * pRegistryKey) -{ - return cppu::component_writeInfoHelper ( - pServiceManager, pRegistryKey, g_entries); -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( const sal_Char * pImplementationName, void * pServiceManager, void * pRegistryKey) { diff --git a/fpicker/source/generic/makefile.mk b/fpicker/source/generic/makefile.mk index f426bd7ad7..08dececfae 100644 --- a/fpicker/source/generic/makefile.mk +++ b/fpicker/source/generic/makefile.mk @@ -40,7 +40,7 @@ DLLPRE= # --- Files -------------------------------------------------------- SLOFILES= \ - $(SLO)$/fpicker.obj + $(SLO)$/fpicker.obj SHL1TARGET= $(TARGET) SHL1IMPLIB= i$(TARGET) @@ -50,9 +50,9 @@ SHL1STDLIBS=\ $(VCLLIB) \ $(SVLLIB) \ $(SVTOOLLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(SALLIB) SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -61,3 +61,11 @@ DEF1NAME= $(SHL1TARGET) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/fpicker.component + +$(MISC)/fpicker.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fpicker.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fpicker.component diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index c107252e63..c15224a3a4 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/ui/dialogs/ControlActions.hpp> #include <vcl/lstbox.hxx> #include <com/sun/star/uno/Sequence.hxx> +#include <tools/urlobj.hxx> #include <algorithm> #include <functional> @@ -201,37 +202,36 @@ namespace svt } //--------------------------------------------------------------------- - void OControlAccess::setHelpURL( Window* _pControl, const ::rtl::OUString& _rURL, sal_Bool _bFileView ) + void OControlAccess::setHelpURL( Window* _pControl, const ::rtl::OUString& sHelpURL, sal_Bool _bFileView ) { - String sHelpURL( _rURL ); - if ( COMPARE_EQUAL == sHelpURL.CompareIgnoreCaseToAscii( "HID:", sizeof( "HID:" ) - 1 ) ) - { - String sID = sHelpURL.Copy( sizeof( "HID:" ) - 1 ); - sal_Int32 nHelpId = sID.ToInt32(); + rtl::OUString sHelpID( sHelpURL ); + INetURLObject aHID( sHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + sHelpID = aHID.GetURLPath(); - if ( _bFileView ) - // the file view "overloaded" the SetHelpId - static_cast< SvtFileView* >( _pControl )->SetHelpId( nHelpId ); - else - _pControl->SetHelpId( nHelpId ); - } + // URLs should always be UTF8 encoded and escaped + rtl::OString sID( rtl::OUStringToOString( sHelpID, RTL_TEXTENCODING_UTF8 ) ); + if ( _bFileView ) + // the file view "overloaded" the SetHelpId + static_cast< SvtFileView* >( _pControl )->SetHelpId( sID ); else - { - DBG_ERRORFILE( "OControlAccess::setHelpURL: unsupported help URL type!" ); - } + _pControl->SetHelpId( sID ); } //--------------------------------------------------------------------- ::rtl::OUString OControlAccess::getHelpURL( Window* _pControl, sal_Bool _bFileView ) { - sal_Int32 nHelpId = _pControl->GetHelpId(); + rtl::OString aHelpId = _pControl->GetHelpId(); if ( _bFileView ) // the file view "overloaded" the SetHelpId - nHelpId = static_cast< SvtFileView* >( _pControl )->GetHelpId( ); - - ::rtl::OUString sHelpURL( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) ); - sHelpURL += ::rtl::OUString::valueOf( (sal_Int32)nHelpId ); - + aHelpId = static_cast< SvtFileView* >( _pControl )->GetHelpId( ); + + ::rtl::OUString sHelpURL; + ::rtl::OUString aTmp( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ) ); + INetURLObject aHID( aTmp ); + if ( aHID.GetProtocol() == INET_PROT_NOT_VALID ) + sHelpURL = rtl::OUString::createFromAscii( INET_HID_SCHEME ); + sHelpURL += aTmp; return sHelpURL; } diff --git a/fpicker/source/office/OfficeFilePicker.hxx b/fpicker/source/office/OfficeFilePicker.hxx index ebea3196ed..53b53cd897 100644 --- a/fpicker/source/office/OfficeFilePicker.hxx +++ b/fpicker/source/office/OfficeFilePicker.hxx @@ -41,7 +41,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include "commonpicker.hxx" #include "pickercallbacks.hxx" diff --git a/fpicker/source/office/fps_office.component b/fpicker/source/office/fps_office.component new file mode 100644 index 0000000000..3e49f68a49 --- /dev/null +++ b/fpicker/source/office/fps_office.component @@ -0,0 +1,37 @@ +<?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.svtools.OfficeFilePicker"> + <service name="com.sun.star.ui.dialogs.OfficeFilePicker"/> + </implementation> + <implementation name="com.sun.star.svtools.OfficeFolderPicker"> + <service name="com.sun.star.ui.dialogs.OfficeFolderPicker"/> + </implementation> +</component> diff --git a/fpicker/source/office/fps_office.cxx b/fpicker/source/office/fps_office.cxx index fb4bf48fb2..58bee9ce5b 100644 --- a/fpicker/source/office/fps_office.cxx +++ b/fpicker/source/office/fps_office.cxx @@ -62,13 +62,6 @@ component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * pServiceManager, void * pRegistryKey) -{ - return cppu::component_writeInfoHelper ( - pServiceManager, pRegistryKey, g_entries); -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplementationName, void * pServiceManager, void * pRegistryKey) { diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index ca0ffb8599..1cf48534ab 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -2,11 +2,9 @@ /************************************************************************* * * 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 diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc index f28cb90925..ac0b4944be 100644 --- a/fpicker/source/office/iodlg.hrc +++ b/fpicker/source/office/iodlg.hrc @@ -28,9 +28,8 @@ #ifndef _SVTOOLS_IODLGIMPL_HRC #define _SVTOOLS_IODLGIMPL_HRC -#ifndef _SVTOOLS_HRC #include "svtools/svtools.hrc" -#endif +#include "svtools/helpid.hrc" // ModalDialog DLG_SVT_EXPLORERFILE @@ -86,22 +85,5 @@ #define SID_SFX_START 5000 #define SID_OPENURL (SID_SFX_START + 596) -#define HID_FILEDLG_STANDARD (HID_SFX_START + 27) -#define HID_FILEDLG_MANAGER (HID_SFX_START + 28) -#define HID_FILEDLG_URL (HID_SFX_START + 29) -#define HID_FILEDLG_USE_PASSWD (HID_SFX_START + 31) -#define HID_FILEDLG_READ_ONLY (HID_SFX_START + 32) - -#define HID_FILEDLG_AUTOCOMPLETEBOX (HID_SFX_START + 218) -#define HID_FILEDLG_SAVE_BTN (HID_SFX_START + 219) -#define HID_FILEDLG_SAVE_FILENAME (HID_SFX_START + 220) -#define HID_FILEDLG_SAVE_FILETYPE (HID_SFX_START + 221) -#define HID_FILEDLG_INSERT_BTN (HID_SFX_START + 222) -#define HID_FILEDLG_PATH_BTN (HID_SFX_START + 223) -#define HID_FILEDLG_PATH_FILENAME (HID_SFX_START + 224) -#define HID_FILEDLG_FOLDER_BTN (HID_SFX_START + 225) -#define HID_FILEDLG_FOLDER_FILENAME (HID_SFX_START + 226) -#define HID_FILEDLG_SRCHFOLDER_BTN (HID_SFX_START + 227) - #endif diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src index af24bd0ffe..238a018d6b 100644 --- a/fpicker/source/office/iodlg.src +++ b/fpicker/source/office/iodlg.src @@ -1,10 +1,10 @@ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -72,12 +72,14 @@ ModalDialog DLG_SVT_EXPLORERFILE }; ImageButton BTN_EXPLORERFILE_NEWFOLDER { + HelpID = "fpicker:ImageButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_NEWFOLDER"; TabStop = FALSE ; Pos = MAP_APPFONT ( 59 , 6 ) ; QuickHelpText [ en-US ] = "Create New Directory" ; }; ImageButton BTN_EXPLORERFILE_LISTVIEW { + HelpID = "fpicker:ImageButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_LISTVIEW"; TabStop = FALSE ; Pos = MAP_APPFONT ( 109 , 6 ) ; ButtonImage = Image @@ -92,6 +94,7 @@ ModalDialog DLG_SVT_EXPLORERFILE }; MenuButton BTN_EXPLORERFILE_UP { + HelpID = "fpicker:MenuButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_UP"; TabStop = FALSE ; Pos = MAP_APPFONT ( 109 , 6 ) ; QuickHelpText [ en-US ] = "Up One Level" ; @@ -99,6 +102,7 @@ ModalDialog DLG_SVT_EXPLORERFILE MenuButton BTN_EXPLORERFILE_STANDARD { + HelpID = "fpicker:MenuButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_STANDARD"; TabStop = FALSE ; Pos = MAP_APPFONT ( 59 , 6 ) ; QuickHelpText [ en-US ] = "Default Directory" ; @@ -118,6 +122,7 @@ ModalDialog DLG_SVT_EXPLORERFILE }; Edit ED_EXPLORERFILE_FILENAME { + HelpID = "fpicker:Edit:DLG_SVT_EXPLORERFILE:ED_EXPLORERFILE_FILENAME"; Pos = MAP_APPFONT ( 59 , 117 ) ; Size = MAP_APPFONT ( 159 , 12 ) ; Border = TRUE ; @@ -131,6 +136,7 @@ ModalDialog DLG_SVT_EXPLORERFILE }; ListBox LB_EXPLORERFILE_SHARED_LISTBOX { + HelpID = "fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_SHARED_LISTBOX"; Pos = MAP_APPFONT ( 59 , 132 ) ; Size = MAP_APPFONT ( 159 , 40 ) ; DropDown = TRUE ; @@ -145,6 +151,7 @@ ModalDialog DLG_SVT_EXPLORERFILE }; ListBox LB_EXPLORERFILE_FILETYPE { + HelpID = "fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_FILETYPE"; Pos = MAP_APPFONT ( 59 , 147 ) ; Size = MAP_APPFONT ( 159 , 80 ) ; DropDown = TRUE ; @@ -154,26 +161,31 @@ ModalDialog DLG_SVT_EXPLORERFILE }; CheckBox CB_EXPLORERFILE_READONLY { + HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_EXPLORERFILE_READONLY"; Size = MAP_APPFONT ( 80 , 10 ) ; Text [ en-US ] = "~Read-only" ; }; CheckBox CB_EXPLORERFILE_PASSWORD { + HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_EXPLORERFILE_PASSWORD"; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "Save with password" ; }; CheckBox CB_AUTO_EXTENSION { + HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_AUTO_EXTENSION"; Size = MAP_APPFONT ( 160 , 10 ) ; Text [ en-US ] = "~Automatic file name extension" ; }; CheckBox CB_OPTIONS { + HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_OPTIONS"; Size = MAP_APPFONT ( 120 , 10 ) ; Text [ en-US ] = "Edit ~filter settings"; }; PushButton BTN_EXPLORERFILE_OPEN { + HelpID = "fpicker:PushButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_OPEN"; Pos = MAP_APPFONT ( 224 , 117 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; DefButton = TRUE ; @@ -222,6 +234,7 @@ ModalDialog DLG_SVT_EXPLORERFILE // QueryFolderNameDialog ---------------------------------------------------------- ModalDialog DLG_SVT_QUERYFOLDERNAME { + HelpID = "fpicker:ModalDialog:DLG_SVT_QUERYFOLDERNAME"; Border = TRUE ; Moveable = TRUE ; OutputSize = TRUE ; @@ -236,6 +249,7 @@ ModalDialog DLG_SVT_QUERYFOLDERNAME }; Edit ED_SVT_QUERYFOLDERNAME_DLG_NAME { + HelpID = "fpicker:Edit:DLG_SVT_QUERYFOLDERNAME:ED_SVT_QUERYFOLDERNAME_DLG_NAME"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 138 , 12 ) ; Border = TRUE ; diff --git a/fpicker/source/office/makefile.mk b/fpicker/source/office/makefile.mk index adc3c30f9a..39be844aad 100644 --- a/fpicker/source/office/makefile.mk +++ b/fpicker/source/office/makefile.mk @@ -42,32 +42,32 @@ DLLPRE= # --- Files -------------------------------------------------------- SLOFILES=\ - $(SLO)$/asyncfilepicker.obj \ - $(SLO)$/commonpicker.obj \ - $(SLO)$/OfficeControlAccess.obj \ - $(SLO)$/OfficeFilePicker.obj \ - $(SLO)$/OfficeFolderPicker.obj \ - $(SLO)$/fpinteraction.obj \ - $(SLO)$/fpsmartcontent.obj \ - $(SLO)$/fps_office.obj \ - $(SLO)$/iodlg.obj \ - $(SLO)$/iodlgimp.obj + $(SLO)$/asyncfilepicker.obj \ + $(SLO)$/commonpicker.obj \ + $(SLO)$/OfficeControlAccess.obj \ + $(SLO)$/OfficeFilePicker.obj \ + $(SLO)$/OfficeFolderPicker.obj \ + $(SLO)$/fpinteraction.obj \ + $(SLO)$/fpsmartcontent.obj \ + $(SLO)$/fps_office.obj \ + $(SLO)$/iodlg.obj \ + $(SLO)$/iodlgimp.obj SHL1TARGET= $(TARGET).uno SHL1IMPLIB= i$(TARGET) SHL1OBJS= $(SLOFILES) SHL1STDLIBS=\ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) + $(SVTOOLLIB) \ + $(TKLIB) \ + $(VCLLIB) \ + $(SVLLIB) \ + $(UNOTOOLSLIB) \ + $(TOOLSLIB) \ + $(UCBHELPERLIB) \ + $(COMPHELPERLIB) \ + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(SALLIB) SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -75,14 +75,22 @@ DEF1NAME= $(SHL1TARGET) SRS1NAME= $(TARGET) SRC1FILES= \ - OfficeFilePicker.src \ - iodlg.src + OfficeFilePicker.src \ + iodlg.src RESLIB1NAME=$(TARGET) RESLIB1IMAGES=$(PRJ)$/res RESLIB1SRSFILES=\ - $(SRS)$/fps_office.srs + $(SRS)$/fps_office.srs # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/fps_office.component + +$(MISC)/fps_office.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fps_office.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fps_office.component diff --git a/fpicker/source/unx/gnome/FPentry.cxx b/fpicker/source/unx/gnome/FPentry.cxx index 015dfa9cf6..2f63a948e2 100644 --- a/fpicker/source/unx/gnome/FPentry.cxx +++ b/fpicker/source/unx/gnome/FPentry.cxx @@ -102,32 +102,6 @@ void SAL_CALL component_getImplementationEnvironment( // //------------------------------------------------ -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_True; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) )); - pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_REGKEY_NAME ) )); - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "InvalidRegistryException caught" ); - bRetVal = sal_False; - } - } - - return bRetVal; -} - -//------------------------------------------------ -// -//------------------------------------------------ - void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ ) { diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx index d08125e75f..412da6ac44 100644 --- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx +++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx @@ -43,6 +43,7 @@ #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <osl/diagnose.h> +#include <osl/process.h> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/ControlActions.hpp> #include <com/sun/star/uno/Any.hxx> @@ -1407,7 +1408,7 @@ uno::Sequence<sal_Int16> SAL_CALL SalGtkFilePicker::getSupportedImageFormats() t OSL_ASSERT( m_pDialog != NULL ); // TODO return m_pImpl->getSupportedImageFormats(); - return 0; + return uno::Sequence<sal_Int16>(); } sal_Int32 SAL_CALL SalGtkFilePicker::getTargetColorDepth() throw( uno::RuntimeException ) diff --git a/fpicker/source/unx/gnome/fps-gnome-ucd.txt b/fpicker/source/unx/gnome/fps-gnome-ucd.txt deleted file mode 100644 index 4a84215dc9..0000000000 --- a/fpicker/source/unx/gnome/fps-gnome-ucd.txt +++ /dev/null @@ -1,13 +0,0 @@ -[ComponentDescriptor] -ImplementationName=com.sun.star.ui.dialogs.SalGtkFilePicker -ComponentName=fps_gnome.uno.so -LoaderName=com.sun.star.loader.SharedLibrary -[SupportedServices] -com.sun.star.ui.dialogs.GtkFilePicker - -[ComponentDescriptor] -ImplementationName=com.sun.star.ui.dialogs.SalGtkFolderPicker -ComponentName=fps_gnome.uno.so -LoaderName=com.sun.star.loader.SharedLibrary -[SupportedServices] -com.sun.star.ui.dialogs.GtkFolderPicker diff --git a/fpicker/source/unx/gnome/fps_gnome.component b/fpicker/source/unx/gnome/fps_gnome.component new file mode 100644 index 0000000000..72bca42f8a --- /dev/null +++ b/fpicker/source/unx/gnome/fps_gnome.component @@ -0,0 +1,37 @@ +<?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.SalGtkFilePicker"> + <service name="com.sun.star.ui.dialogs.GtkFilePicker"/> + </implementation> + <implementation name="com.sun.star.ui.dialogs.SalGtkFolderPicker"> + <service name="com.sun.star.ui.dialogs.GtkFolderPicker"/> + </implementation> +</component> diff --git a/fpicker/source/unx/gnome/makefile.mk b/fpicker/source/unx/gnome/makefile.mk index 04c6e650ff..8e2d3944be 100644 --- a/fpicker/source/unx/gnome/makefile.mk +++ b/fpicker/source/unx/gnome/makefile.mk @@ -42,7 +42,7 @@ DLLPRE= .IF "$(ENABLE_GTK)" != "TRUE" dummy: - @echo "Nothing to build. GUIBASE == $(GUIBASE), WITH_WIDGETSET == $(WITH_WIDGETSET)" + @echo "Nothing to build. GUIBASE == $(GUIBASE), WITH_WIDGETSET == $(WITH_WIDGETSET)" .ELSE # we build for GNOME @@ -54,8 +54,8 @@ GTK_TWO_FOUR:=$(shell @$(PKG_CONFIG) --exists 'gtk+-2.0 >= 2.4.0' && echo ok) .IF "$(GTK_TWO_FOUR)" != "ok" dummy: - @echo "Cannot build gtk filepicker because" - @$(PKG_CONFIG) --print-errors --exists 'gtk+-2.0 >= 2.4.0' + @echo "Cannot build gtk filepicker because" + @$(PKG_CONFIG) --print-errors --exists 'gtk+-2.0 >= 2.4.0' .ELSE @@ -65,23 +65,23 @@ CFLAGS+= $(PKGCONFIG_CFLAGS) # --- Files -------------------------------------------------------- SLOFILES =\ - $(SLO)$/SalGtkPicker.obj \ - $(SLO)$/SalGtkFilePicker.obj \ - $(SLO)$/SalGtkFolderPicker.obj \ - $(SLO)$/resourceprovider.obj \ - $(SLO)$/FPentry.obj + $(SLO)$/SalGtkPicker.obj \ + $(SLO)$/SalGtkFilePicker.obj \ + $(SLO)$/SalGtkFolderPicker.obj \ + $(SLO)$/resourceprovider.obj \ + $(SLO)$/FPentry.obj SHL1NOCHECK=TRUE SHL1TARGET= $(TARGET) SHL1OBJS= $(SLOFILES) SHL1STDLIBS=\ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) \ - $(PKGCONFIG_LIBS) + $(VCLLIB) \ + $(TOOLSLIB) \ + $(CPPUHELPERLIB) \ + $(COMPHELPERLIB) \ + $(CPPULIB) \ + $(SALLIB) \ + $(PKGCONFIG_LIBS) .IF "$(OS)"=="SOLARIS" LINKFLAGSDEFS= @@ -96,3 +96,11 @@ DEF1NAME=$(SHL1TARGET) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/fps_gnome.component + +$(MISC)/fps_gnome.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fps_gnome.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fps_gnome.component diff --git a/fpicker/source/unx/kde4/KDE4FPEntry.cxx b/fpicker/source/unx/kde4/KDE4FPEntry.cxx index d0d5299b1f..49bd760a00 100644 --- a/fpicker/source/unx/kde4/KDE4FPEntry.cxx +++ b/fpicker/source/unx/kde4/KDE4FPEntry.cxx @@ -56,27 +56,6 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) - { - sal_Bool bRetVal = sal_True; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) )); - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "InvalidRegistryException caught" ); - bRetVal = sal_False; - } - } - - return bRetVal; - } - void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* ) { void* pRet = 0; diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx index e2d3413386..98304bcf38 100644 --- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx +++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx @@ -248,6 +248,20 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles() QStringList rawFiles = _dialog->selectedFiles(); QStringList files; + // check if we need to add an extension + QString extension = ""; + if ( _dialog->operationMode() == KFileDialog::Saving ) + { + QCheckBox *cb = dynamic_cast<QCheckBox*> ( + _customWidgets[ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ]); + + if (cb && cb->isChecked()) + { + extension = _dialog->currentFilter(); // assuming filter value is like this *.ext + extension.replace("*",""); + } + } + // Workaround for the double click selection KDE4 bug // kde file picker returns the file and directories for selectedFiles() // when a file is double clicked @@ -274,7 +288,12 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles() if (singleFile) filename.prepend(dir + "/"); - files.append(filename); + + //prevent extension append if we already have one + if (filename.endsWith(extension)) + files.append(filename); + else + files.append(filename + extension); } } @@ -646,7 +665,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args ) case FILESAVE_AUTOEXTENSION: operationMode = KFileDialog::Saving; - addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ); + //addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ); break; case FILESAVE_AUTOEXTENSION_PASSWORD: diff --git a/fpicker/source/unx/kde4/fps-kde4-ucd.txt b/fpicker/source/unx/kde4/fps-kde4-ucd.txt deleted file mode 100644 index 8ecc4e0a0a..0000000000 --- a/fpicker/source/unx/kde4/fps-kde4-ucd.txt +++ /dev/null @@ -1,6 +0,0 @@ -[ComponentDescriptor] -ImplementationName=com.sun.star.ui.dialogs.KDE4FilePicker -ComponentName=fps_kde4.uno.so -LoaderName=com.sun.star.loader.SharedLibrary -[SupportedServices] -com.sun.star.ui.dialogs.KDE4FilePicker diff --git a/fpicker/source/unx/kde4/fps_kde4.component b/fpicker/source/unx/kde4/fps_kde4.component new file mode 100644 index 0000000000..d627212b75 --- /dev/null +++ b/fpicker/source/unx/kde4/fps_kde4.component @@ -0,0 +1,34 @@ +<?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.KDE4FilePicker"> + <service name="com.sun.star.ui.dialogs.KDE4FilePicker"/> + </implementation> +</component> diff --git a/fpicker/source/unx/kde4/makefile.mk b/fpicker/source/unx/kde4/makefile.mk index e245e66184..b372fcfd47 100644 --- a/fpicker/source/unx/kde4/makefile.mk +++ b/fpicker/source/unx/kde4/makefile.mk @@ -43,7 +43,7 @@ DLLPRE= .IF "$(GUIBASE)" != "unx" || "$(ENABLE_KDE4)" != "TRUE" dummy: - @echo "Nothing to build. GUIBASE == $(GUIBASE), ENABLE_KDE4 is not set" + @echo "Nothing to build. GUIBASE == $(GUIBASE), ENABLE_KDE4 is not set" .ELSE # we build for KDE @@ -52,18 +52,18 @@ CFLAGS+= $(KDE4_CFLAGS) # --- Files -------------------------------------------------------- SLOFILES =\ - $(SLO)$/KDE4FilePicker.obj \ - $(SLO)$/KDE4FilePicker.moc.obj \ - $(SLO)$/KDE4FPEntry.obj + $(SLO)$/KDE4FilePicker.obj \ + $(SLO)$/KDE4FilePicker.moc.obj \ + $(SLO)$/KDE4FPEntry.obj SHL1NOCHECK=TRUE SHL1TARGET=$(TARGET) SHL1STDLIBS=$(CPPULIB)\ - $(CPPUHELPERLIB)\ - $(SALLIB)\ - $(VCLLIB)\ - $(TOOLSLIB) \ - $(KDE4_LIBS) -lkio -lkfile + $(CPPUHELPERLIB)\ + $(SALLIB)\ + $(VCLLIB)\ + $(TOOLSLIB) \ + $(KDE4_LIBS) -lkio -lkfile SHL1OBJS=$(SLOFILES) @@ -79,4 +79,12 @@ DEF1VERSIONMAP=exports.map .INCLUDE : target.mk $(MISC)$/KDE4FilePicker.moc.cxx : KDE4FilePicker.hxx - $(MOC4) $< -o $@ + $(MOC4) $< -o $@ + +ALLTAR : $(MISC)/fps_kde4.component + +$(MISC)/fps_kde4.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fps_kde4.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fps_kde4.component diff --git a/fpicker/source/unx/kde_unx/makefile.mk b/fpicker/source/unx/kde_unx/makefile.mk index 067399bf08..bad26d6687 100644 --- a/fpicker/source/unx/kde_unx/makefile.mk +++ b/fpicker/source/unx/kde_unx/makefile.mk @@ -3,7 +3,6 @@ # 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 # @@ -56,13 +55,21 @@ SLOFILES =\ $(SLO)$/UnxNotifyThread.obj \ $(SLO)$/UnxFPentry.obj -SHL1NOCHECK=TRUE -SHL1TARGET=fps_kde.uno -SHL1STDLIBS=$(CPPULIB)\ - $(CPPUHELPERLIB)\ - $(SALLIB)\ - $(VCLLIB)\ - $(TOOLSLIB) +APP1TARGET= $(TARGET) +APP1OBJS= $(OBJFILES) +APP1LIBS= $(LB)$/svx.lib +APP1STDLIBS=$(TOOLSLIB) \ + $(VOSLIB) \ + $(SO2LIB) \ + $(SVTOOLLIB) \ + $(SVLLIB) \ + $(COMPHELPERLIB) \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(SALLIB) \ + $(SFXLIB) \ + $(SOTLIB) \ + $(VCLLIB) SHL1OBJS=$(SLOFILES) SHL1DEF=$(MISC)$/$(SHL1TARGET).def diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index 91c9632d40..e804a43aa5 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -105,31 +105,6 @@ void SAL_CALL component_getImplementationEnvironment( // //------------------------------------------------ -sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_True; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) )); - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "InvalidRegistryException caught" ); - bRetVal = sal_False; - } - } - - return bRetVal; -} - -//------------------------------------------------ -// -//------------------------------------------------ - void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* ) { diff --git a/fpicker/source/win32/filepicker/makefile.mk b/fpicker/source/win32/filepicker/makefile.mk index 17e4f26090..72a557258c 100644 --- a/fpicker/source/win32/filepicker/makefile.mk +++ b/fpicker/source/win32/filepicker/makefile.mk @@ -55,29 +55,29 @@ RCFILES=fps.rc # --- Files -------------------------------------------------------- SLOFILES=$(SLO)$/FileOpenDlg.obj\ - $(SLO)$/FPentry.obj\ - $(SLO)$/FilePicker.obj\ - $(SLO)$/WinFileOpenImpl.obj\ - $(SLO)$/FilterContainer.obj\ - $(SLO)$/controlaccess.obj\ - $(SLO)$/dibpreview.obj\ - $(SLO)$/helppopupwindow.obj\ - $(SLO)$/controlcommand.obj\ - $(SLO)$/filepickerstate.obj\ - $(SLO)$/getfilenamewrapper.obj\ - $(SLO)$/asynceventnotifier.obj\ - $(SLO)$/previewadapter.obj\ - $(SLO)$/previewbase.obj\ - $(SLO)$/filepickereventnotification.obj\ - $(SLO)$/customcontrol.obj\ - $(SLO)$/customcontrolcontainer.obj\ - $(SLO)$/customcontrolfactory.obj\ - $(SLO)$/dialogcustomcontrols.obj\ - $(SLO)$/asyncrequests.obj\ - $(SLO)$/VistaFilePickerEventHandler.obj\ - $(SLO)$/VistaFilePickerImpl.obj\ - $(SLO)$/VistaFilePicker.obj\ - $(SLO)$/SolarMutex.obj + $(SLO)$/FPentry.obj\ + $(SLO)$/FilePicker.obj\ + $(SLO)$/WinFileOpenImpl.obj\ + $(SLO)$/FilterContainer.obj\ + $(SLO)$/controlaccess.obj\ + $(SLO)$/dibpreview.obj\ + $(SLO)$/helppopupwindow.obj\ + $(SLO)$/controlcommand.obj\ + $(SLO)$/filepickerstate.obj\ + $(SLO)$/getfilenamewrapper.obj\ + $(SLO)$/asynceventnotifier.obj\ + $(SLO)$/previewadapter.obj\ + $(SLO)$/previewbase.obj\ + $(SLO)$/filepickereventnotification.obj\ + $(SLO)$/customcontrol.obj\ + $(SLO)$/customcontrolcontainer.obj\ + $(SLO)$/customcontrolfactory.obj\ + $(SLO)$/dialogcustomcontrols.obj\ + $(SLO)$/asyncrequests.obj\ + $(SLO)$/VistaFilePickerEventHandler.obj\ + $(SLO)$/VistaFilePickerImpl.obj\ + $(SLO)$/VistaFilePicker.obj\ + $(SLO)$/SolarMutex.obj # --- Targets ------------------------------------------------------ diff --git a/fpicker/source/win32/filepicker/workbench/makefile.mk b/fpicker/source/win32/filepicker/workbench/makefile.mk index 926e2c22a0..b57e2f146b 100644 --- a/fpicker/source/win32/filepicker/workbench/makefile.mk +++ b/fpicker/source/win32/filepicker/workbench/makefile.mk @@ -40,18 +40,18 @@ CFLAGS+=-GR -GX # --- Files -------------------------------------------------------- - + OBJFILES=$(OBJ)$/test_fps.obj APP1TARGET=$(TARGET) APP1OBJS=$(OBJFILES) - + APP1STDLIBS+=\ - $(CPPULIB)\ - $(CPPUHELPERLIB)\ - $(SALLIB)\ - $(USER32LIB)\ - $(OLE32LIB) + $(CPPULIB)\ + $(CPPUHELPERLIB)\ + $(SALLIB)\ + $(USER32LIB)\ + $(OLE32LIB) APP1DEF=$(MISC)$/$(APP1TARGET).def diff --git a/fpicker/source/win32/folderpicker/Fopentry.cxx b/fpicker/source/win32/folderpicker/Fopentry.cxx index 1f71a0771e..9204cce0c5 100644 --- a/fpicker/source/win32/folderpicker/Fopentry.cxx +++ b/fpicker/source/win32/folderpicker/Fopentry.cxx @@ -84,31 +84,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//----------------------------------------------------------------------- -// -//----------------------------------------------------------------------- - -sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_True; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_REGKEY_NAME ) ) ); - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "InvalidRegistryException caught"); - bRetVal = sal_False; - } - } - - return bRetVal; -} - //---------------------------------------------------------------------- // component_getFactory // returns a factory to create XFilePicker-Services diff --git a/fpicker/source/win32/folderpicker/makefile.mk b/fpicker/source/win32/folderpicker/makefile.mk index 7f0556d7ce..955b686723 100644 --- a/fpicker/source/win32/folderpicker/makefile.mk +++ b/fpicker/source/win32/folderpicker/makefile.mk @@ -42,9 +42,9 @@ COMP1TYPELIST=$(TARGET) CFLAGS+=-GR SLOFILES=$(SLO)$/fopentry.obj\ - $(SLO)$/folderpicker.obj\ - $(SLO)$/WinFopImpl.obj\ - $(SLO)$/MtaFop.obj + $(SLO)$/folderpicker.obj\ + $(SLO)$/WinFopImpl.obj\ + $(SLO)$/MtaFop.obj # --- Targets ------------------------------------------------------ diff --git a/fpicker/source/win32/folderpicker/workbench/makefile.mk b/fpicker/source/win32/folderpicker/workbench/makefile.mk index bfdf840989..4fe42d97bf 100644 --- a/fpicker/source/win32/folderpicker/workbench/makefile.mk +++ b/fpicker/source/win32/folderpicker/workbench/makefile.mk @@ -42,7 +42,7 @@ CFLAGS+=-GR -EHa # --- Files -------------------------------------------------------- - + OBJFILES= $(OBJ)$/test_fops.obj APP1TARGET= test_fops @@ -50,11 +50,11 @@ APP1TARGET= test_fops APP1OBJS= $(OBJ)$/test_fops.obj APP1STDLIBS+= $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(USER32LIB)\ - $(OLE32LIB) - + $(CPPUHELPERLIB) \ + $(SALLIB) \ + $(USER32LIB)\ + $(OLE32LIB) + APP1DEF= $(MISC)$/$(APP1TARGET).def # --- Targets ------------------------------------------------------ diff --git a/fpicker/source/win32/misc/makefile.mk b/fpicker/source/win32/misc/makefile.mk index 70faefdeae..11e60489f4 100644 --- a/fpicker/source/win32/misc/makefile.mk +++ b/fpicker/source/win32/misc/makefile.mk @@ -44,8 +44,8 @@ CFLAGS+=-EHa -DUNICODE -D_UNICODE # --- Files ------------------------------------- SLOFILES=$(SLO)$/WinImplHelper.obj\ - $(SLO)$/AutoBuffer.obj\ - $(SLO)$/resourceprovider.obj + $(SLO)$/AutoBuffer.obj\ + $(SLO)$/resourceprovider.obj LIB1TARGET=$(SLB)$/$(TARGET).lib LIB1OBJFILES=$(SLOFILES) diff --git a/fpicker/test/makefile.mk b/fpicker/test/makefile.mk index 9cdf1adb15..358da9cf54 100644 --- a/fpicker/test/makefile.mk +++ b/fpicker/test/makefile.mk @@ -53,16 +53,16 @@ APP1OBJS= $(OBJFILES) # $(OBJ)$/salmain.obj APP1STDLIBS= $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(SALLIB) \ - $(SOTLIB) \ - $(SVLIB) -l$(LB)/fps_office.uno.lib + $(CPPUHELPERLIB) \ + $(COMPHELPERLIB) \ + $(VCLLIB) \ + $(TOOLSLIB) \ + $(SALLIB) \ + $(SOTLIB) \ + $(SVLIB) -l$(LB)/fps_office.uno.lib APP1DEPN= $(L)$/itools.lib \ - $(L)$/sot.lib + $(L)$/sot.lib .IF "$(GUI)"=="WIN" || "$(GUI)"=="OS200" APP1DEF= $(MISC)$/$(TARGET).def @@ -71,18 +71,18 @@ APP1DEF= $(MISC)$/$(TARGET).def # --- Targets ------------------------------------------------------ ALL : \ - ALLTAR \ - $(BIN)$/applicat.rdb + ALLTAR \ + $(BIN)$/applicat.rdb .INCLUDE : target.mk $(BIN)$/applicat.rdb : makefile.mk $(UNOUCRRDB) - rm -f $@ - $(GNUCOPY) $(UNOUCRRDB) $@ - +cd $(BIN) && \ - regcomp -register -r applicat.rdb \ - -c i18nsearch.uno$(DLLPOST) \ - -c i18npool.uno$(DLLPOST) + rm -f $@ + $(GNUCOPY) $(UNOUCRRDB) $@ + +cd $(BIN) && \ + regcomp -register -r applicat.rdb \ + -c i18nsearch.uno$(DLLPOST) \ + -c i18npool.uno$(DLLPOST) # ------------------------------------------------------------------ # Windows @@ -91,15 +91,15 @@ $(BIN)$/applicat.rdb : makefile.mk $(UNOUCRRDB) .IF "$(GUI)" == "WIN" $(MISC)$/$(TARGET).def: makefile - echo NAME $(TARGET) >$@ - echo DESCRIPTION 'StarView - Testprogramm' >>$@ - echo EXETYPE WINDOWS >>$@ - echo STUB 'winSTUB.EXE' >>$@ - echo PROTMODE >>$@ - echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ - echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ - echo HEAPSIZE 8192 >>$@ - echo STACKSIZE 32768 >>$@ + echo NAME $(TARGET) >$@ + echo DESCRIPTION 'StarView - Testprogramm' >>$@ + echo EXETYPE WINDOWS >>$@ + echo STUB 'winSTUB.EXE' >>$@ + echo PROTMODE >>$@ + echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ + echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ + echo HEAPSIZE 8192 >>$@ + echo STACKSIZE 32768 >>$@ .ENDIF diff --git a/fpicker/util/exports.dxp b/fpicker/util/exports.dxp index 028ac41759..f0e1c69934 100644 --- a/fpicker/util/exports.dxp +++ b/fpicker/util/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/fpicker/util/fop.component b/fpicker/util/fop.component new file mode 100644 index 0000000000..a31c096dd4 --- /dev/null +++ b/fpicker/util/fop.component @@ -0,0 +1,34 @@ +<?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> diff --git a/fpicker/util/fps.component b/fpicker/util/fps.component new file mode 100644 index 0000000000..cc18d21102 --- /dev/null +++ b/fpicker/util/fps.component @@ -0,0 +1,34 @@ +<?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.Win32FilePicker"> + <service name="com.sun.star.ui.dialogs.SystemFilePicker"/> + </implementation> +</component> diff --git a/fpicker/util/makefile.mk b/fpicker/util/makefile.mk index c249e4259e..8343afb7ef 100644 --- a/fpicker/util/makefile.mk +++ b/fpicker/util/makefile.mk @@ -40,30 +40,30 @@ USE_LDUMP2=TRUE # --- fps dynlib ---------------------------------------------- COMMON_LIBS=$(CPPULIB)\ - $(CPPUHELPERLIB)\ - $(COMPHELPERLIB)\ - $(SALLIB)\ - $(VCLLIB)\ - $(TOOLSLIB) + $(CPPUHELPERLIB)\ + $(COMPHELPERLIB)\ + $(SALLIB)\ + $(VCLLIB)\ + $(TOOLSLIB) .IF "$(GUI)"=="WNT" SHL1TARGET=$(TARGET1) SHL1STDLIBS= $(COMMON_LIBS) \ - $(UWINAPILIB) \ - $(ADVAPI32LIB) \ - $(SHELL32LIB)\ - $(OLE32LIB)\ - $(GDI32LIB)\ - $(OLEAUT32LIB)\ - $(COMDLG32LIB)\ - $(KERNEL32LIB)\ - $(UUIDLIB) + $(UWINAPILIB) \ + $(ADVAPI32LIB) \ + $(SHELL32LIB)\ + $(OLE32LIB)\ + $(GDI32LIB)\ + $(OLEAUT32LIB)\ + $(COMDLG32LIB)\ + $(KERNEL32LIB)\ + $(UUIDLIB) SHL1DEPN= SHL1IMPLIB=i$(SHL1TARGET) SHL1LIBS=$(SLB)$/fps.lib\ - $(SLB)$/utils.lib + $(SLB)$/utils.lib SHL1RES=$(RES)$/$(TARGET1).res SHL1DEF=$(MISC)$/$(SHL1TARGET).def @@ -79,17 +79,17 @@ SHL2NOCHECK=TRUE SHL2TARGET=$(TARGET2) SHL2STDLIBS= $(COMMON_LIBS) \ - $(UWINAPILIB) \ - $(ADVAPI32LIB) \ - $(OLE32LIB)\ - $(GDI32LIB)\ - $(SHELL32LIB)\ - $(OLEAUT32LIB) + $(UWINAPILIB) \ + $(ADVAPI32LIB) \ + $(OLE32LIB)\ + $(GDI32LIB)\ + $(SHELL32LIB)\ + $(OLEAUT32LIB) SHL2DEPN= SHL2IMPLIB=i$(SHL2TARGET) SHL2LIBS=$(SLB)$/fop.lib\ - $(SLB)$/utils.lib + $(SLB)$/utils.lib SHL2DEF=$(MISC)$/$(SHL2TARGET).def DEF2NAME=$(SHL2TARGET) @@ -100,3 +100,16 @@ DEF2EXPORTFILE= exports.dxp .INCLUDE : target.mk +ALLTAR : $(MISC)/fop.component $(MISC)/fps.component + +$(MISC)/fop.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fop.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fop.component + +$(MISC)/fps.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fps.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fps.component |