summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/tpcolor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/tpcolor.cxx')
-rw-r--r--cui/source/tabpages/tpcolor.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 94231c5f0f32..50b74de0b673 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -142,7 +142,16 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl)
OUString aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) );
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 )
@@ -202,7 +211,16 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickSaveHdl_Impl)
OUString aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) );
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" );
XPropertyListRef pList = GetList();