diff options
author | Fakabbir Amin <fakabbir@gmail.com> | 2017-02-15 12:54:37 +0530 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2017-02-15 16:10:41 +0000 |
commit | 2af4221bd1f91b4cef22d6b1867a250e3780f6e3 (patch) | |
tree | 62e7d9e2487ef8688d58a53e1d73a94e8f205634 /tools | |
parent | 432f605e3287269d1a20383f4eeebf012ee3679d (diff) |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 55caad880d55..455ece0e057f 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) |