diff options
Diffstat (limited to 'fpicker/source')
-rw-r--r-- | fpicker/source/aqua/FilterHelper.cxx | 28 | ||||
-rw-r--r-- | fpicker/source/aqua/exports.map | 8 | ||||
-rw-r--r-- | fpicker/source/aqua/makefile.mk | 2 | ||||
-rw-r--r-- | fpicker/source/generic/exports.map | 8 | ||||
-rw-r--r-- | fpicker/source/generic/makefile.mk | 2 | ||||
-rw-r--r-- | fpicker/source/office/exports.map | 8 | ||||
-rw-r--r-- | fpicker/source/office/makefile.mk | 2 | ||||
-rw-r--r-- | fpicker/source/unx/gnome/exports.map | 8 | ||||
-rw-r--r-- | fpicker/source/unx/gnome/makefile.mk | 2 | ||||
-rw-r--r-- | fpicker/source/unx/kde4/KDE4FilePicker.cxx | 10 | ||||
-rw-r--r-- | fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx | 40 | ||||
-rw-r--r-- | fpicker/source/win32/filepicker/makefile.mk | 1 |
12 files changed, 41 insertions, 78 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/aqua/exports.map b/fpicker/source/aqua/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/fpicker/source/aqua/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/fpicker/source/aqua/makefile.mk b/fpicker/source/aqua/makefile.mk index f79d2a018952..10990e22d5e1 100644 --- a/fpicker/source/aqua/makefile.mk +++ b/fpicker/source/aqua/makefile.mk @@ -74,7 +74,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(SALLIB) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) diff --git a/fpicker/source/generic/exports.map b/fpicker/source/generic/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/fpicker/source/generic/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/fpicker/source/generic/makefile.mk b/fpicker/source/generic/makefile.mk index f5d624f8e4d6..bfbfb65f3da6 100644 --- a/fpicker/source/generic/makefile.mk +++ b/fpicker/source/generic/makefile.mk @@ -53,7 +53,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(SALLIB) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/fpicker/source/office/exports.map b/fpicker/source/office/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/fpicker/source/office/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/fpicker/source/office/makefile.mk b/fpicker/source/office/makefile.mk index c687d8cb333e..adc3c30f9a3d 100644 --- a/fpicker/source/office/makefile.mk +++ b/fpicker/source/office/makefile.mk @@ -69,7 +69,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(SALLIB) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/fpicker/source/unx/gnome/exports.map b/fpicker/source/unx/gnome/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/fpicker/source/unx/gnome/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/fpicker/source/unx/gnome/makefile.mk b/fpicker/source/unx/gnome/makefile.mk index aa1fbc54b7f5..04c6e650ff6f 100644 --- a/fpicker/source/unx/gnome/makefile.mk +++ b/fpicker/source/unx/gnome/makefile.mk @@ -87,7 +87,7 @@ SHL1STDLIBS=\ LINKFLAGSDEFS= .ENDIF # "$(OS)"=="SOLARIS" -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) .ENDIF # GTK_TWO_FOUR 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/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx index 3f51aa9c765d..c44e4bd65b35 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx @@ -125,14 +125,14 @@ STDMETHODIMP VistaFilePickerEventHandler::OnFileOk(IFileDialog* /*pDialog*/) } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnFolderChanging(IFileDialog* pDialog, - IShellItem* pFolder) +STDMETHODIMP VistaFilePickerEventHandler::OnFolderChanging(IFileDialog* /*pDialog*/, + IShellItem* /*pFolder*/) { return E_NOTIMPL; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnFolderChange(IFileDialog* pDialog) +STDMETHODIMP VistaFilePickerEventHandler::OnFolderChange(IFileDialog* /*pDialog*/) { impl_sendEvent(E_DIRECTORY_CHANGED, 0); return S_OK; @@ -250,7 +250,7 @@ void lcl_updateVersionListDirectly(IFileDialog* pDialog) } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* pDialog) +STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* /*pDialog*/) { impl_sendEvent(E_FILE_SELECTION_CHANGED, 0); //lcl_updateVersionListDirectly(pDialog); @@ -258,16 +258,16 @@ STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* pDialog } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* pDialog , - IShellItem* pItem , - FDE_SHAREVIOLATION_RESPONSE* pResponse) +STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* /*pDialog*/ , + IShellItem* /*pItem*/ , + FDE_SHAREVIOLATION_RESPONSE* /*pResponse*/) { impl_sendEvent(E_CONTROL_STATE_CHANGED, css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER); return S_OK; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* pDialog) +STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* /*pDialog*/) { /* IFileDialogCustomize *iCustomize; @@ -299,32 +299,32 @@ STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* pDialog) } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnOverwrite(IFileDialog* pDialog , - IShellItem* pItem , - FDE_OVERWRITE_RESPONSE* pResponse) +STDMETHODIMP VistaFilePickerEventHandler::OnOverwrite(IFileDialog* /*pDialog*/ , + IShellItem* /*pItem*/ , + FDE_OVERWRITE_RESPONSE* /*pResponse*/) { return E_NOTIMPL; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* pCustomize, +STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl , - DWORD nIDItem ) + DWORD /*nIDItem*/ ) { - impl_sendEvent(E_CONTROL_STATE_CHANGED, nIDCtl); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl )); return S_OK; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnButtonClicked(IFileDialogCustomize* pCustomize, +STDMETHODIMP VistaFilePickerEventHandler::OnButtonClicked(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl ) { - impl_sendEvent(E_CONTROL_STATE_CHANGED, nIDCtl); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl)); return S_OK; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustomize* pCustomize, +STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl , BOOL bChecked ) { @@ -353,15 +353,15 @@ STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustom if (nIDCtl == css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION) m_pInternalNotify->onAutoExtensionChanged(bChecked); - impl_sendEvent(E_CONTROL_STATE_CHANGED, nIDCtl); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl)); return S_OK; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnControlActivating(IFileDialogCustomize* pCustomize, +STDMETHODIMP VistaFilePickerEventHandler::OnControlActivating(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl ) { - impl_sendEvent(E_CONTROL_STATE_CHANGED, nIDCtl); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl)); return S_OK; } 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 ---------------------------------------------------- |