[Libreoffice-commits] .: sfx2/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Apr 12 05:40:58 PDT 2011


 sfx2/source/doc/guisaveas.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 8c94993472013bf60ee0db9b480bc19443f1c701
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 12 13:32:19 2011 +0100

    Resolves: #i108637# after save warn dialog return to original dir
    
    Since 2010-01-25, Lets not make the perfect the enemy of the good FFS

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 74f3193..8f5d2fc 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -303,7 +303,7 @@ public:
                                 sal_Bool bSetStandardName,
                                 ::rtl::OUString& aSuggestedName,
                                 sal_Bool bPreselectPassword,
-                                const ::rtl::OUString& aSuggestedDir,
+                                ::rtl::OUString& aSuggestedDir,
                                 sal_Int16 nDialog,
                                 const ::rtl::OUString& rStandardDir,
                                 const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList
@@ -809,7 +809,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
                                             sal_Bool bSetStandardName,
                                             ::rtl::OUString& aSuggestedName,
                                             sal_Bool bPreselectPassword,
-                                            const ::rtl::OUString& aSuggestedDir,
+                                            ::rtl::OUString& aSuggestedDir,
                                             sal_Int16 nDialog,
                                             const ::rtl::OUString& rStandardDir,
                                             const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList)
@@ -1017,6 +1017,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
     INetURLObject aURL( pFileDlg->GetPath() );
     // the path should be provided outside since it might be used for further calls to the dialog
     aSuggestedName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET );
+       aSuggestedDir = pFileDlg->GetDisplayDirectory();
 
     // old filter options should be cleared in case different filter is used
 
@@ -1504,10 +1505,8 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
         sal_Bool bExit = sal_False;
         while ( !bExit )
         {
+            // in case the dialog is opened a second time the folder should be the same as previously navigated to by the user, not what was handed over by initial parameters
             bUseFilterOptions = aModelData.OutputFileDialog( nStoreMode, aFilterProps, bSetStandardName, aSuggestedName, bPreselectPassword, aSuggestedDir, nDialog, sStandardDir, aBlackList );
-
-            // in case the dialog is opend a second time the folder should be the same as before, not what was handed over by parameters
-            aSuggestedDir = ::rtl::OUString();
             if ( nStoreMode == SAVEAS_REQUESTED )
             {
                 // in case of saving check filter for possible alien warning


More information about the Libreoffice-commits mailing list