Kaydet (Commit) b165f0f9 authored tarafından Matteo Casalin's avatar Matteo Casalin

Remove SfxObjectFactory::GetShortName()

Used in just two places, where GetFactoryName can also work.

Change-Id: I8d498345c41aef520ef776a3deb6744cc64756f5
Reviewed-on: https://gerrit.libreoffice.org/35374Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst a6209ba6
......@@ -53,7 +53,6 @@ public:
const SvGlobalName& GetClassId() const;
SfxObjectShellFlags GetFlags() { return nFlags; }
const char* GetShortName() const { return pShortName; }
OUString GetFactoryURL() const; // shortcut for "private:factory/GetShortName()"
OUString GetFactoryName() const { return OUString::createFromAscii(pShortName); }
OUString GetModuleName() const;
......
......@@ -344,7 +344,7 @@ OUString SfxObjectFactory::GetFactoryURL() const
{
OUStringBuffer aURLComposer;
aURLComposer.append("private:factory/");
aURLComposer.appendAscii(GetShortName());
aURLComposer.appendAscii(pShortName);
return aURLComposer.makeStringAndClear();
}
......
......@@ -2782,9 +2782,9 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
case SID_RECORDMACRO :
{
SvtMiscOptions aMiscOptions;
const char* pName = GetObjectShell()->GetFactory().GetShortName();
const OUString sName{GetObjectShell()->GetFactory().GetFactoryName()};
if ( !aMiscOptions.IsMacroRecorderMode() ||
( strcmp(pName,"swriter") && strcmp(pName,"scalc") ) )
( sName!="swriter" && sName!="scalc" ) )
{
rSet.DisableItem( nWhich );
rSet.Put(SfxVisibilityItem(nWhich, false));
......@@ -2808,9 +2808,9 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
case SID_STOP_RECORDING :
{
SvtMiscOptions aMiscOptions;
const char* pName = GetObjectShell()->GetFactory().GetShortName();
const OUString sName{GetObjectShell()->GetFactory().GetFactoryName()};
if ( !aMiscOptions.IsMacroRecorderMode() ||
( strcmp(pName,"swriter") && strcmp(pName,"scalc") ) )
( sName!="swriter" && sName!="scalc" ) )
{
rSet.DisableItem( nWhich );
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment