tools/source/fsys/urlobj.cxx | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)
New commits: commit 2af4221bd1f91b4cef22d6b1867a250e3780f6e3 Author: Fakabbir Amin <fakab...@gmail.com> Date: Wed Feb 15 12:54:37 2017 +0530 tdf#103221 recoded clear if-else sequence Change-Id: I8a3126427dca7b6c54282f48645f238f98ca62af Reviewed-on: https://gerrit.libreoffice.org/34289 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl> diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 55caad8..455ece0 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits