fix coverity parse errors

Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2021-01-08 19:54:55 +00:00
parent 0c20b68149
commit ac396f2f6b
194 changed files with 591 additions and 588 deletions

View File

@ -1209,11 +1209,11 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
void Shell::ManageToolbars()
{
static const OUStringLiteral aMacroBarResName = u"private:resource/toolbar/macrobar";
static const OUStringLiteral aDialogBarResName = u"private:resource/toolbar/dialogbar";
static const OUStringLiteral aInsertControlsBarResName
static constexpr OUStringLiteral aMacroBarResName = u"private:resource/toolbar/macrobar";
static constexpr OUStringLiteral aDialogBarResName = u"private:resource/toolbar/dialogbar";
static constexpr OUStringLiteral aInsertControlsBarResName
= u"private:resource/toolbar/insertcontrolsbar";
static const OUStringLiteral aFormControlsBarResName
static constexpr OUStringLiteral aFormControlsBarResName
= u"private:resource/toolbar/formcontrolsbar";
if( !pCurWin )

View File

@ -78,7 +78,7 @@ bool LocalizationMgr::isLibraryLocalized ()
void LocalizationMgr::handleTranslationbar ()
{
static const OUStringLiteral aToolBarResName = u"private:resource/toolbar/translationbar";
static constexpr OUStringLiteral aToolBarResName = u"private:resource/toolbar/translationbar";
Reference< beans::XPropertySet > xFrameProps
( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );

View File

@ -57,8 +57,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::io;
const OUStringLiteral aResourceResolverPropName = u"ResourceResolver";
const OUStringLiteral aDecorationPropName = u"Decoration";
constexpr OUStringLiteral aResourceResolverPropName = u"ResourceResolver";
constexpr OUStringLiteral aDecorationPropName = u"Decoration";
// DlgEdHint

View File

@ -141,7 +141,7 @@ void PropBrw::ImplReCreateController()
// create a property browser controller
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_SET_THROW );
static const OUStringLiteral s_sControllerServiceName = u"com.sun.star.awt.PropertyBrowserController";
static constexpr OUStringLiteral s_sControllerServiceName = u"com.sun.star.awt.PropertyBrowserController";
m_xBrowserController.set( xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY );
if ( !m_xBrowserController.is() )
{

View File

@ -116,7 +116,7 @@ public:
CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D",
utils::importFromSvgD( aPoly, aPath0, false, nullptr ));
aExport = utils::exportToSvgD( aPoly, true, true, false );
static const OUStringLiteral sExportString = u"m10 10h-20v-20h20z";
static constexpr OUStringLiteral sExportString = u"m10 10h-20v-20h20z";
CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting rectangle to SVG-D",
OUString(sExportString), aExport );
CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D (round-trip",
@ -143,7 +143,7 @@ public:
// so for correct unit test i add the new exported string here as sExportStringSimpleBezier
// and compare to it.
static const OUStringLiteral sExportStringSimpleBezier =
static constexpr OUStringLiteral sExportStringSimpleBezier =
u"m11430 0c-8890 3810 5715 6985 5715 6985"
"l-17145-1905c0 0 22860-10160 16510 6350"
"s-3810-11430-3810-11430z";
@ -164,7 +164,7 @@ public:
// same here, the corrected export with the corrected B2DPolygon is simply more efficient,
// so i needed to change the compare string. Also adding the re-import comparison below.
static const OUStringLiteral sExportString1 =
static constexpr OUStringLiteral sExportString1 =
u"m1917 1114c-89-189-233-284-430-284-167 0-306 91-419 273s-170 370-17"
"0 564c0 145 33 259 98 342 65 84 150 126 257 126q115.5 0 231-57s147-97 210-176 99-143 109-190c38-199 76-398 114"
"-598zm840 1646c-133 73-312 139-537 197-225 57-440 86-644 87-483-1-866-132-1150-392-284-261-426-619-426-1076 0-"
@ -187,7 +187,7 @@ public:
CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D",
utils::importFromSvgD( aPoly, aPath3, false, nullptr ));
aExport = utils::exportToSvgD( aPoly, true, true, false );
static const OUStringLiteral sExportString2 =
static constexpr OUStringLiteral sExportString2 =
u"m1598 125h306v2334h-306v-1105h-1293v1105h-305v-2334h305v973h1293"
"zm2159 1015 78-44 85 235-91 47-91 40-90 34-90 29-89 21-88 16-88 10-88 3-102-4-97"
"-12-91-19-85-26-40-16-39-18-38-20-36-22-34-24-33-26-32-27-30-30-29-31-27-33-25-3"
@ -220,7 +220,7 @@ public:
utils::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) ));
aExport = utils::exportToSvgD( B2DPolyPolygon(aRect), false, false, false );
static const OUStringLiteral sExportStringRect = u"M0 0H4000V4000H0Z";
static constexpr OUStringLiteral sExportStringRect = u"M0 0H4000V4000H0Z";
CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting to rectangle svg-d string",
OUString(sExportStringRect), aExport);
}

View File

@ -155,7 +155,7 @@ public:
aRandomIntersections.appendElement( aRandomRange, B2VectorOrientation::Negative );
}
#else
static const OUStringLiteral randomSvg=u"m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
static constexpr OUStringLiteral randomSvg=u"m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
B2DPolyPolygon randomPoly;
CPPUNIT_ASSERT(utils::importFromSvgD(randomPoly, randomSvg, false, nullptr));
for (auto const& aPolygon : randomPoly)

View File

@ -127,7 +127,7 @@ public:
{
utils::B2DClipState aMixedClip;
static const OUStringLiteral unionSvg=u"m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z";
static constexpr OUStringLiteral unionSvg=u"m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z";
B2DPolyPolygon aTmp1;
CPPUNIT_ASSERT(utils::importFromSvgD(aTmp1, unionSvg, false, nullptr));

View File

@ -84,12 +84,12 @@ typedef WeakImplHelper< script::XStarBasicAccess > StarBasicAccessHelper;
// Version 2
// + bool bReference
const OUStringLiteral szStdLibName = u"Standard";
const OUStringLiteral szBasicStorage = u"StarBASIC";
const OUStringLiteral szOldManagerStream = u"BasicManager";
const OUStringLiteral szManagerStream = u"BasicManager2";
const OUStringLiteral szImbedded = u"LIBIMBEDDED";
const OStringLiteral szCryptingKey = "CryptedBasic";
constexpr OUStringLiteral szStdLibName = u"Standard";
constexpr OUStringLiteral szBasicStorage = u"StarBASIC";
constexpr OUStringLiteral szOldManagerStream = u"BasicManager";
constexpr OUStringLiteral szManagerStream = u"BasicManager2";
constexpr OUStringLiteral szImbedded = u"LIBIMBEDDED";
constexpr OStringLiteral szCryptingKey = "CryptedBasic";
const StreamMode eStreamReadMode = StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL;

View File

@ -1786,7 +1786,7 @@ void removeDimAsNewRecoverItem( SbxVariable* pVar )
// saving object variable
// not-object variables will cause errors
const OUStringLiteral pCollectionStr = u"Collection";
constexpr OUStringLiteral pCollectionStr = u"Collection";
void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, bool bHandleDefaultProp )
{

View File

@ -342,8 +342,8 @@ SfxLibraryContainer* SfxDialogLibraryContainer::createInstanceImpl()
return new SfxDialogLibraryContainer();
}
const OUStringLiteral aResourceFileNameBase = u"DialogStrings";
const OUStringLiteral aResourceFileCommentBase = u"# Strings for Dialog Library ";
constexpr OUStringLiteral aResourceFileNameBase = u"DialogStrings";
constexpr OUStringLiteral aResourceFileCommentBase = u"# Strings for Dialog Library ";
// Resource handling
Reference< css::resource::XStringResourcePersistence >

View File

