summaryrefslogtreecommitdiff
path: root/svtools/source/control/inettbc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/control/inettbc.cxx')
-rw-r--r--svtools/source/control/inettbc.cxx82
1 files changed, 41 insertions, 41 deletions
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 725ff7136a82..a432d2269678 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -910,59 +910,59 @@ void SvtURLBox::SetSmartProtocol( INetProtocol eProt )
void SvtURLBox::UpdatePicklistForSmartProtocol_Impl()
{
Clear();
- if ( !bHistoryDisabled )
- {
- // read history pick list
- Sequence< Sequence< PropertyValue > > seqPicklist = SvtHistoryOptions().GetList( ePICKLIST );
- sal_uInt32 nCount = seqPicklist.getLength();
- INetURLObject aCurObj;
+ if ( bHistoryDisabled )
+ return;
- for( sal_uInt32 nItem=0; nItem < nCount; nItem++ )
- {
- Sequence< PropertyValue > seqPropertySet = seqPicklist[ nItem ];
+ // read history pick list
+ Sequence< Sequence< PropertyValue > > seqPicklist = SvtHistoryOptions().GetList( ePICKLIST );
+ sal_uInt32 nCount = seqPicklist.getLength();
+ INetURLObject aCurObj;
- OUString sURL;
+ for( sal_uInt32 nItem=0; nItem < nCount; nItem++ )
+ {
+ Sequence< PropertyValue > seqPropertySet = seqPicklist[ nItem ];
+
+ OUString sURL;
- sal_uInt32 nPropertyCount = seqPropertySet.getLength();
+ sal_uInt32 nPropertyCount = seqPropertySet.getLength();
- for( sal_uInt32 nProperty=0; nProperty < nPropertyCount; nProperty++ )
+ for( sal_uInt32 nProperty=0; nProperty < nPropertyCount; nProperty++ )
+ {
+ if( seqPropertySet[nProperty].Name == HISTORY_PROPERTYNAME_URL )
{
- if( seqPropertySet[nProperty].Name == HISTORY_PROPERTYNAME_URL )
- {
- seqPropertySet[nProperty].Value >>= sURL;
- aCurObj.SetURL( sURL );
+ seqPropertySet[nProperty].Value >>= sURL;
+ aCurObj.SetURL( sURL );
- if ( !sURL.isEmpty() && ( eSmartProtocol != INetProtocol::NotValid ) )
- {
- if( aCurObj.GetProtocol() != eSmartProtocol )
- break;
- }
+ if ( !sURL.isEmpty() && ( eSmartProtocol != INetProtocol::NotValid ) )
+ {
+ if( aCurObj.GetProtocol() != eSmartProtocol )
+ break;
+ }
- OUString aURL( aCurObj.GetMainURL( INetURLObject::DecodeMechanism::WithCharset ) );
+ OUString aURL( aCurObj.GetMainURL( INetURLObject::DecodeMechanism::WithCharset ) );
- if ( !aURL.isEmpty() )
+ if ( !aURL.isEmpty() )
+ {
+ bool bFound = aURL.endsWith("/");
+ if ( !bFound )
{
- bool bFound = aURL.endsWith("/");
- if ( !bFound )
- {
- OUString aUpperURL( aURL );
- aUpperURL = aUpperURL.toAsciiUpperCase();
+ OUString aUpperURL( aURL );
+ aUpperURL = aUpperURL.toAsciiUpperCase();
- bFound = ::std::any_of(pImpl->m_aFilters.begin(),
- pImpl->m_aFilters.end(),
- FilterMatch( aUpperURL ) );
- }
- if ( bFound )
- {
- OUString aFile;
- if (osl::FileBase::getSystemPathFromFileURL(aURL, aFile) == osl::FileBase::E_None)
- InsertEntry(aFile);
- else
- InsertEntry(aURL);
- }
+ bFound = ::std::any_of(pImpl->m_aFilters.begin(),
+ pImpl->m_aFilters.end(),
+ FilterMatch( aUpperURL ) );
+ }
+ if ( bFound )
+ {
+ OUString aFile;
+ if (osl::FileBase::getSystemPathFromFileURL(aURL, aFile) == osl::FileBase::E_None)
+ InsertEntry(aFile);
+ else
+ InsertEntry(aURL);
}
- break;
}
+ break;
}
}
}