diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-07-30 10:30:12 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-07-30 10:30:12 +0000 |
commit | dd431e5d75389aa997300bb9f31afb408fec13b8 (patch) | |
tree | 7ef0957da609509339f89f8da991c1b2c769886f /svx | |
parent | a013040879f34aa9ba69a86c86fa940691c0dc70 (diff) |
CWS-TOOLING: integrate CWS filepicker02
2009-07-24 16:20:33 +0200 cd r274312 : #i95152# Use trimTrailingBlanks() correctly
2009-07-21 14:41:50 +0200 cd r274197 : #i103566# Makes fixes for MinGW port
2009-07-20 10:45:57 +0200 cd r274112 : #i95152# Return empty string when there are only blanks
2009-07-17 14:53:51 +0200 cd r274093 : #i95152# Old Windows file picker implementation now trims trailing blanks like the new Vista file picker
2009-07-17 09:45:38 +0200 cd r274080 : #i99759# Apply stability fixes from CWS filepicker01 to help QA
2009-07-17 09:00:26 +0200 cd r274078 : #i95336# Extend SfxApplication to reset last used directory
2009-07-17 08:59:10 +0200 cd r274077 : #i99759# Apply fix from filepicker01 to filepicker02 to help QA
2009-07-17 08:58:45 +0200 cd r274076 : #i99759# Apply fix from filepicker01 to filepicker02 to help QA
2009-07-16 16:08:17 +0200 cd r274059 : #103566# Use AddPlace as a fallback for directories which are not change the current folder
2009-07-16 11:54:26 +0200 cd r274038 : #i103566# Use provided folder and filename to decide to set the folder in the file dialog
2009-07-15 17:19:47 +0200 cd r274016 : #i95336# Set flag to true to force the file picker to use the default working path.
2009-07-14 14:49:48 +0200 cd r273977 : #i103346# Set work path flag to indicate file picker to use work path once
2009-07-14 14:47:49 +0200 cd r273976 : #i95336# New configuration entry for work path changes via Tools-Options
2009-07-14 14:46:19 +0200 cd r273975 : #i95336# Force file picker to use a changed work path once
2009-07-14 10:19:54 +0200 cd r273961 : #i103346# Add new advice for file picker usage. Especially for Windows Vista and higher.
2009-07-09 10:32:08 +0200 cd r273852 : #i97053# Use SetFolder()/AddPlace() for Open dialog, too.
2009-07-06 14:59:06 +0200 cd r273746 : #i103346# Destroy dialog instance within close handler to prevent problems with custom controls under Windows
2009-07-03 15:25:48 +0200 cd r273707 : #i94054# Add resource access to read localized labels for custom controls. Use SetControlLabel to set the localized label
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/cui/optpath.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/svx/source/cui/optpath.cxx b/svx/source/cui/optpath.cxx index b31d56493aed..eeef9ec75fea 100644 --- a/svx/source/cui/optpath.cxx +++ b/svx/source/cui/optpath.cxx @@ -41,6 +41,7 @@ #include <tools/shl.hxx> #include <vcl/msgbox.hxx> #include <sfx2/filedlghelper.hxx> +#include <sfx2/app.hxx> #include <svtools/pickerhelper.hxx> #include <svtools/aeitem.hxx> #include <svtools/svtabbx.hxx> @@ -52,6 +53,7 @@ #include <unotools/localfilehelper.hxx> #include <svtools/pathoptions.hxx> #include <svtools/moduleoptions.hxx> +#include <svtools/viewoptions.hxx> #define _SVX_OPTPATH_CXX @@ -62,6 +64,7 @@ #include <svx/dialogs.hrc> #include "helpid.hrc" #include <comphelper/processfactory.hxx> +#include <comphelper/configurationhelper.hxx> #include <com/sun/star/uno/Exception.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -91,6 +94,7 @@ using namespace svx; #define POSTFIX_WRITABLE String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "_writable" ) ) #define POSTFIX_READONLY String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "_readonly" ) ) #define VAR_ONE String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "%1" ) ) +#define IODLG_CONFIGNAME String(DEFINE_CONST_UNICODE("FilePicker_Save")) // struct OptPath_Impl --------------------------------------------------- @@ -536,6 +540,26 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) pPathImpl = (PathUserData_Impl*)pPathBox->GetEntry(nPos)->GetUserData(); pPathImpl->eState = SFX_ITEM_SET; pPathImpl->sWritablePath = sNewPathStr; + if ( SvtPathOptions::PATH_WORK == pPathImpl->nRealId ) + { + // Remove view options entry so the new work path + // will be used for the next open dialog. + SvtViewOptions aDlgOpt( E_DIALOG, IODLG_CONFIGNAME ); + aDlgOpt.Delete(); + // Reset also last used dir in the sfx application instance + SfxApplication *pSfxApp = SFX_APP(); + pSfxApp->ResetLastDir(); + + // Set configuration flag to notify file picker that it's necessary + // to take over the path provided. + Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + ::comphelper::ConfigurationHelper::writeDirectKey(xFactory, + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/")), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Path/Info")), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WorkPathChanged")), + ::com::sun::star::uno::makeAny(true), + ::comphelper::ConfigurationHelper::E_STANDARD); + } } } |