@ -60,7 +60,7 @@ WrappedScaleTextProperty::WrappedScaleTextProperty(const std::shared_ptr<Chart2M
void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
static const OUStringLiteral aRefSizeName = u"ReferencePageSize";
static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize";
if( !xInnerPropertySet.is() )
return;

View File

@ -48,7 +48,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
const OUStringLiteral lcl_aServiceName
constexpr OUStringLiteral lcl_aServiceName
= u"com.sun.star.comp.chart.ElementSelectorToolbarController";
}

View File

@ -31,7 +31,7 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace
{
const OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
}

View File

@ -31,7 +31,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
const OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME
constexpr OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME
= u"com.sun.star.chart2.CoordinateSystems.Polar";
}

View File

@ -42,7 +42,7 @@ using ::chart::impl::CachedDataSequence_Base;
namespace
{
const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
enum
{

View File

@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
const OUStringLiteral aSeriesPropName = u"Series";
constexpr OUStringLiteral aSeriesPropName = u"Series";
} // anonymous namespace

View File

@ -41,7 +41,7 @@ using namespace ::com::sun::star;
namespace
{
const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{

View File

@ -57,12 +57,12 @@ namespace chart
namespace
{
const OUStringLiteral lcl_aCategoriesRangeName = u"categories";
constexpr OUStringLiteral lcl_aCategoriesRangeName = u"categories";
const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level
const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point
const OUStringLiteral lcl_aCategoriesRoleName = u"categories";
constexpr OUStringLiteral lcl_aCategoriesRoleName = u"categories";
const char lcl_aLabelRangePrefix[] = "label ";
const OUStringLiteral lcl_aCompleteRange = u"all";
constexpr OUStringLiteral lcl_aCompleteRange = u"all";
typedef std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
lcl_tSequenceMap;

View File

@ -131,7 +131,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet(
if( ! xProp.is())
return;
static const OUStringLiteral aRefSizeName = u"ReferencePageSize";
static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize";
try
{

View File

@ -27,10 +27,10 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace
{
const OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling";
const OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling";
const OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling";
const OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling";
constexpr OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling";
constexpr OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling";
constexpr OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling";
constexpr OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling";
}

View File

@ -41,7 +41,7 @@ using ::chart::impl::UncachedDataSequence_Base;
namespace
{
const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence";
constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence";
enum
{

View File

@ -25,8 +25,8 @@
namespace
{
const OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling";
const OUStringLiteral lcl_aServiceName_InverseDateScaling
constexpr OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling";
constexpr OUStringLiteral lcl_aServiceName_InverseDateScaling
= u"com.sun.star.chart2.InverseDateScaling";
const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic

View File

@ -24,7 +24,7 @@
namespace comphelper{
const OUStringLiteral ERRMSG_INVALID_COMPONENT_PARAM = u"NULL as component reference not allowed.";
constexpr OUStringLiteral ERRMSG_INVALID_COMPONENT_PARAM = u"NULL as component reference not allowed.";
NumberedCollection::NumberedCollection()

View File

@ -35,7 +35,7 @@ namespace dbtools
using namespace css::sdbc;
using namespace css::lang;
const OUStringLiteral ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection";
constexpr OUStringLiteral ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection";
OAutoConnectionDisposer::OAutoConnectionDisposer(const Reference< XRowSet >& _rxRowSet, const Reference< XConnection >& _rxConnection)
:m_xRowSet( _rxRowSet )

View File

@ -917,7 +917,7 @@ Reference< XNumberFormatsSupplier> getNumberFormats(
// ask the parent of the connection (should be a DatabaseAccess)
Reference< XNumberFormatsSupplier> xReturn;
Reference< XChild> xConnAsChild(_rxConn, UNO_QUERY);
static const OUStringLiteral sPropFormatsSupplier( u"NumberFormatsSupplier" );
static constexpr OUStringLiteral sPropFormatsSupplier( u"NumberFormatsSupplier" );
if (xConnAsChild.is())
{
Reference< XPropertySet> xConnParentProps(xConnAsChild->getParent(), UNO_QUERY);
@ -952,20 +952,20 @@ try
Property* pNewProps = aNewProperties.getArray();
static const OUStringLiteral sPropFormatsSupplier(u"FormatsSupplier");
static const OUStringLiteral sPropCurrencySymbol(u"CurrencySymbol");
static const OUStringLiteral sPropDecimals(u"Decimals");
static const OUStringLiteral sPropEffectiveMin(u"EffectiveMin");
static const OUStringLiteral sPropEffectiveMax(u"EffectiveMax");
static const OUStringLiteral sPropEffectiveDefault(u"EffectiveDefault");
static const OUStringLiteral sPropDefaultText(u"DefaultText");
static const OUStringLiteral sPropDefaultDate(u"DefaultDate");
static const OUStringLiteral sPropDefaultTime(u"DefaultTime");
static const OUStringLiteral sPropValueMin(u"ValueMin");
static const OUStringLiteral sPropValueMax(u"ValueMax");
static const OUStringLiteral sPropDecimalAccuracy(u"DecimalAccuracy");
static const OUStringLiteral sPropClassId(u"ClassId");
static const OUStringLiteral sFormattedServiceName( u"com.sun.star.form.component.FormattedField" );
static constexpr OUStringLiteral sPropFormatsSupplier(u"FormatsSupplier");
static constexpr OUStringLiteral sPropCurrencySymbol(u"CurrencySymbol");
static constexpr OUStringLiteral sPropDecimals(u"Decimals");
static constexpr OUStringLiteral sPropEffectiveMin(u"EffectiveMin");
static constexpr OUStringLiteral sPropEffectiveMax(u"EffectiveMax");
static constexpr OUStringLiteral sPropEffectiveDefault(u"EffectiveDefault");
static constexpr OUStringLiteral sPropDefaultText(u"DefaultText");
static constexpr OUStringLiteral sPropDefaultDate(u"DefaultDate");
static constexpr OUStringLiteral sPropDefaultTime(u"DefaultTime");
static constexpr OUStringLiteral sPropValueMin(u"ValueMin");
static constexpr OUStringLiteral sPropValueMax(u"ValueMax");
static constexpr OUStringLiteral sPropDecimalAccuracy(u"DecimalAccuracy");
static constexpr OUStringLiteral sPropClassId(u"ClassId");
static constexpr OUStringLiteral sFormattedServiceName( u"com.sun.star.form.component.FormattedField" );
for (const Property& rOldProp : aOldProperties)
{

View File

@ -1014,7 +1014,7 @@ bool isAggregateColumn( const Reference< XPropertySet > &_xColumn )
{
bool bAgg(false);
static const OUStringLiteral sAgg = u"AggregateFunction";
static constexpr OUStringLiteral sAgg = u"AggregateFunction";
if ( _xColumn->getPropertySetInfo()->hasPropertyByName(sAgg) )
_xColumn->getPropertyValue(sAgg) >>= bAgg;

View File

@ -41,7 +41,7 @@ void SAL_CALL OPoolTimer::onShot()
m_pPool->invalidatePooledConnections();
}
const OUStringLiteral TIMEOUT_NODENAME = u"Timeout";
constexpr OUStringLiteral TIMEOUT_NODENAME = u"Timeout";
OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver,
const Reference< XInterface >& _xDriverNode,

View File

@ -40,7 +40,7 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData()
void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns)
{
static const OUStringLiteral aName = u"Name";
static constexpr OUStringLiteral aName = u"Name";
for (const auto& rxColumn : *xColumns)
{

View File

@ -165,7 +165,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
// check if any type is given
// when no types are given then we have to return all tables e.g. TABLE
static const OUStringLiteral aTable = u"TABLE";
static constexpr OUStringLiteral aTable = u"TABLE";
bool bTableFound = true;
sal_Int32 nLength = types.getLength();

View File

@ -45,11 +45,11 @@ using namespace connectivity::firebird;
// Static const variables
namespace {
const OUStringLiteral our_sFirebirdTmpVar = u"FIREBIRD_TMP";
const OUStringLiteral our_sFirebirdLockVar = u"FIREBIRD_LOCK";
const OUStringLiteral our_sFirebirdMsgVar = u"FIREBIRD_MSG";
constexpr OUStringLiteral our_sFirebirdTmpVar = u"FIREBIRD_TMP";
constexpr OUStringLiteral our_sFirebirdLockVar = u"FIREBIRD_LOCK";
constexpr OUStringLiteral our_sFirebirdMsgVar = u"FIREBIRD_MSG";
#ifdef MACOSX
const OUStringLiteral our_sFirebirdLibVar = u"LIBREOFFICE_FIREBIRD_LIB";
constexpr OUStringLiteral our_sFirebirdLibVar = u"LIBREOFFICE_FIREBIRD_LIB";
#endif
};

View File

@ -699,7 +699,7 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas
OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString& _sDriverClass)
{
static const OUStringLiteral s_sNodeName
static constexpr OUStringLiteral s_sNodeName
= u"org.openoffice.Office.DataAccess/JDBC/DriverClassPaths";
::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
m_pDriver->getContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);

View File

@ -739,7 +739,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( )
static ODatabaseMetaDataResultSet::ORows aRows = [&]
{
static const OUStringLiteral aTable = u"TABLE";
static constexpr OUStringLiteral aTable = u"TABLE";
ODatabaseMetaDataResultSet::ORows tmp;
ODatabaseMetaDataResultSet::ORow aRow(2);
aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
@ -925,7 +925,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables(
// check whether we have tables in the requested types
// for the moment, we answer only the "TABLE" table type
// when no types are given at all, we return all the tables
static const OUStringLiteral aTable = u"TABLE";
static constexpr OUStringLiteral aTable = u"TABLE";
bool bTableFound = false;
const OUString* p = types.getConstArray(),
* pEnd = p + types.getLength();

View File

@ -43,7 +43,7 @@ MacabResultSetMetaData::~MacabResultSetMetaData()
void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns)
{
static const OUStringLiteral aName = u"Name";
static constexpr OUStringLiteral aName = u"Name";
MacabRecords *aRecords;
MacabHeader *aHeader;

View File

@ -1090,9 +1090,9 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(bool _bRowVer,const Any& cat
// E.g. psqlodbc up to at least version 09.01.0100 segfaults
if (table.empty())
{
static const OUStringLiteral errMsg
static constexpr OUStringLiteral errMsg
= u"ODBC: Trying to get special columns of empty table name";
static const OUStringLiteral SQLState = u"HY009";
static constexpr OUStringLiteral SQLState = u"HY009";
throw SQLException( errMsg, *this, SQLState, -1, Any() );
}

View File

@ -264,7 +264,7 @@ namespace
{
OUString sComposedName;
static const OUStringLiteral s_sWildcard = u"%" ;
static constexpr OUStringLiteral s_sWildcard = u"%" ;
// we want all catalogues, all schemas, all tables
Sequence< OUString > sTableTypes(3);

View File

@ -65,9 +65,9 @@
using namespace css;
const OUStringLiteral FOLDERNAME_UICONFIG = u"Configurations2";
constexpr OUStringLiteral FOLDERNAME_UICONFIG = u"Configurations2";
const OUStringLiteral MEDIATYPE_PROPNAME = u"MediaType";
constexpr OUStringLiteral MEDIATYPE_PROPNAME = u"MediaType";
const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
KEY_F2,

View File

@ -74,7 +74,7 @@ const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
const char CMDURL_SPART_ONLY [] = "Style:string=";
const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
const OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
constexpr OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
OUString SfxStylesInfo_Impl::generateCommand(
std::u16string_view sFamily, std::u16string_view sStyle)

View File

@ -709,7 +709,7 @@ void TPGalleryThemeProperties::FillFilterList()
#if HAVE_FEATURE_AVMEDIA
// media filters
static const OUStringLiteral aWildcard = u"*.";
static constexpr OUStringLiteral aWildcard = u"*.";
::avmedia::FilterNameVector aFilters= ::avmedia::MediaWindow::getMediaFilters();
for(const std::pair<OUString,OUString> & aFilter : aFilters)

View File

@ -43,18 +43,18 @@
#define notebookbarTabScope "notebookbarTabScope"
const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
inline const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
inline constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
const char ITEM_DESCRIPTOR_LABEL[] = "Label";
const char ITEM_DESCRIPTOR_TYPE[] = "Type";
const char ITEM_DESCRIPTOR_STYLE[] = "Style";
const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
const char ITEM_DESCRIPTOR_RESOURCEURL[] = "ResourceURL";
inline const OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
inline constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
inline const OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
inline constexpr OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
constexpr char16_t ITEM_TOOLBAR_URL[] = u"private:resource/toolbar/";
inline const OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
const char aMenuSeparatorStr[] = " | ";

View File

@ -43,8 +43,8 @@ using namespace com::sun::star::i18n;
using namespace com::sun::star::frame;
using namespace com::sun::star::beans;
const OUStringLiteral cIsKernAsianPunctuation = u"IsKernAsianPunctuation";
const OUStringLiteral cCharacterCompressionType = u"CharacterCompressionType";
constexpr OUStringLiteral cIsKernAsianPunctuation = u"IsKernAsianPunctuation";
constexpr OUStringLiteral cCharacterCompressionType = u"CharacterCompressionType";
namespace {

View File

@ -1019,11 +1019,11 @@ struct LanguageConfig_Impl
static bool bLanguageCurrentDoc_Impl = false;
// some things we'll need...
const OUStringLiteral sAccessSrvc = u"com.sun.star.configuration.ConfigurationAccess";
const OUStringLiteral sAccessUpdSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
const OUStringLiteral sInstalledLocalesPath = u"org.openoffice.Setup/Office/InstalledLocales";
const OUStringLiteral sUserLocalePath = u"org.openoffice.Office.Linguistic/General";
const OUStringLiteral sUserLocaleKey = u"UILocale";
constexpr OUStringLiteral sAccessSrvc = u"com.sun.star.configuration.ConfigurationAccess";
constexpr OUStringLiteral sAccessUpdSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
constexpr OUStringLiteral sInstalledLocalesPath = u"org.openoffice.Setup/Office/InstalledLocales";
constexpr OUStringLiteral sUserLocalePath = u"org.openoffice.Office.Linguistic/General";
constexpr OUStringLiteral sUserLocaleKey = u"UILocale";
static Sequence< OUString > seqInstalledLanguages;
static OUString lcl_getDatePatternsConfigString( const LocaleDataWrapper& rLocaleWrapper )

View File

@ -93,14 +93,14 @@ IMPL_LINK(SvxProxyTabPage, PortChangedHdl, weld::Entry&, rEdit, void)
}
}
const OUStringLiteral g_aProxyModePN = u"ooInetProxyType";
const OUStringLiteral g_aHttpProxyPN = u"ooInetHTTPProxyName";
const OUStringLiteral g_aHttpPortPN = u"ooInetHTTPProxyPort";
const OUStringLiteral g_aHttpsProxyPN = u"ooInetHTTPSProxyName";
const OUStringLiteral g_aHttpsPortPN = u"ooInetHTTPSProxyPort";
const OUStringLiteral g_aFtpProxyPN = u"ooInetFTPProxyName";
const OUStringLiteral g_aFtpPortPN = u"ooInetFTPProxyPort";
const OUStringLiteral g_aNoProxyDescPN = u"ooInetNoProxy";
constexpr OUStringLiteral g_aProxyModePN = u"ooInetProxyType";
constexpr OUStringLiteral g_aHttpProxyPN = u"ooInetHTTPProxyName";
constexpr OUStringLiteral g_aHttpPortPN = u"ooInetHTTPProxyPort";
constexpr OUStringLiteral g_aHttpsProxyPN = u"ooInetHTTPSProxyName";
constexpr OUStringLiteral g_aHttpsPortPN = u"ooInetHTTPSProxyPort";
constexpr OUStringLiteral g_aFtpProxyPN = u"ooInetFTPProxyName";
constexpr OUStringLiteral g_aFtpPortPN = u"ooInetFTPProxyPort";
constexpr OUStringLiteral g_aNoProxyDescPN = u"ooInetNoProxy";
IMPL_STATIC_LINK(SvxProxyTabPage, NumberOnlyTextFilterHdl, OUString&, rTest, bool)
{

View File

@ -343,7 +343,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
}
}
static const OUStringLiteral sAll = u"%";
static constexpr OUStringLiteral sAll = u"%";
Reference< XResultSet > xTables = m_xMetaData->getTables( Any(), sAll, sAll, aTableTypeFilter );
Reference< XRow > xCurrentRow( xTables, UNO_QUERY_THROW );

View File

@ -311,7 +311,7 @@ namespace
}
}
const OUStringLiteral sPictures = u"Pictures";
constexpr OUStringLiteral sPictures = u"Pictures";
// base documents seem to have a different behaviour to other documents, the
// root storage contents at least seem to be re-used over different saves, thus if there is a

View File

@ -266,7 +266,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL DatabaseDataProvider::cre
osl::MutexGuard g(m_aMutex);
uno::Reference< chart2::data::XDataSequence > xData = m_xInternal->createDataSequenceByRangeRepresentation(_sRangeRepresentation);
uno::Reference<beans::XPropertySet> xProp(xData,uno::UNO_QUERY);
static const OUStringLiteral s_sNumberFormatKey = u"NumberFormatKey";
static constexpr OUStringLiteral s_sNumberFormatKey = u"NumberFormatKey";
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(s_sNumberFormatKey) )
{
xProp->setPropertyValue(s_sNumberFormatKey,impl_getNumberFormatKey_nothrow(_sRangeRepresentation));

View File

@ -86,9 +86,9 @@ namespace dbaccess
return true;
}
const OUStringLiteral sRecoveryDataSubStorageName = u"recovery";
constexpr OUStringLiteral sRecoveryDataSubStorageName = u"recovery";
const OUStringLiteral sObjectMapStreamName = u"storage-component-map.ini";
constexpr OUStringLiteral sObjectMapStreamName = u"storage-component-map.ini";
void lcl_writeObjectMap_throw( const Reference<XComponentContext> & i_rContext, const Reference< XStorage >& i_rStorage,
const MapStringToCompDesc& i_mapStorageToCompDesc )

View File

@ -36,7 +36,7 @@ namespace dbaccess
Reference< XTextOutputStream2 > xTextOutput;
};
const OUStringLiteral sLineFeed = u"\n";
constexpr OUStringLiteral sLineFeed = u"\n";
// StorageTextOutputStream
StorageTextOutputStream::StorageTextOutputStream( const Reference<XComponentContext>& i_rContext,

View File

@ -160,8 +160,8 @@ namespace dbaccess
return xCommandProcessor;
}
const OUStringLiteral sSettingsStreamName = u"settings.xml";
const OUStringLiteral sCurrentQueryDesignName = u"ooo:current-query-design";
constexpr OUStringLiteral sSettingsStreamName = u"settings.xml";
constexpr OUStringLiteral sCurrentQueryDesignName = u"ooo:current-query-design";
}
namespace {

View File

@ -674,7 +674,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = xEnumAccess.is();
if ( aReturn.bEnabled )
{
static const OUStringLiteral s_sReportDesign = u"org.libreoffice.report.pentaho.SOReportJobFactory";
static constexpr OUStringLiteral s_sReportDesign = u"org.libreoffice.report.pentaho.SOReportJobFactory";
Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(s_sReportDesign);
aReturn.bEnabled = xEnumDrivers.is() && xEnumDrivers->hasMoreElements();
}

View File

@ -639,7 +639,7 @@ void OApplicationController::onLoadedMenu(const Reference< css::frame::XLayoutMa
if ( !_xLayoutManager.is() )
return;
static const OUStringLiteral s_sStatusbar = u"private:resource/statusbar/statusbar";
static constexpr OUStringLiteral s_sStatusbar = u"private:resource/statusbar/statusbar";
_xLayoutManager->createElement( s_sStatusbar );
_xLayoutManager->requestElement( s_sStatusbar );

View File

@ -304,10 +304,10 @@ bool DlgFilterCrit::getCondition(const weld::ComboBox& _rField,const weld::Combo
}
}
xColumn->getPropertyValue(PROPERTY_REALNAME) >>= _rFilter.Name;
static const OUStringLiteral sAgg = u"AggregateFunction";
static constexpr OUStringLiteral sAgg = u"AggregateFunction";
if ( xInfo->hasPropertyByName(sAgg) )
xColumn->getPropertyValue(sAgg) >>= bHaving;
static const OUStringLiteral sFunction = u"Function";
static constexpr OUStringLiteral sFunction = u"Function";
if ( xInfo->hasPropertyByName(sFunction) )
xColumn->getPropertyValue(sFunction) >>= bFunction;
}

View File

@ -122,7 +122,7 @@ namespace dbaui
}
// set the properties
static const OUStringLiteral s_sNamePropertyName = u"Name";
static constexpr OUStringLiteral s_sNamePropertyName = u"Name";
// the index' own props
xIndexDescriptor->setPropertyValue("IsUnique", css::uno::makeAny(_rPos->bUnique));
xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName));

View File

@ -149,8 +149,8 @@ namespace
return;
xLayoutManager->lock();
static const OUStringLiteral s_sDesignToolbar = u"private:resource/toolbar/designobjectbar";
static const OUStringLiteral s_sSqlToolbar = u"private:resource/toolbar/sqlobjectbar";
static constexpr OUStringLiteral s_sDesignToolbar = u"private:resource/toolbar/designobjectbar";
static constexpr OUStringLiteral s_sSqlToolbar = u"private:resource/toolbar/sqlobjectbar";
if ( _bDesign )
{
xLayoutManager->destroyElement( s_sSqlToolbar );

View File

@ -561,7 +561,7 @@ bool Desktop::QueryExit()
{
}
static const OUStringLiteral SUSPEND_QUICKSTARTVETO = u"SuspendQuickstartVeto";
static constexpr OUStringLiteral SUSPEND_QUICKSTARTVETO = u"SuspendQuickstartVeto";
Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
Reference< XPropertySet > xPropertySet(xDesktop, UNO_QUERY_THROW);
@ -873,7 +873,7 @@ namespace {
#if HAVE_FEATURE_BREAKPAD
void handleCrashReport()
{
static const OUStringLiteral SERVICENAME_CRASHREPORT = u"com.sun.star.comp.svx.CrashReportUI";
static constexpr OUStringLiteral SERVICENAME_CRASHREPORT = u"com.sun.star.comp.svx.CrashReportUI";
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();

View File

@ -207,7 +207,7 @@ void SilentCommandEnv::pop()
} // end namespace
const OUStringLiteral aAccessSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
constexpr OUStringLiteral aAccessSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
static sal_Int16 impl_showExtensionDialog( uno::Reference< uno::XComponentContext > const &xContext )
{

View File

@ -35,10 +35,10 @@
namespace desktop
{
const OUStringLiteral aCmdLineHelp_version =
constexpr OUStringLiteral aCmdLineHelp_version =
u"%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION %BUILDID\n"
"\n";
const OUStringLiteral aCmdLineHelp =
constexpr OUStringLiteral aCmdLineHelp =
u"Usage: %CMDNAME [argument...]\n"
" argument - switches, switch parameters and document URIs (filenames). \n\n"
"Using without special arguments: \n"

View File

@ -69,9 +69,9 @@ using namespace com::sun::star;
namespace desktop
{
const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
static OUString mapModuleShortNameToIdentifier(std::u16string_view sShortName)
{

View File

@ -95,9 +95,9 @@ namespace o3tl {
}
const sal_Unicode cNonBreakingSpace = 0xA0; // UNICODE code for no break space
const OUStringLiteral pXMLImplWrdStt_ExcptLstStr = u"WordExceptList.xml";
const OUStringLiteral pXMLImplCplStt_ExcptLstStr = u"SentenceExceptList.xml";
const OUStringLiteral pXMLImplAutocorr_ListStr = u"DocumentList.xml";
constexpr OUStringLiteral pXMLImplWrdStt_ExcptLstStr = u"WordExceptList.xml";
constexpr OUStringLiteral pXMLImplCplStt_ExcptLstStr = u"SentenceExceptList.xml";
constexpr OUStringLiteral pXMLImplAutocorr_ListStr = u"DocumentList.xml";
const char
/* also at these beginnings - Brackets and all kinds of begin characters */

View File

@ -62,7 +62,7 @@ namespace abp
{
// the service name of the administration dialog
static const char16_t s_sAdministrationServiceName[] = u"com.sun.star.sdb.DatasourceAdministrationDialog";
static const OUStringLiteral s_sDataSourceTypeChangeDialog = u"com.sun.star.sdb.DataSourceTypeChangeDialog";
static constexpr OUStringLiteral s_sDataSourceTypeChangeDialog = u"com.sun.star.sdb.DataSourceTypeChangeDialog";
// the parameters for the call
Sequence<Any> aArguments(comphelper::InitAnyPropertySequence(

View File

@ -50,7 +50,7 @@ namespace abp
const char16_t sDriverSettingsNodeName[] = u"/org.openoffice.Office.DataAccess/DriverSettings/com.sun.star.comp.sdbc.MozabDriver";
const OUStringLiteral sAddressBookNodeName = u"/org.openoffice.Office.DataAccess/AddressBook";
constexpr OUStringLiteral sAddressBookNodeName = u"/org.openoffice.Office.DataAccess/AddressBook";
namespace fieldmapping
{

View File

@ -93,8 +93,8 @@ namespace dbp
if (!xColumnFactory.is() || !xColumnContainer.is())
return;
static const OUStringLiteral s_sMouseWheelBehavior = u"MouseWheelBehavior";
static const OUStringLiteral s_sEmptyString = u"";
static constexpr OUStringLiteral s_sMouseWheelBehavior = u"MouseWheelBehavior";
static constexpr OUStringLiteral s_sEmptyString = u"";
// collect "descriptors" for the to-be-created (grid)columns
std::vector< OUString > aColumnServiceNames; // service names to be used with the XGridColumnFactory

View File

@ -189,7 +189,7 @@ namespace dbp
void OOptionGroupLayouter::implAnchorShape(const Reference< XPropertySet >& _rxShapeProps)
{
static const OUStringLiteral s_sAnchorPropertyName = u"AnchorType";
static constexpr OUStringLiteral s_sAnchorPropertyName = u"AnchorType";
Reference< XPropertySetInfo > xPropertyInfo;
if (_rxShapeProps.is())
xPropertyInfo = _rxShapeProps->getPropertySetInfo();

View File

@ -94,13 +94,13 @@ const char aOOOAttrBackgroundVisibility[] = NSPREFIX "background-visibility";
const char aOOOAttrMasterObjectsVisibility[] = NSPREFIX "master-objects-visibility";
const char aOOOAttrSlideDuration[] = NSPREFIX "slide-duration";
const OUString aOOOAttrDateTimeField = NSPREFIX "date-time-field";
const OUStringLiteral aOOOAttrFooterField = u"" NSPREFIX "footer-field";
constexpr OUStringLiteral aOOOAttrFooterField = u"" NSPREFIX "footer-field";
const char aOOOAttrHasTransition[] = NSPREFIX "has-transition";
// ooo xml attributes for pages and shapes
const char aOOOAttrName[] = NSPREFIX "name";
const OUStringLiteral constSvgNamespace = u"http://www.w3.org/2000/svg";
constexpr OUStringLiteral constSvgNamespace = u"http://www.w3.org/2000/svg";
/** Text Field Class Hierarchy

View File

@ -63,8 +63,8 @@ using namespace ::com::sun::star;
namespace
{
const OUStringLiteral constFilterNameDraw = u"svg_Scalable_Vector_Graphics_Draw";
const OUStringLiteral constFilterName = u"svg_Scalable_Vector_Graphics";
constexpr OUStringLiteral constFilterNameDraw = u"svg_Scalable_Vector_Graphics_Draw";
constexpr OUStringLiteral constFilterName = u"svg_Scalable_Vector_Graphics";
}
SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :

View File

@ -1943,7 +1943,7 @@ void ODatabaseForm::reset_impl(bool _bApproveByListeners)
if ( xColProps.is() )
xPSI = xColProps->getPropertySetInfo( );
static const OUStringLiteral PROPERTY_CONTROLDEFAULT = u"ControlDefault";
static constexpr OUStringLiteral PROPERTY_CONTROLDEFAULT = u"ControlDefault";
if ( xPSI.is() && xPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) )
{
Any aDefault = xColProps->getPropertyValue( PROPERTY_CONTROLDEFAULT );

View File

@ -649,7 +649,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats();
OUString sFormatDescription;
LanguageType eFormatLanguage = LANGUAGE_DONTKNOW;
static const OUStringLiteral s_aLocaleProp = u"Locale";
static constexpr OUStringLiteral s_aLocaleProp = u"Locale";
Reference<css::beans::XPropertySet> xFormat = xFormats->getByKey(nKey);
if (hasProperty(s_aLocaleProp, xFormat))
{
@ -660,7 +660,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false);
}
}
static const OUStringLiteral s_aFormatStringProp = u"FormatString";
static constexpr OUStringLiteral s_aFormatStringProp = u"FormatString";
if (hasProperty(s_aFormatStringProp, xFormat))
xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription;
_rxOutStream->writeUTF(sFormatDescription);

View File

@ -21,38 +21,39 @@
#define INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
/// [XFrame] if it's set, it will be used as parent frame for the new created frame.
const OUStringLiteral ARGUMENT_PARENTFRAME = u"ParentFrame"; // XFrame
constexpr OUStringLiteral ARGUMENT_PARENTFRAME = u"ParentFrame"; // XFrame
/** [OUString] if it's not a special name (beginning with "_" ... which are not allowed here!)
it will be set as the API name of the new created frame.
*/
const OUStringLiteral ARGUMENT_FRAMENAME = u"FrameName"; // OUString
constexpr OUStringLiteral ARGUMENT_FRAMENAME = u"FrameName"; // OUString
/// [sal_Bool] If it's set to sal_True we will make the new created frame visible.
const OUStringLiteral ARGUMENT_MAKEVISIBLE = u"MakeVisible"; // sal_Bool
constexpr OUStringLiteral ARGUMENT_MAKEVISIBLE = u"MakeVisible"; // sal_Bool
/** [sal_Bool] If not "ContainerWindow" property is set it force creation of a
top level window as new container window.
*/
const OUStringLiteral ARGUMENT_CREATETOPWINDOW = u"CreateTopWindow"; // sal_Bool
constexpr OUStringLiteral ARGUMENT_CREATETOPWINDOW = u"CreateTopWindow"; // sal_Bool
/// [Rectangle] Place the new created frame on this place and resize the container window.
inline const OUStringLiteral ARGUMENT_POSSIZE = u"PosSize"; // Rectangle
inline constexpr OUStringLiteral ARGUMENT_POSSIZE = u"PosSize"; // Rectangle
/// [XWindow] an outside created window, used as container window of the new created frame.
inline const OUStringLiteral ARGUMENT_CONTAINERWINDOW = u"ContainerWindow"; // XWindow
inline constexpr OUStringLiteral ARGUMENT_CONTAINERWINDOW = u"ContainerWindow"; // XWindow
/** [sal_Bool] enable/disable special mode, where this frame will be part of
the persistent window state feature suitable for any office module window
*/
const OUStringLiteral ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE
constexpr OUStringLiteral ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE
= u"SupportPersistentWindowState"; // sal_Bool
/** [sal_Bool] enable/disable special mode, where the title bar of our
the new created frame will be updated automatically.
Default = ON !
*/
inline const OUStringLiteral ARGUMENT_ENABLE_TITLEBARUPDATE = u"EnableTitleBarUpdate"; // sal_Bool
inline constexpr OUStringLiteral ARGUMENT_ENABLE_TITLEBARUPDATE
= u"EnableTitleBarUpdate"; // sal_Bool
#endif // INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX

View File

@ -57,8 +57,8 @@
namespace framework
{
const OUStringLiteral CFG_ENTRY_SECONDARY = u"SecondaryKeys";
const OUStringLiteral CFG_PROP_COMMAND = u"Command";
constexpr OUStringLiteral CFG_ENTRY_SECONDARY = u"SecondaryKeys";
constexpr OUStringLiteral CFG_PROP_COMMAND = u"Command";
static OUString lcl_getKeyString(const css::awt::KeyEvent& aKeyEvent)
{

View File

@ -72,12 +72,12 @@
#define ATTRIBUTE_ITEMSTYLE_RADIO "radio"
// Property names of a menu/menu item ItemDescriptor
const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
const OUStringLiteral ITEM_DESCRIPTOR_HELPURL = u"HelpURL";
const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
const OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
const OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
constexpr OUStringLiteral ITEM_DESCRIPTOR_HELPURL = u"HelpURL";
constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
// using namespaces

View File

@ -48,11 +48,11 @@ namespace framework
{
// Property names of a menu/menu item ItemDescriptor
const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
const OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
const OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
const OUStringLiteral ITEM_DESCRIPTOR_VISIBLE = u"IsVisible";
constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
constexpr OUStringLiteral ITEM_DESCRIPTOR_VISIBLE = u"IsVisible";
static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
OUString& rCommandURL,

View File

@ -33,7 +33,7 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::container;
const int PROPHANDLE_UINAME = 1;
const OUStringLiteral PROPNAME_UINAME = u"UIName";
constexpr OUStringLiteral PROPNAME_UINAME = u"UIName";
namespace framework
{

View File

@ -30,7 +30,7 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
const OUStringLiteral WRONG_TYPE_EXCEPTION
constexpr OUStringLiteral WRONG_TYPE_EXCEPTION
= u"Type must be css::uno::Sequence< css::beans::PropertyValue >";
namespace framework

View File

@ -33,11 +33,11 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
const OUStringLiteral WRONG_TYPE_EXCEPTION
constexpr OUStringLiteral WRONG_TYPE_EXCEPTION
= u"Type must be css::uno::Sequence< css::beans::PropertyValue >";
const int PROPHANDLE_UINAME = 1;
const OUStringLiteral PROPNAME_UINAME = u"UIName";
constexpr OUStringLiteral PROPNAME_UINAME = u"UIName";
namespace framework
{

View File

@ -48,7 +48,7 @@ struct RescheduleLock: public rtl::Static<osl::Mutex, RescheduleLock> {}; ///< m
}
const OUStringLiteral PROGRESS_RESOURCE = u"private:resource/progressbar/progressbar";
constexpr OUStringLiteral PROGRESS_RESOURCE = u"private:resource/progressbar/progressbar";
StatusIndicatorFactory::StatusIndicatorFactory(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: m_xContext (xContext )

View File

@ -37,14 +37,14 @@ const int UIELEMENT_PROPHANDLE_TYPE = 5;
const int UIELEMENT_PROPHANDLE_XMENUBAR = 6;
const int UIELEMENT_PROPHANDLE_CONFIGLISTENER = 7;
const int UIELEMENT_PROPHANDLE_NOCLOSE = 8;
const OUStringLiteral UIELEMENT_PROPNAME_CONFIGLISTENER = u"ConfigListener";
const OUStringLiteral UIELEMENT_PROPNAME_CONFIGSOURCE = u"ConfigurationSource";
const OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
const OUStringLiteral UIELEMENT_PROPNAME_PERSISTENT = u"Persistent";
const OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
const OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
const OUStringLiteral UIELEMENT_PROPNAME_XMENUBAR = u"XMenuBar";
const OUStringLiteral UIELEMENT_PROPNAME_NOCLOSE = u"NoClose";
constexpr OUStringLiteral UIELEMENT_PROPNAME_CONFIGLISTENER = u"ConfigListener";
constexpr OUStringLiteral UIELEMENT_PROPNAME_CONFIGSOURCE = u"ConfigurationSource";
constexpr OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
constexpr OUStringLiteral UIELEMENT_PROPNAME_PERSISTENT = u"Persistent";
constexpr OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
constexpr OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
constexpr OUStringLiteral UIELEMENT_PROPNAME_XMENUBAR = u"XMenuBar";
constexpr OUStringLiteral UIELEMENT_PROPNAME_NOCLOSE = u"NoClose";
using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
using namespace com::sun::star::frame;

View File

@ -28,9 +28,9 @@
const int UIELEMENT_PROPHANDLE_RESOURCEURL = 1;
const int UIELEMENT_PROPHANDLE_TYPE = 2;
const int UIELEMENT_PROPHANDLE_FRAME = 3;
const OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
const OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
const OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
constexpr OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
constexpr OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
constexpr OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;

View File

@ -44,9 +44,9 @@
namespace framework
{
inline const OUStringLiteral CFG_ENTRY_PRIMARY = u"PrimaryKeys";
inline const OUStringLiteral CFG_ENTRY_GLOBAL = u"Global";
inline const OUStringLiteral CFG_ENTRY_MODULES = u"Modules";
inline constexpr OUStringLiteral CFG_ENTRY_PRIMARY = u"PrimaryKeys";
inline constexpr OUStringLiteral CFG_ENTRY_GLOBAL = u"Global";
inline constexpr OUStringLiteral CFG_ENTRY_MODULES = u"Modules";
/**
implements a read/write access to the accelerator configuration.

View File

@ -241,8 +241,8 @@ void SAL_CALL JobExecutor::trigger( const OUString& sEvent )
void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent )
{
static const OUStringLiteral EVENT_ON_DOCUMENT_OPENED(u"onDocumentOpened"); // Job UI event : OnNew or OnLoad
static const OUStringLiteral EVENT_ON_DOCUMENT_ADDED(u"onDocumentAdded"); // Job API event : OnCreate or OnLoadFinished
static constexpr OUStringLiteral EVENT_ON_DOCUMENT_OPENED(u"onDocumentOpened"); // Job UI event : OnNew or OnLoad
static constexpr OUStringLiteral EVENT_ON_DOCUMENT_ADDED(u"onDocumentAdded"); // Job API event : OnCreate or OnLoadFinished
OUString aModuleIdentifier;
::std::vector< JobData::TJob2DocEventBinding > lJobs;

View File

@ -76,7 +76,7 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::frame;
const OUStringLiteral STATUS_BAR_ALIAS = u"private:resource/statusbar/statusbar";
constexpr OUStringLiteral STATUS_BAR_ALIAS = u"private:resource/statusbar/statusbar";
namespace framework
{

View File

@ -91,8 +91,8 @@
#include <classes/taskcreator.hxx>
#include <tools/fileutil.hxx>
const OUStringLiteral PROP_TYPES = u"Types";
const OUStringLiteral PROP_NAME = u"Name";
constexpr OUStringLiteral PROP_TYPES = u"Types";
constexpr OUStringLiteral PROP_NAME = u"Name";
namespace framework {

View File

@ -995,30 +995,30 @@ private:
};
// recovery.xcu
const OUStringLiteral CFG_PACKAGE_RECOVERY = u"org.openoffice.Office.Recovery/";
constexpr OUStringLiteral CFG_PACKAGE_RECOVERY = u"org.openoffice.Office.Recovery/";
const char CFG_ENTRY_AUTOSAVE_ENABLED[] = "AutoSave/Enabled";
const char CFG_ENTRY_AUTOSAVE_TIMEINTERVALL[] = "AutoSave/TimeIntervall"; //sic!
const OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = u"ooSetupFactoryActualFilter";
constexpr OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = u"ooSetupFactoryActualFilter";
const OUStringLiteral CFG_ENTRY_PROP_TEMPURL = u"TempURL";
const OUStringLiteral CFG_ENTRY_PROP_ORIGINALURL = u"OriginalURL";
const OUStringLiteral CFG_ENTRY_PROP_TEMPLATEURL = u"TemplateURL";
const OUStringLiteral CFG_ENTRY_PROP_FACTORYURL = u"FactoryURL";
const OUStringLiteral CFG_ENTRY_PROP_MODULE = u"Module";
const OUStringLiteral CFG_ENTRY_PROP_DOCUMENTSTATE = u"DocumentState";
const OUStringLiteral CFG_ENTRY_PROP_FILTER = u"Filter";
const OUStringLiteral CFG_ENTRY_PROP_TITLE = u"Title";
const OUStringLiteral CFG_ENTRY_PROP_ID = u"ID";
const OUStringLiteral CFG_ENTRY_PROP_VIEWNAMES = u"ViewNames";
constexpr OUStringLiteral CFG_ENTRY_PROP_TEMPURL = u"TempURL";
constexpr OUStringLiteral CFG_ENTRY_PROP_ORIGINALURL = u"OriginalURL";
constexpr OUStringLiteral CFG_ENTRY_PROP_TEMPLATEURL = u"TemplateURL";
constexpr OUStringLiteral CFG_ENTRY_PROP_FACTORYURL = u"FactoryURL";
constexpr OUStringLiteral CFG_ENTRY_PROP_MODULE = u"Module";
constexpr OUStringLiteral CFG_ENTRY_PROP_DOCUMENTSTATE = u"DocumentState";
constexpr OUStringLiteral CFG_ENTRY_PROP_FILTER = u"Filter";
constexpr OUStringLiteral CFG_ENTRY_PROP_TITLE = u"Title";
constexpr OUStringLiteral CFG_ENTRY_PROP_ID = u"ID";
constexpr OUStringLiteral CFG_ENTRY_PROP_VIEWNAMES = u"ViewNames";
const OUStringLiteral FILTER_PROP_TYPE = u"Type";
const OUStringLiteral TYPE_PROP_EXTENSIONS = u"Extensions";
constexpr OUStringLiteral FILTER_PROP_TYPE = u"Type";
constexpr OUStringLiteral TYPE_PROP_EXTENSIONS = u"Extensions";
// setup.xcu
const OUStringLiteral CFG_ENTRY_PROP_EMPTYDOCUMENTURL = u"ooSetupFactoryEmptyDocumentURL";
const OUStringLiteral CFG_ENTRY_PROP_FACTORYSERVICE = u"ooSetupFactoryDocumentService";
constexpr OUStringLiteral CFG_ENTRY_PROP_EMPTYDOCUMENTURL = u"ooSetupFactoryEmptyDocumentURL";
constexpr OUStringLiteral CFG_ENTRY_PROP_FACTORYSERVICE = u"ooSetupFactoryDocumentService";
const char EVENT_ON_NEW[] = "OnNew";
const char EVENT_ON_LOAD[] = "OnLoad";
@ -1034,7 +1034,7 @@ const char EVENT_ON_SAVEFAILED[] = "OnSaveFailed";
const char EVENT_ON_SAVEASFAILED[] = "OnSaveAsFailed";
const char EVENT_ON_SAVETOFAILED[] = "OnCopyToFailed";
const OUStringLiteral RECOVERY_ITEM_BASE_IDENTIFIER = u"recovery_item_";
constexpr OUStringLiteral RECOVERY_ITEM_BASE_IDENTIFIER = u"recovery_item_";
const char CMD_PROTOCOL[] = "vnd.sun.star.autorecovery:";
@ -1050,17 +1050,17 @@ const char CMD_DO_SESSION_RESTORE[] = "/doSessionRestore"; // restore a saved
const char CMD_DO_DISABLE_RECOVERY[] = "/disableRecovery"; // disable recovery and auto save (!) temp. for this office session
const char CMD_DO_SET_AUTOSAVE_STATE[] = "/setAutoSaveState"; // disable/enable auto save (not crash save) for this office session
const OUStringLiteral REFERRER_USER = u"private:user";
constexpr OUStringLiteral REFERRER_USER = u"private:user";
const OUStringLiteral PROP_DISPATCH_ASYNCHRON = u"DispatchAsynchron";
const OUStringLiteral PROP_PROGRESS = u"StatusIndicator";
const OUStringLiteral PROP_SAVEPATH = u"SavePath";
const OUStringLiteral PROP_ENTRY_ID = u"EntryID";
const OUStringLiteral PROP_AUTOSAVE_STATE = u"AutoSaveState";
constexpr OUStringLiteral PROP_DISPATCH_ASYNCHRON = u"DispatchAsynchron";
constexpr OUStringLiteral PROP_PROGRESS = u"StatusIndicator";
constexpr OUStringLiteral PROP_SAVEPATH = u"SavePath";
constexpr OUStringLiteral PROP_ENTRY_ID = u"EntryID";
constexpr OUStringLiteral PROP_AUTOSAVE_STATE = u"AutoSaveState";
const OUStringLiteral OPERATION_START = u"start";
const OUStringLiteral OPERATION_STOP = u"stop";
const OUStringLiteral OPERATION_UPDATE = u"update";
constexpr OUStringLiteral OPERATION_START = u"start";
constexpr OUStringLiteral OPERATION_STOP = u"stop";
constexpr OUStringLiteral OPERATION_UPDATE = u"update";
const sal_Int32 MIN_DISCSPACE_DOCSAVE = 5; // [MB]
const sal_Int32 MIN_DISCSPACE_CONFIGSAVE = 1; // [MB]

View File

@ -64,8 +64,8 @@ using namespace ::cppu;
const sal_Int16 MAX_IMAGETYPE_VALUE = css::ui::ImageType::SIZE_32;
const OUStringLiteral IMAGE_FOLDER = u"images";
const OUStringLiteral BITMAPS_FOLDER = u"Bitmaps";
constexpr OUStringLiteral IMAGE_FOLDER = u"images";
constexpr OUStringLiteral BITMAPS_FOLDER = u"Bitmaps";
const o3tl::enumarray<vcl::ImageType, const char*> IMAGELIST_XML_FILE =
{

View File

@ -40,9 +40,9 @@ using namespace com::sun::star::util;
namespace {
const OUStringLiteral CMD_CLEAR_LIST = u".uno:ClearRecentFileList";
const OUStringLiteral CMD_OPEN_AS_TEMPLATE = u".uno:OpenTemplate";
const OUStringLiteral CMD_OPEN_REMOTE = u".uno:OpenRemote";
constexpr OUStringLiteral CMD_CLEAR_LIST = u".uno:ClearRecentFileList";
constexpr OUStringLiteral CMD_OPEN_AS_TEMPLATE = u".uno:OpenTemplate";
constexpr OUStringLiteral CMD_OPEN_REMOTE = u".uno:OpenRemote";
class RecentFilesMenuController : public svt::PopupMenuControllerBase
{

View File

@ -68,9 +68,9 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui;
const OUStringLiteral CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility";
constexpr OUStringLiteral CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility";
const OUStringLiteral STATIC_CMD_PART = u".uno:AvailableToolbars?Toolbar:string=";
constexpr OUStringLiteral STATIC_CMD_PART = u".uno:AvailableToolbars?Toolbar:string=";
const char STATIC_INTERNAL_CMD_PART[] = ".cmd:";
namespace framework

View File

@ -54,7 +54,7 @@ using namespace ::com::sun::star::frame;
const char CONFIGURATION_ROOT_ACCESS[] = "/org.openoffice.Office.UI.";
// Special resource URLs to retrieve additional information
const OUStringLiteral PRIVATE_RESOURCE_URL = u"private:";
constexpr OUStringLiteral PRIVATE_RESOURCE_URL = u"private:";
const sal_Int32 COMMAND_PROPERTY_IMAGE = 1;
const sal_Int32 COMMAND_PROPERTY_ROTATE = 2;

View File

@ -72,7 +72,7 @@ ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int
return res1.Value == res2.Value ? 0 : res1.Value > res2.Value ? 1 : -1;
}
const OUStringLiteral cChapCollator = u"com.sun.star.i18n.ChapterCollator";
constexpr OUStringLiteral cChapCollator = u"com.sun.star.i18n.ChapterCollator";
OUString SAL_CALL
ChapterCollator::getImplementationName()

View File

@ -38,7 +38,7 @@ using namespace ::com::sun::star::uno;
namespace i18npool {
const OUStringLiteral implementationName = u"com.sun.star.i18n.Collator_Unicode";
constexpr OUStringLiteral implementationName = u"com.sun.star.i18n.Collator_Unicode";
Collator_Unicode::Collator_Unicode()
{

View File

@ -419,7 +419,7 @@ static
void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
{
OUStringBuffer aTemp(64);
static const OUStringLiteral asPersianWord_conjunction_data = u" \u0648 ";
static constexpr OUStringLiteral asPersianWord_conjunction_data = u" \u0648 ";
OUString asPersianWord_conjunction( asPersianWord_conjunction_data );
unsigned char nSection = 0;

View File

@ -63,7 +63,7 @@ sal_Int16 SAL_CALL IndexEntrySupplier_ja_phonetic::compareIndexEntry(
return result;
}
const OUStringLiteral first = u"phonetic (alphanumeric first)";
constexpr OUStringLiteral first = u"phonetic (alphanumeric first)";
sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable::loadAlgorithm(
const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/,
sal_Int32 collatorOptions )
@ -77,7 +77,7 @@ sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant
return collator->loadCollatorAlgorithm(first, rLocale, collatorOptions) == 0;
}
const OUStringLiteral last = u"phonetic (alphanumeric last)";
constexpr OUStringLiteral last = u"phonetic (alphanumeric last)";
sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable::loadAlgorithm(
const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/,
sal_Int32 collatorOptions )

View File

@ -1220,7 +1220,7 @@ OUString getCyrillicNativeNumberString(const OUString& aNumberString)
return aNumberString;
}
const OUStringLiteral implementationName = u"com.sun.star.i18n.NativeNumberSupplier";
constexpr OUStringLiteral implementationName = u"com.sun.star.i18n.NativeNumberSupplier";
OUString SAL_CALL NativeNumberSupplierService::getImplementationName()
{

View File

@ -134,7 +134,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffixService::getOrdinalSuffix( sal_I
return comphelper::containerToSequence(retVec);
}
const OUStringLiteral cOrdinalSuffix = u"com.sun.star.i18n.OrdinalSuffix";
constexpr OUStringLiteral cOrdinalSuffix = u"com.sun.star.i18n.OrdinalSuffix";
OUString SAL_CALL OrdinalSuffixService::getImplementationName()
{

View File

@ -29,7 +29,7 @@ class Color;
class IntlWrapper;
// static and prototypes -------------------------------------------------
inline const OUStringLiteral cpDelim = u", ";
inline constexpr OUStringLiteral cpDelim = u", ";
EDITENG_DLLPUBLIC OUString GetMetricText( tools::Long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper * pIntl );
OUString GetColorString( const Color& rCol );

View File

@ -89,7 +89,7 @@ void SaveInteropProperties(uno::Reference<frame::XModel> const& xModel,
OUString const& rObjectName, OUString const*const pOldObjectName,
OUString const& rProgId)
{
static const OUStringLiteral sEmbeddingsPropName = u"EmbeddedObjects";
static constexpr OUStringLiteral sEmbeddingsPropName = u"EmbeddedObjects";
// get interop grab bag from document
uno::Reference<beans::XPropertySet> const xDocProps(xModel, uno::UNO_QUERY);

View File

@ -1278,7 +1278,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
uno::Reference< beans::XPropertySet> xProp(_xStorageToSaveTo,uno::UNO_QUERY);
if ( xProp.is() )
{
static const OUStringLiteral sPropName = u"MediaType";
static constexpr OUStringLiteral sPropName = u"MediaType";
OUString sOldMediaType;
xProp->getPropertyValue(sPropName) >>= sOldMediaType;
if ( !xProp->getPropertyValue(sPropName).hasValue() || sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII != sOldMediaType )

View File

@ -130,7 +130,7 @@ OUString OReportEngineJFree::getNewOutputName()
if ( !m_xReport.is() || !m_xActiveConnection.is() )
throw lang::IllegalArgumentException();
static const OUStringLiteral s_sMediaType = u"MediaType";
static constexpr OUStringLiteral s_sMediaType = u"MediaType";
MimeConfigurationHelper aConfighelper(m_xContext);
const OUString sMimeType = m_xReport->getMimeType();

View File

@ -345,7 +345,7 @@ void ExportDocumentHandler::exportTableRows()
const OUString sRElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_ELEMENT) );
const OUString sRComponent( lcl_createAttribute(XML_NP_RPT,XML_REPORT_COMPONENT) ) ;
const OUString sFormulaAttrib( lcl_createAttribute(XML_NP_RPT,XML_FORMULA) );
static const OUStringLiteral s_sFloat = u"float";
static constexpr OUStringLiteral s_sFloat = u"float";
SvXMLAttributeList* pCellAtt = new SvXMLAttributeList();
uno::Reference< xml::sax::XAttributeList > xCellAtt = pCellAtt;

View File

@ -340,7 +340,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
if ( !m_xDatabaseDataProvider.is() )
{
static const OUStringLiteral s_sDatabaseDataProvider = u"com.sun.star.chart2.data.DatabaseDataProvider";
static constexpr OUStringLiteral s_sDatabaseDataProvider = u"com.sun.star.chart2.data.DatabaseDataProvider";
m_xDatabaseDataProvider.set(m_xContext->getServiceManager()->createInstanceWithContext(s_sDatabaseDataProvider
,m_xContext),uno::UNO_QUERY_THROW);
m_xDatabaseDataProvider->setRowLimit(10);

View File

@ -417,7 +417,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
aArgs[0] <<= beans::NamedValue("Storage",uno::makeAny(xStorage));
xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments("com.sun.star.document.ImportEmbeddedObjectResolver",aArgs) , uno::UNO_QUERY);
static const OUStringLiteral s_sOld = u"OldFormat";
static constexpr OUStringLiteral s_sOld = u"OldFormat";
static comphelper::PropertyMapEntry const pMap[] =
{
{ OUString("OldFormat") , 1, cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::BOUND, 0 },
@ -436,8 +436,8 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
xProp->setPropertyValue("StreamRelPath", uno::makeAny(sHierarchicalDocumentName));
uno::Reference<XComponent> xModel = GetModel();
static const OUStringLiteral s_sMeta = u"meta.xml";
static const OUStringLiteral s_sStreamName = u"StreamName";
static constexpr OUStringLiteral s_sMeta = u"meta.xml";
static constexpr OUStringLiteral s_sStreamName = u"StreamName";
xProp->setPropertyValue(s_sStreamName, uno::makeAny(OUString(s_sMeta)));
ErrCode nRet = ReadThroughComponent( xStorage
,xModel
@ -758,7 +758,7 @@ bool ORptFilter::isOldFormat() const
uno::Reference<beans::XPropertySet> xProp = getImportInfo();
if ( xProp.is() )
{
static const OUStringLiteral s_sOld = u"OldFormat";
static constexpr OUStringLiteral s_sOld = u"OldFormat";
if ( xProp->getPropertySetInfo()->hasPropertyByName(s_sOld))
{
xProp->getPropertyValue(s_sOld) >>= bOldFormat;

View File

@ -278,7 +278,7 @@ void testCeilingFloor_Impl( ScDocument& rDoc )
{
// Original test case document is ceiling-floor.xlsx
// Sheet1.K1 has =AND(K3:K81) to evaluate all results.
static const OUStringLiteral pORef = u"Sheet1.K1";
static constexpr OUStringLiteral pORef = u"Sheet1.K1";
ScAddress aPos;
aPos.Parse(pORef, rDoc);
ASSERT_FORMULA_EQUAL(rDoc, aPos, "AND(K3:K81)", "Wrong formula.");

View File

@ -64,7 +64,7 @@
* be synchronized with Writer's SwTableAutoFmtTbl sw/source/core/doc/tblafmt.cxx
*/
const OUStringLiteral sAutoTblFmtName = u"autotbl.fmt";
constexpr OUStringLiteral sAutoTblFmtName = u"autotbl.fmt";
// till SO5PF
const sal_uInt16 AUTOFORMAT_ID_X = 9501;

Some files were not shown because too many files have changed in this diff Show More