new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -1893,7 +1893,7 @@ Reference< frame::XModel > StarBASIC::GetModelFromBasic( SbxObject* pBasic )
|
||||
// look for the ThisComponent variable, first in the parent (which
|
||||
// might be the document's Basic), then in the parent's parent (which might be
|
||||
// the application Basic)
|
||||
static const OUStringLiteral sThisComponent( u"ThisComponent");
|
||||
static constexpr OUStringLiteral sThisComponent( u"ThisComponent");
|
||||
SbxVariable* pThisComponent = nullptr;
|
||||
|
||||
SbxObject* pLookup = pBasic->GetParent();
|
||||
|
||||
@@ -122,7 +122,7 @@ ErrCode ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
|
||||
if( bOnlyIntntl )
|
||||
aSearchStr.append(cIntntlGrpSep);
|
||||
const OUString pSearchStr = aSearchStr.makeStringAndClear();
|
||||
static const OUStringLiteral pDdEe = u"DdEe";
|
||||
static constexpr OUStringLiteral pDdEe = u"DdEe";
|
||||
while( ImpStrChr( pSearchStr, *p ) )
|
||||
{
|
||||
aBuf.append( *p );
|
||||
@@ -191,7 +191,7 @@ ErrCode ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
|
||||
eScanType = SbxDOUBLE;
|
||||
|
||||
// type detection?
|
||||
static const OUStringLiteral pTypes = u"%!&#";
|
||||
static constexpr OUStringLiteral pTypes = u"%!&#";
|
||||
if( ImpStrChr( pTypes, *p ) )
|
||||
p++;
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ sal_Int32 lcl_getNewAPIIndexForOldAPIIndex(
|
||||
|
||||
OUString lcl_getDiagramType( std::u16string_view rTemplateServiceName )
|
||||
{
|
||||
static const OUStringLiteral aPrefix(u"com.sun.star.chart2.template.");
|
||||
static constexpr OUStringLiteral aPrefix(u"com.sun.star.chart2.template.");
|
||||
|
||||
if( o3tl::starts_with(rTemplateServiceName, aPrefix) )
|
||||
{
|
||||
|
||||
@@ -350,7 +350,7 @@ void DataSourceTabPage::fillSeriesListBox()
|
||||
OUString aResString(::chart::SchResId( STR_DATA_UNNAMED_SERIES_WITH_INDEX ));
|
||||
|
||||
// replace index of unnamed series
|
||||
static const OUStringLiteral aReplacementStr( u"%NUMBER" );
|
||||
static constexpr OUStringLiteral aReplacementStr( u"%NUMBER" );
|
||||
sal_Int32 nIndex = aResString.indexOf( aReplacementStr );
|
||||
if( nIndex != -1 )
|
||||
aLabel = aResString.replaceAt(
|
||||
@@ -480,7 +480,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl, weld::TreeView&, voi
|
||||
OUString aSelectedRange = lcl_GetSelectedRolesRange( *m_xLB_ROLE );
|
||||
|
||||
// replace role in fixed text label
|
||||
static const OUStringLiteral aReplacementStr( u"%VALUETYPE" );
|
||||
static constexpr OUStringLiteral aReplacementStr( u"%VALUETYPE" );
|
||||
sal_Int32 nIndex = m_aFixedTextRange.indexOf( aReplacementStr );
|
||||
if( nIndex != -1 )
|
||||
{
|
||||
|
||||
@@ -426,7 +426,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
|
||||
case XATTR_FILLBMP_STRETCH:
|
||||
if( lcl_supportsFillProperties( m_GraphicObjectType ))
|
||||
{
|
||||
static const OUStringLiteral aModePropName(u"FillBitmapMode");
|
||||
static constexpr OUStringLiteral aModePropName(u"FillBitmapMode");
|
||||
bool bStretched = rItemSet.Get( XATTR_FILLBMP_STRETCH ).GetValue();
|
||||
drawing::BitmapMode aMode =
|
||||
(bStretched ? drawing::BitmapMode_STRETCH : drawing::BitmapMode_NO_REPEAT);
|
||||
@@ -448,7 +448,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
|
||||
case XATTR_FILLBMP_TILE:
|
||||
if( lcl_supportsFillProperties( m_GraphicObjectType ))
|
||||
{
|
||||
static const OUStringLiteral aModePropName(u"FillBitmapMode");
|
||||
static constexpr OUStringLiteral aModePropName(u"FillBitmapMode");
|
||||
bool bTiled = rItemSet.Get( XATTR_FILLBMP_TILE ).GetValue();
|
||||
drawing::BitmapMode aMode =
|
||||
(bTiled ? drawing::BitmapMode_REPEAT : drawing::BitmapMode_NO_REPEAT);
|
||||
|
||||
@@ -419,7 +419,7 @@ void PieChartTypeTemplate::applyStyle2(
|
||||
|
||||
if( nSeriesIndex == nOuterSeriesIndex ) //@todo in future this will depend on Orientation of the radius axis scale
|
||||
{
|
||||
static const OUStringLiteral aOffsetPropName( u"Offset" );
|
||||
static constexpr OUStringLiteral aOffsetPropName( u"Offset" );
|
||||
// get offset mode
|
||||
chart2::PieChartOffsetMode ePieOffsetMode;
|
||||
getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE ) >>= ePieOffsetMode;
|
||||
|
||||
@@ -1245,7 +1245,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
|
||||
return "";
|
||||
}
|
||||
|
||||
static const OUStringLiteral aPivotTableID(u"PT@");
|
||||
static constexpr OUStringLiteral aPivotTableID(u"PT@");
|
||||
if (aXMLRange.startsWith(aPivotTableID))
|
||||
return aXMLRange.copy(aPivotTableID.getLength());
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ using namespace ::com::sun::star::chart2;
|
||||
using ::com::sun::star::uno::Reference;
|
||||
using ::com::sun::star::uno::Any;
|
||||
|
||||
const OUStringLiteral m_aMultiClick = u"MultiClick";
|
||||
const OUStringLiteral m_aDragMethodEquals = u"DragMethod=";
|
||||
const OUStringLiteral m_aDragParameterEquals = u"DragParameter=";
|
||||
const OUStringLiteral m_aProtocol = u"CID/";
|
||||
constexpr OUStringLiteral m_aMultiClick = u"MultiClick";
|
||||
constexpr OUStringLiteral m_aDragMethodEquals = u"DragMethod=";
|
||||
constexpr OUStringLiteral m_aDragParameterEquals = u"DragParameter=";
|
||||
constexpr OUStringLiteral m_aProtocol = u"CID/";
|
||||
const OUString m_aPieSegmentDragMethodServiceName("PieSegmentDragging");
|
||||
|
||||
namespace
|
||||
|
||||
@@ -851,7 +851,7 @@ void RegressionCurveHelper::resetEquationPosition(
|
||||
|
||||
try
|
||||
{
|
||||
static const OUStringLiteral aPosPropertyName( u"RelativePosition" );
|
||||
static constexpr OUStringLiteral aPosPropertyName( u"RelativePosition" );
|
||||
Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); // since m233: , uno::UNO_SET_THROW );
|
||||
if( xEqProp->getPropertyValue( aPosPropertyName ).hasValue())
|
||||
xEqProp->setPropertyValue( aPosPropertyName, uno::Any());
|
||||
|
||||
@@ -144,7 +144,7 @@ void lcl_setXMLRangePropertyAtDataSequence(
|
||||
{
|
||||
try
|
||||
{
|
||||
static const OUStringLiteral aXMLRangePropName( u"CachedXMLRange");
|
||||
static constexpr OUStringLiteral aXMLRangePropName( u"CachedXMLRange");
|
||||
Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY_THROW );
|
||||
Reference< beans::XPropertySetInfo > xInfo( xProp->getPropertySetInfo());
|
||||
if( xInfo.is() && xInfo->hasPropertyByName( aXMLRangePropName ))
|
||||
|
||||
@@ -212,7 +212,7 @@ Sequence< OUString > SAL_CALL UncachedDataSequence::generateLabel( chart2::data:
|
||||
// auto-generated label
|
||||
sal_Int32 nSeries = m_aSourceRepresentation.toInt32() + 1;
|
||||
OUString aResString(::chart::SchResId(STR_DATA_UNNAMED_SERIES_WITH_INDEX));
|
||||
static const OUStringLiteral aReplacementStr(u"%NUMBER");
|
||||
static constexpr OUStringLiteral aReplacementStr(u"%NUMBER");
|
||||
sal_Int32 nIndex = aResString.indexOf(aReplacementStr);
|
||||
OUString aName;
|
||||
if( nIndex != -1 )
|
||||
|
||||
@@ -103,7 +103,7 @@ static void lcl_ResizeTextShapeToFitAvailableSpace( SvxShapeText& rShape2DText,
|
||||
if( !nAvgCharWidth )
|
||||
return;
|
||||
|
||||
static const OUStringLiteral sDots = u"...";
|
||||
static constexpr OUStringLiteral sDots = u"...";
|
||||
const sal_Int32 nCharsToRemove = ( nTextSize - nMaxLabelsSize ) / nAvgCharWidth + 1;
|
||||
sal_Int32 nNewLen = rLabel.size() - nCharsToRemove - sDots.getLength();
|
||||
// Prevent from showing only dots
|
||||
|
||||
@@ -421,7 +421,7 @@ awt::Size lcl_placeLegendEntries(
|
||||
try
|
||||
{
|
||||
OUString aLabelString = rEntries[0].xLabel->getString();
|
||||
static const OUStringLiteral sDots = u"...";
|
||||
static constexpr OUStringLiteral sDots = u"...";
|
||||
for (sal_Int32 nNewLen = aLabelString.getLength() - sDots.getLength(); nNewLen > 0; )
|
||||
{
|
||||
OUString aNewLabel = aLabelString.subView(0, nNewLen) + sDots;
|
||||
|
||||
@@ -661,8 +661,8 @@ namespace
|
||||
const ExtensionInfoEntryVector& rToBeEnabled,
|
||||
const ExtensionInfoEntryVector& rToBeDisabled)
|
||||
{
|
||||
static const OUStringLiteral aRegPathFront(u"/uno_packages/cache/registry/com.sun.star.comp.deployment.");
|
||||
static const OUStringLiteral aRegPathBack(u".PackageRegistryBackend/backenddb.xml");
|
||||
static constexpr OUStringLiteral aRegPathFront(u"/uno_packages/cache/registry/com.sun.star.comp.deployment.");
|
||||
static constexpr OUStringLiteral aRegPathBack(u".PackageRegistryBackend/backenddb.xml");
|
||||
// first appearance to check
|
||||
{
|
||||
const OUString aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "bundle" + aRegPathBack);
|
||||
@@ -1467,7 +1467,7 @@ namespace comphelper
|
||||
// points to registrymodifications.xcu
|
||||
OUString conf("${CONFIGURATION_LAYERS}");
|
||||
rtl::Bootstrap::expandMacros(conf);
|
||||
static const OUStringLiteral aTokenUser(u"user:");
|
||||
static constexpr OUStringLiteral aTokenUser(u"user:");
|
||||
sal_Int32 nStart(conf.indexOf(aTokenUser));
|
||||
|
||||
if (-1 != nStart)
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef LO_CLANG_SHARED_PLUGINS
|
||||
|
||||
#include <cassert>
|
||||
#include <stack>
|
||||
|
||||
#include "check.hxx"
|
||||
#include "plugin.hxx"
|
||||
#include "config_clang.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
class ConstexprLiteral final : public loplugin::FilteringPlugin<ConstexprLiteral>
|
||||
{
|
||||
public:
|
||||
explicit ConstexprLiteral(loplugin::InstantiationData const& data)
|
||||
: FilteringPlugin(data)
|
||||
{
|
||||
}
|
||||
|
||||
bool VisitVarDecl(const VarDecl* varDecl)
|
||||
{
|
||||
if (ignoreLocation(varDecl))
|
||||
return true;
|
||||
if (varDecl->isConstexpr())
|
||||
return true;
|
||||
if (!loplugin::TypeCheck(varDecl->getType())
|
||||
.Class("OUStringLiteral")
|
||||
.Namespace("rtl")
|
||||
.GlobalNamespace())
|
||||
return true;
|
||||
report(DiagnosticsEngine::Warning, "OUStringLiteral should be declared constexpr",
|
||||
varDecl->getBeginLoc())
|
||||
<< varDecl->getSourceRange();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool preRun() override
|
||||
{
|
||||
if (!compiler.getLangOpts().CPlusPlus)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void run() override
|
||||
{
|
||||
if (preRun())
|
||||
{
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
loplugin::Plugin::Registration<ConstexprLiteral> constexprliteral("constexprliteral");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
@@ -0,0 +1,24 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include <sal/config.h>
|
||||
#include <rtl/string.hxx>
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
namespace test1
|
||||
{
|
||||
void f()
|
||||
{
|
||||
// expected-error@+1 {{OUStringLiteral should be declared constexpr [loplugin:constexprliteral]}}
|
||||
const OUStringLiteral foo = u"foo";
|
||||
(void)foo;
|
||||
}
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
@@ -93,8 +93,8 @@ void AdoDriverTest::test_metadata()
|
||||
}
|
||||
|
||||
const Any catalog;
|
||||
static const OUStringLiteral schemaPattern = u"%";
|
||||
static const OUStringLiteral tableNamePattern = u"%";
|
||||
static constexpr OUStringLiteral schemaPattern = u"%";
|
||||
static constexpr OUStringLiteral tableNamePattern = u"%";
|
||||
const Sequence< OUString > types;
|
||||
|
||||
Reference< XResultSet > xResultSet =
|
||||
@@ -107,7 +107,7 @@ void AdoDriverTest::test_metadata()
|
||||
|
||||
void AdoDriverTest::test_select_default_all()
|
||||
{
|
||||
static const OUStringLiteral sql = u"select \"FirstName\" from \"Students\" ORDER BY \"FirstName\"";
|
||||
static constexpr OUStringLiteral sql = u"select \"FirstName\" from \"Students\" ORDER BY \"FirstName\"";
|
||||
Reference< XPreparedStatement > xStatement = m_xConnection->prepareStatement(sql);
|
||||
if (!xStatement.is())
|
||||
{
|
||||
|
||||
@@ -389,7 +389,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet,
|
||||
|
||||
// build a connection with its current settings (4. data source name, or 5. URL)
|
||||
|
||||
static const OUStringLiteral sUserProp( u"User" );
|
||||
static constexpr OUStringLiteral sUserProp( u"User" );
|
||||
OUString sDataSourceName;
|
||||
xRowSetProps->getPropertyValue("DataSourceName") >>= sDataSourceName;
|
||||
OUString sURL;
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace dbtools
|
||||
// get the format key of our bound field
|
||||
Reference< XPropertySetInfo > xPSI( _rxColumn->getPropertySetInfo(), UNO_SET_THROW );
|
||||
bool bHaveFieldFormat = false;
|
||||
static const OUStringLiteral sFormatKeyProperty( u"FormatKey" );
|
||||
static constexpr OUStringLiteral sFormatKeyProperty( u"FormatKey" );
|
||||
if ( xPSI->hasPropertyByName( sFormatKeyProperty ) )
|
||||
{
|
||||
bHaveFieldFormat = ( _rxColumn->getPropertyValue( sFormatKeyProperty ) >>= _rData.m_nFormatKey );
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace dbtools
|
||||
xComposer->setElementaryQuery( sStatement );
|
||||
|
||||
// the sort order
|
||||
static const OUStringLiteral sPropOrder( u"Order" );
|
||||
static constexpr OUStringLiteral sPropOrder( u"Order" );
|
||||
if ( ::comphelper::hasProperty( sPropOrder, xQuery ) )
|
||||
{
|
||||
OUString sOrder;
|
||||
@@ -176,7 +176,7 @@ namespace dbtools
|
||||
|
||||
// the filter
|
||||
bool bApplyFilter = true;
|
||||
static const OUStringLiteral sPropApply( u"ApplyFilter" );
|
||||
static constexpr OUStringLiteral sPropApply( u"ApplyFilter" );
|
||||
if ( ::comphelper::hasProperty( sPropApply, xQuery ) )
|
||||
{
|
||||
OSL_VERIFY( xQuery->getPropertyValue( sPropApply ) >>= bApplyFilter );
|
||||
|
||||
@@ -1074,7 +1074,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::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();
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace connectivity
|
||||
OUString sMessage;
|
||||
try
|
||||
{
|
||||
static const OUStringLiteral sProperties( u"properties" );
|
||||
static constexpr OUStringLiteral sProperties( u"properties" );
|
||||
if ( !bIsNewDatabase && xStorage->isStreamElement(sProperties) )
|
||||
{
|
||||
Reference<XStream > xStream = xStorage->openStreamElement(sProperties,ElementModes::READ);
|
||||
@@ -297,7 +297,7 @@ namespace connectivity
|
||||
//
|
||||
// hsqldb 2.6.0 release notes have: added system role SCRIPT_OPS for export / import of database structure and data
|
||||
// which seems to provide a builtin way to do this with contemporary hsqldb
|
||||
static const OUStringLiteral sScript(u"script");
|
||||
static constexpr OUStringLiteral sScript(u"script");
|
||||
if (!bIsNewDatabase && xStorage->isStreamElement(sScript))
|
||||
{
|
||||
Reference<XStream > xStream = xStorage->openStreamElement(sScript, ElementModes::READ);
|
||||
|
||||
@@ -90,7 +90,7 @@ const char arUsingText[] =
|
||||
static bool readOption( OUString * pValue, const char * pOpt,
|
||||
sal_uInt32 * pnIndex, const OUString & aArg)
|
||||
{
|
||||
static const OUStringLiteral dash(u"-");
|
||||
static constexpr OUStringLiteral dash(u"-");
|
||||
if(!aArg.startsWith(dash))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -293,9 +293,9 @@ int SvxHlinkDlgMarkWnd::FillTree( const uno::Reference< container::XNameAccess >
|
||||
const sal_Int32 nLinks = aNames.getLength();
|
||||
const OUString* pNames = aNames.getConstArray();
|
||||
|
||||
static const OUStringLiteral aProp_LinkDisplayName( u"LinkDisplayName" );
|
||||
static const OUStringLiteral aProp_LinkTarget( u"com.sun.star.document.LinkTarget" );
|
||||
static const OUStringLiteral aProp_LinkDisplayBitmap( u"LinkDisplayBitmap" );
|
||||
static constexpr OUStringLiteral aProp_LinkDisplayName( u"LinkDisplayName" );
|
||||
static constexpr OUStringLiteral aProp_LinkTarget( u"com.sun.star.document.LinkTarget" );
|
||||
static constexpr OUStringLiteral aProp_LinkDisplayBitmap( u"LinkDisplayBitmap" );
|
||||
for( sal_Int32 i = 0; i < nLinks; i++ )
|
||||
{
|
||||
uno::Any aAny;
|
||||
|
||||
@@ -3010,7 +3010,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet )
|
||||
|
||||
void SvxCharPositionPage::FillUserData()
|
||||
{
|
||||
static const OUStringLiteral cTok( u";" );
|
||||
static constexpr OUStringLiteral cTok( u";" );
|
||||
|
||||
OUString sUser = OUString::number( m_nSuperEsc ) + cTok +
|
||||
OUString::number( m_nSubEsc ) + cTok +
|
||||
|
||||
@@ -56,7 +56,7 @@ void DialogSaveTest::test()
|
||||
uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries());
|
||||
CPPUNIT_ASSERT(xStorDlgLib.is());
|
||||
uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW);
|
||||
static const OUStringLiteral sStandard(u"Standard");
|
||||
static constexpr OUStringLiteral sStandard(u"Standard");
|
||||
xBasLib->loadLibrary(sStandard);
|
||||
CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
|
||||
// the whole point of this test is to test the "save" operation
|
||||
|
||||
@@ -54,7 +54,7 @@ void DialogSaveTest::test()
|
||||
uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries());
|
||||
CPPUNIT_ASSERT(xStorDlgLib.is());
|
||||
uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW);
|
||||
static const OUStringLiteral sStandard(u"Standard");
|
||||
static constexpr OUStringLiteral sStandard(u"Standard");
|
||||
xBasLib->loadLibrary(sStandard);
|
||||
xDlgLib->loadLibrary(sStandard);
|
||||
CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
|
||||
|
||||
@@ -54,7 +54,7 @@ void DialogSaveTest::test()
|
||||
uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries());
|
||||
CPPUNIT_ASSERT(xStorDlgLib.is());
|
||||
uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW);
|
||||
static const OUStringLiteral sStandard(u"Standard");
|
||||
static constexpr OUStringLiteral sStandard(u"Standard");
|
||||
xBasLib->loadLibrary(sStandard);
|
||||
xDlgLib->loadLibrary(sStandard);
|
||||
CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
|
||||
|
||||
@@ -430,9 +430,9 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
|
||||
OSL_VERIFY( aFilterModeSetting >>= nFilterMode );
|
||||
}
|
||||
|
||||
static const OUStringLiteral sAll( u"%" );
|
||||
static const OUStringLiteral sView( u"VIEW" );
|
||||
static const OUStringLiteral sTable( u"TABLE" );
|
||||
static constexpr OUStringLiteral sAll( u"%" );
|
||||
static constexpr OUStringLiteral sView( u"VIEW" );
|
||||
static constexpr OUStringLiteral sTable( u"TABLE" );
|
||||
|
||||
switch ( nFilterMode )
|
||||
{
|
||||
|
||||
@@ -478,7 +478,7 @@ namespace dbaccess
|
||||
StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, sSettingsStreamName );
|
||||
SettingsExportContext aSettingsExportContext( m_rContext, aDesignOutput );
|
||||
|
||||
static const OUStringLiteral sWhitespace( u" " );
|
||||
static constexpr OUStringLiteral sWhitespace( u" " );
|
||||
|
||||
aDesignOutput.startElement( "office:settings" );
|
||||
aDesignOutput.ignorableWhitespace( sWhitespace );
|
||||
|
||||
@@ -561,7 +561,7 @@ void ODBExport::exportConnectionData()
|
||||
Reference< XPropertySetInfo > xSettingsInfo( xDataSourceSettings->getPropertySetInfo(), UNO_SET_THROW );
|
||||
|
||||
|
||||
static const OUStringLiteral sPropertyName = u"LocalSocket";
|
||||
static constexpr OUStringLiteral sPropertyName = u"LocalSocket";
|
||||
if ( xSettingsInfo->hasPropertyByName( sPropertyName ) )
|
||||
{
|
||||
OUString sPropertyValue;
|
||||
|
||||
@@ -664,7 +664,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r
|
||||
try { xInfo = _rxDest->getPropertySetInfo(); }
|
||||
catch(Exception&) { }
|
||||
|
||||
static const OUStringLiteral sUrlProp(u"URL");
|
||||
static constexpr OUStringLiteral sUrlProp(u"URL");
|
||||
// transfer the direct properties
|
||||
for (auto const& elem : m_aDirectPropTranslator)
|
||||
{
|
||||
|
||||
@@ -126,8 +126,8 @@ void DlgOrderCrit::impl_initializeOrderList_nothrow()
|
||||
{
|
||||
try
|
||||
{
|
||||
static const OUStringLiteral sNameProperty = u"Name";
|
||||
static const OUStringLiteral sAscendingProperty = u"IsAscending";
|
||||
static constexpr OUStringLiteral sNameProperty = u"Name";
|
||||
static constexpr OUStringLiteral sAscendingProperty = u"IsAscending";
|
||||
|
||||
Reference< XIndexAccess > xOrderColumns( m_xQueryComposer->getOrderColumns(), UNO_SET_THROW );
|
||||
sal_Int32 nColumns = xOrderColumns->getCount();
|
||||
|
||||
@@ -135,8 +135,8 @@ void CrashReporter::writeCommonInfo()
|
||||
|
||||
ucbhelper::InternetProxyDecider proxy_decider(::comphelper::getProcessComponentContext());
|
||||
|
||||
static const OUStringLiteral protocol = u"https";
|
||||
static const OUStringLiteral url = u"crashreport.libreoffice.org";
|
||||
static constexpr OUStringLiteral protocol = u"https";
|
||||
static constexpr OUStringLiteral url = u"crashreport.libreoffice.org";
|
||||
const sal_Int32 port = 443;
|
||||
|
||||
const ucbhelper::InternetProxyServer proxy_server = proxy_decider.getProxy(protocol, url, port);
|
||||
|
||||
@@ -421,7 +421,7 @@ void BackendImpl::implProcessHelp(
|
||||
&langFolderContent,
|
||||
langFolderDest, xCmdEnv);
|
||||
|
||||
static const OUStringLiteral aHelpStr(u"help");
|
||||
static constexpr OUStringLiteral aHelpStr(u"help");
|
||||
|
||||
OUString aJarFile(
|
||||
makeURL(sHelpFolder, langFolderURLSegment + "/" + aHelpStr + ".jar"));
|
||||
|
||||
@@ -1057,9 +1057,9 @@ void BackendImpl::PackageImpl::exportTo(
|
||||
manifest.reserve( bundle.getLength() );
|
||||
sal_Int32 baseURLlen = m_url_expanded.getLength();
|
||||
Reference<deployment::XPackage> const *pbundle = bundle.getConstArray();
|
||||
static const OUStringLiteral strMediaType( u"MediaType" );
|
||||
static const OUStringLiteral strFullPath( u"FullPath" );
|
||||
static const OUStringLiteral strIsFolder( u"IsFolder" );
|
||||
static constexpr OUStringLiteral strMediaType( u"MediaType" );
|
||||
static constexpr OUStringLiteral strFullPath( u"FullPath" );
|
||||
static constexpr OUStringLiteral strIsFolder( u"IsFolder" );
|
||||
for ( sal_Int32 pos = bundle.getLength(); pos--; )
|
||||
{
|
||||
Reference<deployment::XPackage> const & xPackage = pbundle[ pos ];
|
||||
|
||||
@@ -5945,7 +5945,7 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
|
||||
{
|
||||
boost::property_tree::ptree aChild;
|
||||
boost::property_tree::ptree aChildren;
|
||||
static const OUStringLiteral sPageStyles(u"PageStyles");
|
||||
static constexpr OUStringLiteral sPageStyles(u"PageStyles");
|
||||
uno::Reference<beans::XPropertySet> xProperty;
|
||||
uno::Reference<container::XNameContainer> xContainer;
|
||||
|
||||
|
||||
@@ -190,8 +190,8 @@ bool MigrationImpl::doMigration()
|
||||
|
||||
copyFiles();
|
||||
|
||||
static const OUStringLiteral sMenubarResourceURL(u"private:resource/menubar/menubar");
|
||||
static const OUStringLiteral sToolbarResourcePre(u"private:resource/toolbar/");
|
||||
static constexpr OUStringLiteral sMenubarResourceURL(u"private:resource/menubar/menubar");
|
||||
static constexpr OUStringLiteral sToolbarResourcePre(u"private:resource/toolbar/");
|
||||
for (MigrationModuleInfo & i : vModulesInfo) {
|
||||
OUString sModuleIdentifier = mapModuleShortNameToIdentifier(i.sModuleShortName);
|
||||
if (sModuleIdentifier.isEmpty())
|
||||
@@ -307,8 +307,8 @@ void MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigr
|
||||
uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration/SupportedVersions"), uno::UNO_SET_THROW);
|
||||
const uno::Sequence< OUString > seqSupportedVersions = aMigrationAccess->getElementNames();
|
||||
|
||||
static const OUStringLiteral aVersionIdentifiers( u"VersionIdentifiers" );
|
||||
static const OUStringLiteral aPriorityIdentifier( u"Priority" );
|
||||
static constexpr OUStringLiteral aVersionIdentifiers( u"VersionIdentifiers" );
|
||||
static constexpr OUStringLiteral aPriorityIdentifier( u"Priority" );
|
||||
|
||||
for (OUString const & supportedVersion :seqSupportedVersions) {
|
||||
sal_Int32 nPriority( 0 );
|
||||
@@ -905,8 +905,8 @@ void MigrationImpl::runServices()
|
||||
std::vector< MigrationModuleInfo > MigrationImpl::detectUIChangesForAllModules() const
|
||||
{
|
||||
std::vector< MigrationModuleInfo > vModulesInfo;
|
||||
static const OUStringLiteral MENUBAR(u"menubar");
|
||||
static const OUStringLiteral TOOLBAR(u"toolbar");
|
||||
static constexpr OUStringLiteral MENUBAR(u"menubar");
|
||||
static constexpr OUStringLiteral TOOLBAR(u"toolbar");
|
||||
|
||||
uno::Sequence< uno::Any > lArgs {uno::Any(m_aInfo.userdata + "/user/config/soffice.cfg/modules"),
|
||||
uno::Any(embed::ElementModes::READ)};
|
||||
@@ -966,7 +966,7 @@ void MigrationImpl::compareOldAndNewConfig(const OUString& sParent,
|
||||
const uno::Reference< container::XIndexContainer >& xIndexNew,
|
||||
const OUString& sResourceURL)
|
||||
{
|
||||
static const OUStringLiteral MENU_SEPARATOR(u" | ");
|
||||
static constexpr OUStringLiteral MENU_SEPARATOR(u" | ");
|
||||
|
||||
std::vector< MigrationItem > vOldItems;
|
||||
std::vector< MigrationItem > vNewItems;
|
||||
@@ -1176,8 +1176,8 @@ void NewVersionUIInfo::init(const std::vector< MigrationModuleInfo >& vModulesIn
|
||||
m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size());
|
||||
auto p_lNewVersionToolbarSettingsSeq = m_lNewVersionToolbarSettingsSeq.getArray();
|
||||
|
||||
static const OUStringLiteral sMenubarResourceURL(u"private:resource/menubar/menubar");
|
||||
static const OUStringLiteral sToolbarResourcePre(u"private:resource/toolbar/");
|
||||
static constexpr OUStringLiteral sMenubarResourceURL(u"private:resource/menubar/menubar");
|
||||
static constexpr OUStringLiteral sToolbarResourcePre(u"private:resource/toolbar/");
|
||||
|
||||
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = ui::theModuleUIConfigurationManagerSupplier::get( ::comphelper::getProcessComponentContext() );
|
||||
|
||||
|
||||
@@ -1083,7 +1083,7 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
|
||||
uno::Reference<beans::XPropertySetInfo> xPropertyInfo(
|
||||
xModelProperties.is() ? xModelProperties->getPropertySetInfo()
|
||||
: uno::Reference<beans::XPropertySetInfo>());
|
||||
static const OUStringLiteral sPrintablePropertyName(u"Printable");
|
||||
static constexpr OUStringLiteral sPrintablePropertyName(u"Printable");
|
||||
|
||||
if (xPropertyInfo.is() && xPropertyInfo->hasPropertyByName(sPrintablePropertyName))
|
||||
{
|
||||
|
||||
@@ -633,7 +633,7 @@ uno::Reference< XDictionary > LinguMgr::GetStandard()
|
||||
if (!xTmpDicList.is())
|
||||
return nullptr;
|
||||
|
||||
static const OUStringLiteral aDicName( u"standard.dic" );
|
||||
static constexpr OUStringLiteral aDicName( u"standard.dic" );
|
||||
uno::Reference< XDictionary > xDic = xTmpDicList->getDictionaryByName( aDicName );
|
||||
if (!xDic.is())
|
||||
{
|
||||
|
||||
@@ -304,7 +304,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
|
||||
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( rStream ) );
|
||||
|
||||
/* testcode
|
||||
static const OUStringLiteral aURL( u"file:///e:/test.xml" );
|
||||
static constexpr OUStringLiteral aURL( u"file:///e:/test.xml" );
|
||||
SvFileStream aStream(aURL, StreamMode::WRITE | StreamMode::TRUNC);
|
||||
xOut = new utl::OOutputStreamWrapper(aStream);
|
||||
*/
|
||||
|
||||
@@ -169,7 +169,7 @@ EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection
|
||||
uno::Reference<io::XInputStream> xInputStream = new utl::OInputStreamWrapper( rStream );
|
||||
|
||||
/* testcode
|
||||
static const OUStringLiteral aURL( u"file:///e:/test.xml" );
|
||||
static constexpr OUStringLiteral aURL( u"file:///e:/test.xml" );
|
||||
SfxMedium aMedium( aURL, StreamMode::READ | STREAM_NOCREATE, sal_True );
|
||||
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ static void TransferMediaType( const uno::Reference< embed::XStorage >& i_rSourc
|
||||
{
|
||||
const uno::Reference< beans::XPropertySet > xSourceProps( i_rSource, uno::UNO_QUERY_THROW );
|
||||
const uno::Reference< beans::XPropertySet > xTargetProps( i_rTarget, uno::UNO_QUERY_THROW );
|
||||
static const OUStringLiteral sMediaTypePropName( u"MediaType" );
|
||||
static constexpr OUStringLiteral sMediaTypePropName( u"MediaType" );
|
||||
xTargetProps->setPropertyValue( sMediaTypePropName, xSourceProps->getPropertyValue( sMediaTypePropName ) );
|
||||
}
|
||||
catch( const uno::Exception& )
|
||||
|
||||
@@ -219,8 +219,8 @@ namespace abp
|
||||
const OUString* pExistentFields = aExistentFields.getConstArray();
|
||||
const OUString* pExistentFieldsEnd = pExistentFields + aExistentFields.getLength();
|
||||
|
||||
static const OUStringLiteral sProgrammaticNodeName( u"ProgrammaticFieldName" );
|
||||
static const OUStringLiteral sAssignedNodeName( u"AssignedFieldName" );
|
||||
static constexpr OUStringLiteral sProgrammaticNodeName( u"ProgrammaticFieldName" );
|
||||
static constexpr OUStringLiteral sAssignedNodeName( u"AssignedFieldName" );
|
||||
|
||||
for ( ; pExistentFields != pExistentFieldsEnd; ++pExistentFields )
|
||||
{
|
||||
|
||||
@@ -599,7 +599,7 @@ void EscherPropertyContainer::CreateFillProperties(
|
||||
uno::Any aAny;
|
||||
AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapNone );
|
||||
AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle );
|
||||
static const OUStringLiteral aPropName( u"FillStyle" );
|
||||
static constexpr OUStringLiteral aPropName( u"FillStyle" );
|
||||
|
||||
if ( EscherPropertyValueHelper::GetPropertyValue(
|
||||
aAny, rXPropSet, aPropName ) )
|
||||
@@ -2597,14 +2597,14 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
|
||||
if ( !(aGeoPropSet >>= aGeoPropSeq) )
|
||||
return;
|
||||
|
||||
static const OUStringLiteral sViewBox ( u"ViewBox" );
|
||||
static const OUStringLiteral sTextRotateAngle ( u"TextRotateAngle" );
|
||||
static const OUStringLiteral sExtrusion ( u"Extrusion" );
|
||||
static const OUStringLiteral sEquations ( u"Equations" );
|
||||
static const OUStringLiteral sPath ( u"Path" );
|
||||
static const OUStringLiteral sTextPath ( u"TextPath" );
|
||||
static const OUStringLiteral sHandles ( u"Handles" );
|
||||
static const OUStringLiteral sAdjustmentValues ( u"AdjustmentValues" );
|
||||
static constexpr OUStringLiteral sViewBox ( u"ViewBox" );
|
||||
static constexpr OUStringLiteral sTextRotateAngle ( u"TextRotateAngle" );
|
||||
static constexpr OUStringLiteral sExtrusion ( u"Extrusion" );
|
||||
static constexpr OUStringLiteral sEquations ( u"Equations" );
|
||||
static constexpr OUStringLiteral sPath ( u"Path" );
|
||||
static constexpr OUStringLiteral sTextPath ( u"TextPath" );
|
||||
static constexpr OUStringLiteral sHandles ( u"Handles" );
|
||||
static constexpr OUStringLiteral sAdjustmentValues ( u"AdjustmentValues" );
|
||||
|
||||
bool bAdjustmentValuesProp = false;
|
||||
uno::Any aAdjustmentValuesProp;
|
||||
|
||||
@@ -614,7 +614,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
|
||||
{
|
||||
const SfxPoolItem& aCustomShape = static_cast<SdrObjCustomShape*>(pO)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
|
||||
SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(aCustomShape) );
|
||||
static const OUStringLiteral sPath( u"Path" );
|
||||
static constexpr OUStringLiteral sPath( u"Path" );
|
||||
sal_Int16 nGluePointType = EnhancedCustomShapeGluePointType::SEGMENTS;
|
||||
css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sPath, "GluePointType" );
|
||||
if ( pAny )
|
||||
@@ -736,7 +736,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
|
||||
sal_Int32 nX = 0, nY = 0;
|
||||
if ( ( rPara.First.Value >>= nX ) && ( rPara.Second.Value >>= nY ) )
|
||||
{
|
||||
static const OUStringLiteral sGluePoints( u"GluePoints" );
|
||||
static constexpr OUStringLiteral sGluePoints( u"GluePoints" );
|
||||
css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > aGluePoints;
|
||||
pAny = aGeometryItem.GetPropertyValueByName( sPath, sGluePoints );
|
||||
if ( pAny )
|
||||
@@ -2822,7 +2822,7 @@ void DffPropertyReader::CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItem
|
||||
|
||||
const css::uno::Any* pAny;
|
||||
SdrCustomShapeGeometryItem aGeometryItem(rSet.Get( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
|
||||
static const OUStringLiteral sTextRotateAngle( u"TextRotateAngle" );
|
||||
static constexpr OUStringLiteral sTextRotateAngle( u"TextRotateAngle" );
|
||||
pAny = aGeometryItem.GetPropertyValueByName( sTextRotateAngle );
|
||||
double fExtraTextRotateAngle = 0.0;
|
||||
if ( pAny )
|
||||
@@ -4601,9 +4601,9 @@ rtl::Reference<SdrObject> SvxMSDffManager::ImportShape( const DffRecordHeader& r
|
||||
// applies only if importing arcs from MS Office.
|
||||
if ( aObjData.eShapeType == mso_sptArc )
|
||||
{
|
||||
static const OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
|
||||
static const OUStringLiteral sViewBox( u"ViewBox" );
|
||||
static const OUStringLiteral sPath( u"Path" );
|
||||
static constexpr OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
|
||||
static constexpr OUStringLiteral sViewBox( u"ViewBox" );
|
||||
static constexpr OUStringLiteral sPath( u"Path" );
|
||||
SdrCustomShapeGeometryItem aGeometryItem( static_cast<SdrObjCustomShape*>(xRet.get())->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
|
||||
PropertyValue aPropVal;
|
||||
|
||||
|
||||
@@ -987,9 +987,9 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
|
||||
}
|
||||
bool bExportNotesPages = false;
|
||||
bool bReChangeToNormalView = false;
|
||||
static const OUStringLiteral sShowOnlineLayout( u"ShowOnlineLayout" );
|
||||
static constexpr OUStringLiteral sShowOnlineLayout( u"ShowOnlineLayout" );
|
||||
bool bReHideWhitespace = false;
|
||||
static const OUStringLiteral sHideWhitespace(u"HideWhitespace");
|
||||
static constexpr OUStringLiteral sHideWhitespace(u"HideWhitespace");
|
||||
uno::Reference< beans::XPropertySet > xViewProperties;
|
||||
|
||||
if ( aCreator == "Writer" )
|
||||
|
||||
@@ -1164,8 +1164,8 @@ bool SVGTextWriter::nextTextPortion()
|
||||
Reference < XTextField > xTextField( xRangePropSet->getPropertyValue( "TextField" ), UNO_QUERY );
|
||||
if( xTextField.is() )
|
||||
{
|
||||
static const OUStringLiteral sServicePrefix(u"com.sun.star.text.textfield.");
|
||||
static const OUStringLiteral sPresentationServicePrefix(u"com.sun.star.presentation.TextField.");
|
||||
static constexpr OUStringLiteral sServicePrefix(u"com.sun.star.text.textfield.");
|
||||
static constexpr OUStringLiteral sPresentationServicePrefix(u"com.sun.star.presentation.TextField.");
|
||||
|
||||
Reference< XServiceInfo > xService( xTextField, UNO_QUERY );
|
||||
const Sequence< OUString > aServices = xService->getSupportedServiceNames();
|
||||
@@ -1894,8 +1894,8 @@ tools::PolyPolygon& SVGActionWriter::ImplMap( const tools::PolyPolygon& rPolyPol
|
||||
OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bool bLine )
|
||||
{
|
||||
OUStringBuffer aPathData;
|
||||
static const OUStringLiteral aBlank( u" " );
|
||||
static const OUStringLiteral aComma( u"," );
|
||||
static constexpr OUStringLiteral aBlank( u" " );
|
||||
static constexpr OUStringLiteral aComma( u"," );
|
||||
Point aPolyPoint;
|
||||
|
||||
for( tools::Long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
|
||||
|
||||
@@ -79,17 +79,17 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
|
||||
{
|
||||
try
|
||||
{
|
||||
static const OUStringLiteral sComponentData ( u"oor:component-data" );
|
||||
static const OUStringLiteral sNode ( u"node" );
|
||||
static const OUStringLiteral sName ( u"oor:name" );
|
||||
static const OUStringLiteral sWhiteSpace ( u" " );
|
||||
static const OUStringLiteral sUIName ( u"UIName" );
|
||||
static const OUStringLiteral sComma ( u"," );
|
||||
static const OUStringLiteral sDelim ( u";" );
|
||||
static const OUStringLiteral sData ( u"Data" );
|
||||
static const OUStringLiteral sDocTypePrefix ( u"doctype:" );
|
||||
static const OUStringLiteral sFilterAdaptorService( u"com.sun.star.comp.Writer.XmlFilterAdaptor" );
|
||||
static const OUStringLiteral sXSLTFilterService ( u"com.sun.star.documentconversion.XSLTFilter" );
|
||||
static constexpr OUStringLiteral sComponentData ( u"oor:component-data" );
|
||||
static constexpr OUStringLiteral sNode ( u"node" );
|
||||
static constexpr OUStringLiteral sName ( u"oor:name" );
|
||||
static constexpr OUStringLiteral sWhiteSpace ( u" " );
|
||||
static constexpr OUStringLiteral sUIName ( u"UIName" );
|
||||
static constexpr OUStringLiteral sComma ( u"," );
|
||||
static constexpr OUStringLiteral sDelim ( u";" );
|
||||
static constexpr OUStringLiteral sData ( u"Data" );
|
||||
static constexpr OUStringLiteral sDocTypePrefix ( u"doctype:" );
|
||||
static constexpr OUStringLiteral sFilterAdaptorService( u"com.sun.star.comp.Writer.XmlFilterAdaptor" );
|
||||
static constexpr OUStringLiteral sXSLTFilterService ( u"com.sun.star.documentconversion.XSLTFilter" );
|
||||
|
||||
|
||||
// set up sax writer and connect to given output stream
|
||||
@@ -206,9 +206,9 @@ void TypeDetectionExporter::addProperty( const Reference< XWriter >& xHandler, c
|
||||
{
|
||||
try
|
||||
{
|
||||
static const OUStringLiteral sProp( u"prop" );
|
||||
static const OUStringLiteral sValue( u"value" );
|
||||
static const OUStringLiteral sWhiteSpace ( u" " );
|
||||
static constexpr OUStringLiteral sProp( u"prop" );
|
||||
static constexpr OUStringLiteral sValue( u"value" );
|
||||
static constexpr OUStringLiteral sWhiteSpace ( u" " );
|
||||
|
||||
rtl::Reference<::comphelper::AttributeList>pAttrList = new ::comphelper::AttributeList;
|
||||
pAttrList->AddAttribute ( "oor:name", rName );
|
||||
@@ -233,9 +233,9 @@ void TypeDetectionExporter::addLocaleProperty( const Reference< XWriter >& xHand
|
||||
{
|
||||
try
|
||||
{
|
||||
static const OUStringLiteral sProp( u"prop" );
|
||||
static const OUStringLiteral sValue( u"value" );
|
||||
static const OUStringLiteral sWhiteSpace ( u" " );
|
||||
static constexpr OUStringLiteral sProp( u"prop" );
|
||||
static constexpr OUStringLiteral sValue( u"value" );
|
||||
static constexpr OUStringLiteral sWhiteSpace ( u" " );
|
||||
|
||||
rtl::Reference<::comphelper::AttributeList> pAttrList = new ::comphelper::AttributeList;
|
||||
pAttrList->AddAttribute ( "oor:name", rName );
|
||||
|
||||
@@ -83,8 +83,8 @@ const css::uno::Sequence<OUString>& getColumnTypes()
|
||||
|
||||
sal_Int32 getColumnTypeByModelName(const OUString& aModelName)
|
||||
{
|
||||
static const OUStringLiteral aModelPrefix (u"com.sun.star.form.component.");
|
||||
static const OUStringLiteral aCompatibleModelPrefix (u"stardiv.one.form.component.");
|
||||
static constexpr OUStringLiteral aModelPrefix (u"com.sun.star.form.component.");
|
||||
static constexpr OUStringLiteral aCompatibleModelPrefix (u"stardiv.one.form.component.");
|
||||
|
||||
sal_Int32 nTypeId = -1;
|
||||
if (aModelName == FRM_COMPONENT_EDIT)
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace
|
||||
if ( xProviderProps.is() )
|
||||
{
|
||||
Reference< XPropertySetInfo > xPropInfo = xProviderProps->getPropertySetInfo();
|
||||
static const OUStringLiteral sHomeDirPropertyName( u"HomeDirectory" );
|
||||
static constexpr OUStringLiteral sHomeDirPropertyName( u"HomeDirectory" );
|
||||
if ( !xPropInfo.is() || xPropInfo->hasPropertyByName( sHomeDirPropertyName ) )
|
||||
{
|
||||
OUString sHomeDirectory;
|
||||
|
||||
@@ -78,7 +78,7 @@ void TestFilterManager( Reference< XFilePicker > xFilePicker );
|
||||
|
||||
Reference< XMultiServiceFactory > g_xFactory;
|
||||
|
||||
static const OUStringLiteral BMP_EXTENSION( u"bmp" );
|
||||
static constexpr OUStringLiteral BMP_EXTENSION( u"bmp" );
|
||||
|
||||
|
||||
// a test client
|
||||
|
||||
@@ -962,7 +962,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( bool bPreferred, const css:
|
||||
}
|
||||
|
||||
const OUString sIsoLang = impl_ts_getLocale();
|
||||
static const OUStringLiteral sDefaultLocale(u"en-US");
|
||||
static constexpr OUStringLiteral sDefaultLocale(u"en-US");
|
||||
|
||||
css::uno::Reference< css::container::XNameAccess > xKey;
|
||||
css::uno::Reference< css::container::XNameAccess > xCommand;
|
||||
|
||||
@@ -928,7 +928,7 @@ OUString AddonsOptions_Impl::GeneratePrefixURL()
|
||||
|
||||
void AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionContainer& aContainer )
|
||||
{
|
||||
static const OUStringLiteral aMenuMergeRootName( u"AddonUI/OfficeMenuBarMerging/" );
|
||||
static constexpr OUStringLiteral aMenuMergeRootName( u"AddonUI/OfficeMenuBarMerging/" );
|
||||
|
||||
Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aMenuMergeRootName );
|
||||
|
||||
@@ -1000,7 +1000,7 @@ void AddonsOptions_Impl::ReadMergeMenuData( std::u16string_view aMergeAddonInstr
|
||||
|
||||
void AddonsOptions_Impl::ReadToolbarMergeInstructions( ToolbarMergingInstructions& rCachedToolbarMergingInstructions )
|
||||
{
|
||||
static const OUStringLiteral aToolbarMergeRootName( u"AddonUI/OfficeToolbarMerging/" );
|
||||
static constexpr OUStringLiteral aToolbarMergeRootName( u"AddonUI/OfficeToolbarMerging/" );
|
||||
|
||||
Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aToolbarMergeRootName );
|
||||
sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
|
||||
@@ -1072,7 +1072,7 @@ void AddonsOptions_Impl::ReadMergeToolbarData( std::u16string_view aMergeAddonIn
|
||||
void AddonsOptions_Impl::ReadNotebookBarMergeInstructions(
|
||||
NotebookBarMergingInstructions& rCachedNotebookBarMergingInstructions)
|
||||
{
|
||||
static const OUStringLiteral aNotebookBarMergeRootName(u"AddonUI/OfficeNotebookBarMerging/");
|
||||
static constexpr OUStringLiteral aNotebookBarMergeRootName(u"AddonUI/OfficeNotebookBarMerging/");
|
||||
|
||||
Sequence<OUString> aAddonMergeNodesSeq = GetNodeNames(aNotebookBarMergeRootName);
|
||||
sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
|
||||
@@ -1147,7 +1147,7 @@ void AddonsOptions_Impl::ReadMergeNotebookBarData(
|
||||
|
||||
void AddonsOptions_Impl::ReadStatusbarMergeInstructions( MergeStatusbarInstructionContainer& aContainer )
|
||||
{
|
||||
static const OUStringLiteral aStatusbarMergeRootName( u"AddonUI/OfficeStatusbarMerging/" );
|
||||
static constexpr OUStringLiteral aStatusbarMergeRootName( u"AddonUI/OfficeStatusbarMerging/" );
|
||||
|
||||
Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aStatusbarMergeRootName );
|
||||
sal_uInt32 nCount = aAddonMergeNodesSeq.getLength();
|
||||
|
||||
@@ -93,7 +93,7 @@ void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq
|
||||
}
|
||||
sort(aVector.begin(), aVector.end(), lcl_I18nCompareString );
|
||||
|
||||
static const OUStringLiteral aFontNameCommandPrefix( u".uno:CharFontName?CharFontName.FamilyName:string=" );
|
||||
static constexpr OUStringLiteral aFontNameCommandPrefix( u".uno:CharFontName?CharFontName.FamilyName:string=" );
|
||||
const sal_Int16 nCount = static_cast<sal_Int16>(aVector.size());
|
||||
for ( sal_Int16 i = 0; i < nCount; i++ )
|
||||
{
|
||||
|
||||
@@ -155,7 +155,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co
|
||||
m_aHeightArray.clear();
|
||||
|
||||
sal_uInt16 nPos = 0; // Id is nPos+1
|
||||
static const OUStringLiteral aFontHeightCommand( u".uno:FontHeight?FontHeight.Height:float=" );
|
||||
static constexpr OUStringLiteral aFontHeightCommand( u".uno:FontHeight?FontHeight.Height:float=" );
|
||||
|
||||
// first insert font size names (for simplified/traditional chinese)
|
||||
FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguageTag().getLanguageType() );
|
||||
|
||||
@@ -97,8 +97,8 @@ void HeaderMenuController::fillPopupMenu( const Reference< css::frame::XModel >&
|
||||
aCmd = ".uno:InsertPageFooter";
|
||||
aHeaderFooterIsOnStr = "FooterIsOn";
|
||||
}
|
||||
static const OUStringLiteral aIsPhysicalStr( u"IsPhysical" );
|
||||
static const OUStringLiteral aDisplayNameStr( u"DisplayName" );
|
||||
static constexpr OUStringLiteral aIsPhysicalStr( u"IsPhysical" );
|
||||
static constexpr OUStringLiteral aDisplayNameStr( u"DisplayName" );
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -192,7 +192,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
|
||||
// the different menus purpose will be handled by the different string
|
||||
// for aCmd_Dialog and aCmd_Language
|
||||
sal_Int16 nItemId = 0; // in this control the item id is not important for executing the command
|
||||
static const OUStringLiteral sAsterisk(u"*"); // multiple languages in current selection
|
||||
static constexpr OUStringLiteral sAsterisk(u"*"); // multiple languages in current selection
|
||||
const OUString sNone( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ));
|
||||
for (auto const& langItem : aLangItems)
|
||||
{
|
||||
|
||||
@@ -134,7 +134,7 @@ void LangSelectionStatusbarController::LangMenu(
|
||||
|
||||
// add first few entries to main menu
|
||||
sal_Int16 nItemId = static_cast< sal_Int16 >(MID_LANG_SEL_1);
|
||||
static const OUStringLiteral sAsterisk(u"*"); // multiple languages in current selection
|
||||
static constexpr OUStringLiteral sAsterisk(u"*"); // multiple languages in current selection
|
||||
const OUString sNone( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ));
|
||||
std::map< sal_Int16, OUString > aLangMap;
|
||||
for (auto const& langItem : aLangItems)
|
||||
|
||||
@@ -119,9 +119,9 @@ void SAL_CALL MacrosMenuController::statusChanged( const FeatureStateEvent& )
|
||||
|
||||
void MacrosMenuController::addScriptItems(const Reference<css::awt::XPopupMenu>& rPopupMenu, sal_uInt16 startItemId)
|
||||
{
|
||||
static const OUStringLiteral aCmdBase(u".uno:ScriptOrganizer?ScriptOrganizer.Language:string=");
|
||||
static const OUStringLiteral ellipsis( u"..." );
|
||||
static const OUStringLiteral providerKey(u"com.sun.star.script.provider.ScriptProviderFor");
|
||||
static constexpr OUStringLiteral aCmdBase(u".uno:ScriptOrganizer?ScriptOrganizer.Language:string=");
|
||||
static constexpr OUStringLiteral ellipsis( u"..." );
|
||||
static constexpr OUStringLiteral providerKey(u"com.sun.star.script.provider.ScriptProviderFor");
|
||||
sal_uInt16 itemId = startItemId;
|
||||
Reference< XContentEnumerationAccess > xEnumAccess( m_xContext->getServiceManager(), UNO_QUERY_THROW );
|
||||
Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( "com.sun.star.script.provider.LanguageScriptProvider" );
|
||||
|
||||
@@ -85,7 +85,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< css::embed::VerbDescri
|
||||
|
||||
resetPopupMenu( rPopupMenu );
|
||||
|
||||
static const OUStringLiteral aVerbCommand( u".uno:ObjectMenue?VerbID:short=" );
|
||||
static constexpr OUStringLiteral aVerbCommand( u".uno:ObjectMenue?VerbID:short=" );
|
||||
for ( sal_Int32 i = 0; i < rVerbCommandSeq.getLength(); i++ )
|
||||
{
|
||||
const css::embed::VerbDescriptor& rVerb = pVerbCommandArray[i];
|
||||
|
||||
@@ -448,7 +448,7 @@ void SAL_CALL RecentFilesMenuController::dispatch(
|
||||
if ( nQueryPart <= 0 )
|
||||
return;
|
||||
|
||||
static const OUStringLiteral aEntryArgStr( u"entry=" );
|
||||
static constexpr OUStringLiteral aEntryArgStr( u"entry=" );
|
||||
sal_Int32 nEntryArg = aURL.Complete.indexOf( aEntryArgStr, nQueryPart );
|
||||
sal_Int32 nEntryPos = nEntryArg + aEntryArgStr.getLength();
|
||||
if (( nEntryArg <= 0 ) || ( nEntryPos >= aURL.Complete.getLength() ))
|
||||
|
||||
@@ -118,7 +118,7 @@ Reference< XInterface > SAL_CALL UIControllerFactory::createInstanceWithArgument
|
||||
const Sequence< Any >& Arguments,
|
||||
const Reference< XComponentContext >& )
|
||||
{
|
||||
static const OUStringLiteral aPropModuleName( u"ModuleIdentifier" );
|
||||
static constexpr OUStringLiteral aPropModuleName( u"ModuleIdentifier" );
|
||||
|
||||
OUString aPropName;
|
||||
PropertyValue aPropValue;
|
||||
|
||||
@@ -623,7 +623,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale)
|
||||
}
|
||||
}
|
||||
|
||||
OUStringLiteral under(u"_");
|
||||
static constexpr OUStringLiteral under(u"_");
|
||||
|
||||
sal_Int32 l = rLocale.Language.getLength();
|
||||
sal_Int32 c = rLocale.Country.getLength();
|
||||
|
||||
@@ -61,7 +61,7 @@ ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int
|
||||
if( ans != 0 )
|
||||
return ans;
|
||||
|
||||
static const OUStringLiteral aAddAllowed(u"?");
|
||||
static constexpr OUStringLiteral aAddAllowed(u"?");
|
||||
ParseResult res1, res2;
|
||||
// since parseAnyToken does not take length as parameter, we have to copy
|
||||
// it to a temp. string.
|
||||
|
||||
@@ -1837,35 +1837,35 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const
|
||||
of.writeInt(nbOfCalendars);
|
||||
of.writeAsciiString(";\n\n");
|
||||
|
||||
of.writeAsciiString("static const OUStringLiteral nbOfDays = u\"");
|
||||
of.writeAsciiString("static constexpr OUStringLiteral nbOfDays = u\"");
|
||||
for(i = 0; i < nbOfCalendars; i++) {
|
||||
of.writeAsciiString("\\x");
|
||||
of.writeHexInt(nbOfDays[i]);
|
||||
}
|
||||
of.writeAsciiString("\";\n");
|
||||
|
||||
of.writeAsciiString("static const OUStringLiteral nbOfMonths = u\"");
|
||||
of.writeAsciiString("static constexpr OUStringLiteral nbOfMonths = u\"");
|
||||
for(i = 0; i < nbOfCalendars; i++) {
|
||||
of.writeAsciiString("\\x");
|
||||
of.writeHexInt(nbOfMonths[i]);
|
||||
}
|
||||
of.writeAsciiString("\";\n");
|
||||
|
||||
of.writeAsciiString("static const OUStringLiteral nbOfGenitiveMonths = u\"");
|
||||
of.writeAsciiString("static constexpr OUStringLiteral nbOfGenitiveMonths = u\"");
|
||||
for(i = 0; i < nbOfCalendars; i++) {
|
||||
of.writeAsciiString("\\x");
|
||||
of.writeHexInt(nbOfGenitiveMonths[i]);
|
||||
}
|
||||
of.writeAsciiString("\";\n");
|
||||
|
||||
of.writeAsciiString("static const OUStringLiteral nbOfPartitiveMonths = u\"");
|
||||
of.writeAsciiString("static constexpr OUStringLiteral nbOfPartitiveMonths = u\"");
|
||||
for(i = 0; i < nbOfCalendars; i++) {
|
||||
of.writeAsciiString("\\x");
|
||||
of.writeHexInt(nbOfPartitiveMonths[i]);
|
||||
}
|
||||
of.writeAsciiString("\";\n");
|
||||
|
||||
of.writeAsciiString("static const OUStringLiteral nbOfEras = u\"");
|
||||
of.writeAsciiString("static constexpr OUStringLiteral nbOfEras = u\"");
|
||||
for(i = 0; i < nbOfCalendars; i++) {
|
||||
of.writeAsciiString("\\x");
|
||||
of.writeHexInt(nbOfEras[i]);
|
||||
|
||||
@@ -356,7 +356,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
|
||||
if (aLocaleStr.isEmpty())
|
||||
aLocaleStr = officecfg::System::L10N::Locale::get();
|
||||
|
||||
static const OUStringLiteral EN_US = u"en-US";
|
||||
static constexpr OUStringLiteral EN_US = u"en-US";
|
||||
if (aLocaleStr.isEmpty())
|
||||
aLocaleStr = EN_US;
|
||||
|
||||
|
||||
@@ -710,10 +710,10 @@ void LngSvcMgr::UpdateAll()
|
||||
|
||||
void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
|
||||
{
|
||||
static const OUStringLiteral aSpellCheckerList( u"ServiceManager/SpellCheckerList" );
|
||||
static const OUStringLiteral aGrammarCheckerList( u"ServiceManager/GrammarCheckerList" );
|
||||
static const OUStringLiteral aHyphenatorList( u"ServiceManager/HyphenatorList" );
|
||||
static const OUStringLiteral aThesaurusList( u"ServiceManager/ThesaurusList" );
|
||||
static constexpr OUStringLiteral aSpellCheckerList( u"ServiceManager/SpellCheckerList" );
|
||||
static constexpr OUStringLiteral aGrammarCheckerList( u"ServiceManager/GrammarCheckerList" );
|
||||
static constexpr OUStringLiteral aHyphenatorList( u"ServiceManager/HyphenatorList" );
|
||||
static constexpr OUStringLiteral aThesaurusList( u"ServiceManager/ThesaurusList" );
|
||||
|
||||
const uno::Sequence< OUString > aSpellCheckerListEntries( GetNodeNames( aSpellCheckerList ) );
|
||||
const uno::Sequence< OUString > aGrammarCheckerListEntries( GetNodeNames( aGrammarCheckerList ) );
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<xsl:text>: public comphelper::ConfigurationGroup< </xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>> {
</xsl:text>
|
||||
<xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
|
||||
<xsl:text> static OUString path() { static constexpr OUStringLiteral PATH(<!--
|
||||
-->u"</xsl:text>
|
||||
<xsl:value-of select="$path"/>
|
||||
<xsl:text>/</xsl:text>
|
||||
@@ -163,7 +163,7 @@
|
||||
<xsl:text>: public comphelper::ConfigurationSet< </xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>> {
</xsl:text>
|
||||
<xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
|
||||
<xsl:text> static OUString path() { static constexpr OUStringLiteral PATH(<!--
|
||||
-->u"</xsl:text>
|
||||
<xsl:value-of select="$path"/>
|
||||
<xsl:text>/</xsl:text>
|
||||
@@ -252,7 +252,7 @@
|
||||
<xsl:text>> </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>> {
</xsl:text>
|
||||
<xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
|
||||
<xsl:text> static OUString path() { static constexpr OUStringLiteral PATH(<!--
|
||||
-->u"</xsl:text>
|
||||
<xsl:value-of select="$path"/>
|
||||
<xsl:text>/</xsl:text>
|
||||
|
||||
@@ -269,10 +269,10 @@ OUString FilterBase::getAbsoluteUrl( const OUString& rUrl ) const
|
||||
{
|
||||
// handle some special cases before calling ::rtl::Uri::convertRelToAbs()
|
||||
|
||||
static const OUStringLiteral aFileSchema = u"file:";
|
||||
static const OUStringLiteral aFilePrefix = u"file:///";
|
||||
static constexpr OUStringLiteral aFileSchema = u"file:";
|
||||
static constexpr OUStringLiteral aFilePrefix = u"file:///";
|
||||
const sal_Int32 nFilePrefixLen = aFilePrefix.getLength();
|
||||
static const OUStringLiteral aUncPrefix = u"//";
|
||||
static constexpr OUStringLiteral aUncPrefix = u"//";
|
||||
|
||||
/* (1) convert all backslashes to slashes, and check that passed URL is
|
||||
not empty. */
|
||||
|
||||
@@ -134,8 +134,8 @@ void CustomShapeProperties::pushToPropSet(
|
||||
|
||||
if ( !maAdjustmentGuideList.empty() )
|
||||
{
|
||||
static const OUStringLiteral sCustomShapeGeometry(u"CustomShapeGeometry");
|
||||
static const OUStringLiteral sAdjustmentValues(u"AdjustmentValues");
|
||||
static constexpr OUStringLiteral sCustomShapeGeometry(u"CustomShapeGeometry");
|
||||
static constexpr OUStringLiteral sAdjustmentValues(u"AdjustmentValues");
|
||||
uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry );
|
||||
uno::Sequence< beans::PropertyValue > aGeoPropSeq;
|
||||
if ( aGeoPropSet >>= aGeoPropSeq )
|
||||
|
||||
@@ -155,9 +155,9 @@ void FontworkHelpers::putCustomShapeIntoTextPathMode(
|
||||
= comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(aGeomPropSeq);
|
||||
|
||||
// Reset old properties
|
||||
static const OUStringLiteral sTextPath(u"TextPath");
|
||||
static const OUStringLiteral sAdjustmentValues(u"AdjustmentValues");
|
||||
static const OUStringLiteral sPresetTextWarp(u"PresetTextWarp");
|
||||
static constexpr OUStringLiteral sTextPath(u"TextPath");
|
||||
static constexpr OUStringLiteral sAdjustmentValues(u"AdjustmentValues");
|
||||
static constexpr OUStringLiteral sPresetTextWarp(u"PresetTextWarp");
|
||||
|
||||
resetPropertyValueInVec(aGeomPropVec, u"CoordinateSize");
|
||||
resetPropertyValueInVec(aGeomPropVec, u"Equations");
|
||||
|
||||
@@ -81,7 +81,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent,
|
||||
// ppaction://macro?name=MACRO_NAME
|
||||
// ppaction://program
|
||||
|
||||
static const OUStringLiteral sPPAction( u"ppaction://" );
|
||||
static constexpr OUStringLiteral sPPAction( u"ppaction://" );
|
||||
if ( aAction.matchIgnoreAsciiCase( sPPAction ) )
|
||||
{
|
||||
OUString aPPAct( aAction.copy( sPPAction.getLength() ) );
|
||||
@@ -90,7 +90,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent,
|
||||
|
||||
if ( aPPAction.match( "hlinkshowjump" ) )
|
||||
{
|
||||
static const OUStringLiteral sJump( u"jump=" );
|
||||
static constexpr OUStringLiteral sJump( u"jump=" );
|
||||
if ( aPPAct.match( sJump, nIndex + 1 ) )
|
||||
{
|
||||
std::u16string_view aDestination( aPPAct.subView( nIndex + 1 + sJump.getLength() ) );
|
||||
|
||||
@@ -1413,7 +1413,7 @@ Reference< XShape > const & Shape::createAndInsert(
|
||||
if(mnRotation)
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
|
||||
static const OUStringLiteral aGrabBagPropName = u"FrameInteropGrabBag";
|
||||
static constexpr OUStringLiteral aGrabBagPropName = u"FrameInteropGrabBag";
|
||||
uno::Sequence<beans::PropertyValue> aGrabBag;
|
||||
xPropertySet->getPropertyValue(aGrabBagPropName) >>= aGrabBag;
|
||||
beans::PropertyValue aPair(comphelper::makePropertyValue("mso-rotation-angle",
|
||||
|
||||
@@ -646,7 +646,7 @@ static void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHa
|
||||
{
|
||||
for ( const Sequence< PropertyValue >& rPropSeq : rHandles )
|
||||
{
|
||||
static const OUStringLiteral sPosition( u"Position" );
|
||||
static constexpr OUStringLiteral sPosition( u"Position" );
|
||||
bool bPosition = false;
|
||||
EnhancedCustomShapeParameterPair aPosition;
|
||||
for ( const PropertyValue& rPropVal: rPropSeq )
|
||||
|
||||
@@ -909,7 +909,7 @@ void PropertyMap::dumpCode( const Reference< XPropertySet >& rXPropSet )
|
||||
{
|
||||
Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
|
||||
const Sequence< Property > props = info->getProperties ();
|
||||
static const OUStringLiteral sType = u"Type";
|
||||
static constexpr OUStringLiteral sType = u"Type";
|
||||
|
||||
for (const Property& rProp : props) {
|
||||
|
||||
|
||||
@@ -803,7 +803,7 @@ void VbaUserForm::importForm( const Reference< XNameContainer >& rxDialogLib,
|
||||
|
||||
// scan for the line 'Begin {GUID} <FormName>'
|
||||
TextInputStream aFrameTextStrm( mxContext, aInStrm, eTextEnc );
|
||||
static const OUStringLiteral aBegin = u"Begin";
|
||||
static constexpr OUStringLiteral aBegin = u"Begin";
|
||||
OUString aLine;
|
||||
bool bBeginFound = false;
|
||||
while( !bBeginFound && !aFrameTextStrm.isEof() )
|
||||
|
||||
@@ -773,7 +773,7 @@ void exportDirStream(SvStream& rStrm,
|
||||
aDirStream.WriteUInt32(0x00000000); // reserved
|
||||
|
||||
#if VBA_EXPORT_DEBUG
|
||||
static const OUStringLiteral aDirFileName(u"/tmp/vba_dir_out.bin");
|
||||
static constexpr OUStringLiteral aDirFileName(u"/tmp/vba_dir_out.bin");
|
||||
SvFileStream aDirStreamDebug(aDirFileName, StreamMode::READWRITE);
|
||||
aDirStream.Seek(0);
|
||||
aDirStreamDebug.WriteStream(aDirStream);
|
||||
|
||||
@@ -182,7 +182,7 @@ void PPTShape::addShape(
|
||||
if (sServiceName != "com.sun.star.drawing.GraphicObjectShape" &&
|
||||
sServiceName != "com.sun.star.drawing.OLE2Shape")
|
||||
{
|
||||
static const OUStringLiteral sOutlinerShapeService(u"com.sun.star.presentation.OutlinerShape");
|
||||
static constexpr OUStringLiteral sOutlinerShapeService(u"com.sun.star.presentation.OutlinerShape");
|
||||
SAL_INFO("oox.ppt","has master: " << std::hex << rSlidePersist.getMasterPersist().get());
|
||||
switch (mnSubType)
|
||||
{
|
||||
|
||||
@@ -194,7 +194,7 @@ void PresentationFragmentHandler::importCustomSlideShow(std::vector<CustomShow>&
|
||||
UNO_QUERY);
|
||||
if (xShow.is())
|
||||
{
|
||||
static const OUStringLiteral sSlide = u"slides/slide";
|
||||
static constexpr OUStringLiteral sSlide = u"slides/slide";
|
||||
for (size_t j = 0; j < rCustomShowList[i].maSldLst.size(); ++j)
|
||||
{
|
||||
OUString sCustomSlide = rCustomShowList[i].maSldLst[j];
|
||||
@@ -228,7 +228,7 @@ void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::Theme
|
||||
{
|
||||
uno::Reference<beans::XPropertySetInfo> xPropsInfo = xDocProps->getPropertySetInfo();
|
||||
|
||||
static const OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
|
||||
static constexpr OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
|
||||
if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(aGrabBagPropName))
|
||||
{
|
||||
// get existing grab bag
|
||||
|
||||
@@ -241,10 +241,10 @@ void SlidePersist::applyTextStyles( const XmlFilterBase& rFilterBase )
|
||||
OUString aStyle;
|
||||
OUString aFamily;
|
||||
|
||||
static const OUStringLiteral sOutline( u"outline1" );
|
||||
static const OUStringLiteral sTitle( u"title" );
|
||||
static const OUStringLiteral sStandard( u"standard" );
|
||||
static const OUStringLiteral sSubtitle( u"subtitle" );
|
||||
static constexpr OUStringLiteral sOutline( u"outline1" );
|
||||
static constexpr OUStringLiteral sTitle( u"title" );
|
||||
static constexpr OUStringLiteral sStandard( u"standard" );
|
||||
static constexpr OUStringLiteral sSubtitle( u"subtitle" );
|
||||
|
||||
for( int i = 0; i < 4; i++ ) // todo: aggregation of bodystyle (subtitle)
|
||||
{
|
||||
|
||||
@@ -312,7 +312,7 @@ void ShapeBase::finalizeFragmentImport()
|
||||
else {
|
||||
// Temporary fix, shapetype not found if referenced from different substream
|
||||
// FIXME: extend scope of ShapeContainer to store all shapetypes from the document
|
||||
static const OUStringLiteral sShapeTypePrefix = u"shapetype_";
|
||||
static constexpr OUStringLiteral sShapeTypePrefix = u"shapetype_";
|
||||
OUString tmp;
|
||||
if (aType.startsWith(sShapeTypePrefix)) {
|
||||
maTypeModel.moShapeType = o3tl::toInt32(aType.subView(sShapeTypePrefix.getLength()));
|
||||
|
||||
@@ -45,24 +45,24 @@ using namespace ::com::sun::star;
|
||||
|
||||
ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > const & xHandler, const uno::Sequence< uno::Sequence < beans::PropertyValue > >& rManList )
|
||||
{
|
||||
static const OUStringLiteral sKeyInfo ( u"KeyInfo" );
|
||||
static const OUStringLiteral sPgpKeyIDProperty ( u"KeyId" );
|
||||
static const OUStringLiteral sPgpKeyPacketProperty ( u"KeyPacket" );
|
||||
static const OUStringLiteral sCipherValueProperty ( u"CipherValue" );
|
||||
static const OUStringLiteral sFullPathProperty ( u"FullPath" );
|
||||
static const OUStringLiteral sVersionProperty ( u"Version" );
|
||||
static const OUStringLiteral sMediaTypeProperty ( u"MediaType" );
|
||||
static const OUStringLiteral sIterationCountProperty ( u"IterationCount" );
|
||||
static const OUStringLiteral sDerivedKeySizeProperty ( u"DerivedKeySize" );
|
||||
static const OUStringLiteral sSaltProperty ( u"Salt" );
|
||||
static const OUStringLiteral sInitialisationVectorProperty( u"InitialisationVector" );
|
||||
static const OUStringLiteral sSizeProperty ( u"Size" );
|
||||
static const OUStringLiteral sDigestProperty ( u"Digest" );
|
||||
static const OUStringLiteral sEncryptionAlgProperty ( u"EncryptionAlgorithm" );
|
||||
static const OUStringLiteral sStartKeyAlgProperty ( u"StartKeyAlgorithm" );
|
||||
static const OUStringLiteral sDigestAlgProperty ( u"DigestAlgorithm" );
|
||||
static constexpr OUStringLiteral sKeyInfo ( u"KeyInfo" );
|
||||
static constexpr OUStringLiteral sPgpKeyIDProperty ( u"KeyId" );
|
||||
static constexpr OUStringLiteral sPgpKeyPacketProperty ( u"KeyPacket" );
|
||||
static constexpr OUStringLiteral sCipherValueProperty ( u"CipherValue" );
|
||||
static constexpr OUStringLiteral sFullPathProperty ( u"FullPath" );
|
||||
static constexpr OUStringLiteral sVersionProperty ( u"Version" );
|
||||
static constexpr OUStringLiteral sMediaTypeProperty ( u"MediaType" );
|
||||
static constexpr OUStringLiteral sIterationCountProperty ( u"IterationCount" );
|
||||
static constexpr OUStringLiteral sDerivedKeySizeProperty ( u"DerivedKeySize" );
|
||||
static constexpr OUStringLiteral sSaltProperty ( u"Salt" );
|
||||
static constexpr OUStringLiteral sInitialisationVectorProperty( u"InitialisationVector" );
|
||||
static constexpr OUStringLiteral sSizeProperty ( u"Size" );
|
||||
static constexpr OUStringLiteral sDigestProperty ( u"Digest" );
|
||||
static constexpr OUStringLiteral sEncryptionAlgProperty ( u"EncryptionAlgorithm" );
|
||||
static constexpr OUStringLiteral sStartKeyAlgProperty ( u"StartKeyAlgorithm" );
|
||||
static constexpr OUStringLiteral sDigestAlgProperty ( u"DigestAlgorithm" );
|
||||
|
||||
static const OUStringLiteral sWhiteSpace ( u" " );
|
||||
static constexpr OUStringLiteral sWhiteSpace ( u" " );
|
||||
|
||||
const OUString sSHA256_URL_ODF12 ( SHA256_URL_ODF12 );
|
||||
const OUString sSHA1_Name ( SHA1_NAME );
|
||||
|
||||
@@ -168,11 +168,11 @@ void ZipPackage::parseManifest()
|
||||
return;
|
||||
|
||||
bool bManifestParsed = false;
|
||||
static const OUStringLiteral sMeta (u"META-INF");
|
||||
static constexpr OUStringLiteral sMeta (u"META-INF");
|
||||
if ( m_xRootFolder->hasByName( sMeta ) )
|
||||
{
|
||||
try {
|
||||
static const OUStringLiteral sManifest (u"manifest.xml");
|
||||
static constexpr OUStringLiteral sManifest (u"manifest.xml");
|
||||
Any aAny = m_xRootFolder->getByName( sMeta );
|
||||
uno::Reference< XNameContainer > xMetaInfFolder;
|
||||
aAny >>= xMetaInfFolder;
|
||||
@@ -185,19 +185,19 @@ void ZipPackage::parseManifest()
|
||||
{
|
||||
uno::Reference < XManifestReader > xReader = ManifestReader::create( m_xContext );
|
||||
|
||||
static const OUStringLiteral sPropFullPath (u"FullPath");
|
||||
static const OUStringLiteral sPropVersion (u"Version");
|
||||
static const OUStringLiteral sPropMediaType (u"MediaType");
|
||||
static const OUStringLiteral sPropInitialisationVector (u"InitialisationVector");
|
||||
static const OUStringLiteral sPropSalt (u"Salt");
|
||||
static const OUStringLiteral sPropIterationCount (u"IterationCount");
|
||||
static const OUStringLiteral sPropSize (u"Size");
|
||||
static const OUStringLiteral sPropDigest (u"Digest");
|
||||
static const OUStringLiteral sPropDerivedKeySize (u"DerivedKeySize");
|
||||
static const OUStringLiteral sPropDigestAlgorithm (u"DigestAlgorithm");
|
||||
static const OUStringLiteral sPropEncryptionAlgorithm (u"EncryptionAlgorithm");
|
||||
static const OUStringLiteral sPropStartKeyAlgorithm (u"StartKeyAlgorithm");
|
||||
static const OUStringLiteral sKeyInfo (u"KeyInfo");
|
||||
static constexpr OUStringLiteral sPropFullPath (u"FullPath");
|
||||
static constexpr OUStringLiteral sPropVersion (u"Version");
|
||||
static constexpr OUStringLiteral sPropMediaType (u"MediaType");
|
||||
static constexpr OUStringLiteral sPropInitialisationVector (u"InitialisationVector");
|
||||
static constexpr OUStringLiteral sPropSalt (u"Salt");
|
||||
static constexpr OUStringLiteral sPropIterationCount (u"IterationCount");
|
||||
static constexpr OUStringLiteral sPropSize (u"Size");
|
||||
static constexpr OUStringLiteral sPropDigest (u"Digest");
|
||||
static constexpr OUStringLiteral sPropDerivedKeySize (u"DerivedKeySize");
|
||||
static constexpr OUStringLiteral sPropDigestAlgorithm (u"DigestAlgorithm");
|
||||
static constexpr OUStringLiteral sPropEncryptionAlgorithm (u"EncryptionAlgorithm");
|
||||
static constexpr OUStringLiteral sPropStartKeyAlgorithm (u"StartKeyAlgorithm");
|
||||
static constexpr OUStringLiteral sKeyInfo (u"KeyInfo");
|
||||
|
||||
const uno::Sequence < uno::Sequence < PropertyValue > > aManifestSequence = xReader->readManifestSequence ( xSink->getInputStream() );
|
||||
const Any *pKeyInfo = nullptr;
|
||||
@@ -370,7 +370,7 @@ void ZipPackage::parseManifest()
|
||||
throw ZipIOException(
|
||||
THROW_WHERE "Could not parse manifest.xml" );
|
||||
|
||||
static const OUStringLiteral sMimetype (u"mimetype");
|
||||
static constexpr OUStringLiteral sMimetype (u"mimetype");
|
||||
if ( m_xRootFolder->hasByName( sMimetype ) )
|
||||
{
|
||||
// get mediatype from the "mimetype" stream
|
||||
@@ -447,7 +447,7 @@ void ZipPackage::parseContentType()
|
||||
return;
|
||||
|
||||
try {
|
||||
static const OUStringLiteral aContentTypes(u"[Content_Types].xml");
|
||||
static constexpr OUStringLiteral aContentTypes(u"[Content_Types].xml");
|
||||
// the content type must exist in OFOPXML format!
|
||||
if ( !m_xRootFolder->hasByName( aContentTypes ) )
|
||||
throw io::IOException(THROW_WHERE "Wrong format!" );
|
||||
@@ -1001,7 +1001,7 @@ uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( c
|
||||
|
||||
void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
|
||||
{
|
||||
static const OUStringLiteral sMime (u"mimetype");
|
||||
static constexpr OUStringLiteral sMime (u"mimetype");
|
||||
if ( m_xRootFolder->hasByName( sMime ) )
|
||||
m_xRootFolder->removeByName( sMime );
|
||||
|
||||
@@ -1214,7 +1214,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
|
||||
|
||||
if ( m_xRootFolder->hasByName( sMeta ) )
|
||||
{
|
||||
static const OUStringLiteral sManifest (u"manifest.xml");
|
||||
static constexpr OUStringLiteral sManifest (u"manifest.xml");
|
||||
|
||||
uno::Reference< XNameContainer > xMetaInfFolder;
|
||||
Any aAny = m_xRootFolder->getByName( sMeta );
|
||||
|
||||
@@ -435,11 +435,11 @@ bool ZipPackageStream::saveChild(
|
||||
{
|
||||
bool bSuccess = true;
|
||||
|
||||
static const OUStringLiteral sDigestProperty (u"Digest");
|
||||
static const OUStringLiteral sEncryptionAlgProperty (u"EncryptionAlgorithm");
|
||||
static const OUStringLiteral sStartKeyAlgProperty (u"StartKeyAlgorithm");
|
||||
static const OUStringLiteral sDigestAlgProperty (u"DigestAlgorithm");
|
||||
static const OUStringLiteral sDerivedKeySizeProperty (u"DerivedKeySize");
|
||||
static constexpr OUStringLiteral sDigestProperty (u"Digest");
|
||||
static constexpr OUStringLiteral sEncryptionAlgProperty (u"EncryptionAlgorithm");
|
||||
static constexpr OUStringLiteral sStartKeyAlgProperty (u"StartKeyAlgorithm");
|
||||
static constexpr OUStringLiteral sDigestAlgProperty (u"DigestAlgorithm");
|
||||
static constexpr OUStringLiteral sDerivedKeySizeProperty (u"DerivedKeySize");
|
||||
|
||||
uno::Sequence < beans::PropertyValue > aPropSet (PKG_SIZE_NOENCR_MNFST);
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ namespace rptui
|
||||
OUString sMatchExpression( m_sPattern );
|
||||
sMatchExpression = sMatchExpression.replaceAll(u"$$", _rFieldDataSource);
|
||||
|
||||
static const OUStringLiteral sLHSPattern( u"$1" );
|
||||
static const OUStringLiteral sRHSPattern( u"$2" );
|
||||
static constexpr OUStringLiteral sLHSPattern( u"$1" );
|
||||
static constexpr OUStringLiteral sRHSPattern( u"$2" );
|
||||
sal_Int32 nLHSIndex( sMatchExpression.indexOf( sLHSPattern ) );
|
||||
sal_Int32 nRHSIndex( sMatchExpression.indexOf( sRHSPattern ) );
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace rptui
|
||||
return;
|
||||
|
||||
OUString sDataField( _rxFormatted->getDataField() );
|
||||
static const OUStringLiteral sFieldPrefix( u"field:[" );
|
||||
static constexpr OUStringLiteral sFieldPrefix( u"field:[" );
|
||||
if ( sDataField.indexOf( sFieldPrefix ) != 0 )
|
||||
// not bound to a table field
|
||||
// TODO: we might also do this kind of thing for functions and expressions ...
|
||||
|
||||
@@ -112,11 +112,11 @@ void SAL_CALL DataProviderHandler::inspect(const uno::Reference< uno::XInterface
|
||||
try
|
||||
{
|
||||
uno::Reference< container::XNameContainer > xNameCont(Component,uno::UNO_QUERY);
|
||||
static const OUStringLiteral sFormComponent(u"FormComponent");
|
||||
static constexpr OUStringLiteral sFormComponent(u"FormComponent");
|
||||
if ( xNameCont->hasByName(sFormComponent) )
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xProp(xNameCont->getByName(sFormComponent),uno::UNO_QUERY);
|
||||
static const OUStringLiteral sModel(u"Model");
|
||||
static constexpr OUStringLiteral sModel(u"Model");
|
||||
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(sModel) )
|
||||
{
|
||||
m_xChartModel.set(xProp->getPropertyValue(sModel),uno::UNO_QUERY);
|
||||
|
||||
@@ -282,7 +282,7 @@ void SAL_CALL GeometryHandler::inspect( const uno::Reference< uno::XInterface >
|
||||
const uno::Reference< container::XNameContainer > xObjectAsContainer( _rxInspectee, uno::UNO_QUERY );
|
||||
m_xReportComponent.set( xObjectAsContainer->getByName("ReportComponent"), uno::UNO_QUERY );
|
||||
|
||||
static const OUStringLiteral sRowSet(u"RowSet");
|
||||
static constexpr OUStringLiteral sRowSet(u"RowSet");
|
||||
if ( xObjectAsContainer->hasByName( sRowSet ) )
|
||||
{
|
||||
const uno::Any aRowSet( xObjectAsContainer->getByName(sRowSet) );
|
||||
@@ -2093,8 +2093,8 @@ void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,std::u1
|
||||
m_xFunction.set(report::Function::create(m_xContext));
|
||||
m_xFunction->setName( _sFunctionName );
|
||||
|
||||
static const OUStringLiteral sPlaceHolder1(u"%Column");
|
||||
static const OUStringLiteral sPlaceHolder2(u"%FunctionName");
|
||||
static constexpr OUStringLiteral sPlaceHolder1(u"%Column");
|
||||
static constexpr OUStringLiteral sPlaceHolder2(u"%FunctionName");
|
||||
OUString sFormula(_aFunction.m_sFormula);
|
||||
sFormula = sFormula.replaceAll(sPlaceHolder1,_sDataField);
|
||||
sFormula = sFormula.replaceAll(sPlaceHolder2,_sFunctionName);
|
||||
|
||||
@@ -86,10 +86,10 @@ void SAL_CALL ReportComponentHandler::inspect(const uno::Reference< uno::XInterf
|
||||
try
|
||||
{
|
||||
uno::Reference< container::XNameContainer > xNameCont(Component,uno::UNO_QUERY);
|
||||
static const OUStringLiteral sFormComponent(u"FormComponent");
|
||||
static constexpr OUStringLiteral sFormComponent(u"FormComponent");
|
||||
if ( xNameCont->hasByName(sFormComponent) )
|
||||
xNameCont->getByName(sFormComponent) >>= m_xFormComponent;
|
||||
static const OUStringLiteral sRowSet(u"RowSet");
|
||||
static constexpr OUStringLiteral sRowSet(u"RowSet");
|
||||
if ( xNameCont->hasByName(sRowSet) )
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> xProp(m_xFormComponentHandler,uno::UNO_QUERY);
|
||||
|
||||
@@ -3990,7 +3990,7 @@ void OReportController::checkChartEnabled()
|
||||
::utl::OConfigurationTreeRoot::createWithComponentContext( m_xContext, "/org.openoffice.Office.ReportDesign" ) );
|
||||
|
||||
bool bChartEnabled = false;
|
||||
static const OUStringLiteral sPropertyName( u"UserData/Chart" );
|
||||
static constexpr OUStringLiteral sPropertyName( u"UserData/Chart" );
|
||||
if ( aConfiguration.hasByHierarchicalName(sPropertyName) )
|
||||
aConfiguration.getNodeValue( sPropertyName ) >>= bChartEnabled;
|
||||
m_bChartEnabled = bChartEnabled;
|
||||
|
||||
@@ -69,9 +69,9 @@ public:
|
||||
void getAppCommandArg_001()
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
static const OUStringLiteral EXECUTABLE_NAME(u"child_process.exe");
|
||||
static constexpr OUStringLiteral EXECUTABLE_NAME(u"child_process.exe");
|
||||
#else
|
||||
static const OUStringLiteral EXECUTABLE_NAME(u"child_process");
|
||||
static constexpr OUStringLiteral EXECUTABLE_NAME(u"child_process");
|
||||
#endif
|
||||
OUString suCWD = getModulePath();
|
||||
// OUString suCWD2 = getExecutableDirectory();
|
||||
@@ -198,9 +198,9 @@ public:
|
||||
void getGlobalProcessId_002()
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
static const OUStringLiteral EXEC_NAME(u"child_process_id.exe");
|
||||
static constexpr OUStringLiteral EXEC_NAME(u"child_process_id.exe");
|
||||
#else
|
||||
static const OUStringLiteral EXEC_NAME(u"child_process_id");
|
||||
static constexpr OUStringLiteral EXEC_NAME(u"child_process_id");
|
||||
#endif
|
||||
sal_uInt8 pTargetUUID1[16];
|
||||
rtl_getGlobalProcessId( pTargetUUID1 );
|
||||
|
||||
@@ -269,9 +269,9 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testTdf89920)
|
||||
CPPUNIT_TEST_FIXTURE(ScMacrosTest, testPasswordProtectedUnicodeString)
|
||||
{
|
||||
const OUString sCorrectString(u"English Русский 中文");
|
||||
static const OUStringLiteral sMacroURL(
|
||||
static constexpr OUStringLiteral sMacroURL(
|
||||
u"vnd.sun.Star.script:Protected.Module1.TestUnicodeString?language=Basic&location=document");
|
||||
static const OUStringLiteral sLibName(u"Protected");
|
||||
static constexpr OUStringLiteral sLibName(u"Protected");
|
||||
|
||||
createScDoc("tdf57113.ods");
|
||||
|
||||
@@ -309,9 +309,9 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testPasswordProtectedUnicodeString)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScMacrosTest, testPasswordProtectedArrayInUserType)
|
||||
{
|
||||
static const OUStringLiteral sMacroURL(
|
||||
static constexpr OUStringLiteral sMacroURL(
|
||||
u"vnd.sun.Star.script:Protected.Module1.TestMyType?language=Basic&location=document");
|
||||
static const OUStringLiteral sLibName(u"Protected");
|
||||
static constexpr OUStringLiteral sLibName(u"Protected");
|
||||
|
||||
createScDoc("ProtectedArrayInCustomType.ods");
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ VclPtr<VclAbstractDialog> ScScreenshotTest::createDialogByID(sal_uInt32 nID)
|
||||
{
|
||||
VclPtr<VclAbstractDialog> pReturnDialog;
|
||||
////FIXME: translatable string here
|
||||
static const OUStringLiteral aDefaultSheetName(u"Sheet1");
|
||||
static constexpr OUStringLiteral aDefaultSheetName(u"Sheet1");
|
||||
|
||||
switch ( nID )
|
||||
{
|
||||
|
||||
@@ -1911,8 +1911,8 @@ bool XclExpChSeries::ConvertDataSeries(
|
||||
Reference< XColorScheme > xColorScheme = xDiagram->getDefaultColorScheme();
|
||||
if( xColorScheme.is() )
|
||||
{
|
||||
static const OUStringLiteral aFillStyleName = u"FillStyle";
|
||||
static const OUStringLiteral aColorName = u"Color";
|
||||
static constexpr OUStringLiteral aFillStyleName = u"FillStyle";
|
||||
static constexpr OUStringLiteral aColorName = u"Color";
|
||||
namespace cssd = ::com::sun::star::drawing;
|
||||
for( sal_Int32 nPointIdx = 0; nPointIdx < nMaxPointCount; ++nPointIdx )
|
||||
{
|
||||
|
||||
@@ -1013,7 +1013,7 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm )
|
||||
OUString aTables( rStrm.ReadUniString() );
|
||||
|
||||
const sal_Unicode cSep = ';';
|
||||
static const OUStringLiteral aQuotedPairs( u"\"\"" );
|
||||
static constexpr OUStringLiteral aQuotedPairs( u"\"\"" );
|
||||
maTables.clear();
|
||||
for ( sal_Int32 nStringIx {aTables.isEmpty() ? -1 : 0}; nStringIx>=0; )
|
||||
{
|
||||
|
||||
@@ -249,7 +249,7 @@ void QueryTable::finalizeImport()
|
||||
PropertySet aDocProps( getDocument() );
|
||||
Reference< XAreaLinks > xAreaLinks( aDocProps.getAnyProperty( PROP_AreaLinks ), UNO_QUERY_THROW );
|
||||
CellAddress aDestPos( aDestRange.aStart.Tab(), aDestRange.aStart.Col(), aDestRange.aStart.Row() );
|
||||
static const OUStringLiteral aFilterName = u"calc_HTML_WebQuery";
|
||||
static constexpr OUStringLiteral aFilterName = u"calc_HTML_WebQuery";
|
||||
xAreaLinks->insertAtPosition( aDestPos, aFileUrl, aTables, aFilterName, /*aFilterOptions*/"" );
|
||||
// set refresh interval (convert minutes to seconds)
|
||||
sal_Int32 nRefreshPeriod = xConnection->getModel().mnInterval * 60;
|
||||
|
||||
@@ -164,7 +164,7 @@ bool lcl_IsFontwork( const SdrObject* pObj )
|
||||
bool bIsFontwork = false;
|
||||
if( pObj->GetObjIdentifier() == SdrObjKind::CustomShape )
|
||||
{
|
||||
static const OUStringLiteral aTextPath = u"TextPath";
|
||||
static constexpr OUStringLiteral aTextPath = u"TextPath";
|
||||
const SdrCustomShapeGeometryItem& rGeometryItem =
|
||||
pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
|
||||
if( const Any* pAny = rGeometryItem.GetPropertyValueByName( aTextPath, aTextPath ) )
|
||||
|
||||
@@ -384,7 +384,7 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
|
||||
// and the property name is "MacroName".
|
||||
bool bScriptURL = SfxApplication::IsXScriptURL( rValidation.sErrorTitle );
|
||||
|
||||
static const OUStringLiteral sScript(u"Script");
|
||||
static constexpr OUStringLiteral sScript(u"Script");
|
||||
uno::Sequence<beans::PropertyValue> aSeq( comphelper::InitPropertySequence({
|
||||
{ "EventType", uno::Any(bScriptURL ? sScript : OUString("StarBasic")) },
|
||||
{ "Library", uno::Any(OUString()) },
|
||||
|
||||
@@ -71,7 +71,7 @@ ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell)
|
||||
output.writeString(getLabel());
|
||||
output.nextColumn();
|
||||
|
||||
static const OUStringLiteral strWildcardNumber(u"%NUMBER%");
|
||||
static constexpr OUStringLiteral strWildcardNumber(u"%NUMBER%");
|
||||
|
||||
// write labels to columns
|
||||
for (size_t i = 0; i < aRangeList.size(); i++)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user