[Libreoffice-commits] core.git: cui/source editeng/source extensions/source filter/source framework/source include/tools reportdesign/source sc/source sd/source sfx2/source svl/qa svl/source svtools/source svx/source sw/qa sw/source vcl/unx writerperfect/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 20 22:48:47 UTC 2019


 cui/source/dialogs/cuigaldlg.cxx                     |    2 +-
 cui/source/dialogs/linkdlg.cxx                       |    2 +-
 cui/source/tabpages/tpbitmap.cxx                     |    3 ++-
 editeng/source/misc/svxacorr.cxx                     |    2 +-
 extensions/source/abpilot/abpfinalpage.cxx           |    2 +-
 extensions/source/dbpilots/controlwizard.cxx         |    2 +-
 filter/source/xsltdialog/typedetectionexport.cxx     |    2 +-
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |   10 +++++-----
 framework/source/services/urltransformer.cxx         |    2 +-
 include/tools/urlobj.hxx                             |    8 --------
 reportdesign/source/filter/xml/dbloader2.cxx         |    2 +-
 sc/source/filter/html/htmlexp.cxx                    |    2 +-
 sc/source/ui/view/prevwsh.cxx                        |    2 +-
 sc/source/ui/view/printfun.cxx                       |    2 +-
 sc/source/ui/view/tabvwsh4.cxx                       |    2 +-
 sd/source/filter/eppt/pptexsoundcollection.cxx       |    4 ++--
 sd/source/filter/ppt/pptin.cxx                       |    2 +-
 sfx2/source/control/recentdocsviewitem.cxx           |    2 +-
 sfx2/source/dialog/dinfdlg.cxx                       |    2 +-
 sfx2/source/dialog/filedlghelper.cxx                 |    5 +++--
 sfx2/source/doc/guisaveas.cxx                        |    7 ++++---
 svl/qa/unit/lockfiles/test_lockfiles.cxx             |    2 +-
 svl/source/misc/lockfilecommon.cxx                   |    2 +-
 svl/source/misc/msodocumentlockfile.cxx              |    2 +-
 svtools/source/contnr/fileview.cxx                   |    3 ++-
 svx/source/core/graphichelper.cxx                    |    4 ++--
 svx/source/gallery2/galbrws2.cxx                     |    2 +-
 svx/source/gallery2/gallery1.cxx                     |    2 +-
 svx/source/gallery2/galmisc.cxx                      |    4 ++--
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx    |    2 +-
 sw/qa/extras/ooxmlexport/ooxmllinks.cxx              |    5 +++--
 sw/source/core/doc/docglbl.cxx                       |    2 +-
 sw/source/core/fields/docufld.cxx                    |    2 +-
 sw/source/core/unocore/swunohelper.cxx               |    2 +-
 sw/source/filter/writer/writer.cxx                   |    2 +-
 sw/source/filter/ww8/ww8par.cxx                      |    3 ++-
 sw/source/uibase/dbui/dbmgr.cxx                      |    4 ++--
 vcl/unx/generic/fontmanager/fontmanager.cxx          |    2 +-
 writerperfect/source/writer/exp/xmlimp.cxx           |    4 ++--
 39 files changed, 57 insertions(+), 59 deletions(-)

New commits:
commit cb28e48bfd7e8727797435dc05bdfe1652fb34f0
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jun 20 23:07:30 2019 +1000
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Jun 21 00:47:22 2019 +0200

    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 at collabora.com>

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 799440789bb2..24b03ef54348 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -162,7 +162,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
                               != rFormats.end() ) ||
                             std::find( rFormats.begin(),
                                          rFormats.end(),
-                                         aFoundURL.GetExtension().toAsciiLowerCase() )
+                                         aFoundURL.GetFileExtension().toAsciiLowerCase())
                             != rFormats.end() )
                         {
                             SolarMutexGuard aGuard;
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 238156007a7e..ca8c1280ac60 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -303,7 +303,7 @@ IMPL_LINK_NOARG(SvBaseLinksDlg, ChangeSourceClickHdl, weld::Button&, void)
             if(aUrl.GetProtocol() == INetProtocol::File)
             {
                 OUString sOldPath(aUrl.PathToFileName());
-                sal_Int32 nLen = aUrl.GetName().getLength();
+                sal_Int32 nLen = aUrl.GetLastName().getLength();
                 sOldPath = sOldPath.copy(0, sOldPath.getLength() - nLen);
                 xFolderPicker->setDisplayDirectory(sOldPath);
             }
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index f291b1bdf48a..a116b587c8c7 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -745,7 +745,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
             OUString        aName;
             INetURLObject   aURL( aDlg.GetPath() );
             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-            ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aURL.GetName().getToken(0, '.'), aDesc));
