summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-06-20 23:07:30 +1000
committerMike Kaganski <mike.kaganski@collabora.com>2019-06-21 00:47:22 +0200
commitcb28e48bfd7e8727797435dc05bdfe1652fb34f0 (patch)
tree544789048956324c6192d6f53e10392dcef12c42 /sw
parent6153bedd8948cc05a9d8d338bac1d5858635c5ba (diff)
Drop INetURLObject::GetName and INetURLObject::GetExtension
They are just synonyms for GetLastName and GetFileExtension resp. Change-Id: Ic498c7025cc421b830394ed94d64529fd74fe7dd Reviewed-on: https://gerrit.libreoffice.org/74448 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmllinks.cxx5
-rw-r--r--sw/source/core/doc/docglbl.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx2
-rw-r--r--sw/source/core/unocore/swunohelper.cxx2
-rw-r--r--sw/source/filter/writer/writer.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx3
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
7 files changed, 11 insertions, 9 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
index 146497c23957..5b03e7ddf532 100644
--- a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
@@ -42,8 +42,9 @@
bool bOk = aOriginalURL.setFSysPath(sOriginalFileName, FSysStyle::Detect); \
if (!bOk) \
aOriginalURL = INetURLObject(sOriginalFileName); \
- OUString sFileName \
- = aOriginalURL.GetName().isEmpty() ? sOriginalFileName : aOriginalURL.GetName(); \
+ OUString sFileName = aOriginalURL.GetLastName().isEmpty() \
+ ? sOriginalFileName \
+ : aOriginalURL.GetLastName(); \
\
/* Get temp path */ \
OUString sTempDir = utl::TempFile::CreateTempName(); \
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 10521aa6ae54..d4522f54714e 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -411,7 +411,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
default:
{
- const OUString sNm( INetURLObject( sFileName ).GetName() );
+ const OUString sNm(INetURLObject(sFileName).GetLastName());
SwSectionData aSectData( FILE_LINK_SECTION,
GetUniqueSectionName( &sNm ));
SwSectionFormat* pFormat = MakeSectionFormat();
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 53e9097279eb..f8dcbd0d7e3f 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -607,7 +607,7 @@ OUString SwTemplNameFieldType::Expand(sal_uLong nFormat) const
{
INetURLObject aPathName( xDocProps->getTemplateURL() );
if( FF_NAME == nFormat )
- aRet = aPathName.GetName(URL_DECODE);
+ aRet = aPathName.GetLastName(URL_DECODE);
else if( FF_NAME_NOEXT == nFormat )
aRet = aPathName.GetBase();
else
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 29e76e9bd554..fe657d36fc53 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -80,7 +80,7 @@ bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL )
try
{
INetURLObject aURL( rNewURL );
- const OUString sName( aURL.GetName() );
+ const OUString sName(aURL.GetLastName());
aURL.removeSegment();
const OUString sMainURL( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE) );
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index be4fbe67571a..b67f6b928056 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -330,7 +330,7 @@ bool Writer::CopyLocalFileToINet( OUString& rFileNm )
OUString aSrc = rFileNm;
OUString aDest = aTargetUrl.GetPartBeforeLastName();
- aDest += aFileUrl.GetName();
+ aDest += aFileUrl.GetLastName();
SfxMedium aSrcFile( aSrc, StreamMode::READ );
SfxMedium aDstFile( aDest, StreamMode::WRITE | StreamMode::SHARE_DENYNONE );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 77fe6fae93c7..e81e395179ca 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5551,7 +5551,8 @@ namespace
{
::comphelper::DocPasswordRequest* pRequest = new ::comphelper::DocPasswordRequest(
::comphelper::DocPasswordRequestType::MS, task::PasswordRequestMode_PASSWORD_ENTER,
- INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DecodeMechanism::WithCharset ) );
+ INetURLObject(rMedium.GetOrigURL())
+ .GetLastName(INetURLObject::DecodeMechanism::WithCharset));
uno::Reference< task::XInteractionRequest > xRequest( pRequest );
xHandler->handle( xRequest );
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index ec31fdc6a500..3b1adf7ea7ba 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2622,7 +2622,7 @@ namespace sw
{
DBConnURIType GetDBunoType(const INetURLObject &rURL)
{
- OUString sExt(rURL.GetExtension());
+ OUString sExt(rURL.GetFileExtension());
DBConnURIType type = DBConnURIType::UNKNOWN;
if (sExt == "odb")
@@ -2754,7 +2754,7 @@ Optionally add a prefix to the registered DB name.
OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference< beans::XPropertySet > *pSettings,
const INetURLObject &rURL, const OUString *pDestDir, SfxObjectShell* pDocShell)
{
- OUString sExt(rURL.GetExtension());
+ OUString sExt(rURL.GetFileExtension());
uno::Any aTableFilterAny;
uno::Any aSuppressVersionsAny;
uno::Any aInfoAny;