[Libreoffice-commits] core.git: starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Fri Mar 13 07:04:49 PDT 2015
starmath/source/accessibility.cxx | 24 +++++++++++-------------
starmath/source/smdetect.cxx | 4 +---
starmath/source/unomodel.cxx | 27 +++++++++++++++------------
3 files changed, 27 insertions(+), 28 deletions(-)
New commits:
commit e59015ef832178451ba2fca2fe7054fcf5090e9a
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Thu Mar 12 17:09:33 2015 +0900
Simplify code constructing uno::Sequence<OUString> by initializer_list
Change-Id: I17ef35da6feda65534bbb7d3cc9346d679613618
Reviewed-on: https://gerrit.libreoffice.org/14837
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 1604cee..6973dfd 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -788,13 +788,12 @@ sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
- Sequence< OUString > aNames(4);
- OUString *pNames = aNames.getArray();
- pNames[0] = "com::sun::star::accessibility::Accessible";
- pNames[1] = "com::sun::star::accessibility::AccessibleComponent";
- pNames[2] = "com::sun::star::accessibility::AccessibleContext";
- pNames[3] = "com::sun::star::accessibility::AccessibleText";
- return aNames;
+ return Sequence< OUString >{
+ "com::sun::star::accessibility::Accessible",
+ "com::sun::star::accessibility::AccessibleComponent",
+ "com::sun::star::accessibility::AccessibleContext",
+ "com::sun::star::accessibility::AccessibleText"
+ };
}
@@ -1925,12 +1924,11 @@ sal_Bool SAL_CALL SmEditAccessible::supportsService(
Sequence< OUString > SAL_CALL SmEditAccessible::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
- Sequence< OUString > aNames(3);
- OUString *pNames = aNames.getArray();
- pNames[0] = "com::sun::star::accessibility::Accessible";
- pNames[1] = "com::sun::star::accessibility::AccessibleComponent";
- pNames[2] = "com::sun::star::accessibility::AccessibleContext";
- return aNames;
+ return Sequence< OUString >{
+ "com::sun::star::accessibility::Accessible",
+ "com::sun::star::accessibility::AccessibleComponent",
+ "com::sun::star::accessibility::AccessibleContext"
+ };
}
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index 27982f9..03ca462 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -139,9 +139,7 @@ Sequence< OUString > SAL_CALL SmFilterDetect::getSupportedServiceNames() throw(
/* Helper for XServiceInfo */
Sequence< OUString > SmFilterDetect::impl_getStaticSupportedServiceNames()
{
- Sequence< OUString > seqServiceNames( 1 );
- seqServiceNames.getArray() [0] = "com.sun.star.frame.ExtendedTypeDetection";
- return seqServiceNames ;
+ return Sequence< OUString >{ "com.sun.star.frame.ExtendedTypeDetection" };
}
/* Helper for XServiceInfo */
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index f85e044..8e617e3 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -111,18 +111,21 @@ SmPrintUIOptions::SmPrintUIOptions()
m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("size", aLocalizedStrings.GetString(5), OUString());
// create a radio button group for print format (matches to SID_PRINTSIZE)
- Sequence< OUString > aChoices( 3 );
- aChoices[0] = aLocalizedStrings.GetString( 6 );
- aChoices[1] = aLocalizedStrings.GetString( 7 );
- aChoices[2] = aLocalizedStrings.GetString( 8 );
- Sequence< OUString > aHelpIds( 3 );
- aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0";
- aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1";
- aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2";
- Sequence< OUString > aWidgetIds( 3 );
- aWidgetIds[0] = "originalsize";
- aWidgetIds[1] = "fittopage";
- aWidgetIds[2] = "scaling";
+ Sequence< OUString > aChoices{
+ aLocalizedStrings.GetString( 6 ),
+ aLocalizedStrings.GetString( 7 ),
+ aLocalizedStrings.GetString( 8 )
+ };
+ Sequence< OUString > aHelpIds{
+ ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0",
+ ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1",
+ ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2"
+ };
+ Sequence< OUString > aWidgetIds{
+ "originalsize",
+ "fittopage",
+ "scaling"
+ };
OUString aPrintFormatProp( PRTUIOPT_PRINT_FORMAT );
m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
aHelpIds,
More information about the Libreoffice-commits
mailing list