Commits

Anonymous committed ce01e7a

CWS-TOOLING: integrate CWS filepicker03
2009-08-28 10:59:09 +0200 cd r275520 : #i103568# Added context for Writer export
2009-08-27 13:42:55 +0200 cd r275478 : #i103568# The expression must be negated to be correct!
2009-08-26 14:26:24 +0200 cd r275423 : CWS-TOOLING: rebase CWS filepicker03 to trunk@275331 (milestone: DEV300:m56)
2009-08-26 11:53:11 +0200 cd r275411 : #i103568# Fix file type suggestion inconsistency
2009-08-26 11:27:16 +0200 cd r275407 : #i83457# Fix compiler warnings for wntmsci11 and 12
2009-08-26 11:26:32 +0200 cd r275406 : #i83457# Remove fpicker from modules with warnings
2009-08-25 16:20:06 +0200 cd r275368 : #i83457# Fix msvc warnings
2009-08-03 15:12:44 +0200 cd r274582 : CWS-TOOLING: rebase CWS filepicker03 to trunk@274203 (milestone: DEV300:m53)

Comments (0)

Files changed (11)

fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx

     // at least an empty version list will be better then the wrong one .-)
     iCustomize->RemoveAllControlItems(CONTROL_VERSIONLIST);
     
-    HRESULT                   hResult;
+    HRESULT                   hResult = E_FAIL;
     ComPtr< IShellItemArray > iItems;
     ComPtr< IShellItem >      iItem;
 
 
     if ( FAILED(hResult) )
         return;
-
+    
     const ::rtl::OUString sURL = lcl_getURLFromShellItem2(iItem);
     if (sURL.getLength() < 1)
         return;

fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx

 // includes
 //-----------------------------------------------------------------------------
 
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
+#pragma warning( disable : 4917 )
+#endif
+
 #include "comptr.hxx"
 #include "vistatypes.h"
 #include "IVistaFilePickerInternalNotify.hxx"

fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx

     // Note further: we must react different if dialog is in execute or not .-(
     ComPtr< IShellItem >      iItem;
     ComPtr< IShellItemArray > iItems;
-    HRESULT                   hResult;
+    HRESULT                   hResult = E_FAIL;
 
     if (iOpen.is())
     {
     }
 
     if (FAILED(hResult))
-        return;
+        return;    
     
     // convert and pack results
     TStringList lFiles;
 	}
 	
 
-    HRESULT hResult;
+    HRESULT hResult = E_FAIL;
     try
     {
         // show dialog and wait for user decision

fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx

 // includes
 //-----------------------------------------------------------------------------
 
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
+#pragma warning( disable : 4917 )
+#endif
+
 #include "platform_vista.h"
 #include "asyncrequests.hxx"
 #include "comptr.hxx"

fpicker/source/win32/folderpicker/workbench/Test_fops.cxx

 #include <cppuhelper/servicefactory.hxx>
 
 #ifndef _RTL_USTRING_
-#include <rtl/ustring>
+#include <rtl/ustring.hxx>
 #endif
 #include <sal/types.h>
 #include <osl/diagnose.h>
 //--------------------------------------------------------------
 
 
-int SAL_CALL main(int nArgc, char* Argv[], char* Env[]	)
+int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/	)
 {
 	CoInitializeEx( NULL, COINIT_MULTITHREADED );
 
         rootDir = xFolderPicker->getDisplayDirectory( );
 	    selectedDir = xFolderPicker->getDirectory( );
 	}
-	catch(...)
+    catch( ::com::sun::star::uno::Exception& )
 	{
 		MessageBox( NULL, "Exception caught!", "Error", MB_OK );
 	}

fpicker/source/win32/folderpicker/workbench/makefile.mk

 
 .INCLUDE :  settings.mk
 
-CFLAGS+=-GR -GX
+CFLAGS+=-GR -EHa
 
 # --- Files --------------------------------------------------------
 

fpicker/source/win32/misc/makefile.mk

 PRJNAME=fpicker
 TARGET=utils
 LIBTARGET=NO
+ENABLE_EXCEPTIONS=TRUE
 
 # --- Settings ----------------------------------
 
 .IF "$(COM)"=="GCC"
 CFLAGSAPPEND+=-fexceptions -fno-enforce-eh-specs -DUNICODE -D_UNICODE
 .ELSE
-CFLAGS+=-GX -DUNICODE -D_UNICODE
+CFLAGS+=-EHa -DUNICODE -D_UNICODE
 .ENDIF
 
 # --- Files -------------------------------------

sfx2/inc/sfx2/filedlghelper.hxx

 		SD_INSERT_SOUND,				// insert sound in draw
 		SD_INSERT_VIDEO,				// insert video in draw
 		SD_EXPORT,						// export in draw
-		SI_EXPORT						// export in impress
+		SI_EXPORT,						// export in impress
+        SW_EXPORT                       // export in writer
 	};
 
 private:

sfx2/source/dialog/filedlghelper.cxx

 {
     static const OUString aSD_EXPORT_IDENTIFIER( RTL_CONSTASCII_USTRINGPARAM( "SdExportLastFilter" ) );
     static const OUString aSI_EXPORT_IDENTIFIER( RTL_CONSTASCII_USTRINGPARAM( "SiExportLastFilter" ) );
+    static const OUString aSW_EXPORT_IDENTIFIER( RTL_CONSTASCII_USTRINGPARAM( "SwExportLastFilter" ) );
 
     const OUString* pRet = NULL;
 
     {
         case FileDialogHelper::SD_EXPORT: pRet = &aSD_EXPORT_IDENTIFIER; break;
         case FileDialogHelper::SI_EXPORT: pRet = &aSI_EXPORT_IDENTIFIER; break;
+        case FileDialogHelper::SW_EXPORT: pRet = &aSW_EXPORT_IDENTIFIER; break;
         default: break;
     }
 

sfx2/source/doc/guisaveas.cxx

            	eCtxt = sfx2::FileDialogHelper::SD_EXPORT;
         if( aDocServiceName.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) )
            	eCtxt = sfx2::FileDialogHelper::SI_EXPORT;
+        if( aDocServiceName.equalsAscii( "com.sun.star.text.TextDocument" ) )
+            eCtxt = sfx2::FileDialogHelper::SW_EXPORT;
+        
         if ( eCtxt != sfx2::FileDialogHelper::UNKNOWN_CONTEXT )
            	pFileDlg->SetContext( eCtxt );
 
     ::rtl::OUString aAdjustToType;
 
     // bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format
-	if ( bSetStandardName || GetStorable()->hasLocation() )
+	if ( !(( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )) && 
+        ( bSetStandardName || GetStorable()->hasLocation() ))
     {
         uno::Sequence< beans::PropertyValue > aOldFilterProps;
         ::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault(

solenv/inc/wntmsci11.mk

 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
 # settings.mk):
 MODULES_WITH_WARNINGS := \
-    fpicker \
     soldep
 
 CDEFS+=-DSTLPORT_VERSION=400 -D_MT