+            ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(
+                GetDialogFrameWeld(), aURL.GetLastName().getToken(0, '.'), aDesc));
             nError = ErrCode(1);
 
             while( pDlg->Execute() == RET_OK )
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 2a7db090d1ed..3fa9fa1dcb7c 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2366,7 +2366,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
             ::ucbhelper::Content aNewContent( sMain, uno::Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
             TransferInfo aInfo;
             aInfo.NameClash = NameClash::OVERWRITE;
-            aInfo.NewTitle  = aDest.GetName();
+            aInfo.NewTitle = aDest.GetLastName();
             aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
             aInfo.MoveData  = false;
             aNewContent.executeCommand( "transfer", Any(aInfo));
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index 92a7e804f6e4..cf2598ef042b 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -124,7 +124,7 @@ namespace abp
         rSettings.sDataSourceName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
         m_pLocationController->setURL( rSettings.sDataSourceName );
         OUString sName = aURL.getName( );
-        sal_Int32 nPos = sName.indexOf(aURL.GetExtension());
+        sal_Int32 nPos = sName.indexOf(aURL.GetFileExtension());
         if ( nPos != -1 )
         {
             sName = sName.replaceAt(nPos-1, 4, "");
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 4453b72f95f0..1e8494f73f13 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -213,7 +213,7 @@ namespace dbp
 
             INetURLObject aURL( sDataSource );
             if( aURL.GetProtocol() != INetProtocol::NotValid )
-                sDataSource = aURL.GetName(INetURLObject::DecodeMechanism::WithCharset);
+                sDataSource = aURL.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
             m_pFormDatasource->SetText(sDataSource);
             m_pFormTable->SetText(sCommand);
 
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index bcd379e47be2..65cd250790c3 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -51,7 +51,7 @@ static OUString createRelativeURL( const OUString& rFilterName, const OUString&
         !rURL.startsWith("ftp:") )
     {
         INetURLObject aURL( rURL );
-        OUString aName( aURL.GetName() );
+        OUString aName(aURL.GetLastName());
         if( aName.isEmpty() )
         {
             sal_Int32 nPos = rURL.lastIndexOf( '/' );
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 21d9fe69d7e7..27502305610d 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -447,13 +447,13 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
         if( !pFilterEntry->maImportTemplate.matchIgnoreAsciiCase( m_sTemplatePath ) )
         {
             INetURLObject aSourceURL( pFilterEntry->maImportTemplate );
-            if( !aSourceURL.GetName().isEmpty() )
+            if (!aSourceURL.GetLastName().isEmpty())
             {
                 OUString aDestURL( m_sTemplatePath );
                 aDestURL += pFilterEntry->maFilterName + "/";
                 if( createDirectory( aDestURL ) )
                 {
-                    aDestURL += aSourceURL.GetName();
+                    aDestURL += aSourceURL.GetLastName();
 
                     SvFileStream aInputStream(pFilterEntry->maImportTemplate, StreamMode::READ );
                     Reference< XInputStream > xIS( new utl::OInputStreamWrapper( aInputStream ) );
@@ -870,13 +870,13 @@ void XMLFilterSettingsDialog::onSave()
         {
             aMsg = XsltResId(STR_FILTERS_HAVE_BEEN_SAVED);
             aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) );
-            aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() );
+            aMsg = aMsg.replaceFirst(sPlaceholder, aURL.GetLastName());
         }
         else
         {
             aMsg = XsltResId(STR_FILTER_HAS_BEEN_SAVED);
             aMsg = aMsg.replaceFirst( sPlaceholder, (*aFilters.begin())->maFilterName );
-            aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() );
+            aMsg = aMsg.replaceFirst(sPlaceholder, aURL.GetLastName());
         }
 
         std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(m_xDialog.get(),
@@ -929,7 +929,7 @@ void XMLFilterSettingsDialog::onOpen()
         {
             INetURLObject aURLObj( aURL );
             aMsg = XsltResId(STR_NO_FILTERS_FOUND);
-            aMsg = aMsg.replaceFirst( sPlaceholder, aURLObj.GetName() );
+            aMsg = aMsg.replaceFirst(sPlaceholder, aURLObj.GetLastName());
         }
         else if( nFilters == 1 )
         {
diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx
index b9508629ed5d..5c666103e138 100644
--- a/framework/source/services/urltransformer.cxx
+++ b/framework/source/services/urltransformer.cxx
@@ -92,7 +92,7 @@ void lcl_ParserHelper(INetURLObject& _rParser, css::util::URL& _rURL,bool _bUseI
     else
     {
         _rURL.Path       = _rParser.GetURLPath( INetURLObject::DecodeMechanism::NONE           );
-        _rURL.Name      = _rParser.GetName  (                                    );
+        _rURL.Name = _rParser.GetLastName();
     }
 
     _rURL.Arguments  = _rParser.GetParam();
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 3cbbab49f5bf..f72f2521a2b2 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -930,16 +930,8 @@ public:
                  EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
                  rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
 
-    OUString GetName(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
-                             rtl_TextEncoding eCharset
-                                 = RTL_TEXTENCODING_UTF8) const
-    { return GetLastName(eMechanism, eCharset); }
-
     void SetExtension(OUString const & rTheExtension);
 
-    OUString GetExtension() const
-    { return GetFileExtension(); }
-
     OUString CutExtension();
 
     static bool IsCaseSensitive() { return true; }
diff --git a/reportdesign/source/filter/xml/dbloader2.cxx b/reportdesign/source/filter/xml/dbloader2.cxx
index b9d4810f5cca..001052e362dc 100644
--- a/reportdesign/source/filter/xml/dbloader2.cxx
+++ b/reportdesign/source/filter/xml/dbloader2.cxx
@@ -54,7 +54,7 @@ OUString SAL_CALL ORptTypeDetection::detect( Sequence< css::beans::PropertyValue
     if ( !sTemp.isEmpty() )
     {
         INetURLObject aURL(sTemp);
-        if ( aURL.GetExtension().equalsIgnoreAsciiCase("orp") )
+        if ( aURL.GetFileExtension().equalsIgnoreAsciiCase("orp") )
             return OUString("StarBaseReport");
         else
         {
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 8b9a5ade838b..3e5acc29a43d 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1276,7 +1276,7 @@ void ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
 
         OUString aSrc = rFileNm;
         OUString aDest = aTargetUrl.GetPartBeforeLastName();
-        aDest += aFileUrl.GetName();
+        aDest += aFileUrl.GetLastName();
 
         SfxMedium aMedium( aDest, StreamMode::WRITE | StreamMode::SHARE_DENYNONE );
 
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 3a548f589d2c..a1a079b805f1 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -888,7 +888,7 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
     const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
     rData.aLongDocName  = rURLObj.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
     if ( !rData.aLongDocName.isEmpty() )
-        rData.aShortDocName = rURLObj.GetName( INetURLObject::DecodeMechanism::Unambiguous );
+        rData.aShortDocName = rURLObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous);
     else
         rData.aShortDocName = rData.aLongDocName = rData.aTitle;
     rData.nPageNo       = pPreview->GetPageNo() + 1;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 86a823fa78d8..15664211f0ff 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1088,7 +1088,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
     const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
     aFieldData.aLongDocName = rURLObj.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
     if ( !aFieldData.aLongDocName.isEmpty() )
-        aFieldData.aShortDocName = rURLObj.GetName( INetURLObject::DecodeMechanism::Unambiguous );
+        aFieldData.aShortDocName = rURLObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous);
     else
         aFieldData.aShortDocName = aFieldData.aLongDocName = aFieldData.aTitle;
 
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index fce0a758df33..bb12bbd3dc19 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1806,7 +1806,7 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData )
     const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
     rData.aLongDocName  = rURLObj.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
     if ( !rData.aLongDocName.isEmpty() )
-        rData.aShortDocName = rURLObj.GetName( INetURLObject::DecodeMechanism::Unambiguous );
+        rData.aShortDocName = rURLObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous);
     else
         rData.aShortDocName = rData.aLongDocName = rData.aTitle;
     rData.nPageNo       = 1;
diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx
index 1019d4daf255..c6ee37ddee2d 100644
--- a/sd/source/filter/eppt/pptexsoundcollection.cxx
+++ b/sd/source/filter/eppt/pptexsoundcollection.cxx
@@ -51,13 +51,13 @@ ExSoundEntry::ExSoundEntry(const OUString& rString)
 OUString ExSoundEntry::ImplGetName() const
 {
     INetURLObject aTmp( aSoundURL );
-    return aTmp.GetName();
+    return aTmp.GetLastName();
 }
 
 OUString ExSoundEntry::ImplGetExtension() const
 {
     INetURLObject aTmp( aSoundURL );
-    OUString aExtension( aTmp.GetExtension() );
+    OUString aExtension(aTmp.GetFileExtension());
     if ( !aExtension.isEmpty() )
     {
         aExtension = "." + aExtension;
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index a71561373925..27318d8ada61 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1913,7 +1913,7 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
                     {
                         INetURLObject   aURL( aSoundList[ n ] );
 
-                        if( aURL.GetName() == aRetval )
+                        if (aURL.GetLastName() == aRetval)
                         {
                             aRetval = aSoundList[ n ];
                             bSoundExists = true;
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index cddbe57ae500..85d84ddc699d 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -50,7 +50,7 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri
         m_sHelpText = aURLObj.GetURLNoPass();
 
     if (aTitle.isEmpty())
-        aTitle = aURLObj.GetName(INetURLObject::DecodeMechanism::WithCharset);
+        aTitle = aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
 
     BitmapEx aThumbnail(rThumbnail);
     //fdo#74834: only load thumbnail if the corresponding option is not disabled in the configuration
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index a84390fc8332..70669200b5a8 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -966,7 +966,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
 
     // determine name
     INetURLObject aURL(aFile);
-    OUString aName = aURL.GetName( INetURLObject::DecodeMechanism::WithCharset );
+    OUString aName = aURL.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
     if ( aName.isEmpty() || aURL.GetProtocol() == INetProtocol::PrivSoffice )
         aName = SfxResId( STR_NONAME );
     m_xNameED->set_label( aName );
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index dd6cde167da1..617ad549254d 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1270,7 +1270,8 @@ void FileDialogHelper_Impl::implInitializeFileName( )
             if ( bAutoExtChecked )
             {   // cut the extension
                 aObj.removeExtension( );
-                mxFileDlg->setDefaultName( aObj.GetName( INetURLObject::DecodeMechanism::WithCharset ) );
+                mxFileDlg->setDefaultName(
+                    aObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset));
             }
         }
     }
@@ -2564,7 +2565,7 @@ void FileDialogHelper::SetDisplayDirectory( const OUString& _rPath )
 
     INetURLObject aObj( _rPath );
 
-    OUString sFileName = aObj.GetName( INetURLObject::DecodeMechanism::WithCharset );
+    OUString sFileName = aObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
     aObj.removeSegment();
     OUString sPath = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
 
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 1cf87a410f30..afe18e916005 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -999,7 +999,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int16 nStoreMode,
     // get the path from the dialog
     INetURLObject aURL( pFileDlg->GetPath() );
     // the path should be provided outside since it might be used for further calls to the dialog
-    aSuggestedName = aURL.GetName( INetURLObject::DecodeMechanism::WithCharset );
+    aSuggestedName = aURL.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
     aSuggestedDir = pFileDlg->GetDisplayDirectory();
 
     // old filter options should be cleared in case different filter is used
@@ -1213,7 +1213,8 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
     if ( !aSuggestedName.isEmpty() )
         return aSuggestedName;
 
-    OUString aRecommendedName {INetURLObject( GetStorable()->getLocation() ).GetName( INetURLObject::DecodeMechanism::WithCharset )};
+    OUString aRecommendedName{ INetURLObject(GetStorable()->getLocation())
+                                   .GetLastName(INetURLObject::DecodeMechanism::WithCharset) };
     if ( aRecommendedName.isEmpty() )
     {
         try {
@@ -1237,7 +1238,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
             if ( !aExtension.isEmpty() )
                 aObj.SetExtension( aExtension );
 
-            aRecommendedName = aObj.GetName( INetURLObject::DecodeMechanism::WithCharset );
+            aRecommendedName = aObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
         }
     }
 
diff --git a/svl/qa/unit/lockfiles/test_lockfiles.cxx b/svl/qa/unit/lockfiles/test_lockfiles.cxx
index 076d699484bb..5d2661ca00be 100644
--- a/svl/qa/unit/lockfiles/test_lockfiles.cxx
+++ b/svl/qa/unit/lockfiles/test_lockfiles.cxx
@@ -90,7 +90,7 @@ OUString readLockFile(const OUString& aSource)
 OUString GetLockFileName(const svt::GenDocumentLockFile& rLockFile)
 {
     INetURLObject aDocURL = svt::LockFileCommon::ResolveLinks(INetURLObject(rLockFile.GetURL()));
-    return aDocURL.GetName();
+    return aDocURL.GetLastName();
 }
 
 OUString LockfileTest::generateTestURL(const OUString& sFileName) const
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx
index fbcd27215c32..9a3cb0c7abe0 100644
--- a/svl/source/misc/lockfilecommon.cxx
+++ b/svl/source/misc/lockfilecommon.cxx
@@ -72,7 +72,7 @@ void LockFileCommon::SetURL(const OUString& aURL)
 OUString LockFileCommon::GenerateOwnLockFileURL(const OUString& aOrigURL, const OUString& aPrefix)
 {
     INetURLObject aURL = ResolveLinks(INetURLObject(aOrigURL));
-    aURL.SetName(aPrefix + aURL.GetName() + "%23" /*'#'*/);
+    aURL.SetName(aPrefix + aURL.GetLastName() + "%23" /*'#'*/);
     return aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
 }
 
diff --git a/svl/source/misc/msodocumentlockfile.cxx b/svl/source/misc/msodocumentlockfile.cxx
index 3b57402b7166..cdb4ddd2264f 100644
--- a/svl/source/misc/msodocumentlockfile.cxx
+++ b/svl/source/misc/msodocumentlockfile.cxx
@@ -45,7 +45,7 @@ OUString GenerateMSOLockFileURL(const OUString& aOrigURL)
     INetURLObject aURL = LockFileCommon::ResolveLinks(INetURLObject(aOrigURL));
 
     // For text documents MSO Word cuts some of the first characters of the file name
-    OUString sFileName = aURL.GetName();
+    OUString sFileName = aURL.GetLastName();
     const OUString sExt = aURL.GetFileExtension();
 
     if (isWordFormat(sExt))
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index db7dd94fbdfa..3cf1bfab180b 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -656,7 +656,8 @@ void ViewTabListBox_Impl::DeleteEntries()
         if ( eResult != svtools::QUERYDELETE_ALL )
         {
             INetURLObject aObj( aURL );
-            svtools::QueryDeleteDlg_Impl aDlg(GetFrameWeld(), aObj.GetName(INetURLObject::DecodeMechanism::WithCharset));
+            svtools::QueryDeleteDlg_Impl aDlg(
+                GetFrameWeld(), aObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset));
 
             if ( GetSelectionCount() > 1 )
                 aDlg.EnableAllButton();
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index e3e2ed241e8a..3898057d36d9 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -199,12 +199,12 @@ OUString GraphicHelper::ExportGraphic(weld::Window* pParent, const Graphic& rGra
     aDialogHelper.SetDisplayDirectory( aPath.GetMainURL(INetURLObject::DecodeMechanism::ToIUri) );
     INetURLObject aURL;
     aURL.SetSmartURL( rGraphicName );
-    aDialogHelper.SetFileName( aURL.GetName() );
+    aDialogHelper.SetFileName(aURL.GetLastName());
 
     GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
     const sal_uInt16 nCount = rGraphicFilter.GetExportFormatCount();
 
-    OUString aExtension( aURL.GetExtension() );
+    OUString aExtension(aURL.GetFileExtension());
     if( aExtension.isEmpty() )
     {
         GetPreferredExtension( aExtension, rGraphic );
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index e3f80b010d25..02e1fa525e4f 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1224,7 +1224,7 @@ OUString GalleryBrowser2::GetFilterName() const
             GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
             INetURLObject       aURL;
             mpCurTheme->GetURL( mnCurActionPos, aURL );
-            sal_uInt16          nFilter = rFilter.GetImportFormatNumberForShortName( aURL.GetExtension() );
+            sal_uInt16 nFilter = rFilter.GetImportFormatNumberForShortName(aURL.GetFileExtension());
 
             if( GRFILTER_FORMAT_DONTKNOW != nFilter )
                 aFilterName = rFilter.GetImportFormatName( nFilter );
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 0356394449a6..79fd2a487d5f 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -376,7 +376,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO
                 {
                     INetURLObject aThmURL( xContentAccess->queryContentIdentifierString() );
 
-                    if(aThmURL.GetExtension().equalsIgnoreAsciiCase("thm"))
+                    if (aThmURL.GetFileExtension().equalsIgnoreAsciiCase("thm"))
                     {
                         INetURLObject   aSdgURL( aThmURL); aSdgURL.SetExtension( "sdg" );
                         INetURLObject   aSdvURL( aThmURL ); aSdvURL.SetExtension( "sdv" );
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 372961573e08..ed20a28de227 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -258,7 +258,7 @@ bool CreateDir( const INetURLObject& rURL )
             uno::Sequence< uno::Any >               aValues( 1 );
 
             aProps[0] = "Title";
-            aValues[0] <<= rURL.GetName();
+            aValues[0] <<= rURL.GetLastName();
 
             ::ucbhelper::Content aContent( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext() );
             bRet = aParent.insertNewContent( "application/vnd.sun.staroffice.fsys-folder", aProps, aValues, aContent );
@@ -287,7 +287,7 @@ bool CopyFile(  const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
 
         aDestPath.executeCommand( "transfer",
                                   uno::makeAny( ucb::TransferInfo( false, rSrcURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
-                                                rDstURL.GetName(), ucb::NameClash::OVERWRITE ) ) );
+                                                rDstURL.GetLastName(), ucb::NameClash::OVERWRITE ) ) );
         bRet = true;
     }
     catch( const ucb::ContentCreationException& )
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index ecb49437617d..93d2881820a8 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -207,7 +207,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, ClickImportBitmapHdl, Button*, void)
         {
             XBitmapListRef pList = SfxObjectShell::Current()->GetItem(SID_BITMAP_LIST)->GetBitmapList();
             INetURLObject   aURL( aDlg.GetPath() );
-            OUString aFileName =  aURL.GetName().getToken( 0, '.' );
+            OUString aFileName = aURL.GetLastName().getToken(0, '.');
             OUString aName = aFileName;
             long j = 1;
             bool bValidBitmapName = false;
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;
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index fd0cdc6a1bb9..3438fb7cd73e 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -167,7 +167,7 @@ std::vector<fontID> PrintFontManager::addFontFile( const OString& rFileName )
 {
     rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
     INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), FSysStyle::Detect );
-    OString aName( OUStringToOString( aPath.GetName( INetURLObject::DecodeMechanism::WithCharset, aEncoding ), aEncoding ) );
+    OString aName(OUStringToOString(aPath.GetLastName(INetURLObject::DecodeMechanism::WithCharset, aEncoding), aEncoding));
     OString aDir( OUStringToOString(
         INetURLObject::decode( aPath.GetPath(), INetURLObject::DecodeMechanism::WithCharset, aEncoding ), aEncoding ) );
 
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx
index 890e896d5fb9..1f3960a2dae4 100644
--- a/writerperfect/source/writer/exp/xmlimp.cxx
+++ b/writerperfect/source/writer/exp/xmlimp.cxx
@@ -97,7 +97,7 @@ OUString FindCoverImage(const OUString& rDocumentBaseURL, OUString& rMimeType,
     if (!aRet.isEmpty())
     {
         INetURLObject aRetURL(aRet);
-        rMimeType = GetMimeType(aRetURL.GetExtension());
+        rMimeType = GetMimeType(aRetURL.GetFileExtension());
         return aRet;
     }
 
@@ -429,7 +429,7 @@ PopupState XMLImport::FillPopupData(const OUString& rURL, librevenge::RVNGProper
     rPropList.insert("office:binary-data", aBinaryData);
 
     INetURLObject aAbsURL(aAbs);
-    OUString aMimeType = GetMimeType(aAbsURL.GetExtension());
+    OUString aMimeType = GetMimeType(aAbsURL.GetFileExtension());
     rPropList.insert("librevenge:mime-type", aMimeType.toUtf8().getStr());
 
     return PopupState::Consumed;


More information about the Libreoffice-commits mailing list