Use OUStringLiteral
Change-Id: I76b83140222cfd7e313736936b2803997c43836d
This commit is contained in:
parent
fc51789ad0
commit
1ba76fa81e
@ -54,6 +54,7 @@
|
|||||||
#include "ViewShellBase.hxx"
|
#include "ViewShellBase.hxx"
|
||||||
#include <editeng/boxitem.hxx>
|
#include <editeng/boxitem.hxx>
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
using ::osl::MutexGuard;
|
using ::osl::MutexGuard;
|
||||||
@ -624,44 +625,40 @@ void SdStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
|
|||||||
{
|
{
|
||||||
static struct ApiNameMap
|
static struct ApiNameMap
|
||||||
{
|
{
|
||||||
const sal_Char* mpApiName;
|
OUStringLiteral mpApiName;
|
||||||
sal_uInt32 mnApiNameLength;
|
|
||||||
sal_uInt32 mnHelpId;
|
sal_uInt32 mnHelpId;
|
||||||
}
|
}
|
||||||
pApiNameMap[] =
|
const pApiNameMap[] =
|
||||||
{
|
{
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "title" ), HID_PSEUDOSHEET_TITLE },
|
{ "title", HID_PSEUDOSHEET_TITLE },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "subtitle" ), HID_PSEUDOSHEET_SUBTITLE },
|
{ "subtitle", HID_PSEUDOSHEET_SUBTITLE },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "background" ), HID_PSEUDOSHEET_BACKGROUND },
|
{ "background", HID_PSEUDOSHEET_BACKGROUND },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "backgroundobjects" ),HID_PSEUDOSHEET_BACKGROUNDOBJECTS },
|
{ "backgroundobjects",HID_PSEUDOSHEET_BACKGROUNDOBJECTS },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "notes" ), HID_PSEUDOSHEET_NOTES },
|
{ "notes", HID_PSEUDOSHEET_NOTES },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "standard" ), HID_STANDARD_STYLESHEET_NAME },
|
{ "standard", HID_STANDARD_STYLESHEET_NAME },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "objectwitharrow" ), HID_POOLSHEET_OBJWITHARROW },
|
{ "objectwitharrow", HID_POOLSHEET_OBJWITHARROW },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "objectwithshadow" ), HID_POOLSHEET_OBJWITHSHADOW },
|
{ "objectwithshadow", HID_POOLSHEET_OBJWITHSHADOW },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "objectwithoutfill" ),HID_POOLSHEET_OBJWITHOUTFILL },
|
{ "objectwithoutfill",HID_POOLSHEET_OBJWITHOUTFILL },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "text" ), HID_POOLSHEET_TEXT },
|
{ "text", HID_POOLSHEET_TEXT },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "textbody" ), HID_POOLSHEET_TEXTBODY },
|
{ "textbody", HID_POOLSHEET_TEXTBODY },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "textbodyjustfied" ), HID_POOLSHEET_TEXTBODY_JUSTIFY },
|
{ "textbodyjustfied", HID_POOLSHEET_TEXTBODY_JUSTIFY },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "textbodyindent" ), HID_POOLSHEET_TEXTBODY_INDENT },
|
{ "textbodyindent", HID_POOLSHEET_TEXTBODY_INDENT },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "title" ), HID_POOLSHEET_TITLE },
|
{ "title", HID_POOLSHEET_TITLE },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "title1" ), HID_POOLSHEET_TITLE1 },
|
{ "title1", HID_POOLSHEET_TITLE1 },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "title2" ), HID_POOLSHEET_TITLE2 },
|
{ "title2", HID_POOLSHEET_TITLE2 },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "headline" ), HID_POOLSHEET_HEADLINE },
|
{ "headline", HID_POOLSHEET_HEADLINE },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "headline1" ), HID_POOLSHEET_HEADLINE1 },
|
{ "headline1", HID_POOLSHEET_HEADLINE1 },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "headline2" ), HID_POOLSHEET_HEADLINE2 },
|
{ "headline2", HID_POOLSHEET_HEADLINE2 },
|
||||||
{ RTL_CONSTASCII_STRINGPARAM( "measure" ), HID_POOLSHEET_MEASURE },
|
{ "measure", HID_POOLSHEET_MEASURE }
|
||||||
{ nullptr, 0, 0 }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ApiNameMap* p = pApiNameMap;
|
for (std::size_t i = 0; i != SAL_N_ELEMENTS(pApiNameMap); ++i)
|
||||||
while( p->mpApiName )
|
|
||||||
{
|
{
|
||||||
if( nId == p->mnHelpId )
|
if( nId == pApiNameMap[i].mnHelpId )
|
||||||
{
|
{
|
||||||
msApiName = OUString( p->mpApiName, p->mnApiNameLength, RTL_TEXTENCODING_ASCII_US );
|
msApiName = pApiNameMap[i].mpApiName;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
p++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user