summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2017-03-16 21:21:25 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2017-03-17 20:13:42 +0000
commitb93a015f9bbed007a8800ef040ec2b6211d33858 (patch)
treeb171f4687669dc4e71062de99319348f470e9413 /sfx2
parentb224dadbca1c5a4906eb60b38bd60250a51d4730 (diff)
Use SfxObjectFactory::GetFactoryName/URL
instead of OUString::createFromAscii( GetShortName() ), in one case manually added to factory URL prefix. Change-Id: I762fc1bcd6dcf7246531816faad2682caf9133fb Reviewed-on: https://gerrit.libreoffice.org/35371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objserv.cxx5
-rw-r--r--sfx2/source/doc/objstor.cxx2
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
3 files changed, 4 insertions, 5 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 95048d118856..f354797da5a1 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -275,7 +275,7 @@ bool SfxObjectShell::APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItem
const SfxStringItem* pContentTypeItem = rItemSet.GetItem<SfxStringItem>(SID_CONTENTTYPE, false);
if ( pContentTypeItem )
{
- std::shared_ptr<const SfxFilter> pFilter = SfxFilterMatcher( OUString::createFromAscii(GetFactory().GetShortName()) ).GetFilter4Mime( pContentTypeItem->GetValue(), SfxFilterFlags::EXPORT );
+ std::shared_ptr<const SfxFilter> pFilter = SfxFilterMatcher( GetFactory().GetFactoryName() ).GetFilter4Mime( pContentTypeItem->GetValue(), SfxFilterFlags::EXPORT );
if ( pFilter )
aFilterName = pFilter->GetName();
}
@@ -457,8 +457,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
else
{
- aURL = "private:factory/" + OUString::createFromAscii( GetFactory().GetShortName() );
-
+ aURL = GetFactory().GetFactoryURL();
aTitle = GetTitle();
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 4f70a1db4068..420cb6ecd35c 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2588,7 +2588,7 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
OUString aFilterName;
std::shared_ptr<const SfxFilter> pFilter;
if ( pFilterItem )
- pFilter = SfxFilterMatcher( OUString::createFromAscii( GetFactory().GetShortName()) ).GetFilter4FilterName( aFilterName );
+ pFilter = SfxFilterMatcher( GetFactory().GetFactoryName() ).GetFilter4FilterName( aFilterName );
SfxMedium *pMed = new SfxMedium(
pSalvageItem->GetValue(), StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, pFilter );
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 5fbe65757128..56afe2fcb781 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -116,7 +116,7 @@ void SfxViewFrame::UpdateTitle()
{
const SfxObjectFactory &rFact = GetObjectShell()->GetFactory();
- m_pImpl->aFactoryName = OUString::createFromAscii(rFact.GetShortName());
+ m_pImpl->aFactoryName = rFact.GetFactoryName();
SfxObjectShell *pObjSh = GetObjectShell();
if ( !pObjSh )