summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-12 12:20:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-12 18:37:38 +0100
commita4d4286a6ae5ad7f57db4f34380ed170b92ced06 (patch)
tree3d354a2a00b2fea1003d08566f7e4ab003c4c954 /framework/source
parent16be302fededaf2cc6e82701bda6dcba6e3fa4d3 (diff)
introduce OUStringConstExpr
so we can declare compile-time constant arrays and structs containing OUStringLiteral Change-Id: I51fd743f2e461a36bb4a0a17c6ff107f86096895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 4fd152a6f03e..11385edd9b5c 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -85,12 +85,12 @@ namespace {
struct ToolboxStyleItem
{
sal_Int16 nBit;
- const char* attrName;
+ rtl::OUStringConstExpr attrName;
};
}
-const ToolboxStyleItem Styles[ ] = {
+constexpr ToolboxStyleItem Styles[ ] = {
{ css::ui::ItemStyle::RADIO_CHECK, ATTRIBUTE_ITEMSTYLE_RADIO },
{ css::ui::ItemStyle::ALIGN_LEFT, ATTRIBUTE_ITEMSTYLE_LEFT },
{ css::ui::ItemStyle::AUTO_SIZE, ATTRIBUTE_ITEMSTYLE_AUTO },
@@ -703,7 +703,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxItem(
{
if ( !aValue.isEmpty() )
aValue.append(" ");
- aValue.appendAscii( pStyle->attrName );
+ aValue.append( OUString(pStyle->attrName) );
}
}
pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_ITEMSTYLE,