[Libreoffice-commits] core.git: tools/source

Fakabbir Amin fakabbir at gmail.com
Wed Feb 15 16:11:02 UTC 2017


 tools/source/fsys/urlobj.cxx |   35 ++++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 13 deletions(-)

New commits:
commit 2af4221bd1f91b4cef22d6b1867a250e3780f6e3
Author: Fakabbir Amin <fakabbir at 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 <ci at libreoffice.org>
    Reviewed-by: Bartosz Kosiorek <gang65 at 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)


More information about the Libreoffice-commits mailing list