diff options
Diffstat (limited to 'cui/source/tabpages/tphatch.cxx')
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index bad1e714cbf6..0060b36d848e 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -692,7 +692,16 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); OUString aStrFilterType( "*.soh" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); - INetURLObject aFile( SvtPathOptions().GetPalettePath() ); + OUString aPalettePath(SvtPathOptions().GetPalettePath()); + OUString aLastDir; + sal_Int32 nIndex = 0; + do + { + aLastDir = aPalettePath.getToken(0, ';', nIndex); + } + while (nIndex >= 0); + + INetURLObject aFile(aLastDir); aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) ); if( aDlg.Execute() == ERRCODE_NONE ) @@ -765,7 +774,16 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl) OUString aStrFilterType( "*.soh" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); - INetURLObject aFile( SvtPathOptions().GetPalettePath() ); + OUString aPalettePath(SvtPathOptions().GetPalettePath()); + OUString aLastDir; + sal_Int32 nIndex = 0; + do + { + aLastDir = aPalettePath.getToken(0, ';', nIndex); + } + while (nIndex >= 0); + + INetURLObject aFile(aLastDir); DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); if( !pHatchingList->GetName().isEmpty() ) |