summaryrefslogtreecommitdiff
path: root/fpicker/source
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-04-07 13:14:23 +0200
committersb <sb@openoffice.org>2010-04-07 13:14:23 +0200
commit75ba0870517ea585027812c48dcfbc0827280a84 (patch)
tree5df4d546e2fab9c70bf902a0afe27292a36d0812 /fpicker/source
parent5521c8065f538b8cedaf2db2dbff9a265394a6b3 (diff)
parent7a7f37e3ba0ba89628fb30b035440ff5f91ab551 (diff)
sb118: merged in re/DEV300_next towards DEV300_m76
Diffstat (limited to 'fpicker/source')
-rw-r--r--fpicker/source/aqua/FilterHelper.cxx28
-rw-r--r--fpicker/source/unx/kde4/KDE4FilePicker.cxx10
-rw-r--r--fpicker/source/win32/filepicker/makefile.mk1
3 files changed, 17 insertions, 22 deletions
diff --git a/fpicker/source/aqua/FilterHelper.cxx b/fpicker/source/aqua/FilterHelper.cxx
index 2b4ce95a9bad..10e429f201c5 100644
--- a/fpicker/source/aqua/FilterHelper.cxx
+++ b/fpicker/source/aqua/FilterHelper.cxx
@@ -391,30 +391,25 @@ sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-// OSL_TRACE("filter event handler called");
-
if (m_aCurrentFilter == NULL) {
OSL_TRACE("filter name is null");
return sal_True;
}
NSFileManager *manager = [NSFileManager defaultManager];
- MacOSBOOL bDir = NO;
- if ([manager fileExistsAtPath:sFilename isDirectory:&bDir] && bDir == YES) {
-// OSL_TRACE(" folder");
- return sal_True;
- }
-
- NSFileWrapper *wrapper = [[NSFileWrapper alloc] initWithPath:sFilename];
- MacOSBOOL bIsLink = [wrapper isSymbolicLink];
- [wrapper release];
- if (bIsLink) {
-// OSL_TRACE(" symboliclink");
- return sal_True;
+ NSDictionary* pAttribs = [manager fileAttributesAtPath: sFilename traverseLink: NO];
+ if( pAttribs )
+ {
+ NSObject* pType = [pAttribs objectForKey: NSFileType];
+ if( pType && [pType isKindOfClass: [NSString class]] )
+ {
+ NSString* pT = (NSString*)pType;
+ if( [pT isEqualToString: NSFileTypeDirectory] ||
+ [pT isEqualToString: NSFileTypeSymbolicLink] )
+ return sal_True;
+ }
}
-// OSL_TRACE(" file");
-
FilterList::iterator filter = ::std::find_if(m_pFilterList->begin(), m_pFilterList->end(), FilterTitleMatch(m_aCurrentFilter));
if (filter == m_pFilterList->end()) {
OSL_TRACE("filter not found in list");
@@ -424,7 +419,6 @@ sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
OUStringList suffixList = filter->getFilterSuffixList();
{
-// OSL_TRACE(" starting to work");
rtl::OUString aName = [sFilename OUString];
rtl::OUString allMatcher = rtl::OUString::createFromAscii(".*");
for(OUStringList::iterator iter = suffixList.begin(); iter != suffixList.end(); iter++) {
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 058796fa4e4a..046147ff4b77 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -139,8 +139,6 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<lang::XMultiServiceFactory>
//default mode
_dialog->setOperationMode(KFileDialog::Opening);
-
- _dialog->setStyleSheet("color: black;");
}
KDE4FilePicker::~KDE4FilePicker()
@@ -185,6 +183,7 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
_dialog->clearFilter();
_dialog->setFilter(_filter);
+ _dialog->filterWidget()->setEditable(false);
//block and wait for user input
if (_dialog->exec() == KFileDialog::Accepted)
@@ -236,7 +235,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
QCheckBox *cb = dynamic_cast<QCheckBox*> (
_customWidgets[ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ]);
- if (cb->isChecked())
+ if (cb && cb->isChecked())
{
extension = _dialog->currentFilter(); // assuming filter value is like this *.ext
extension.replace("*","");
@@ -631,13 +630,13 @@ 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:
{
operationMode = KFileDialog::Saving;
- addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
+ //addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD );
break;
}
@@ -688,6 +687,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
}
_dialog->setOperationMode(operationMode);
+ _dialog->setConfirmOverwrite(true);
}
void SAL_CALL KDE4FilePicker::cancel()
diff --git a/fpicker/source/win32/filepicker/makefile.mk b/fpicker/source/win32/filepicker/makefile.mk
index feea7ee80349..17e4f2609069 100644
--- a/fpicker/source/win32/filepicker/makefile.mk
+++ b/fpicker/source/win32/filepicker/makefile.mk
@@ -43,6 +43,7 @@ CDEFS+=-D_UNICODE
CDEFS+=-DUNICODE
#CDEFS+=-DWIN32_LEAN_AND_MEAN
#CDEFS+=-DWIN32
+CDEFS+=-U_WIN32_WINNT -D_WIN32_WINNT=0x0600
# --- Resources ----------------------------------------------------