Apache OpenOffice (AOO) Bugzilla – Issue 121028
path can't be removed in auto text dialog once it was added
Last modified: 2014-04-16 04:21:07 UTC
Build: Aoo_Trunk_20120918.1800 Revision :1387022 Steps: 1. New a SW document in AOO 2. Select menu Edit-->Auto Text to launch Auto Text dialog 3. Click Path button to launch Select Paths dialog 4. Select a path in path list, and click Delete button to delete it. Click OK to apply the modification. 5. Click Path button to re-launch Select Paths dialog Bug: deleted path is still in path list. Note: In Select paths dialog, click Add button to add a path, the new added path also can't be removed.
The bug is not in the dialog nor in sw module. Setting a break point in SwGlossaryDlg::PathHdl, main/sw/source/ui/misc/glossary.cxx:1194 shows that error is not there: The dialog calls SvtPathOptions::SetAutoTextPath with a string with the path removed. The problem is in the implementation of the service css.util.PathSettings in the framework module. There is a bug removing paths. See framework::PathSettings::impl_setPathValue in main/framework/source/services/pathsettings.cxx case IDGROUP_OLDSTYLE : { ::rtl::OUString sVal; aVal >>= sVal; OUStringList lList = impl_convertOldStyle2Path(sVal); impl_subst(lList, fa_getSubstitution(), sal_False); impl_purgeKnownPaths(aChangePath, lList); if (! impl_isValidPath(lList)) throw css::lang::IllegalArgumentException(); if (aChangePath.bIsSinglePath) { LOG_ASSERT2(lList.size()>1, "PathSettings::impl_setPathValue()", "You try to set more then path value for a defined SINGLE_PATH!") if ( !lList.empty() ) aChangePath.sWritePath = *(lList.begin()); else aChangePath.sWritePath = ::rtl::OUString(); } else { OUStringList::const_iterator pIt; for ( pIt = lList.begin(); pIt != lList.end() ; ++pIt ) { aChangePath.lUserPaths.push_back(*pIt); } } } break; The problem with that code is that it only contemplates ADDING new paths, not removing: impl_purgeKnownPaths(aChangePath, lList); removes from lList all path already in aChangePath * In the case where we are REMOVING a path, lList will remain empty * In the case where we are ADDING a path, lList will only have the new path, that is pushed back inside aChangePath.lUserPaths
Bug confirmed during TestLink testing Test Case ID AOOTest-621. AOO410m1(Build:9750) - Rev. 1537113 Rev.1537113 Win 7
Version has been modified erroneous, so back to old Version selection