methods1.cxx (e1f63238) | methods1.cxx (0848378b) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1583 unchanged lines hidden (view full) --- 1592 (void)pBasic; 1593 (void)bWrite; 1594 1595 if ( rPar.Count() == 2 ) 1596 { 1597 String aStr = rPar.Get(1)->GetString(); 1598 INetURLObject aURLObj( aStr, INET_PROT_FILE ); 1599 ::rtl::OUString aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE ); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1583 unchanged lines hidden (view full) --- 1592 (void)pBasic; 1593 (void)bWrite; 1594 1595 if ( rPar.Count() == 2 ) 1596 { 1597 String aStr = rPar.Get(1)->GetString(); 1598 INetURLObject aURLObj( aStr, INET_PROT_FILE ); 1599 ::rtl::OUString aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE ); |
1600 if( !aFileURL.getLength() ) | 1600 if( aFileURL.isEmpty() ) |
1601 ::osl::File::getFileURLFromSystemPath( aFileURL, aFileURL ); | 1601 ::osl::File::getFileURLFromSystemPath( aFileURL, aFileURL ); |
1602 if( !aFileURL.getLength() ) | 1602 if( aFileURL.isEmpty() ) |
1603 aFileURL = aStr; 1604 rPar.Get(0)->PutString( String(aFileURL) ); 1605 } 1606 else 1607 StarBASIC::Error( SbERR_BAD_ARGUMENT ); 1608} 1609 1610RTLFUNC(ConvertFromUrl) 1611{ 1612 (void)pBasic; 1613 (void)bWrite; 1614 1615 if ( rPar.Count() == 2 ) 1616 { 1617 String aStr = rPar.Get(1)->GetString(); 1618 ::rtl::OUString aSysPath; 1619 ::osl::File::getSystemPathFromFileURL( aStr, aSysPath ); | 1603 aFileURL = aStr; 1604 rPar.Get(0)->PutString( String(aFileURL) ); 1605 } 1606 else 1607 StarBASIC::Error( SbERR_BAD_ARGUMENT ); 1608} 1609 1610RTLFUNC(ConvertFromUrl) 1611{ 1612 (void)pBasic; 1613 (void)bWrite; 1614 1615 if ( rPar.Count() == 2 ) 1616 { 1617 String aStr = rPar.Get(1)->GetString(); 1618 ::rtl::OUString aSysPath; 1619 ::osl::File::getSystemPathFromFileURL( aStr, aSysPath ); |
1620 if( !aSysPath.getLength() ) | 1620 if( aSysPath.isEmpty() ) |
1621 aSysPath = aStr; 1622 rPar.Get(0)->PutString( String(aSysPath) ); 1623 } 1624 else 1625 StarBASIC::Error( SbERR_BAD_ARGUMENT ); 1626} 1627 1628 --- 1088 unchanged lines hidden --- | 1621 aSysPath = aStr; 1622 rPar.Get(0)->PutString( String(aSysPath) ); 1623 } 1624 else 1625 StarBASIC::Error( SbERR_BAD_ARGUMENT ); 1626} 1627 1628 --- 1088 unchanged lines hidden --- |