diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-12-12 12:52:51 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-12-12 12:52:51 +0000 |
commit | 4aea6bc177a92f159bb19e9870fe86b6a034dabc (patch) | |
tree | e97002e911982ba1cfd85bd5d08ebe523d88de05 /sfx2 | |
parent | b167d99496b51b8c7ce6e823cbd654cb064ff685 (diff) |
CWS-TOOLING: integrate CWS fwk92
2008-12-04 14:43:28 +0100 oc r264844 : #i96788#
2008-12-03 02:15:17 +0100 fredrikh r264734 : i96817
2008-12-02 16:42:46 +0100 tbo r264720 : #i96763# changes to password dialog for framework, math, global
2008-11-26 16:26:28 +0100 mav r264418 : #i93617# fix typo
2008-11-26 16:13:03 +0100 mav r264411 : #i93617# fix the linux scenario
2008-11-25 17:58:01 +0100 mav r264323 : #i93617# fix the windows problems
2008-11-25 17:51:33 +0100 mav r264321 : #i93617# fix the windows problems
2008-11-21 16:01:18 +0100 mav r264145 : #i78753# integrate the patch
2008-11-21 14:08:32 +0100 mav r264136 : #i93617# integrate the patch
2008-11-21 13:01:56 +0100 mav r264127 : #i82947# integrate the patch
2008-11-20 18:14:19 +0100 mav r264092 : #i95793# look for import filter
2008-11-18 15:23:44 +0100 pb r263776 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls
2008-11-18 15:21:39 +0100 pb r263774 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls
2008-11-18 15:18:54 +0100 pb r263772 : fix: #i92583# SvxSearchPage::InitControls_Impl() added
2008-11-18 15:16:07 +0100 pb r263771 : fix: #i92579# columns calculated newly
2008-11-18 11:09:28 +0100 mav r263751 : #i21923# small fixes
2008-11-17 17:22:04 +0100 mav r263730 : #i21923# integrate the patch
2008-11-17 14:29:02 +0100 mav r263723 : #i21923# integrate the patch
2008-11-13 16:46:08 +0100 mav r263653 : #i88127# integrate the patch
2008-11-13 14:46:56 +0100 mav r263645 : #i54638# integrate the patch
2008-11-11 13:11:03 +0100 pb r263554 : fix: #i93142# disable maRecommReadOnlyCB on read-only documents
2008-11-10 13:30:58 +0100 pb r263516 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in
2008-11-10 13:29:10 +0100 pb r263515 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in
2008-11-10 06:10:11 +0100 pb r263505 : fix: #i94937# now .uno.ExtendedHelp without image
2008-11-04 20:52:50 +0100 mav r263337 : migrate cws fwk92 to svn
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/objsh.hxx | 5 | ||||
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 61 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 21 |
5 files changed, 56 insertions, 52 deletions
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx index 65857da037..8d07bb8bfd 100644 --- a/sfx2/inc/sfx2/objsh.hxx +++ b/sfx2/inc/sfx2/objsh.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: objsh.hxx,v $ - * $Revision: 1.14 $ + * $Revision: 1.14.72.1 $ * * This file is part of OpenOffice.org. * @@ -695,7 +695,8 @@ public: String * pAppName, String * pFullTypeName, String * pShortTypeName, - sal_Int32 nVersion ) const = 0; + sal_Int32 nVersion, + sal_Bool bTemplate = sal_False) const = 0; // ================================= diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 70f4d8ec81..d711e18535 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -297,14 +297,14 @@ sal_uInt32 CheckPasswd_Impl sal_Bool bRetry = sal_True; sal_Bool bGotPasswd = sal_False; ::rtl::OUString aPassword; + ::com::sun::star::task::PasswordRequestMode nDlgMode = ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER; while( bRetry ) { bRetry = sal_False; - RequestDocumentPassword* pPasswordRequest = new RequestDocumentPassword( - ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER, - INetURLObject( pFile->GetOrigURL() ).GetName( INetURLObject::DECODE_WITH_CHARSET ) ); + RequestDocumentPassword* pPasswordRequest = new RequestDocumentPassword( nDlgMode, + INetURLObject( pFile->GetOrigURL() ).GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) ); Reference< XInteractionRequest > rRequest( pPasswordRequest ); xInteractionHandler->handle( rRequest ); @@ -330,7 +330,7 @@ sal_uInt32 CheckPasswd_Impl catch( const packages::WrongPasswordException& ) { // reask for the password - ErrorHandler::HandleError( ERRCODE_SFX_WRONGPASSWORD ); + nDlgMode = ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER; bRetry = sal_True; } catch( const uno::Exception& ) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 2f4eed0b03..f2eaff0cd9 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -56,7 +56,9 @@ #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/container/XEnumeration.hpp> #include <com/sun/star/container/XContainerQuery.hpp> +#include <com/sun/star/task/XInteractionRequest.hpp> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> + #include <comphelper/processfactory.hxx> #include <comphelper/types.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -84,6 +86,7 @@ #include <svtools/helpid.hrc> #endif #include <svtools/pickerhelper.hxx> +#include <svtools/docpasswdrequest.hxx> #include <ucbhelper/content.hxx> #include <comphelper/storagehelper.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -1544,31 +1547,6 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, if( !rpSet ) rpSet = new SfxAllItemSet( SFX_APP()->GetPool() ); - // check, wether or not we have to display a password box - if ( mbHasPassword && mbIsPwdEnabled && xCtrlAccess.is() ) - { - try - { - Any aValue = xCtrlAccess->getValue( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, 0 ); - sal_Bool bPassWord = sal_False; - if ( ( aValue >>= bPassWord ) && bPassWord ) - { - // ask for the password - SfxPasswordDialog aPasswordDlg( NULL ); - aPasswordDlg.ShowExtras( SHOWEXTRAS_CONFIRM ); - short nRet = aPasswordDlg.Execute(); - if ( RET_OK == nRet ) - { - String aPasswd = aPasswordDlg.GetPassword(); - rpSet->Put( SfxStringItem( SID_PASSWORD, aPasswd ) ); - } - else - return ERRCODE_ABORT; - } - } - catch( IllegalArgumentException ){} - } - // the item should remain only if it was set by the dialog rpSet->ClearItem( SID_SELECTION ); @@ -1627,9 +1605,38 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, // fill the rpURLList implGetAndCacheFiles(mxFileDlg, rpURLList, getCurentSfxFilter()); - if ( rpURLList == NULL ) + if ( rpURLList == NULL || rpURLList->GetObject(0) == NULL ) return ERRCODE_ABORT; - + + // check, wether or not we have to display a password box + if ( mbHasPassword && mbIsPwdEnabled && xCtrlAccess.is() ) + { + try + { + Any aValue = xCtrlAccess->getValue( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, 0 ); + sal_Bool bPassWord = sal_False; + if ( ( aValue >>= bPassWord ) && bPassWord ) + { + // ask for the password + uno::Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.comp.uui.UUIInteractionHandler")), UNO_QUERY ); + + if( xInteractionHandler.is() ) + { + RequestDocumentPassword* pPasswordRequest = new RequestDocumentPassword( + ::com::sun::star::task::PasswordRequestMode_PASSWORD_CREATE, *(rpURLList->GetObject(0)) ); + + uno::Reference< com::sun::star::task::XInteractionRequest > rRequest( pPasswordRequest ); + xInteractionHandler->handle( rRequest ); + if ( pPasswordRequest->isPassword() ) + rpSet->Put( SfxStringItem( SID_PASSWORD, pPasswordRequest->getPassword() ) ); + else + return ERRCODE_ABORT; + } + } + } + catch( IllegalArgumentException ){} + } + SaveLastUsedFilter(); return ERRCODE_NONE; } diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index fe56d8c937..19a636d804 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -49,6 +49,7 @@ #include <svtools/rectitem.hxx> #include <svtools/eitem.hxx> #include <svtools/urihelper.hxx> +#include <svtools/ctloptions.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/storagehelper.hxx> #include <svtools/securityoptions.hxx> @@ -171,6 +172,18 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHig "size of first page is 0, overload GetFirstPageSize or set vis-area!" ); pFile->Record( &aDevice ); + + LanguageType eLang; + SvtCTLOptions* pCTLOptions = new SvtCTLOptions; + if ( SvtCTLOptions::NUMERALS_HINDI == pCTLOptions->GetCTLTextNumerals() ) + eLang = LANGUAGE_ARABIC; + else if ( SvtCTLOptions::NUMERALS_ARABIC == pCTLOptions->GetCTLTextNumerals() ) + eLang = LANGUAGE_ENGLISH; + else + eLang = (LanguageType) Application::GetSettings().GetLanguage(); + + aDevice.SetDigitLanguage( eLang ); + ((SfxObjectShell*)this)->DoDraw( &aDevice, Point(0,0), aTmpSize, JobSetup(), nAspect ); pFile->Stop(); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 351ba27685..9457504d7c 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -340,7 +340,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto String aFullTypeName, aShortTypeName, aAppName; sal_uInt32 nClipFormat=0; - FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion ); + FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate ); if ( nClipFormat ) { // basic doesn't have a ClipFormat @@ -350,30 +350,13 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto SotExchange::GetFormatDataFlavor( nClipFormat, aDataFlavor ); if ( aDataFlavor.MimeType.getLength() ) { - if ( bTemplate ) - { - // TODO/LATER: this is a temporary solution for BETA to avoid incompatible change - if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_TEXT ) ) - aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE; - else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_DRAWING ) ) - aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE; - else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION ) ) - aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE; - else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET ) ) - aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE; - else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_CHART ) ) - aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE; - else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_FORMULA ) ) - aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE; - } - try { xProps->setPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ), uno::makeAny( aDataFlavor.MimeType ) ); } catch( uno::Exception& ) { - // TODO/LATER: ErrorHandling + const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL ); } ::rtl::OUString aVersion; |