recent documents: Don't assign the same values twice.
Change-Id: I85be809dd390a0dcd19a388a85930e1dc0893305
This commit is contained in:
@@ -379,15 +379,12 @@ void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
|
|||||||
|
|
||||||
for (sal_Int32 i=0; i<nLength; ++i)
|
for (sal_Int32 i=0; i<nLength; ++i)
|
||||||
{
|
{
|
||||||
OUString sTmp;
|
OUString aItem;
|
||||||
xOrderList->getByName(OUString::number(i)) >>= xSet;
|
xOrderList->getByName(OUString::number(i)) >>= xSet;
|
||||||
xSet->getPropertyValue(s_sHistoryItemRef) >>= sTmp;
|
xSet->getPropertyValue(s_sHistoryItemRef) >>= aItem;
|
||||||
|
|
||||||
if(sURL == sTmp)
|
if (aItem == sURL)
|
||||||
{
|
{
|
||||||
OUString sFind;
|
|
||||||
xOrderList->getByName(OUString::number(i)) >>= xSet;
|
|
||||||
xSet->getPropertyValue(s_sHistoryItemRef) >>= sFind;
|
|
||||||
for (sal_Int32 j = i - 1; j >= 0; --j)
|
for (sal_Int32 j = i - 1; j >= 0; --j)
|
||||||
{
|
{
|
||||||
uno::Reference<beans::XPropertySet> xPrevSet;
|
uno::Reference<beans::XPropertySet> xPrevSet;
|
||||||
@@ -400,7 +397,7 @@ void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
|
|||||||
xPrevSet->setPropertyValue(s_sHistoryItemRef, uno::makeAny(sTemp));
|
xPrevSet->setPropertyValue(s_sHistoryItemRef, uno::makeAny(sTemp));
|
||||||
}
|
}
|
||||||
xOrderList->getByName(OUString::number(0)) >>= xSet;
|
xOrderList->getByName(OUString::number(0)) >>= xSet;
|
||||||
xSet->setPropertyValue(s_sHistoryItemRef, uno::makeAny(sFind));
|
xSet->setPropertyValue(s_sHistoryItemRef, uno::makeAny(aItem));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user