Kaydet (Commit) 60c23d48 authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS aquafilepicker02_DEV300 (1.2.40); FILE MERGED

2008/01/14 08:23:24 fheckl 1.2.40.2: Code cleanup and some implementation details
2008/01/02 18:25:59 fheckl 1.2.40.1: issue #80399 more Cocoa
üst 8c0f8695
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
<type>com.sun.star.ui.dialogs.ExecutableDialogException</type> <type>com.sun.star.ui.dialogs.ExecutableDialogException</type>
<type>com.sun.star.ui.dialogs.XFilePickerNotifier</type> <type>com.sun.star.ui.dialogs.XFilePickerNotifier</type>
<type>com.sun.star.ui.dialogs.XFilePickerControlAccess</type> <type>com.sun.star.ui.dialogs.XFilePickerControlAccess</type>
<type>com.sun.star.ui.dialogs.XFilePreview</type>
<type>com.sun.star.ui.dialogs.ExtendedFilePickerElementIds</type> <type>com.sun.star.ui.dialogs.ExtendedFilePickerElementIds</type>
<type>com.sun.star.ui.dialogs.ExecutableDialogResults</type> <type>com.sun.star.ui.dialogs.ExecutableDialogResults</type>
<type>com.sun.star.ui.dialogs.FilePickerEvent</type> <type>com.sun.star.ui.dialogs.FilePickerEvent</type>
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: resourceprovider.cxx,v $ * $RCSfile: resourceprovider.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: ihi $ $Date: 2007-07-11 11:00:56 $ * last change: $Author: kz $ $Date: 2008-03-05 16:39:52 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -45,10 +45,6 @@ ...@@ -45,10 +45,6 @@
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#endif #endif
#ifndef _RESOURCEPROVIDER_HXX_
#include "resourceprovider.hxx"
#endif
#ifndef _VOS_MUTEX_HXX_ #ifndef _VOS_MUTEX_HXX_
#include <vos/mutex.hxx> #include <vos/mutex.hxx>
#endif #endif
...@@ -69,8 +65,19 @@ ...@@ -69,8 +65,19 @@
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#endif #endif
#ifndef _SVTOOLS_SVTOOLS_HRC_
#include <svtools/svtools.hrc> #include <svtools/svtools.hrc>
#endif
#ifndef _SVTOOLS_FILEDLG2_HRC_
#include <svtools/filedlg2.hrc> #include <svtools/filedlg2.hrc>
#endif
#ifndef _NSSTRING_OOOADDITIONS_HXX_
#include "NSString_OOoAdditions.hxx"
#endif
#include "resourceprovider.hxx"
//------------------------------------------------------------ //------------------------------------------------------------
// namespace directives // namespace directives
...@@ -111,13 +118,14 @@ _Entry CtrlIdToResIdTable[] = { ...@@ -111,13 +118,14 @@ _Entry CtrlIdToResIdTable[] = {
{ CHECKBOX_SELECTION, STR_SVT_FILEPICKER_SELECTION }, { CHECKBOX_SELECTION, STR_SVT_FILEPICKER_SELECTION },
{ FOLDERPICKER_TITLE, STR_SVT_FOLDERPICKER_DEFAULT_TITLE }, { FOLDERPICKER_TITLE, STR_SVT_FOLDERPICKER_DEFAULT_TITLE },
{ FOLDER_PICKER_DEF_DESCRIPTION, STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION }, { FOLDER_PICKER_DEF_DESCRIPTION, STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION },
{ FILE_PICKER_OVERWRITE, STR_SVT_ALREADYEXISTOVERWRITE } { FILE_PICKER_OVERWRITE, STR_SVT_ALREADYEXISTOVERWRITE },
{ LISTBOX_FILTER_LABEL, STR_SVT_FILEPICKER_FILTER_TITLE}
}; };
_Entry OtherCtrlIdToResIdTable[] = { _Entry OtherCtrlIdToResIdTable[] = {
{ FILE_PICKER_TITLE_OPEN, STR_FILEDLG_OPEN }, { FILE_PICKER_TITLE_OPEN, STR_FILEDLG_OPEN },
{ FILE_PICKER_TITLE_SAVE, STR_FILEDLG_SAVE }, { FILE_PICKER_TITLE_SAVE, STR_FILEDLG_SAVE },
{ FILE_PICKER_FILE_TYPE, STR_FILEDLG_TYPE }, { FILE_PICKER_FILE_TYPE, STR_FILEDLG_TYPE }
}; };
...@@ -192,7 +200,7 @@ public: ...@@ -192,7 +200,7 @@ public:
// //
//------------------------------------- //-------------------------------------
CFStringRef getResString( sal_Int16 aId ) NSString* getResString( sal_Int16 aId )
{ {
String aResString; String aResString;
OUString aResOUString; OUString aResOUString;
...@@ -210,8 +218,9 @@ public: ...@@ -210,8 +218,9 @@ public:
else else
{ {
aResId = OtherCtrlIdToResId( aId ); aResId = OtherCtrlIdToResId( aId );
if ( aResId > -1 ) if ( aResId > -1 ) {
aResString = String( ResId( aResId, *m_OtherResMgr ) ); aResString = String( ResId( aResId, *m_OtherResMgr ) );
}
} }
if ( aResId > -1 ) if ( aResId > -1 )
aResOUString = OUString( aResString ); aResOUString = OUString( aResString );
...@@ -220,7 +229,7 @@ public: ...@@ -220,7 +229,7 @@ public:
{ {
} }
return CFStringCreateWithOUString(aResOUString); return [NSString stringWithOUString:aResOUString];
} }
public: public:
...@@ -250,20 +259,13 @@ CResourceProvider::~CResourceProvider( ) ...@@ -250,20 +259,13 @@ CResourceProvider::~CResourceProvider( )
// //
//------------------------------------------------------------ //------------------------------------------------------------
CFStringRef CResourceProvider::getResString( sal_Int32 aId ) NSString* CResourceProvider::getResString( sal_Int32 aId )
{ {
CFStringRef sImmutable = m_pImpl->getResString( aId ); NSString* sImmutable = m_pImpl->getResString( aId );
CFIndex nLength = CFStringGetLength(sImmutable); NSMutableString *sMutableString = [NSMutableString stringWithString:sImmutable];
CFMutableStringRef sMutableString = CFStringCreateMutableCopy(kCFAllocatorDefault,nLength,sImmutable); [sMutableString replaceOccurrencesOfString:@"~" withString:@"" options:0 range:NSMakeRange(0, [sMutableString length])];
CFRelease(sImmutable);
CFStringRef sToFind = CFSTR("~"); NSString *result = [NSString stringWithString:sMutableString];
CFStringRef sRep = CFSTR("");
CFStringFindAndReplace(sMutableString,sToFind,sRep,CFRangeMake(0,nLength),0);
CFRelease(sToFind);
CFRelease(sRep);
CFStringRef result = CFStringCreateCopy(kCFAllocatorDefault,sMutableString);
CFRelease(sMutableString);
return result; return result;
} }
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: resourceprovider.hxx,v $ * $RCSfile: resourceprovider.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: ihi $ $Date: 2007-07-11 11:01:07 $ * last change: $Author: kz $ $Date: 2008-03-05 16:40:06 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -45,11 +45,9 @@ ...@@ -45,11 +45,9 @@
#include <sal/types.h> #include <sal/types.h>
#endif #endif
#ifndef _RTL_USTRING_HXX_ #include <premac.h>
#include <rtl/ustring> #include <Cocoa/Cocoa.h>
#endif #include <postmac.h>
#include "CFStringUtilities.hxx"
#define FOLDERPICKER_TITLE 500 #define FOLDERPICKER_TITLE 500
#define FOLDER_PICKER_DEF_DESCRIPTION 501 #define FOLDER_PICKER_DEF_DESCRIPTION 501
...@@ -70,7 +68,7 @@ public: ...@@ -70,7 +68,7 @@ public:
CResourceProvider( ); CResourceProvider( );
~CResourceProvider( ); ~CResourceProvider( );
CFStringRef getResString( sal_Int32 aId ); NSString* getResString( sal_Int32 aId );
private: private:
CResourceProvider_Impl* m_pImpl; CResourceProvider_Impl* m_pImpl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment