tdf#103221 recoded clear if-else sequence

Change-Id: I8a3126427dca7b6c54282f48645f238f98ca62af
Reviewed-on: https://gerrit.libreoffice.org/34289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
This commit is contained in:
Fakabbir Amin
2017-02-15 12:54:37 +05:30
committed by Bartosz Kosiorek
parent 432f605e32
commit 2af4221bd1

View File

@@ -4436,19 +4436,28 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
+ ((eStyle & FSysStyle::Dos) ? 1 : 0)
> 1)
{
eStyle = eStyle & FSysStyle::Vos
&& m_aHost.isPresent()
&& m_aHost.getLength() > 0 ?
FSysStyle::Vos :
hasDosVolume(eStyle)
|| ((eStyle & FSysStyle::Dos)
&& m_aHost.isPresent()
&& m_aHost.getLength() > 0) ?
FSysStyle::Dos :
eStyle & FSysStyle::Unix
&& (!m_aHost.isPresent() || m_aHost.getLength() == 0) ?
FSysStyle::Unix :
FSysStyle(0);
if(eStyle & FSysStyle::Vos && m_aHost.isPresent() && m_aHost.getLength() > 0)
{
eStyle= FSysStyle::Vos;
}
else
{
if(hasDosVolume(eStyle) || ((eStyle & FSysStyle::Dos) && m_aHost.isPresent() && m_aHost.getLength() > 0))
{
eStyle = FSysStyle::Dos;
}
else
{
if(eStyle & FSysStyle::Unix && (!m_aHost.isPresent() || m_aHost.getLength() == 0))
{
eStyle = FSysStyle::Unix;
}
else
{
eStyle= FSysStyle(0);
}
}
}
}
switch (eStyle)