loplugin:stringviewparam extend to new..
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -1538,7 +1538,7 @@ void StarBASIC::SetErrorData( ErrCode nCode, sal_uInt16 nLine,
|
||||
aGlobals.nCol2 = nCol2;
|
||||
}
|
||||
|
||||
void StarBASIC::MakeErrorText( ErrCode nId, const OUString& aMsg )
|
||||
void StarBASIC::MakeErrorText( ErrCode nId, std::u16string_view aMsg )
|
||||
{
|
||||
SolarMutexGuard aSolarGuard;
|
||||
sal_uInt16 nOldID = GetVBErrorCode( nId );
|
||||
|
||||
@@ -284,13 +284,13 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
static void implAppendExceptionMsg( OUStringBuffer& _inout_rBuffer, const Exception& _e, const OUString& _rExceptionType, sal_Int32 _nLevel )
|
||||
static void implAppendExceptionMsg( OUStringBuffer& _inout_rBuffer, const Exception& _e, std::u16string_view _rExceptionType, sal_Int32 _nLevel )
|
||||
{
|
||||
_inout_rBuffer.append( "\n" );
|
||||
lcl_indent( _inout_rBuffer, _nLevel );
|
||||
_inout_rBuffer.append( "Type: " );
|
||||
|
||||
if ( _rExceptionType.isEmpty() )
|
||||
if ( _rExceptionType.empty() )
|
||||
_inout_rBuffer.append( "Unknown" );
|
||||
else
|
||||
_inout_rBuffer.append( _rExceptionType );
|
||||
@@ -303,7 +303,7 @@ static void implAppendExceptionMsg( OUStringBuffer& _inout_rBuffer, const Except
|
||||
}
|
||||
|
||||
// construct an error message for the exception
|
||||
static OUString implGetExceptionMsg( const Exception& e, const OUString& aExceptionType_ )
|
||||
static OUString implGetExceptionMsg( const Exception& e, std::u16string_view aExceptionType_ )
|
||||
{
|
||||
OUStringBuffer aMessageBuf;
|
||||
implAppendExceptionMsg( aMessageBuf, e, aExceptionType_, 0 );
|
||||
@@ -338,7 +338,7 @@ static Any convertAny( const Any& rVal, const Type& aDestType )
|
||||
catch( const CannotConvertException& e2 )
|
||||
{
|
||||
StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
|
||||
implGetExceptionMsg( e2, "com.sun.star.lang.IllegalArgumentException" ) );
|
||||
implGetExceptionMsg( e2, u"com.sun.star.lang.IllegalArgumentException" ) );
|
||||
return aConvertedVal;
|
||||
}
|
||||
return aConvertedVal;
|
||||
@@ -4150,7 +4150,7 @@ void RTL_Impl_CreateUnoValue( SbxArray& rPar )
|
||||
catch( const NoSuchElementException& e1 )
|
||||
{
|
||||
StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
|
||||
implGetExceptionMsg( e1, "com.sun.star.container.NoSuchElementException" ) );
|
||||
implGetExceptionMsg( e1, u"com.sun.star.container.NoSuchElementException" ) );
|
||||
return;
|
||||
}
|
||||
Reference< XTypeDescription > xTypeDesc;
|
||||
|
||||
@@ -441,7 +441,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
|
||||
aItemConverter.FillItemSet( aItemSet );
|
||||
ObjectPropertiesDialogParameter aDialogParameter(
|
||||
ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
objType, OUString(), m_aSelection.getSelectedCID()));
|
||||
objType, u"", m_aSelection.getSelectedCID()));
|
||||
aDialogParameter.init( getModel() );
|
||||
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get());
|
||||
SolarMutexGuard aGuard;
|
||||
|
||||
@@ -327,7 +327,7 @@ wrapper::ItemConverter* createItemConverter(
|
||||
OUString lcl_getTitleCIDForCommand( std::string_view rDispatchCommand, const uno::Reference< frame::XModel > & xChartModel )
|
||||
{
|
||||
if( rDispatchCommand == "AllTitles")
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_TITLE, "ALLELEMENTS" );
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_TITLE, u"ALLELEMENTS" );
|
||||
|
||||
TitleHelper::eTitleType nTitleType( TitleHelper::MAIN_TITLE );
|
||||
if( rDispatchCommand == "SubTitle" )
|
||||
@@ -350,7 +350,7 @@ OUString lcl_getTitleCIDForCommand( std::string_view rDispatchCommand, const uno
|
||||
OUString lcl_getAxisCIDForCommand( std::string_view rDispatchCommand, const uno::Reference< frame::XModel >& xChartModel )
|
||||
{
|
||||
if( rDispatchCommand == "DiagramAxisAll")
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_AXIS, "ALLELEMENTS" );
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_AXIS, u"ALLELEMENTS" );
|
||||
|
||||
sal_Int32 nDimensionIndex=0;
|
||||
bool bMainAxis=true;
|
||||
@@ -385,7 +385,7 @@ OUString lcl_getGridCIDForCommand( std::string_view rDispatchCommand, const uno:
|
||||
uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
|
||||
|
||||
if( rDispatchCommand == "DiagramGridAll")
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_GRID, "ALLELEMENTS" );
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_GRID, u"ALLELEMENTS" );
|
||||
|
||||
sal_Int32 nDimensionIndex=0;
|
||||
bool bMainGrid=true;
|
||||
@@ -429,7 +429,7 @@ OUString lcl_getErrorCIDForCommand( const ObjectType eDispatchType, const Object
|
||||
if( eSelectedType == eDispatchType )
|
||||
return rSelectedCID;
|
||||
|
||||
return ObjectIdentifier::createClassifiedIdentifierWithParent( eDispatchType, OUString(), rSelectedCID );
|
||||
return ObjectIdentifier::createClassifiedIdentifierWithParent( eDispatchType, u"", rSelectedCID );
|
||||
}
|
||||
|
||||
OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const uno::Reference< XChartDocument > & xChartDocument, const OUString& rSelectedCID )
|
||||
@@ -520,7 +520,7 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const un
|
||||
return rSelectedCID;
|
||||
else
|
||||
return ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
OBJECTTYPE_DATA_LABELS, OUString(), rSelectedCID );
|
||||
OBJECTTYPE_DATA_LABELS, u"", rSelectedCID );
|
||||
}
|
||||
//data labels
|
||||
else if( rDispatchCommand == "FormatDataLabel" )
|
||||
@@ -536,7 +536,7 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const un
|
||||
OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) + "=" );
|
||||
OUString aLabelsCID = ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle );
|
||||
OUString aLabelCID_Stub = ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
OBJECTTYPE_DATA_LABEL, OUString(), aLabelsCID );
|
||||
OBJECTTYPE_DATA_LABEL, u"", aLabelsCID );
|
||||
|
||||
return ObjectIdentifier::createPointCID( aLabelCID_Stub, nPointIndex );
|
||||
}
|
||||
@@ -631,7 +631,7 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const un
|
||||
if( eSelectedType == OBJECTTYPE_DATA_STOCK_LOSS )
|
||||
return rSelectedCID;
|
||||
else
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DATA_STOCK_LOSS, OUString());
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DATA_STOCK_LOSS, u"");
|
||||
}
|
||||
// stock gain
|
||||
else if( rDispatchCommand == "FormatStockGain" )
|
||||
@@ -639,12 +639,12 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const un
|
||||
if( eSelectedType == OBJECTTYPE_DATA_STOCK_GAIN )
|
||||
return rSelectedCID;
|
||||
else
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DATA_STOCK_GAIN, OUString() );
|
||||
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DATA_STOCK_GAIN, u"" );
|
||||
}
|
||||
|
||||
return ObjectIdentifier::createClassifiedIdentifier(
|
||||
eObjectType,
|
||||
OUString() ); // aParticleID
|
||||
u"" ); // aParticleID
|
||||
}
|
||||
|
||||
}
|
||||
@@ -682,7 +682,7 @@ OUString lcl_getFormatCIDforSelectedCID( const OUString& rSelectedCID )
|
||||
|
||||
// treat diagram as wall
|
||||
if( eObjectType==OBJECTTYPE_DIAGRAM )
|
||||
aFormatCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() );
|
||||
aFormatCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, u"" );
|
||||
|
||||
return aFormatCID;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartD
|
||||
// Chart Area
|
||||
if( m_bOrderingForElementSelector )
|
||||
{
|
||||
aTopLevelContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) );
|
||||
aTopLevelContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );
|
||||
if( xDiagram.is() )
|
||||
{
|
||||
aTopLevelContainer.push_back( aDiaOID );
|
||||
@@ -268,7 +268,7 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartD
|
||||
|
||||
// Chart Area
|
||||
if( !m_bOrderingForElementSelector )
|
||||
aTopLevelContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) );
|
||||
aTopLevelContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );
|
||||
|
||||
if( ! aTopLevelContainer.empty())
|
||||
m_aChildMap[ ObjectHierarchy::getRootNodeOID() ] = aTopLevelContainer;
|
||||
@@ -371,11 +371,11 @@ void ImplObjectHierarchy::createWallAndFloor(
|
||||
bool bHasWall = DiagramHelper::isSupportingFloorAndWall( xDiagram );
|
||||
if( bHasWall && bIsThreeD )
|
||||
{
|
||||
rContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );
|
||||
rContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, u"" ) );
|
||||
|
||||
Reference< beans::XPropertySet > xFloor( xDiagram->getFloor());
|
||||
if( xFloor.is())
|
||||
rContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_FLOOR, OUString() ) );
|
||||
rContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_FLOOR, u"" ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -468,7 +468,7 @@ void ImplObjectHierarchy::createDataSeriesTree(
|
||||
( nStyle != css::chart::ErrorBarStyle::NONE ) )
|
||||
{
|
||||
aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
OBJECTTYPE_DATA_ERRORS_Y, OUString(), aSeriesParticle ) );
|
||||
OBJECTTYPE_DATA_ERRORS_Y, u"", aSeriesParticle ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ void ImplObjectHierarchy::createDataSeriesTree(
|
||||
( nStyle != css::chart::ErrorBarStyle::NONE ) )
|
||||
{
|
||||
aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
OBJECTTYPE_DATA_ERRORS_X, OUString(), aSeriesParticle ) );
|
||||
OBJECTTYPE_DATA_ERRORS_X, u"", aSeriesParticle ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper
|
||||
|
||||
if ( !m_aSelectedOID.isAdditionalShape() )
|
||||
{
|
||||
OUString aPageCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) );//@todo read CID from model
|
||||
OUString aPageCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );//@todo read CID from model
|
||||
|
||||
if ( !m_aSelectedOID.isAutoGeneratedObject() )
|
||||
{
|
||||
@@ -251,7 +251,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper
|
||||
|
||||
//check whether the diagram was hit but not selected (e.g. because it has no filling):
|
||||
OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) );
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, u"" ) );//@todo read CID from model
|
||||
bool bBackGroundHit = m_aSelectedOID.getObjectCID() == aPageCID || m_aSelectedOID.getObjectCID() == aWallCID || !m_aSelectedOID.isAutoGeneratedObject();
|
||||
if( bBackGroundHit )
|
||||
{
|
||||
@@ -401,7 +401,7 @@ OUString SelectionHelper::getHitObjectCID(
|
||||
aRet.clear();
|
||||
}
|
||||
|
||||
OUString aPageCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) );//@todo read CID from model
|
||||
OUString aPageCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );//@todo read CID from model
|
||||
//get page when nothing was hit
|
||||
if( aRet.isEmpty() && !pNewObj )
|
||||
{
|
||||
@@ -426,7 +426,7 @@ OUString SelectionHelper::getHitObjectCID(
|
||||
}
|
||||
else if( bGetDiagramInsteadOf_Wall )
|
||||
{
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, u"" ) );//@todo read CID from model
|
||||
|
||||
if( aRet == aWallCID )
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
|
||||
ChartController* pController = dynamic_cast<ChartController*>(xController.get());
|
||||
if (pController)
|
||||
{
|
||||
pController->select( css::uno::Any( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ) );
|
||||
pController->select( css::uno::Any( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) ) );
|
||||
xSelectionSupplier = css::uno::Reference<css::view::XSelectionSupplier>(xController, css::uno::UNO_QUERY);
|
||||
if (xSelectionSupplier.is())
|
||||
aAny = xSelectionSupplier->getSelection();
|
||||
|
||||
@@ -115,8 +115,8 @@ public:
|
||||
static OUString createClassifiedIdentifierForParticles(
|
||||
const OUString& rParentParticle
|
||||
, const OUString& rChildParticle
|
||||
, const OUString& rDragMethodServiceName = OUString()
|
||||
, const OUString& rDragParameterString = OUString() );
|
||||
, std::u16string_view rDragMethodServiceName = std::u16string_view()
|
||||
, std::u16string_view rDragParameterString = std::u16string_view() );
|
||||
|
||||
static OUString createClassifiedIdentifierForGrid(
|
||||
const css::uno::Reference< css::chart2::XAxis >& xAxis
|
||||
@@ -147,20 +147,20 @@ public:
|
||||
static OUString createParticleForLegend(
|
||||
const css::uno::Reference< css::frame::XModel >& xChartModel );
|
||||
|
||||
static OUString addChildParticle( const OUString& rParticle, const OUString& rChildParticle );
|
||||
static OUString addChildParticle( const OUString& rParticle, std::u16string_view rChildParticle );
|
||||
static OUString createChildParticleWithIndex( ObjectType eObjectType, sal_Int32 nIndex );
|
||||
static sal_Int32 getIndexFromParticleOrCID( const OUString& rParticleOrCID );
|
||||
|
||||
static OUString createClassifiedIdentifier(
|
||||
enum ObjectType eObjectType //e.g. OBJECTTYPE_DATA_SERIES
|
||||
, const OUString& rParticleID );//e.g. SeriesID
|
||||
, std::u16string_view rParticleID );//e.g. SeriesID
|
||||
|
||||
static OUString createClassifiedIdentifierWithParent(
|
||||
enum ObjectType //e.g. OBJECTTYPE_DATA_POINT or OBJECTTYPE_GRID
|
||||
, const OUString& rParticleID //for points or subgrids this is an Index or otherwise an identifier from the model object
|
||||
, const OUString& rParentPartical //e.g. "Series=SeriesID" or "Grid=GridId"
|
||||
, const OUString& rDragMethodServiceName = OUString()
|
||||
, const OUString& rDragParameterString = OUString()
|
||||
, std::u16string_view rParticleID //for points or subgrids this is an Index or otherwise an identifier from the model object
|
||||
, std::u16string_view rParentPartical //e.g. "Series=SeriesID" or "Grid=GridId"
|
||||
, std::u16string_view rDragMethodServiceName = std::u16string_view()
|
||||
, std::u16string_view rDragParameterString = std::u16string_view()
|
||||
);
|
||||
|
||||
static bool isCID( const OUString& rName );
|
||||
@@ -179,12 +179,12 @@ public:
|
||||
|
||||
static OUString createSeriesSubObjectStub( ObjectType eSubObjectType
|
||||
, const OUString& rSeriesParticle
|
||||
, const OUString& rDragMethodServiceName = OUString()
|
||||
, const OUString& rDragParameterString = OUString() );
|
||||
, std::u16string_view rDragMethodServiceName = std::u16string_view()
|
||||
, std::u16string_view rDragParameterString = std::u16string_view() );
|
||||
static OUString createPointCID( std::u16string_view rPointCID_Stub, sal_Int32 nIndex );
|
||||
|
||||
static OUString createDataCurveCID( const OUString& rSeriesParticle, sal_Int32 nCurveIndex, bool bAverageLine );
|
||||
static OUString createDataCurveEquationCID( const OUString& rSeriesParticle, sal_Int32 nCurveIndex );
|
||||
static OUString createDataCurveCID( std::u16string_view rSeriesParticle, sal_Int32 nCurveIndex, bool bAverageLine );
|
||||
static OUString createDataCurveEquationCID( std::u16string_view rSeriesParticle, sal_Int32 nCurveIndex );
|
||||
|
||||
SAL_DLLPRIVATE static OUString getObjectID( const OUString& rCID );
|
||||
static OUString getParticleID( const OUString& rCID );
|
||||
|
||||
@@ -62,8 +62,8 @@ namespace
|
||||
{
|
||||
|
||||
OUString lcl_createClassificationStringForType( ObjectType eObjectType
|
||||
, const OUString& rDragMethodServiceName
|
||||
, const OUString& rDragParameterString
|
||||
, std::u16string_view rDragMethodServiceName
|
||||
, std::u16string_view rDragParameterString
|
||||
)
|
||||
{
|
||||
OUStringBuffer aRet;
|
||||
@@ -81,14 +81,14 @@ OUString lcl_createClassificationStringForType( ObjectType eObjectType
|
||||
default:
|
||||
break;//empty string
|
||||
}
|
||||
if( !rDragMethodServiceName.isEmpty() )
|
||||
if( !rDragMethodServiceName.empty() )
|
||||
{
|
||||
if( !aRet.isEmpty() )
|
||||
aRet.append(":");
|
||||
aRet.append( m_aDragMethodEquals );
|
||||
aRet.append( rDragMethodServiceName );
|
||||
|
||||
if( !rDragParameterString.isEmpty() )
|
||||
if( !rDragParameterString.empty() )
|
||||
{
|
||||
if( !aRet.isEmpty() )
|
||||
aRet.append(":");
|
||||
@@ -477,8 +477,8 @@ OUString ObjectIdentifier::createClassifiedIdentifierForParticle(
|
||||
OUString ObjectIdentifier::createClassifiedIdentifierForParticles(
|
||||
const OUString& rParentParticle
|
||||
, const OUString& rChildParticle
|
||||
, const OUString& rDragMethodServiceName
|
||||
, const OUString& rDragParameterString )
|
||||
, std::u16string_view rDragMethodServiceName
|
||||
, std::u16string_view rDragParameterString )
|
||||
{
|
||||
ObjectType eObjectType( ObjectIdentifier::getObjectType( rChildParticle ) );
|
||||
if( eObjectType == OBJECTTYPE_UNKNOWN )
|
||||
@@ -651,18 +651,18 @@ OUString ObjectIdentifier::createParticleForLegend(
|
||||
|
||||
OUString ObjectIdentifier::createClassifiedIdentifier(
|
||||
enum ObjectType eObjectType //e.g. OBJECTTYPE_DATA_SERIES
|
||||
, const OUString& rParticleID )//e.g. SeriesID
|
||||
, std::u16string_view rParticleID )//e.g. SeriesID
|
||||
{
|
||||
return createClassifiedIdentifierWithParent(
|
||||
eObjectType, rParticleID, OUString() );
|
||||
eObjectType, rParticleID, u"" );
|
||||
}
|
||||
|
||||
OUString ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
enum ObjectType eObjectType //e.g. OBJECTTYPE_DATA_POINT or OBJECTTYPE_GRID
|
||||
, const OUString& rParticleID //e.g. Point Index or SubGrid Index
|
||||
, const OUString& rParentPartical //e.g. "Series=SeriesID" or "Grid=GridId"
|
||||
, const OUString& rDragMethodServiceName
|
||||
, const OUString& rDragParameterString
|
||||
, std::u16string_view rParticleID //e.g. Point Index or SubGrid Index
|
||||
, std::u16string_view rParentPartical //e.g. "Series=SeriesID" or "Grid=GridId"
|
||||
, std::u16string_view rDragMethodServiceName
|
||||
, std::u16string_view rDragParameterString
|
||||
)
|
||||
//, bool bIsMultiClickObject ) //e.g. true
|
||||
{
|
||||
@@ -673,7 +673,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
if(aRet.getLength() > static_cast<sal_Int32>(strlen(m_aProtocol)))
|
||||
aRet.append("/");
|
||||
aRet.append(rParentPartical);
|
||||
if(!rParentPartical.isEmpty())
|
||||
if(!rParentPartical.empty())
|
||||
aRet.append(":");
|
||||
|
||||
aRet.append(getStringForType( eObjectType ));
|
||||
@@ -1066,7 +1066,7 @@ ObjectType ObjectIdentifier::getObjectType() const
|
||||
}
|
||||
|
||||
OUString ObjectIdentifier::createDataCurveCID(
|
||||
const OUString& rSeriesParticle
|
||||
std::u16string_view rSeriesParticle
|
||||
, sal_Int32 nCurveIndex
|
||||
, bool bAverageLine )
|
||||
{
|
||||
@@ -1076,20 +1076,20 @@ OUString ObjectIdentifier::createDataCurveCID(
|
||||
}
|
||||
|
||||
OUString ObjectIdentifier::createDataCurveEquationCID(
|
||||
const OUString& rSeriesParticle
|
||||
std::u16string_view rSeriesParticle
|
||||
, sal_Int32 nCurveIndex )
|
||||
{
|
||||
OUString aParticleID( OUString::number( nCurveIndex ) );
|
||||
return createClassifiedIdentifierWithParent( OBJECTTYPE_DATA_CURVE_EQUATION, aParticleID, rSeriesParticle );
|
||||
}
|
||||
|
||||
OUString ObjectIdentifier::addChildParticle( const OUString& rParticle, const OUString& rChildParticle )
|
||||
OUString ObjectIdentifier::addChildParticle( const OUString& rParticle, std::u16string_view rChildParticle )
|
||||
{
|
||||
OUStringBuffer aRet(rParticle);
|
||||
|
||||
if( !aRet.isEmpty() && !rChildParticle.isEmpty() )
|
||||
if( !aRet.isEmpty() && !rChildParticle.empty() )
|
||||
aRet.append(":");
|
||||
if( !rChildParticle.isEmpty() )
|
||||
if( !rChildParticle.empty() )
|
||||
aRet.append(rChildParticle);
|
||||
|
||||
return aRet.makeStringAndClear();
|
||||
@@ -1114,8 +1114,8 @@ sal_Int32 ObjectIdentifier::getIndexFromParticleOrCID( const OUString& rParticle
|
||||
|
||||
OUString ObjectIdentifier::createSeriesSubObjectStub( ObjectType eSubObjectType
|
||||
, const OUString& rSeriesParticle
|
||||
, const OUString& rDragMethodServiceName
|
||||
, const OUString& rDragParameterString )
|
||||
, std::u16string_view rDragMethodServiceName
|
||||
, std::u16string_view rDragParameterString )
|
||||
{
|
||||
OUString aChildParticle = getStringForType( eSubObjectType ) + "=";
|
||||
|
||||
|
||||
@@ -90,10 +90,10 @@ void CandleStickChart::createShapes()
|
||||
createGroupShape( m_xLogicTarget ));
|
||||
uno::Reference< drawing::XShapes > xLossTarget(
|
||||
createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier(
|
||||
OBJECTTYPE_DATA_STOCK_LOSS, OUString() )));
|
||||
OBJECTTYPE_DATA_STOCK_LOSS, u"" )));
|
||||
uno::Reference< drawing::XShapes > xGainTarget(
|
||||
createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier(
|
||||
OBJECTTYPE_DATA_STOCK_GAIN, OUString() )));
|
||||
OBJECTTYPE_DATA_STOCK_GAIN, u"" )));
|
||||
uno::Reference< drawing::XShapes > xTextTarget(
|
||||
m_pShapeFactory->createGroup2D( m_xFinalTarget ));
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ void VDiagram::createShapes_2d()
|
||||
else
|
||||
{
|
||||
//CID for selection handling
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, u"" ) );//@todo read CID from model
|
||||
xProp->setPropertyValue( UNO_NAME_MISC_OBJ_NAME, uno::Any( aWallCID ) );
|
||||
}
|
||||
}
|
||||
@@ -480,7 +480,7 @@ void VDiagram::createShapes_3d()
|
||||
if( m_xDiagram.is() )
|
||||
xWallProp.set( m_xDiagram->getWall() );
|
||||
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model
|
||||
OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, u"" ) );//@todo read CID from model
|
||||
if( !bAddFloorAndWall )
|
||||
aWallCID.clear();
|
||||
uno::Reference< drawing::XShapes > xWallGroup_Shapes( m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, aWallCID ) );
|
||||
@@ -622,7 +622,7 @@ void VDiagram::createShapes_3d()
|
||||
}
|
||||
else
|
||||
{
|
||||
OUString aFloorCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_FLOOR, OUString() ) );//@todo read CID from model
|
||||
OUString aFloorCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_FLOOR, u"" ) );//@todo read CID from model
|
||||
ShapeFactory::setShapeName( xShape, aFloorCID );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2358,7 +2358,7 @@ void formatPage(
|
||||
tPropertyNameValueMap aNameValueMap;
|
||||
PropertyMapper::getValueMap( aNameValueMap, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xModelPage );
|
||||
|
||||
OUString aCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) );
|
||||
OUString aCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );
|
||||
aNameValueMap.emplace( "Name", uno::Any( aCID ) ); //CID OUString
|
||||
|
||||
tNameSequence aNames;
|
||||
|
||||
@@ -353,7 +353,7 @@ void VDataSeries::setParticle( const OUString& rSeriesParticle )
|
||||
m_aPointCID_Stub = ObjectIdentifier::createSeriesSubObjectStub( OBJECTTYPE_DATA_POINT, m_aSeriesParticle );
|
||||
|
||||
m_aLabelCID_Stub = ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
OBJECTTYPE_DATA_LABEL, OUString(), getLabelsCID() );
|
||||
OBJECTTYPE_DATA_LABEL, u"", getLabelsCID() );
|
||||
}
|
||||
OUString VDataSeries::getErrorBarsCID(bool bYError) const
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
namespace codemaker::java {
|
||||
|
||||
OString translateUnoToJavaType(
|
||||
codemaker::UnoType::Sort sort, OString const & nucleus, bool referenceType)
|
||||
codemaker::UnoType::Sort sort, std::string_view nucleus, bool referenceType)
|
||||
{
|
||||
OStringBuffer buf(128);
|
||||
if (sort <= codemaker::UnoType::Sort::Any) {
|
||||
|
||||
@@ -54,7 +54,7 @@ using codemaker::javamaker::ClassFile;
|
||||
namespace {
|
||||
|
||||
void appendUnoName(
|
||||
rtl::Reference< TypeManager > const & manager, OUString const & nucleus,
|
||||
rtl::Reference< TypeManager > const & manager, std::u16string_view nucleus,
|
||||
sal_Int32 rank, std::vector< OUString > const & arguments,
|
||||
OUStringBuffer * buffer)
|
||||
{
|
||||
@@ -88,7 +88,7 @@ void appendUnoName(
|
||||
// polymorphic struct type template, or interface type, decomposed into nucleus,
|
||||
// sequence rank, and template arguments) into a core UNO type name:
|
||||
OUString createUnoName(
|
||||
rtl::Reference< TypeManager > const & manager, OUString const & nucleus,
|
||||
rtl::Reference< TypeManager > const & manager, std::u16string_view nucleus,
|
||||
sal_Int32 rank, std::vector< OUString > const & arguments)
|
||||
{
|
||||
OUStringBuffer buf(256);
|
||||
|
||||
@@ -286,7 +286,7 @@ uno::Sequence< OUString >
|
||||
return comphelper::containerToSequence(vec);
|
||||
}
|
||||
|
||||
OString join(const OString& rSeparator, const std::vector<OString>& rSequence)
|
||||
OString join(std::string_view rSeparator, const std::vector<OString>& rSequence)
|
||||
{
|
||||
OStringBuffer aBuffer;
|
||||
for (size_t i = 0; i < rSequence.size(); ++i)
|
||||
|
||||
@@ -65,6 +65,23 @@ StringType relevantStringType(QualType type)
|
||||
}
|
||||
}
|
||||
|
||||
bool isRelevantStringBufferType(QualType type)
|
||||
{
|
||||
loplugin::TypeCheck const c(type);
|
||||
if (c.Class("OStringBuffer").Namespace("rtl"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (c.Class("OUStringBuffer").Namespace("rtl"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool relevantParmVarDecl(ParmVarDecl const* decl)
|
||||
{
|
||||
auto const t1 = decl->getType();
|
||||
@@ -122,13 +139,28 @@ DeclRefExpr const* relevantImplicitCastExpr(ImplicitCastExpr const* expr)
|
||||
|
||||
DeclRefExpr const* relevantCXXMemberCallExpr(CXXMemberCallExpr const* expr)
|
||||
{
|
||||
auto const d = expr->getMethodDecl();
|
||||
if (isRelevantStringBufferType(compat::getObjectType(expr)))
|
||||
{
|
||||
if (auto const i = d->getIdentifier())
|
||||
{
|
||||
auto const n = i->getName();
|
||||
if (n == "append" || n == "indexOf" || n == "lastIndexOf")
|
||||
{
|
||||
return relevantDeclRefExpr(expr->getArg(0));
|
||||
}
|
||||
else if (n == "insert")
|
||||
{
|
||||
return relevantDeclRefExpr(expr->getArg(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
StringType t = relevantStringType(compat::getObjectType(expr));
|
||||
if (t == StringType::None)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
bool good = false;
|
||||
auto const d = expr->getMethodDecl();
|
||||
if (d->getOverloadedOperator() == OO_Subscript)
|
||||
{
|
||||
good = true;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "rtl/string.hxx"
|
||||
#include "rtl/ustring.hxx"
|
||||
#include "rtl/ustrbuf.hxx"
|
||||
#include "sal/types.h"
|
||||
|
||||
void f1a(std::string_view);
|
||||
@@ -83,4 +84,11 @@ struct S10
|
||||
}
|
||||
};
|
||||
|
||||
// expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
|
||||
void f11(const OUString& f11rString)
|
||||
{
|
||||
OUStringBuffer buf;
|
||||
buf.append(f11rString);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
||||
@@ -1797,7 +1797,7 @@ void Access::initBroadcasterAndChanges(
|
||||
if (!path.isEmpty()) {
|
||||
path.append('/');
|
||||
}
|
||||
path.append(Data::createSegment("*", i.first));
|
||||
path.append(Data::createSegment(u"*", i.first));
|
||||
allChanges->push_back(
|
||||
css::util::ElementChange(
|
||||
css::uno::Any(path.makeStringAndClear()),
|
||||
@@ -1884,7 +1884,7 @@ void Access::initBroadcasterAndChanges(
|
||||
if (!path.isEmpty()) {
|
||||
path.append('/');
|
||||
}
|
||||
path.append(Data::createSegment("*", i.first));
|
||||
path.append(Data::createSegment(u"*", i.first));
|
||||
allChanges->push_back(
|
||||
css::util::ElementChange(
|
||||
css::uno::Any(path.makeStringAndClear()),
|
||||
|
||||
@@ -77,9 +77,9 @@ bool decode(
|
||||
}
|
||||
|
||||
OUString Data::createSegment(
|
||||
OUString const & templateName, OUString const & name)
|
||||
std::u16string_view templateName, OUString const & name)
|
||||
{
|
||||
if (templateName.isEmpty()) {
|
||||
if (templateName.empty()) {
|
||||
return name;
|
||||
}
|
||||
OUStringBuffer buf(128);
|
||||
|
||||
@@ -51,7 +51,7 @@ struct Data {
|
||||
Modifications modifications;
|
||||
|
||||
static OUString createSegment(
|
||||
OUString const & templateName, OUString const & name);
|
||||
std::u16string_view templateName, OUString const & name);
|
||||
|
||||
static sal_Int32 parseSegment(
|
||||
OUString const & path, sal_Int32 index, OUString * name,
|
||||
|
||||
@@ -1908,7 +1908,7 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams,
|
||||
}
|
||||
}
|
||||
|
||||
void getBooleanComparisonPredicate( const OUString& _rExpression, const bool _bValue, const sal_Int32 _nBooleanComparisonMode,
|
||||
void getBooleanComparisonPredicate( std::u16string_view _rExpression, const bool _bValue, const sal_Int32 _nBooleanComparisonMode,
|
||||
OUStringBuffer& _out_rSQLPredicate )
|
||||
{
|
||||
switch ( _nBooleanComparisonMode )
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace dbtools
|
||||
}
|
||||
|
||||
|
||||
void FilterManager::appendFilterComponent( OUStringBuffer& io_appendTo, const OUString& i_component )
|
||||
void FilterManager::appendFilterComponent( OUStringBuffer& io_appendTo, std::u16string_view i_component )
|
||||
{
|
||||
if ( !io_appendTo.isEmpty() )
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ void Blob::ensureBlobIsOpened()
|
||||
nullptr);
|
||||
|
||||
if (aErr)
|
||||
evaluateStatusVector(m_statusVector, "isc_open_blob2", *this);
|
||||
evaluateStatusVector(m_statusVector, u"isc_open_blob2", *this);
|
||||
|
||||
m_bBlobOpened = true;
|
||||
m_nBlobPosition = 0;
|
||||
@@ -90,7 +90,7 @@ void Blob::ensureBlobIsOpened()
|
||||
aResultBuffer);
|
||||
|
||||
if (aErr)
|
||||
evaluateStatusVector(m_statusVector, "isc_blob_info", *this);
|
||||
evaluateStatusVector(m_statusVector, u"isc_blob_info", *this);
|
||||
|
||||
char* pIt = aResultBuffer;
|
||||
while( *pIt != isc_info_end ) // info is in clusters
|
||||
@@ -141,7 +141,7 @@ bool Blob::readOneSegment(uno::Sequence< sal_Int8 >& rDataOut)
|
||||
|
||||
if (aRet && aRet != isc_segstr_eof && IndicatesError(m_statusVector))
|
||||
{
|
||||
OUString sError(StatusVectorToString(m_statusVector, "isc_get_segment"));
|
||||
OUString sError(StatusVectorToString(m_statusVector, u"isc_get_segment"));
|
||||
throw IOException(sError, *this);
|
||||
}
|
||||
m_nBlobPosition += nActualSize;
|
||||
@@ -160,7 +160,7 @@ void Blob::closeBlob()
|
||||
aErr = isc_close_blob(m_statusVector,
|
||||
&m_blobHandle);
|
||||
if (aErr)
|
||||
evaluateStatusVector(m_statusVector, "isc_close_blob", *this);
|
||||
evaluateStatusVector(m_statusVector, u"isc_close_blob", *this);
|
||||
|
||||
m_bBlobOpened = false;
|
||||
#if SAL_TYPES_SIZEOFPOINTER == 8
|
||||
@@ -299,7 +299,7 @@ sal_Int32 SAL_CALL Blob::readBytes(uno::Sequence< sal_Int8 >& rDataOut,
|
||||
reinterpret_cast<char*>(rDataOut.getArray()) + nTotalBytesRead);
|
||||
if (aErr && IndicatesError(m_statusVector))
|
||||
{
|
||||
OUString sError(StatusVectorToString(m_statusVector, "isc_get_segment"));
|
||||
OUString sError(StatusVectorToString(m_statusVector, u"isc_get_segment"));
|
||||
throw IOException(sError, *this);
|
||||
}
|
||||
nTotalBytesRead += nBytesRead;
|
||||
|
||||
@@ -274,7 +274,7 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >&
|
||||
0);
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(status, "isc_create_database", *this);
|
||||
evaluateStatusVector(status, u"isc_create_database", *this);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -292,7 +292,7 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >&
|
||||
dpbBuffer.c_str());
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(status, "isc_attach_database", *this);
|
||||
evaluateStatusVector(status, u"isc_attach_database", *this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ void Connection::setupTransaction()
|
||||
aTPB);
|
||||
|
||||
evaluateStatusVector(status_vector,
|
||||
"isc_start_transaction",
|
||||
u"isc_start_transaction",
|
||||
*this);
|
||||
}
|
||||
|
||||
@@ -516,7 +516,7 @@ void SAL_CALL Connection::commit()
|
||||
disposeStatements();
|
||||
isc_commit_transaction(status_vector, &m_aTransactionHandle);
|
||||
evaluateStatusVector(status_vector,
|
||||
"isc_commit_transaction",
|
||||
u"isc_commit_transaction",
|
||||
*this);
|
||||
}
|
||||
}
|
||||
@@ -569,7 +569,7 @@ isc_svc_handle Connection::attachServiceManager()
|
||||
aSPBBuffer))
|
||||
{
|
||||
evaluateStatusVector(aStatusVector,
|
||||
"isc_service_attach",
|
||||
u"isc_service_attach",
|
||||
*this);
|
||||
}
|
||||
|
||||
@@ -583,7 +583,7 @@ void Connection::detachServiceManager(isc_svc_handle aServiceHandle)
|
||||
&aServiceHandle))
|
||||
{
|
||||
evaluateStatusVector(aStatusVector,
|
||||
"isc_service_detach",
|
||||
u"isc_service_detach",
|
||||
*this);
|
||||
}
|
||||
}
|
||||
@@ -642,7 +642,7 @@ void Connection::runBackupService(const short nAction)
|
||||
aRequest.getLength(),
|
||||
aRequest.getStr()))
|
||||
{
|
||||
evaluateStatusVector(aStatusVector, "isc_service_start", *this);
|
||||
evaluateStatusVector(aStatusVector, u"isc_service_start", *this);
|
||||
}
|
||||
|
||||
char aInfoSPB = isc_info_svc_line;
|
||||
@@ -658,7 +658,7 @@ void Connection::runBackupService(const short nAction)
|
||||
sizeof(aResults),
|
||||
aResults))
|
||||
{
|
||||
evaluateStatusVector(aStatusVector, "isc_service_query", *this);
|
||||
evaluateStatusVector(aStatusVector, u"isc_service_query", *this);
|
||||
}
|
||||
|
||||
detachServiceManager(aServiceHandle);
|
||||
@@ -911,7 +911,7 @@ void Connection::disposing()
|
||||
{
|
||||
if (isc_detach_database(status, &m_aDBHandle))
|
||||
{
|
||||
evaluateStatusVector(status, "isc_detach_database", *this);
|
||||
evaluateStatusVector(status, u"isc_detach_database", *this);
|
||||
}
|
||||
}
|
||||
// TODO: write to storage again?
|
||||
|
||||
@@ -307,7 +307,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
|
||||
// Do not throw error. Trying to close a closed cursor is not a
|
||||
// critical mistake.
|
||||
OUString sErrMsg = StatusVectorToString(m_statusVector,
|
||||
"isc_dsql_free_statement: close cursor");
|
||||
u"isc_dsql_free_statement: close cursor");
|
||||
SAL_WARN("connectivity.firebird", sErrMsg);
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
|
||||
if (aErr)
|
||||
{
|
||||
SAL_WARN("connectivity.firebird", "isc_dsql_execute failed" );
|
||||
evaluateStatusVector(m_statusVector, "isc_dsql_execute", *this);
|
||||
evaluateStatusVector(m_statusVector, u"isc_dsql_execute", *this);
|
||||
}
|
||||
|
||||
m_xResultSet = new OResultSet(m_pConnection.get(),
|
||||
@@ -565,7 +565,7 @@ void OPreparedStatement::openBlobForWriting(isc_blob_handle& rBlobHandle, ISC_QU
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"setBlob failed on " + m_sSqlStatement,
|
||||
OUString("setBlob failed on " + m_sSqlStatement),
|
||||
*this);
|
||||
assert(false);
|
||||
}
|
||||
@@ -580,7 +580,7 @@ void OPreparedStatement::closeBlobAfterWriting(isc_blob_handle& rBlobHandle)
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_close_blob failed",
|
||||
u"isc_close_blob failed",
|
||||
*this);
|
||||
assert(false);
|
||||
}
|
||||
@@ -632,7 +632,7 @@ void SAL_CALL OPreparedStatement::setClob(sal_Int32 nParameterIndex, const Refer
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_put_segment failed",
|
||||
u"isc_put_segment failed",
|
||||
*this);
|
||||
assert(false);
|
||||
}
|
||||
@@ -670,7 +670,7 @@ void OPreparedStatement::setClob( sal_Int32 nParameterIndex, const OUString& rSt
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_put_segment failed",
|
||||
u"isc_put_segment failed",
|
||||
*this);
|
||||
assert(false);
|
||||
}
|
||||
@@ -722,7 +722,7 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex,
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_put_segment failed",
|
||||
u"isc_put_segment failed",
|
||||
*this);
|
||||
assert(false);
|
||||
}
|
||||
@@ -890,7 +890,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_put_segment failed",
|
||||
u"isc_put_segment failed",
|
||||
*this);
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ sal_Bool SAL_CALL OResultSet::next()
|
||||
{
|
||||
SAL_WARN("connectivity.firebird", "Error when fetching data");
|
||||
// Throws sql exception as appropriate
|
||||
evaluateStatusVector(m_statusVector, "isc_dsql_fetch", *this);
|
||||
evaluateStatusVector(m_statusVector, u"isc_dsql_fetch", *this);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void OStatementCommonBase::freeStatementHandle()
|
||||
&m_aStatementHandle,
|
||||
DSQL_drop);
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_dsql_free_statement",
|
||||
u"isc_dsql_free_statement",
|
||||
*this);
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_dsql_allocate_statement",
|
||||
u"isc_dsql_allocate_statement",
|
||||
*this);
|
||||
}
|
||||
else
|
||||
@@ -162,7 +162,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_dsql_prepare",
|
||||
u"isc_dsql_prepare",
|
||||
*this);
|
||||
}
|
||||
else
|
||||
@@ -176,7 +176,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
|
||||
{
|
||||
// TODO: free statement handle, etc.?
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_dsql_describe",
|
||||
u"isc_dsql_describe",
|
||||
*this);
|
||||
}
|
||||
else
|
||||
@@ -199,7 +199,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(m_statusVector,
|
||||
"isc_dsql_describe",
|
||||
u"isc_dsql_describe",
|
||||
*this);
|
||||
}
|
||||
else
|
||||
@@ -379,7 +379,7 @@ short OStatementCommonBase::getSqlInfoItem(char aInfoItem)
|
||||
}
|
||||
|
||||
evaluateStatusVector(aStatusVector,
|
||||
"isc_dsq_sql_info",
|
||||
u"isc_dsq_sql_info",
|
||||
*this);
|
||||
return 0;
|
||||
}
|
||||
@@ -411,7 +411,7 @@ sal_Int32 OStatementCommonBase::getStatementChangeCount()
|
||||
if (aErr)
|
||||
{
|
||||
evaluateStatusVector(aStatusVector,
|
||||
"isc_dsq_sql_info",
|
||||
u"isc_dsq_sql_info",
|
||||
*this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ OUString firebird::sanitizeIdentifier(const OUString& rIdentifier)
|
||||
}
|
||||
|
||||
OUString firebird::StatusVectorToString(const ISC_STATUS_ARRAY& rStatusVector,
|
||||
const OUString& rCause)
|
||||
std::u16string_view rCause)
|
||||
{
|
||||
OUStringBuffer buf;
|
||||
const ISC_STATUS* pStatus = reinterpret_cast<const ISC_STATUS*>(&rStatusVector);
|
||||
@@ -59,7 +59,7 @@ OUString firebird::StatusVectorToString(const ISC_STATUS_ARRAY& rStatusVector,
|
||||
}
|
||||
|
||||
void firebird::evaluateStatusVector(const ISC_STATUS_ARRAY& rStatusVector,
|
||||
const OUString& rCause,
|
||||
std::u16string_view rCause,
|
||||
const uno::Reference< XInterface >& _rxContext)
|
||||
{
|
||||
if (IndicatesError(rStatusVector))
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
}
|
||||
|
||||
OUString StatusVectorToString(const ISC_STATUS_ARRAY& rStatusVector,
|
||||
const OUString& rCause);
|
||||
std::u16string_view rCause);
|
||||
|
||||
/**
|
||||
* Evaluate a firebird status vector and throw exceptions as necessary.
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
* @throws css::sdbc::SQLException
|
||||
*/
|
||||
void evaluateStatusVector(const ISC_STATUS_ARRAY& rStatusVector,
|
||||
const OUString& aCause,
|
||||
std::u16string_view aCause,
|
||||
const css::uno::Reference< css::uno::XInterface >& _rxContext);
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,18 +23,18 @@
|
||||
namespace connectivity::hsqldb
|
||||
{
|
||||
|
||||
void HTools::appendTableFilterCrit( OUStringBuffer& _inout_rBuffer, const OUString& _rCatalog,
|
||||
const OUString& _rSchema, const OUString& _rName, bool _bShortForm )
|
||||
void HTools::appendTableFilterCrit( OUStringBuffer& _inout_rBuffer, std::u16string_view _rCatalog,
|
||||
std::u16string_view _rSchema, std::u16string_view _rName, bool _bShortForm )
|
||||
{
|
||||
_inout_rBuffer.append( " WHERE " );
|
||||
if ( !_rCatalog.isEmpty() )
|
||||
if ( !_rCatalog.empty() )
|
||||
{
|
||||
_inout_rBuffer.appendAscii( _bShortForm ? "TABLE_CAT" : "TABLE_CATALOG" );
|
||||
_inout_rBuffer.append( " = '" );
|
||||
_inout_rBuffer.append ( _rCatalog );
|
||||
_inout_rBuffer.append( "' AND " );
|
||||
}
|
||||
if ( !_rSchema.isEmpty() )
|
||||
if ( !_rSchema.empty() )
|
||||
{
|
||||
_inout_rBuffer.appendAscii( _bShortForm ? "TABLE_SCHEM" : "TABLE_SCHEMA" );
|
||||
_inout_rBuffer.append( " = '" );
|
||||
|
||||
@@ -37,8 +37,8 @@ namespace connectivity::hsqldb
|
||||
have the short form (TABLE_CAT instead of TABLE_CATALOG, and so on)
|
||||
*/
|
||||
static void appendTableFilterCrit(
|
||||
OUStringBuffer& _inout_rBuffer, const OUString& _rCatalog,
|
||||
const OUString& _rSchema, const OUString& _rName,
|
||||
OUStringBuffer& _inout_rBuffer, std::u16string_view _rCatalog,
|
||||
std::u16string_view _rSchema, std::u16string_view _rName,
|
||||
bool _bShortForm
|
||||
);
|
||||
};
|
||||
|
||||
@@ -282,7 +282,7 @@ uno_Mediate_Mapping::uno_Mediate_Mapping(
|
||||
|
||||
|
||||
static OUString getMappingName(
|
||||
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose )
|
||||
const Environment & rFrom, const Environment & rTo, std::u16string_view rAddPurpose )
|
||||
{
|
||||
OUStringBuffer aKey( 64 );
|
||||
aKey.append( rAddPurpose );
|
||||
@@ -299,10 +299,10 @@ static OUString getMappingName(
|
||||
}
|
||||
|
||||
static OUString getBridgeName(
|
||||
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose )
|
||||
const Environment & rFrom, const Environment & rTo, std::u16string_view rAddPurpose )
|
||||
{
|
||||
OUStringBuffer aBridgeName( 16 );
|
||||
if (!rAddPurpose.isEmpty())
|
||||
if (!rAddPurpose.empty())
|
||||
{
|
||||
aBridgeName.append( rAddPurpose );
|
||||
aBridgeName.append( '_' );
|
||||
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
void printTimes(const TimeValue* pTime1, const TimeValue* pTime2, const TimeValue* pTime3);
|
||||
|
||||
void doPerformanceTestOnODB(const OUString& rDriverURL,
|
||||
const OUString& rDBName,
|
||||
std::u16string_view rDBName,
|
||||
const bool bUsePreparedStatement);
|
||||
|
||||
void setupTestTable(uno::Reference< XConnection > const & xConnection);
|
||||
@@ -102,13 +102,13 @@ private:
|
||||
// Individual Tests
|
||||
void performPreparedStatementInsertTest(
|
||||
uno::Reference< XConnection > const & xConnection,
|
||||
const OUString& rDBName);
|
||||
std::u16string_view rDBName);
|
||||
void performStatementInsertTest(
|
||||
uno::Reference< XConnection > const & xConnection,
|
||||
const OUString& rDBName);
|
||||
std::u16string_view rDBName);
|
||||
void performReadTest(
|
||||
uno::Reference< XConnection > const & xConnection,
|
||||
const OUString& rDBName);
|
||||
std::u16string_view rDBName);
|
||||
|
||||
// Perform all tests on a given DB.
|
||||
void testFirebird();
|
||||
@@ -173,17 +173,17 @@ void EmbeddedDBPerformanceTest::testFirebird()
|
||||
{
|
||||
|
||||
m_aOutputBuffer.append("Standard Insert\n");
|
||||
doPerformanceTestOnODB("sdbc:embedded:firebird", "Firebird", false);
|
||||
doPerformanceTestOnODB("sdbc:embedded:firebird", u"Firebird", false);
|
||||
m_aOutputBuffer.append("PreparedStatement Insert\n");
|
||||
doPerformanceTestOnODB("sdbc:embedded:firebird", "Firebird", true);
|
||||
doPerformanceTestOnODB("sdbc:embedded:firebird", u"Firebird", true);
|
||||
}
|
||||
|
||||
void EmbeddedDBPerformanceTest::testHSQLDB()
|
||||
{
|
||||
m_aOutputBuffer.append("Standard Insert\n");
|
||||
doPerformanceTestOnODB("sdbc:embedded:hsqldb", "HSQLDB", false);
|
||||
doPerformanceTestOnODB("sdbc:embedded:hsqldb", u"HSQLDB", false);
|
||||
m_aOutputBuffer.append("PreparedStatement Insert\n");
|
||||
doPerformanceTestOnODB("sdbc:embedded:hsqldb", "HSQLDB", true);
|
||||
doPerformanceTestOnODB("sdbc:embedded:hsqldb", u"HSQLDB", true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -192,7 +192,7 @@ void EmbeddedDBPerformanceTest::testHSQLDB()
|
||||
*/
|
||||
void EmbeddedDBPerformanceTest::doPerformanceTestOnODB(
|
||||
const OUString& rDriverURL,
|
||||
const OUString& rDBName,
|
||||
std::u16string_view rDBName,
|
||||
const bool bUsePreparedStatement)
|
||||
{
|
||||
::utl::TempFile aFile;
|
||||
@@ -244,7 +244,7 @@ void EmbeddedDBPerformanceTest::setupTestTable(
|
||||
|
||||
void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
|
||||
uno::Reference< XConnection > const & xConnection,
|
||||
const OUString& rDBName)
|
||||
std::u16string_view rDBName)
|
||||
{
|
||||
uno::Reference< XPreparedStatement > xPreparedStatement =
|
||||
xConnection->prepareStatement(
|
||||
@@ -286,7 +286,7 @@ void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
|
||||
|
||||
void EmbeddedDBPerformanceTest::performStatementInsertTest(
|
||||
uno::Reference< XConnection > const & xConnection,
|
||||
const OUString& rDBName)
|
||||
std::u16string_view rDBName)
|
||||
{
|
||||
uno::Reference< XStatement > xStatement =
|
||||
xConnection->createStatement();
|
||||
@@ -324,7 +324,7 @@ void EmbeddedDBPerformanceTest::performStatementInsertTest(
|
||||
|
||||
void EmbeddedDBPerformanceTest::performReadTest(
|
||||
uno::Reference< XConnection > const & xConnection,
|
||||
const OUString& rDBName)
|
||||
std::u16string_view rDBName)
|
||||
{
|
||||
uno::Reference< XStatement > xStatement = xConnection->createStatement();
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ using namespace ::osl;
|
||||
typedef std::map<OUString, OUStringBuffer> TSQLStatements;
|
||||
namespace
|
||||
{
|
||||
void lcl_fillKeyCondition(const OUString& i_sTableName,const OUString& i_sQuotedColumnName,const ORowSetValue& i_aValue,TSQLStatements& io_aKeyConditions)
|
||||
void lcl_fillKeyCondition(const OUString& i_sTableName,std::u16string_view i_sQuotedColumnName,const ORowSetValue& i_aValue,TSQLStatements& io_aKeyConditions)
|
||||
{
|
||||
OUStringBuffer& rKeyCondition = io_aKeyConditions[i_sTableName];
|
||||
if ( !rKeyCondition.isEmpty() )
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace
|
||||
delete pSqlParseNode;
|
||||
_rIterator.dispose();
|
||||
}
|
||||
void lcl_addFilterCriteria_throw(sal_Int32 i_nFilterOperator,const OUString& i_sValue,OUStringBuffer& o_sRet)
|
||||
void lcl_addFilterCriteria_throw(sal_Int32 i_nFilterOperator,std::u16string_view i_sValue,OUStringBuffer& o_sRet)
|
||||
{
|
||||
switch( i_nFilterOperator )
|
||||
{
|
||||
@@ -1647,7 +1647,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
|
||||
|
||||
if ( nType != DataType::BOOLEAN && DataType::BIT != nType )
|
||||
{
|
||||
lcl_addFilterCriteria_throw(filterOperator,"",aSQL);
|
||||
lcl_addFilterCriteria_throw(filterOperator,u"",aSQL);
|
||||
}
|
||||
|
||||
switch(nType)
|
||||
@@ -1716,7 +1716,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
|
||||
sal_Int32 nFilterOp = filterOperator;
|
||||
if ( filterOperator != SQLFilterOperator::SQLNULL && filterOperator != SQLFilterOperator::NOT_SQLNULL )
|
||||
nFilterOp = SQLFilterOperator::SQLNULL;
|
||||
lcl_addFilterCriteria_throw(nFilterOp,"",aSQL);
|
||||
lcl_addFilterCriteria_throw(nFilterOp,u"",aSQL);
|
||||
}
|
||||
|
||||
// Attach filter
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace dbaccess
|
||||
{
|
||||
}
|
||||
|
||||
void SettingsImport::characters( const OUString& i_rCharacters )
|
||||
void SettingsImport::characters( std::u16string_view i_rCharacters )
|
||||
{
|
||||
m_aCharacters.append( i_rCharacters );
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace dbaccess
|
||||
const css::uno::Reference< css::xml::sax::XAttributeList >& i_rAttributes
|
||||
);
|
||||
virtual void endElement();
|
||||
void characters( const OUString& i_rCharacters );
|
||||
void characters( std::u16string_view i_rCharacters );
|
||||
|
||||
protected:
|
||||
virtual ~SettingsImport() override;
|
||||
|
||||
@@ -29,7 +29,7 @@ using namespace css::sdbc;
|
||||
|
||||
namespace
|
||||
{
|
||||
void lcl_appendWithSpace(OUStringBuffer& sBuff, const OUString& sStr)
|
||||
void lcl_appendWithSpace(OUStringBuffer& sBuff, std::u16string_view sStr)
|
||||
{
|
||||
sBuff.append(" ");
|
||||
sBuff.append(sStr);
|
||||
@@ -138,7 +138,7 @@ OUString FbCreateStmtParser::compose() const
|
||||
sSql.append("CREATE TABLE ");
|
||||
sSql.append(getTableName());
|
||||
|
||||
lcl_appendWithSpace(sSql, "("); // column declaration
|
||||
lcl_appendWithSpace(sSql, u"("); // column declaration
|
||||
auto& rColumns = getColumnDef();
|
||||
auto columnIter = rColumns.cbegin();
|
||||
while (columnIter != rColumns.end())
|
||||
@@ -178,7 +178,7 @@ OUString FbCreateStmtParser::compose() const
|
||||
|
||||
if (columnIter->isAutoIncremental())
|
||||
{
|
||||
lcl_appendWithSpace(sSql, "GENERATED BY DEFAULT AS IDENTITY (START WITH ");
|
||||
lcl_appendWithSpace(sSql, u"GENERATED BY DEFAULT AS IDENTITY (START WITH ");
|
||||
|
||||
// start with 0:
|
||||
// HSQLDB: first value will be 0.
|
||||
@@ -187,17 +187,17 @@ OUString FbCreateStmtParser::compose() const
|
||||
sSql.append(")");
|
||||
}
|
||||
else if (!columnIter->isNullable())
|
||||
lcl_appendWithSpace(sSql, "NOT NULL");
|
||||
lcl_appendWithSpace(sSql, u"NOT NULL");
|
||||
|
||||
if (columnIter->isCaseInsensitive())
|
||||
lcl_appendWithSpace(sSql, "COLLATE UNICODE_CI");
|
||||
lcl_appendWithSpace(sSql, u"COLLATE UNICODE_CI");
|
||||
|
||||
const OUString& sDefaultVal = columnIter->getDefault();
|
||||
if (!sDefaultVal.isEmpty())
|
||||
{
|
||||
lcl_appendWithSpace(sSql, "DEFAULT");
|
||||
lcl_appendWithSpace(sSql, u"DEFAULT");
|
||||
if (sDefaultVal.equalsIgnoreAsciiCase("NOW"))
|
||||
lcl_appendWithSpace(sSql, "\'NOW\'"); // Fb likes it single quoted
|
||||
lcl_appendWithSpace(sSql, u"\'NOW\'"); // Fb likes it single quoted
|
||||
else
|
||||
lcl_appendWithSpace(sSql, sDefaultVal);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ void lcl_setParams(const std::vector<Any>& row, Reference<XParameters> const& xP
|
||||
}
|
||||
}
|
||||
|
||||
OUString lcl_createInsertStatement(const OUString& sTableName,
|
||||
OUString lcl_createInsertStatement(std::u16string_view sTableName,
|
||||
const std::vector<dbahsql::ColumnDefinition>& rColTypes)
|
||||
{
|
||||
assert(rColTypes.size() > 0);
|
||||
@@ -216,7 +216,8 @@ HsqlImporter::HsqlImporter(Reference<XConnection>& rConnection, const Reference<
|
||||
m_xStorage.set(rStorage);
|
||||
}
|
||||
|
||||
void HsqlImporter::insertRow(const std::vector<css::uno::Any>& xRows, const OUString& sTableName,
|
||||
void HsqlImporter::insertRow(const std::vector<css::uno::Any>& xRows,
|
||||
std::u16string_view sTableName,
|
||||
const std::vector<ColumnDefinition>& rColTypes)
|
||||
{
|
||||
OUString sStatement = lcl_createInsertStatement(sTableName, rColTypes);
|
||||
|
||||
@@ -30,7 +30,7 @@ private:
|
||||
css::uno::Reference<css::embed::XStorage> m_xStorage;
|
||||
|
||||
protected:
|
||||
void insertRow(const std::vector<css::uno::Any>& xRows, const OUString& sTable,
|
||||
void insertRow(const std::vector<css::uno::Any>& xRows, std::u16string_view sTable,
|
||||
const std::vector<ColumnDefinition>& rColTypes);
|
||||
void processTree(HsqlBinaryNode& rNode, HsqlRowInputStream& rStream,
|
||||
const std::vector<ColumnDefinition>& rColTypes, const OUString& sTableName,
|
||||
|
||||
@@ -90,7 +90,7 @@ struct DispatchHolder
|
||||
Reference< XDispatch > xDispatch;
|
||||
};
|
||||
|
||||
std::shared_ptr<const SfxFilter> impl_lookupExportFilterForUrl( std::u16string_view rUrl, const OUString& rFactory )
|
||||
std::shared_ptr<const SfxFilter> impl_lookupExportFilterForUrl( std::u16string_view rUrl, std::u16string_view rFactory )
|
||||
{
|
||||
// create the list of filters
|
||||
OUStringBuffer sQuery(256);
|
||||
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
uno::Any const & exception) const;
|
||||
|
||||
OUString getUpdateDisplayString(
|
||||
dp_gui::UpdateData const & data, OUString const & version = OUString()) const;
|
||||
dp_gui::UpdateData const & data, std::u16string_view version = std::u16string_view()) const;
|
||||
|
||||
void prepareUpdateData(
|
||||
css::uno::Reference< css::xml::dom::XNode > const & updateInfo,
|
||||
@@ -332,7 +332,7 @@ void UpdateDialog::Thread::handleSpecificError(
|
||||
}
|
||||
|
||||
OUString UpdateDialog::Thread::getUpdateDisplayString(
|
||||
dp_gui::UpdateData const & data, OUString const & version) const
|
||||
dp_gui::UpdateData const & data, std::u16string_view version) const
|
||||
{
|
||||
OSL_ASSERT(data.aInstalledPackage.is());
|
||||
OUStringBuffer b(data.aInstalledPackage->getDisplayName());
|
||||
@@ -343,7 +343,7 @@ OUString UpdateDialog::Thread::getUpdateDisplayString(
|
||||
b.append(m_dialog.m_version);
|
||||
}
|
||||
b.append(' ');
|
||||
if (!version.isEmpty())
|
||||
if (!version.empty())
|
||||
b.append(version);
|
||||
else
|
||||
b.append(data.updateVersion);
|
||||
|
||||
@@ -2516,13 +2516,13 @@ namespace pcr
|
||||
}
|
||||
}
|
||||
|
||||
void FormComponentPropertyHandler::impl_fillQueryNames_throw( const Reference< XNameAccess >& _xQueryNames,std::vector< OUString >& _out_rNames,const OUString& _sName ) const
|
||||
void FormComponentPropertyHandler::impl_fillQueryNames_throw( const Reference< XNameAccess >& _xQueryNames,std::vector< OUString >& _out_rNames,std::u16string_view _sName ) const
|
||||
{
|
||||
DBG_ASSERT( _xQueryNames.is(), "FormComponentPropertyHandler::impl_fillQueryNames_throw: no way to obtain the queries of the connection!" );
|
||||
if ( !_xQueryNames.is() )
|
||||
return;
|
||||
|
||||
bool bAdd = !_sName.isEmpty();
|
||||
bool bAdd = !_sName.empty();
|
||||
|
||||
const Sequence<OUString> aQueryNames =_xQueryNames->getElementNames();
|
||||
for ( const OUString& rQueryName : aQueryNames )
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace pcr
|
||||
*/
|
||||
void impl_fillQueryNames_throw( const css::uno::Reference< css::container::XNameAccess >& _xQueryNames
|
||||
,std::vector< OUString >& _out_rNames
|
||||
,const OUString& _sName = OUString() ) const;
|
||||
,std::u16string_view _sName = std::u16string_view() ) const;
|
||||
|
||||
/** describes the UI for selecting a ListSource (for list-like form controls)
|
||||
@precond
|
||||
|
||||
@@ -80,7 +80,7 @@ class DispatchRecorder final
|
||||
|
||||
// private functions
|
||||
private:
|
||||
void implts_recordMacro( const OUString& aURL,
|
||||
void implts_recordMacro( std::u16string_view aURL,
|
||||
const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
|
||||
bool bAsComment, OUStringBuffer& );
|
||||
void AppendToBuffer( const css::uno::Any& aValue, OUStringBuffer& aArgumentBuffer );
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
using namespace framework;
|
||||
|
||||
#define RESOURCETYPE_ACCELERATOR "accelerator"
|
||||
#define RESOURCETYPE_ACCELERATOR u"accelerator"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -167,7 +167,7 @@ void DocumentAcceleratorConfiguration::fillCache()
|
||||
m_aPresetHandler.connectToResource(
|
||||
PresetHandler::E_DOCUMENT,
|
||||
RESOURCETYPE_ACCELERATOR,
|
||||
OUString(),
|
||||
u"",
|
||||
xDocumentRoot,
|
||||
aLanguageTag);
|
||||
|
||||
|
||||
@@ -304,8 +304,8 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getParentStorageUser(
|
||||
}
|
||||
|
||||
void PresetHandler::connectToResource( PresetHandler::EConfigType eConfigType ,
|
||||
const OUString& sResource ,
|
||||
const OUString& sModule ,
|
||||
std::u16string_view sResource ,
|
||||
std::u16string_view sModule ,
|
||||
const css::uno::Reference< css::embed::XStorage >& xDocumentRoot,
|
||||
const LanguageTag& rLanguageTag )
|
||||
{
|
||||
|
||||
@@ -208,8 +208,8 @@ class PresetHandler
|
||||
if the specified resource couldn't be located.
|
||||
*/
|
||||
void connectToResource( EConfigType eConfigType ,
|
||||
const OUString& sResourceType ,
|
||||
const OUString& sModule ,
|
||||
std::u16string_view sResourceType ,
|
||||
std::u16string_view sModule ,
|
||||
const css::uno::Reference< css::embed::XStorage >& xDocumentRoot ,
|
||||
const LanguageTag& rLanguageTag = LanguageTag(LANGUAGE_USER_PRIV_NOTRANSLATE));
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ void DispatchRecorder::AppendToBuffer( const css::uno::Any& aValue, OUStringBuff
|
||||
}
|
||||
}
|
||||
|
||||
void DispatchRecorder::implts_recordMacro( const OUString& aURL,
|
||||
void DispatchRecorder::implts_recordMacro( std::u16string_view aURL,
|
||||
const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
|
||||
bool bAsComment, OUStringBuffer& aScriptBuffer )
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
sal_uInt16 nCol1, sal_uInt16 nCol2 );
|
||||
|
||||
// Specific to error handler
|
||||
static void MakeErrorText( ErrCode, const OUString& aMsg );
|
||||
static void MakeErrorText( ErrCode, std::u16string_view aMsg );
|
||||
static const OUString& GetErrorText();
|
||||
static ErrCode const & GetErrorCode();
|
||||
static sal_uInt16 GetVBErrorCode( ErrCode nError );
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace rtl { class OString; }
|
||||
namespace codemaker::java {
|
||||
|
||||
rtl::OString translateUnoToJavaType(
|
||||
codemaker::UnoType::Sort sort, rtl::OString const & nucleus,
|
||||
codemaker::UnoType::Sort sort, std::string_view nucleus,
|
||||
bool referenceType);
|
||||
|
||||
rtl::OString translateUnoToJavaIdentifier(
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
OUStringBufferAppender(OUStringBuffer & i_rBuffer)
|
||||
: m_rBuffer(&i_rBuffer) { }
|
||||
Self & operator=(OUString const & i_rStr)
|
||||
Self & operator=(std::u16string_view i_rStr)
|
||||
{
|
||||
m_rBuffer->append( i_rStr );
|
||||
return *this;
|
||||
|
||||
@@ -269,7 +269,7 @@ COMPHELPER_DLLPUBLIC OUString convertCommaSeparated(
|
||||
css::uno::Sequence< OUString > const & i_rSeq);
|
||||
|
||||
/// Return a string which is the concatenation of the strings in the sequence.
|
||||
COMPHELPER_DLLPUBLIC OString join(const OString& rSeparator, const std::vector<OString>& rSequence);
|
||||
COMPHELPER_DLLPUBLIC OString join(std::string_view rSeparator, const std::vector<OString>& rSequence);
|
||||
|
||||
/** Convert a decimal string to a number.
|
||||
|
||||
|
||||
@@ -770,7 +770,7 @@ namespace dbtools
|
||||
the buffer to which the comparison predicate will be appended
|
||||
*/
|
||||
OOO_DLLPUBLIC_DBTOOLS void getBooleanComparisonPredicate(
|
||||
const OUString& _rExpression,
|
||||
std::u16string_view _rExpression,
|
||||
const bool _bValue,
|
||||
const sal_Int32 _nBooleanComparisonMode,
|
||||
OUStringBuffer& _out_rSQLPredicate
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace dbtools
|
||||
|
||||
/** appends one filter component to the statement in our composer
|
||||
*/
|
||||
static void appendFilterComponent( OUStringBuffer& io_appendTo, const OUString& i_component );
|
||||
static void appendFilterComponent( OUStringBuffer& io_appendTo, std::u16string_view i_component );
|
||||
|
||||
/// checks whether there is only one (or even no) non-empty filter component
|
||||
bool isThereAtMostOneFilterComponent( OUString& o_singleComponent ) const;
|
||||
|
||||
@@ -187,7 +187,7 @@ protected:
|
||||
const css::uno::Reference< css::xml::sax::XFastAttributeList >& rxAttribs );
|
||||
|
||||
/** Must be called from characters() in derived classes. */
|
||||
void implCharacters( const OUString& rChars );
|
||||
void implCharacters( std::u16string_view rChars );
|
||||
|
||||
/** Must be called from endFastElement() in derived classes. */
|
||||
void implEndElement( sal_Int32 nElement );
|
||||
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
|
||||
// token list -------------------------------------------------------------
|
||||
|
||||
static void appendToken( OUStringBuffer& rStr, const OUString& rToken, sal_Unicode cSep = OOX_DUMP_LISTSEP );
|
||||
static void appendToken( OUStringBuffer& rStr, std::u16string_view rToken, sal_Unicode cSep = OOX_DUMP_LISTSEP );
|
||||
|
||||
static void appendIndex( OUStringBuffer& rStr, sal_Int64 nIdx );
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
|
||||
/** Creates a new Basic module and inserts it into the passed Basic library. */
|
||||
void createModule(
|
||||
const OUString& rVBASourceCode,
|
||||
std::u16string_view rVBASourceCode,
|
||||
const css::uno::Reference< css::container::XNameContainer >& rxBasicLib,
|
||||
const css::uno::Reference< css::container::XNameAccess >& rxDocObjectNA ) const;
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ createBaseURI(
|
||||
css::uno::Reference<css::uno::XComponentContext> const & i_xContext,
|
||||
css::uno::Reference<css::frame::XModel> const & i_xModel,
|
||||
OUString const & i_rPkgURI,
|
||||
OUString const & i_rSubDocument = OUString());
|
||||
std::u16string_view i_rSubDocument = std::u16string_view());
|
||||
|
||||
|
||||
struct DocumentMetadataAccess_Impl;
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
// Connect the links to a pseudo-object and add to the list
|
||||
void InsertFileLink( sfx2::SvBaseLink&,
|
||||
SvBaseLinkObjectType nFileType,
|
||||
const OUString& rFileNm,
|
||||
std::u16string_view rFileNm,
|
||||
const OUString* pFilterNm = nullptr,
|
||||
const OUString* pRange = nullptr );
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
/// Emits a LOK_CALLBACK_DOCUMENT_SIZE_CHANGED for all views of the same document - if @bInvalidateAll - first invalidates all parts
|
||||
static void notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc, bool bInvalidateAll = true);
|
||||
/// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed.
|
||||
static void notifyInvalidation(SfxViewShell const* pThisView, const OString& rPayload);
|
||||
static void notifyInvalidation(SfxViewShell const* pThisView, std::string_view rPayload);
|
||||
/// Emits a LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, but tweaks it according to setOptionalFeatures() if needed.
|
||||
static void notifyVisCursorInvalidation(OutlinerViewShell const* pThisView, const OString& rRectangle, bool bMispelledWord = false, const OString& rHyperlink = "");
|
||||
/// Notifies all views with the given type and payload.
|
||||
|
||||
@@ -360,9 +360,9 @@ public:
|
||||
|
||||
/// rSymStr is appended/prepended to rStr, incl. minus sign
|
||||
static void CompletePositiveFormatString(OUStringBuffer& rStr,
|
||||
const OUString& rSymStr, sal_uInt16 nPosiFormat);
|
||||
std::u16string_view rSymStr, sal_uInt16 nPosiFormat);
|
||||
static void CompleteNegativeFormatString(OUStringBuffer& rStr,
|
||||
const OUString& rSymStr, sal_uInt16 nNegaFormat);
|
||||
std::u16string_view rSymStr, sal_uInt16 nNegaFormat);
|
||||
|
||||
/** Representation of a currency (symbol position and
|
||||
negative sign) in other language settings */
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
bool GetOutputString( double fNumber, sal_uInt16 nCharCount, OUString& rOutString ) const;
|
||||
|
||||
bool GetOutputString( double fNumber, OUString& OutString, const Color** ppColor );
|
||||
void GetOutputString( const OUString& sString, OUString& OutString, const Color** ppColor );
|
||||
void GetOutputString( std::u16string_view sString, OUString& OutString, const Color** ppColor );
|
||||
|
||||
// True if type text
|
||||
bool IsTextFormat() const { return bool(eType & SvNumFormatType::TEXT); }
|
||||
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
SAL_DLLPRIVATE void AddStyleAttr_Impl( bool bLong );
|
||||
SAL_DLLPRIVATE void AddLanguageAttr_Impl( LanguageType nLang );
|
||||
|
||||
SAL_DLLPRIVATE void AddToTextElement_Impl( const OUString& rString );
|
||||
SAL_DLLPRIVATE void AddToTextElement_Impl( std::u16string_view rString );
|
||||
SAL_DLLPRIVATE void FinishTextElement_Impl(bool bUseExtensionNS = false);
|
||||
|
||||
SAL_DLLPRIVATE void WriteColorElement_Impl( const Color& rColor );
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
|
||||
const LocaleDataWrapper& GetLocaleData() const;
|
||||
|
||||
void AddToCode( const OUString& rString );
|
||||
void AddToCode( std::u16string_view rString );
|
||||
void AddToCode( sal_Unicode c );
|
||||
void AddNumber( const SvXMLNumberInfo& rInfo );
|
||||
void AddCurrency( const OUString& rContent, LanguageType nLang );
|
||||
|
||||
@@ -85,7 +85,7 @@ JFW_MODE getMode();
|
||||
/** creates the -Djava.class.path option with the complete classpath, including
|
||||
the paths which are set by UNO_JAVA_JFW_CLASSPATH_URLS.
|
||||
*/
|
||||
OString makeClassPathOption(OUString const& sUserClassPath);
|
||||
OString makeClassPathOption(std::u16string_view sUserClassPath);
|
||||
|
||||
OString getSettingsPath(const OUString& sURL);
|
||||
|
||||
|
||||
@@ -441,21 +441,21 @@ OUString getApplicationClassPath()
|
||||
return buf.makeStringAndClear();
|
||||
}
|
||||
|
||||
OString makeClassPathOption(OUString const & sUserClassPath)
|
||||
OString makeClassPathOption(std::u16string_view sUserClassPath)
|
||||
{
|
||||
//Compose the class path
|
||||
OString sPaths;
|
||||
OUStringBuffer sBufCP(4096);
|
||||
|
||||
// append all user selected jars to the class path
|
||||
if (!sUserClassPath.isEmpty())
|
||||
if (!sUserClassPath.empty())
|
||||
sBufCP.append(sUserClassPath);
|
||||
|
||||
//append all jar libraries and components to the class path
|
||||
OUString sAppCP = getApplicationClassPath();
|
||||
if (!sAppCP.isEmpty())
|
||||
{
|
||||
if (!sUserClassPath.isEmpty())
|
||||
if (!sUserClassPath.empty())
|
||||
{
|
||||
sBufCP.append(SAL_PATHSEPARATOR);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ bool passesPositiveList(const OUString& rUrl) {
|
||||
}
|
||||
|
||||
void handleCommand(
|
||||
const OString& rInPath, const OString& rOutPath,
|
||||
std::string_view rInPath, std::string_view rOutPath,
|
||||
const std::string& rExecutable)
|
||||
{
|
||||
OStringBuffer buf;
|
||||
|
||||
@@ -102,7 +102,7 @@ void ContextHandler2Helper::implStartElement( sal_Int32 nElement, const Referenc
|
||||
onStartElement( aAttribs );
|
||||
}
|
||||
|
||||
void ContextHandler2Helper::implCharacters( const OUString& rChars )
|
||||
void ContextHandler2Helper::implCharacters( std::u16string_view rChars )
|
||||
{
|
||||
// #i76091# collect characters until new element starts or this element ends
|
||||
if( !mxContextStack->empty() )
|
||||
|
||||
@@ -511,9 +511,9 @@ void StringHelper::appendEncString( OUStringBuffer& rStr, const OUString& rData,
|
||||
|
||||
// token list -----------------------------------------------------------------
|
||||
|
||||
void StringHelper::appendToken( OUStringBuffer& rStr, const OUString& rToken, sal_Unicode cSep )
|
||||
void StringHelper::appendToken( OUStringBuffer& rStr, std::u16string_view rToken, sal_Unicode cSep )
|
||||
{
|
||||
if( (rStr.getLength() > 0) && (!rToken.isEmpty()) )
|
||||
if( (rStr.getLength() > 0) && (!rToken.empty()) )
|
||||
rStr.append( cSep );
|
||||
rStr.append( rToken );
|
||||
}
|
||||
@@ -1061,7 +1061,7 @@ OUString FlagsList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const
|
||||
bool bFlag = getFlag( nKey, nMask );
|
||||
if( bOnOff )
|
||||
{
|
||||
StringHelper::appendToken( aName, rFlagName.copy( 1 ) );
|
||||
StringHelper::appendToken( aName, rFlagName.subView( 1 ) );
|
||||
aName.appendAscii( bFlag ? ":on" : ":off" );
|
||||
}
|
||||
else
|
||||
@@ -1073,14 +1073,14 @@ OUString FlagsList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const
|
||||
if( !bNegated )
|
||||
StringHelper::appendToken( aName, rFlagName );
|
||||
else if( nBothSep > 0 )
|
||||
StringHelper::appendToken( aName, rFlagName.copy( nBothSep + 1 ) );
|
||||
StringHelper::appendToken( aName, rFlagName.subView( nBothSep + 1 ) );
|
||||
}
|
||||
else if( bNegated )
|
||||
{
|
||||
if( nBothSep > 0 )
|
||||
StringHelper::appendToken( aName, rFlagName.copy( 1, nBothSep - 1 ) );
|
||||
StringHelper::appendToken( aName, rFlagName.subView( 1, nBothSep - 1 ) );
|
||||
else
|
||||
StringHelper::appendToken( aName, rFlagName.copy( 1 ) );
|
||||
StringHelper::appendToken( aName, rFlagName.subView( 1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void VbaModule::createAndImportModule( StorageBase& rVbaStrg,
|
||||
void VbaModule::createEmptyModule( const Reference< container::XNameContainer >& rxBasicLib,
|
||||
const Reference< container::XNameAccess >& rxDocObjectNA ) const
|
||||
{
|
||||
createModule( OUString(), rxBasicLib, rxDocObjectNA );
|
||||
createModule( u"", rxBasicLib, rxDocObjectNA );
|
||||
}
|
||||
|
||||
OUString VbaModule::readSourceCode( StorageBase& rVbaStrg ) const
|
||||
@@ -252,7 +252,7 @@ OUString VbaModule::readSourceCode( StorageBase& rVbaStrg ) const
|
||||
return aSourceCode.makeStringAndClear();
|
||||
}
|
||||
|
||||
void VbaModule::createModule( const OUString& rVBASourceCode,
|
||||
void VbaModule::createModule( std::u16string_view rVBASourceCode,
|
||||
const Reference< container::XNameContainer >& rxBasicLib,
|
||||
const Reference< container::XNameAccess >& rxDocObjectNA ) const
|
||||
{
|
||||
|
||||
+14
-14
@@ -65,7 +65,7 @@ RegError ORegKey::releaseKey(RegKeyHandle hKey)
|
||||
|
||||
// createKey
|
||||
|
||||
RegError ORegKey::createKey(const OUString& keyName, RegKeyHandle* phNewKey)
|
||||
RegError ORegKey::createKey(std::u16string_view keyName, RegKeyHandle* phNewKey)
|
||||
{
|
||||
return m_pRegistry->createKey(this, keyName, phNewKey);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ RegError ORegKey::createKey(const OUString& keyName, RegKeyHandle* phNewKey)
|
||||
|
||||
// openKey
|
||||
|
||||
RegError ORegKey::openKey(const OUString& keyName, RegKeyHandle* phOpenKey)
|
||||
RegError ORegKey::openKey(std::u16string_view keyName, RegKeyHandle* phOpenKey)
|
||||
{
|
||||
return m_pRegistry->openKey(this, keyName, phOpenKey);
|
||||
}
|
||||
@@ -81,7 +81,7 @@ RegError ORegKey::openKey(const OUString& keyName, RegKeyHandle* phOpenKey)
|
||||
|
||||
// openSubKeys
|
||||
|
||||
RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubKeys, sal_uInt32* pnSubKeys)
|
||||
RegError ORegKey::openSubKeys(std::u16string_view keyName, RegKeyHandle** phOpenSubKeys, sal_uInt32* pnSubKeys)
|
||||
{
|
||||
RegError _ret = RegError::NO_ERROR;
|
||||
|
||||
@@ -89,7 +89,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
|
||||
*pnSubKeys = 0;
|
||||
|
||||
ORegKey* pKey = this;
|
||||
if ( !keyName.isEmpty() )
|
||||
if ( !keyName.empty() )
|
||||
{
|
||||
_ret = openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pKey));
|
||||
if (_ret != RegError::NO_ERROR)
|
||||
@@ -132,7 +132,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
|
||||
}
|
||||
|
||||
*phOpenSubKeys = reinterpret_cast<RegKeyHandle*>(pSubKeys);
|
||||
if (!keyName.isEmpty())
|
||||
if (!keyName.empty())
|
||||
{
|
||||
(void) releaseKey(pKey);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
|
||||
|
||||
// getKeyNames
|
||||
|
||||
RegError ORegKey::getKeyNames(const OUString& keyName,
|
||||
RegError ORegKey::getKeyNames(std::u16string_view keyName,
|
||||
rtl_uString*** pSubKeyNames,
|
||||
sal_uInt32* pnSubKeys)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName,
|
||||
*pnSubKeys = 0;
|
||||
|
||||
ORegKey* pKey = this;
|
||||
if (!keyName.isEmpty())
|
||||
if (!keyName.empty())
|
||||
{
|
||||
RegError _ret = openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pKey));
|
||||
if (_ret != RegError::NO_ERROR)
|
||||
@@ -189,7 +189,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName,
|
||||
}
|
||||
|
||||
*pSubKeyNames = pSubKeys;
|
||||
if (!keyName.isEmpty())
|
||||
if (!keyName.empty())
|
||||
{
|
||||
releaseKey(pKey);
|
||||
}
|
||||
@@ -207,7 +207,7 @@ RegError ORegKey::closeKey(RegKeyHandle hKey)
|
||||
|
||||
// deleteKey
|
||||
|
||||
RegError ORegKey::deleteKey(const OUString& keyName)
|
||||
RegError ORegKey::deleteKey(std::u16string_view keyName)
|
||||
{
|
||||
return m_pRegistry->deleteKey(this, keyName);
|
||||
}
|
||||
@@ -899,10 +899,10 @@ RegError ORegKey::getUnicodeListValue(std::u16string_view valueName, sal_Unicode
|
||||
}
|
||||
|
||||
|
||||
RegError ORegKey::getResolvedKeyName(const OUString& keyName,
|
||||
RegError ORegKey::getResolvedKeyName(std::u16string_view keyName,
|
||||
OUString& resolvedName) const
|
||||
{
|
||||
if (keyName.isEmpty())
|
||||
if (keyName.empty())
|
||||
return RegError::INVALID_KEYNAME;
|
||||
|
||||
resolvedName = getFullPath(keyName);
|
||||
@@ -961,13 +961,13 @@ OStoreDirectory ORegKey::getStoreDir() const
|
||||
return rStoreDir;
|
||||
}
|
||||
|
||||
OUString ORegKey::getFullPath(OUString const & path) const {
|
||||
OSL_ASSERT(!m_name.isEmpty() && !path.isEmpty());
|
||||
OUString ORegKey::getFullPath(std::u16string_view path) const {
|
||||
OSL_ASSERT(!m_name.isEmpty() && !path.empty());
|
||||
OUStringBuffer b(32);
|
||||
b.append(m_name);
|
||||
if (!b.isEmpty() && b[b.getLength() - 1] == '/') {
|
||||
if (path[0] == '/') {
|
||||
b.append(path.subView(1));
|
||||
b.append(path.substr(1));
|
||||
} else {
|
||||
b.append(path);
|
||||
}
|
||||
|
||||
@@ -42,21 +42,21 @@ public:
|
||||
|
||||
RegError releaseKey(RegKeyHandle hKey);
|
||||
|
||||
RegError createKey(const OUString& keyName, RegKeyHandle* phNewKey);
|
||||
RegError createKey(std::u16string_view keyName, RegKeyHandle* phNewKey);
|
||||
|
||||
RegError openKey(const OUString& keyName, RegKeyHandle* phOpenKey);
|
||||
RegError openKey(std::u16string_view keyName, RegKeyHandle* phOpenKey);
|
||||
|
||||
RegError openSubKeys(const OUString& keyName,
|
||||
RegError openSubKeys(std::u16string_view keyName,
|
||||
RegKeyHandle** phOpenSubKeys,
|
||||
sal_uInt32* pnSubKeys);
|
||||
|
||||
RegError getKeyNames(const OUString& keyName,
|
||||
RegError getKeyNames(std::u16string_view keyName,
|
||||
rtl_uString*** pSubKeyNames,
|
||||
sal_uInt32* pnSubKeys);
|
||||
|
||||
RegError closeKey(RegKeyHandle hKey);
|
||||
|
||||
RegError deleteKey(const OUString& keyName);
|
||||
RegError deleteKey(std::u16string_view keyName);
|
||||
|
||||
RegError getValueInfo(std::u16string_view valueName,
|
||||
RegValueType* pValueTye,
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
sal_Unicode*** pValueList,
|
||||
sal_uInt32* pLen) const;
|
||||
|
||||
RegError getResolvedKeyName(const OUString& keyName,
|
||||
RegError getResolvedKeyName(std::u16string_view keyName,
|
||||
OUString& resolvedName) const;
|
||||
|
||||
bool isDeleted() const
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
const OUString& getName() const
|
||||
{ return m_name; }
|
||||
|
||||
OUString getFullPath(OUString const & path) const;
|
||||
OUString getFullPath(std::u16string_view path) const;
|
||||
|
||||
private:
|
||||
sal_uInt32 m_refCount;
|
||||
|
||||
@@ -603,14 +603,14 @@ RegError ORegistry::releaseKey (RegKeyHandle hKey)
|
||||
return RegError::NO_ERROR;
|
||||
}
|
||||
|
||||
RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName,
|
||||
RegError ORegistry::createKey(RegKeyHandle hKey, std::u16string_view keyName,
|
||||
RegKeyHandle* phNewKey)
|
||||
{
|
||||
ORegKey* pKey;
|
||||
|
||||
*phNewKey = nullptr;
|
||||
|
||||
if (keyName.isEmpty())
|
||||
if (keyName.empty())
|
||||
return RegError::INVALID_KEYNAME;
|
||||
|
||||
REG_GUARD(m_mutex);
|
||||
@@ -660,14 +660,14 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName,
|
||||
return RegError::NO_ERROR;
|
||||
}
|
||||
|
||||
RegError ORegistry::openKey(RegKeyHandle hKey, const OUString& keyName,
|
||||
RegError ORegistry::openKey(RegKeyHandle hKey, std::u16string_view keyName,
|
||||
RegKeyHandle* phOpenKey)
|
||||
{
|
||||
ORegKey* pKey;
|
||||
|
||||
*phOpenKey = nullptr;
|
||||
|
||||
if (keyName.isEmpty())
|
||||
if (keyName.empty())
|
||||
{
|
||||
return RegError::INVALID_KEYNAME;
|
||||
}
|
||||
@@ -735,10 +735,10 @@ RegError ORegistry::closeKey(RegKeyHandle hKey)
|
||||
return releaseKey(pKey);
|
||||
}
|
||||
|
||||
RegError ORegistry::deleteKey(RegKeyHandle hKey, const OUString& keyName)
|
||||
RegError ORegistry::deleteKey(RegKeyHandle hKey, std::u16string_view keyName)
|
||||
{
|
||||
ORegKey* pKey = static_cast< ORegKey* >(hKey);
|
||||
if (keyName.isEmpty())
|
||||
if (keyName.empty())
|
||||
return RegError::INVALID_KEYNAME;
|
||||
|
||||
REG_GUARD(m_mutex);
|
||||
|
||||
@@ -65,16 +65,16 @@ public:
|
||||
RegError releaseKey(RegKeyHandle hKey);
|
||||
|
||||
RegError createKey(RegKeyHandle hKey,
|
||||
const OUString& keyName,
|
||||
std::u16string_view keyName,
|
||||
RegKeyHandle* phNewKey);
|
||||
|
||||
RegError openKey(RegKeyHandle hKey,
|
||||
const OUString& keyName,
|
||||
std::u16string_view keyName,
|
||||
RegKeyHandle* phOpenKey);
|
||||
|
||||
RegError closeKey(RegKeyHandle hKey);
|
||||
|
||||
RegError deleteKey(RegKeyHandle hKey, const OUString& keyName);
|
||||
RegError deleteKey(RegKeyHandle hKey, std::u16string_view keyName);
|
||||
|
||||
RegError loadKey(RegKeyHandle hKey,
|
||||
const OUString& regFileName,
|
||||
|
||||
@@ -241,7 +241,7 @@ static RegError REGISTRY_CALLTYPE mergeKey(RegHandle hReg,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pNewKey = nullptr;
|
||||
RegError _ret = pKey->createKey(keyName, reinterpret_cast<RegKeyHandle*>(&pNewKey));
|
||||
RegError _ret = pKey->createKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pNewKey));
|
||||
if (_ret != RegError::NO_ERROR)
|
||||
return _ret;
|
||||
|
||||
|
||||
+15
-15
@@ -95,7 +95,7 @@ RegError REGISTRY_CALLTYPE createKey(RegKeyHandle hKey,
|
||||
if (pKey->isReadOnly())
|
||||
return RegError::REGISTRY_READONLY;
|
||||
|
||||
return pKey->createKey(keyName, phNewKey);
|
||||
return pKey->createKey(OUString::unacquired(&keyName), phNewKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ RegError REGISTRY_CALLTYPE openKey(RegKeyHandle hKey,
|
||||
if (pKey->isDeleted())
|
||||
return RegError::INVALID_KEY;
|
||||
|
||||
return pKey->openKey(keyName, phOpenKey);
|
||||
return pKey->openKey(OUString::unacquired(&keyName), phOpenKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ RegError REGISTRY_CALLTYPE openSubKeys(RegKeyHandle hKey,
|
||||
if (pKey->isDeleted())
|
||||
return RegError::INVALID_KEY;
|
||||
|
||||
return pKey->openSubKeys(keyName, pphSubKeys, pnSubKeys);
|
||||
return pKey->openSubKeys(OUString::unacquired(&keyName), pphSubKeys, pnSubKeys);
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ RegError REGISTRY_CALLTYPE deleteKey(RegKeyHandle hKey,
|
||||
if (pKey->isReadOnly())
|
||||
return RegError::REGISTRY_READONLY;
|
||||
|
||||
return pKey->deleteKey(keyName);
|
||||
return pKey->deleteKey(OUString::unacquired(&keyName));
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret1 = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret1 != RegError::NO_ERROR)
|
||||
return _ret1;
|
||||
|
||||
@@ -253,7 +253,7 @@ RegError REGISTRY_CALLTYPE setLongListValue(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret1 = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret1 != RegError::NO_ERROR)
|
||||
return _ret1;
|
||||
|
||||
@@ -295,7 +295,7 @@ RegError REGISTRY_CALLTYPE setStringListValue(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret1 = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret1 != RegError::NO_ERROR)
|
||||
return _ret1;
|
||||
|
||||
@@ -337,7 +337,7 @@ RegError REGISTRY_CALLTYPE setUnicodeListValue(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret1 = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret1 != RegError::NO_ERROR)
|
||||
return _ret1;
|
||||
|
||||
@@ -382,7 +382,7 @@ RegError REGISTRY_CALLTYPE getValueInfo(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret != RegError::NO_ERROR)
|
||||
return _ret;
|
||||
|
||||
@@ -428,7 +428,7 @@ RegError REGISTRY_CALLTYPE getValue(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret1 = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret1 != RegError::NO_ERROR)
|
||||
return _ret1;
|
||||
|
||||
@@ -468,7 +468,7 @@ RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret1 = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret1 != RegError::NO_ERROR)
|
||||
return _ret1;
|
||||
|
||||
@@ -508,7 +508,7 @@ RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret1 = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret1 != RegError::NO_ERROR)
|
||||
return _ret1;
|
||||
|
||||
@@ -546,7 +546,7 @@ RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey,
|
||||
if (keyName->length)
|
||||
{
|
||||
ORegKey* pSubKey = nullptr;
|
||||
RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
RegError _ret1 = pKey->openKey(OUString::unacquired(&keyName), reinterpret_cast<RegKeyHandle*>(&pSubKey));
|
||||
if (_ret1 != RegError::NO_ERROR)
|
||||
return _ret1;
|
||||
|
||||
@@ -623,7 +623,7 @@ RegError REGISTRY_CALLTYPE getResolvedKeyName(RegKeyHandle hKey,
|
||||
return RegError::INVALID_KEY;
|
||||
|
||||
OUString resolvedName;
|
||||
RegError _ret = pKey->getResolvedKeyName(keyName, resolvedName);
|
||||
RegError _ret = pKey->getResolvedKeyName(OUString::unacquired(&keyName), resolvedName);
|
||||
if (_ret == RegError::NO_ERROR)
|
||||
rtl_uString_assign(pResolvedName, resolvedName.pData);
|
||||
return _ret;
|
||||
@@ -644,7 +644,7 @@ RegError REGISTRY_CALLTYPE getKeyNames(RegKeyHandle hKey,
|
||||
if (pKey->isDeleted())
|
||||
return RegError::INVALID_KEY;
|
||||
|
||||
return pKey->getKeyNames(keyName, pSubKeyNames, pnSubKeys);
|
||||
return pKey->getKeyNames(OUString::unacquired(&keyName), pSubKeyNames, pnSubKeys);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -574,7 +574,7 @@ Event& Entity::getEvent( CallbackType aType )
|
||||
return rEvent;
|
||||
}
|
||||
|
||||
OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, const OUString& sSystemId, sal_Int32 nLine )
|
||||
OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemId, sal_Int32 nLine )
|
||||
{
|
||||
const char* pMessage;
|
||||
xmlErrorPtr error = xmlCtxtGetLastError( ctxt );
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ public:
|
||||
double fValue, const ScDPNumGroupInfo* pInfo, sal_Int32 nDatePart,
|
||||
const SvNumberFormatter* pFormatter);
|
||||
|
||||
SC_DLLPUBLIC static OUString getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc eFunc);
|
||||
SC_DLLPUBLIC static OUString getDisplayedMeasureName(std::u16string_view rName, ScSubTotalFunc eFunc);
|
||||
|
||||
SC_DLLPUBLIC static ScSubTotalFunc toSubTotalFunc(ScGeneralFunction eGenFunc);
|
||||
};
|
||||
|
||||
+1
-1
@@ -627,7 +627,7 @@ public:
|
||||
@param nSepCount Specifies how often cSep is inserted between two tokens.
|
||||
@param bForceSep true = Always insert separator; false = Only, if not at begin or end. */
|
||||
SC_DLLPUBLIC static OUString addToken(
|
||||
const OUString& rTokenList, const OUString& rToken,
|
||||
const OUString& rTokenList, std::u16string_view rToken,
|
||||
sal_Unicode cSep, sal_Int32 nSepCount = 1,
|
||||
bool bForceSep = false );
|
||||
|
||||
|
||||
@@ -653,7 +653,15 @@ void ScBootstrapFixture::createFileURL(
|
||||
rFilePath = url.GetMainURL(INetURLObject::DecodeMechanism::NONE);
|
||||
}
|
||||
|
||||
void ScBootstrapFixture::createCSVPath(const OUString& aFileBase, OUString& rCSVPath)
|
||||
void ScBootstrapFixture::createCSVPath(const char* aFileBase, OUString& rCSVPath)
|
||||
{
|
||||
OUStringBuffer aBuffer( m_directories.getSrcRootPath());
|
||||
aBuffer.append(EnsureSeparator(aBuffer)).append(m_aBaseString);
|
||||
aBuffer.append(EnsureSeparator(aBuffer)).append("contentCSV/").appendAscii(aFileBase).append("csv");
|
||||
rCSVPath = aBuffer.makeStringAndClear();
|
||||
}
|
||||
|
||||
void ScBootstrapFixture::createCSVPath(std::u16string_view aFileBase, OUString& rCSVPath)
|
||||
{
|
||||
OUStringBuffer aBuffer( m_directories.getSrcRootPath());
|
||||
aBuffer.append(EnsureSeparator(aBuffer)).append(m_aBaseString);
|
||||
|
||||
@@ -188,8 +188,8 @@ public:
|
||||
virtual ~ScBootstrapFixture() override;
|
||||
|
||||
void createFileURL(std::u16string_view aFileBase, const OUString& aFileExtension, OUString& rFilePath);
|
||||
|
||||
void createCSVPath(const OUString& aFileBase, OUString& rCSVPath);
|
||||
void createCSVPath(const char* aFileBase, OUString& rCSVPath);
|
||||
void createCSVPath(std::u16string_view aFileBase, OUString& rCSVPath);
|
||||
|
||||
ScDocShellRef saveAndReload(ScDocShell* pShell, const OUString &rFilter,
|
||||
const OUString &rUserData, const OUString& rTypeName, SfxFilterFlags nFormatType, const OUString* pPassword = nullptr );
|
||||
|
||||
@@ -1296,7 +1296,7 @@ void ScDPResultMember::ProcessData( const vector< SCROW >& aChildMembers, const
|
||||
* Parse subtotal string and replace all occurrences of '?' with the caption
|
||||
* string. Do ensure that escaped characters are not translated.
|
||||
*/
|
||||
static OUString lcl_parseSubtotalName(const OUString& rSubStr, const OUString& rCaption)
|
||||
static OUString lcl_parseSubtotalName(const OUString& rSubStr, std::u16string_view rCaption)
|
||||
{
|
||||
OUStringBuffer aNewStr;
|
||||
sal_Int32 n = rSubStr.getLength();
|
||||
|
||||
@@ -387,7 +387,7 @@ const char* aFuncStrIds[] = {
|
||||
|
||||
}
|
||||
|
||||
OUString ScDPUtil::getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc eFunc)
|
||||
OUString ScDPUtil::getDisplayedMeasureName(std::u16string_view rName, ScSubTotalFunc eFunc)
|
||||
{
|
||||
OUStringBuffer aRet;
|
||||
assert(unsigned(eFunc) < SAL_N_ELEMENTS(aFuncStrIds));
|
||||
|
||||
@@ -651,11 +651,11 @@ const sal_Unicode* ScGlobal::UnicodeStrChr( const sal_Unicode* pStr,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
OUString ScGlobal::addToken(const OUString& rTokenList, const OUString& rToken,
|
||||
OUString ScGlobal::addToken(const OUString& rTokenList, std::u16string_view rToken,
|
||||
sal_Unicode cSep, sal_Int32 nSepCount, bool bForceSep)
|
||||
{
|
||||
OUStringBuffer aBuf(rTokenList);
|
||||
if( bForceSep || (!rToken.isEmpty() && !rTokenList.isEmpty()) )
|
||||
if( bForceSep || (!rToken.empty() && !rTokenList.isEmpty()) )
|
||||
comphelper::string::padToLength(aBuf, aBuf.getLength() + nSepCount, cSep);
|
||||
aBuf.append(rToken);
|
||||
return aBuf.makeStringAndClear();
|
||||
|
||||
@@ -2002,7 +2002,7 @@ static OUString getFileNameFromDoc( const ScDocument* pDoc )
|
||||
}
|
||||
|
||||
|
||||
static void lcl_string_append(OUStringBuffer &rString, const OUString &sString)
|
||||
static void lcl_string_append(OUStringBuffer &rString, std::u16string_view sString)
|
||||
{
|
||||
rString.append(sString);
|
||||
}
|
||||
|
||||
@@ -804,7 +804,7 @@ struct ConventionOOO_A1 : public Convention_A1
|
||||
|
||||
static void MakeOneRefStrImpl(
|
||||
const ScSheetLimits& rLimits, OUStringBuffer& rBuffer,
|
||||
const OUString& rErrRef, const std::vector<OUString>& rTabNames,
|
||||
std::u16string_view rErrRef, const std::vector<OUString>& rTabNames,
|
||||
const ScSingleRefData& rRef, const ScAddress& rAbsRef,
|
||||
bool bForceTab, bool bODF, SingletonDisplay eSingletonDisplay )
|
||||
{
|
||||
|
||||
@@ -429,7 +429,7 @@ void ExcTable::FillAsTableBinary( SCTAB nCodeNameIdx )
|
||||
if (rNote.maPos.Tab() != mnScTab)
|
||||
continue;
|
||||
|
||||
mxNoteList->AppendNewRecord(new XclExpNote(GetRoot(), rNote.maPos, rNote.mpNote, OUString()));
|
||||
mxNoteList->AppendNewRecord(new XclExpNote(GetRoot(), rNote.maPos, rNote.mpNote, u""));
|
||||
}
|
||||
|
||||
// WSBOOL needs data from page settings, create it here, add it later
|
||||
@@ -570,7 +570,7 @@ void ExcTable::FillAsTableXml()
|
||||
if (rNote.maPos.Tab() != mnScTab)
|
||||
continue;
|
||||
|
||||
mxNoteList->AppendNewRecord(new XclExpNote(GetRoot(), rNote.maPos, rNote.mpNote, OUString()));
|
||||
mxNoteList->AppendNewRecord(new XclExpNote(GetRoot(), rNote.maPos, rNote.mpNote, u""));
|
||||
}
|
||||
|
||||
// WSBOOL needs data from page settings, create it here, add it later
|
||||
|
||||
@@ -1448,7 +1448,7 @@ const css::uno::Reference<css::chart::XChartDocument>& XclExpChartObj::GetChartD
|
||||
}
|
||||
|
||||
XclExpNote::XclExpNote(const XclExpRoot& rRoot, const ScAddress& rScPos,
|
||||
const ScPostIt* pScNote, const OUString& rAddText)
|
||||
const ScPostIt* pScNote, std::u16string_view rAddText)
|
||||
: XclExpRecord(EXC_ID_NOTE)
|
||||
, mrRoot(rRoot)
|
||||
, maScPos(rScPos)
|
||||
|
||||
@@ -549,7 +549,7 @@ const char* const ppcStyleNames[] =
|
||||
"Followed_Hyperlink"
|
||||
};
|
||||
|
||||
OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rName, sal_uInt8 nLevel )
|
||||
OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, std::u16string_view rName, sal_uInt8 nLevel )
|
||||
{
|
||||
OUString aStyleName;
|
||||
|
||||
@@ -562,7 +562,7 @@ OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rNam
|
||||
OUStringBuffer aBuf(maStyleNamePrefix1);
|
||||
if( nStyleId < SAL_N_ELEMENTS( ppcStyleNames ) )
|
||||
aBuf.appendAscii(ppcStyleNames[nStyleId]);
|
||||
else if (!rName.isEmpty())
|
||||
else if (!rName.empty())
|
||||
aBuf.append(rName);
|
||||
else
|
||||
aBuf.append(static_cast<sal_Int32>(nStyleId));
|
||||
|
||||
@@ -349,7 +349,7 @@ public:
|
||||
const XclExpRoot& rRoot,
|
||||
const ScAddress& rScPos,
|
||||
const ScPostIt* pScNote,
|
||||
const OUString& rAddText );
|
||||
std::u16string_view rAddText );
|
||||
|
||||
/** Writes the NOTE record, if the respective Escher object is present. */
|
||||
virtual void Save( XclExpStream& rStrm ) override;
|
||||
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
@param rName Default name for unknown styles.
|
||||
@param nLevel The zero-based outline level for RowLevel and ColLevel styles.
|
||||
@return The style name or an empty string, if the parameters are not valid. */
|
||||
static OUString GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rName, sal_uInt8 nLevel );
|
||||
static OUString GetBuiltInStyleName( sal_uInt8 nStyleId, std::u16string_view rName, sal_uInt8 nLevel );
|
||||
|
||||
/** Returns true, if the passed string is a name of an Excel built-in style.
|
||||
@param pnStyleId If not 0, the found style identifier will be returned here.
|
||||
|
||||
@@ -63,9 +63,9 @@ const sal_uInt32 BIFF12_QUERYTABLE_APPLYBORDER = 0x00020000;
|
||||
const sal_uInt32 BIFF12_QUERYTABLE_APPLYFILL = 0x00040000;
|
||||
const sal_uInt32 BIFF12_QUERYTABLE_APPLYPROTECTION = 0x00080000;
|
||||
|
||||
void lclAppendWebQueryTableName( OUStringBuffer& rTables, const OUString& rTableName )
|
||||
void lclAppendWebQueryTableName( OUStringBuffer& rTables, std::u16string_view rTableName )
|
||||
{
|
||||
if( !rTableName.isEmpty() )
|
||||
if( !rTableName.empty() )
|
||||
{
|
||||
if( !rTables.isEmpty() )
|
||||
rTables.append( ';' );
|
||||
|
||||
@@ -2399,13 +2399,13 @@ const char* const sppcStyleNames[] =
|
||||
};
|
||||
const sal_Int32 snStyleNamesCount = static_cast< sal_Int32 >( SAL_N_ELEMENTS( sppcStyleNames ) );
|
||||
|
||||
OUString lclGetBuiltinStyleName( sal_Int32 nBuiltinId, const OUString& rName, sal_Int32 nLevel = 0 )
|
||||
OUString lclGetBuiltinStyleName( sal_Int32 nBuiltinId, std::u16string_view rName, sal_Int32 nLevel = 0 )
|
||||
{
|
||||
OSL_ENSURE( (0 <= nBuiltinId) && (nBuiltinId < snStyleNamesCount), "lclGetBuiltinStyleName - unknown built-in style" );
|
||||
OUStringBuffer aStyleName("Excel Built-in ");
|
||||
if( (0 <= nBuiltinId) && (nBuiltinId < snStyleNamesCount) && (sppcStyleNames[ nBuiltinId ] != nullptr) )
|
||||
aStyleName.appendAscii( sppcStyleNames[ nBuiltinId ] );
|
||||
else if( !rName.isEmpty() )
|
||||
else if( !rName.empty() )
|
||||
aStyleName.append( rName );
|
||||
else
|
||||
aStyleName.append( nBuiltinId );
|
||||
@@ -2678,7 +2678,7 @@ OUString CellStyleBuffer::createCellStyle( const CellStyleRef& rxCellStyle )
|
||||
return rStyleName;
|
||||
}
|
||||
// on error: fallback to default style
|
||||
return lclGetBuiltinStyleName( OOX_STYLE_NORMAL, OUString() );
|
||||
return lclGetBuiltinStyleName( OOX_STYLE_NORMAL, u"" );
|
||||
}
|
||||
|
||||
AutoFormatModel::AutoFormatModel() :
|
||||
|
||||
@@ -807,7 +807,7 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa
|
||||
SvXMLUnitConverter::convertPropertySet(xProperties, aFilteredProps);
|
||||
}
|
||||
|
||||
sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const OUString& rCurrency)
|
||||
sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, std::u16string_view rCurrency)
|
||||
{
|
||||
uno::Reference <util::XNumberFormatsSupplier> xNumberFormatsSupplier(GetNumberFormatsSupplier());
|
||||
if (xNumberFormatsSupplier.is())
|
||||
@@ -913,7 +913,7 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString
|
||||
void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rProperties,
|
||||
sal_Int32& rNumberFormat,
|
||||
const sal_Int16 nCellType,
|
||||
const OUString& rCurrency)
|
||||
std::u16string_view rCurrency)
|
||||
{
|
||||
if (!mbImportStyles)
|
||||
return;
|
||||
@@ -966,7 +966,7 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie
|
||||
rProperties->setPropertyValue( gsNumberFormat, uno::makeAny(xNumberFormatTypes->getStandardFormat(nCellType, aLocale)) );
|
||||
}
|
||||
}
|
||||
else if (!rCurrency.isEmpty() && !sCurrentCurrency.isEmpty())
|
||||
else if (!rCurrency.empty() && !sCurrentCurrency.isEmpty())
|
||||
{
|
||||
if (sCurrentCurrency != rCurrency)
|
||||
if (!IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency))
|
||||
@@ -982,7 +982,7 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((nCellType == util::NumberFormat::CURRENCY) && !rCurrency.isEmpty() && !sCurrentCurrency.isEmpty() &&
|
||||
if ((nCellType == util::NumberFormat::CURRENCY) && !rCurrency.empty() && !sCurrentCurrency.isEmpty() &&
|
||||
sCurrentCurrency != rCurrency && !IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency))
|
||||
rProperties->setPropertyValue( gsNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency)));
|
||||
}
|
||||
|
||||
@@ -254,12 +254,12 @@ public:
|
||||
virtual void SetConfigurationSettings(const css::uno::Sequence<css::beans::PropertyValue>& aConfigProps) override;
|
||||
|
||||
ScMyStylesImportHelper* GetStylesImportHelper() { return pStylesImportHelper.get(); }
|
||||
sal_Int32 SetCurrencySymbol(const sal_Int32 nKey, const OUString& rCurrency);
|
||||
sal_Int32 SetCurrencySymbol(const sal_Int32 nKey, std::u16string_view rCurrency);
|
||||
bool IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString& sCurrencySymbol, std::u16string_view sBankSymbol);
|
||||
void SetType(const css::uno::Reference <css::beans::XPropertySet>& rProperties,
|
||||
sal_Int32& rNumberFormat,
|
||||
const sal_Int16 nCellType,
|
||||
const OUString& rCurrency);
|
||||
std::u16string_view rCurrency);
|
||||
|
||||
void ProgressBarIncrement();
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ OUString ScCondFormatHelper::GetExpression(const ScConditionalFormat& rFormat, c
|
||||
}
|
||||
|
||||
OUString ScCondFormatHelper::GetExpression( ScCondFormatEntryType eType, sal_Int32 nIndex,
|
||||
const OUString& aStr1, const OUString& aStr2 )
|
||||
std::u16string_view aStr1, std::u16string_view aStr2 )
|
||||
{
|
||||
OUStringBuffer aBuffer(getTextForType(eType));
|
||||
aBuffer.append(" ");
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
static SC_DLLPUBLIC OUString GetExpression(const ScConditionalFormat& rFormat, const ScAddress& rPos);
|
||||
|
||||
static SC_DLLPUBLIC OUString GetExpression( ScCondFormatEntryType eType, sal_Int32 nIndex,
|
||||
const OUString& aStr1 = OUString(), const OUString& aStr2 = OUString() );
|
||||
std::u16string_view aStr1 = std::u16string_view(), std::u16string_view aStr2 = std::u16string_view() );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -322,9 +322,9 @@ OUString getParagraphStyle( SdrOutliner* pOutliner, sal_Int32 nPara )
|
||||
return sStyle;
|
||||
}
|
||||
|
||||
void lclAppendStyle(OUStringBuffer& aBuffer, const OUString& aTag, const OUString& aStyle)
|
||||
void lclAppendStyle(OUStringBuffer& aBuffer, std::u16string_view aTag, std::u16string_view aStyle)
|
||||
{
|
||||
if (aStyle.isEmpty())
|
||||
if (aStyle.empty())
|
||||
aBuffer.append("<").append(aTag).append(">");
|
||||
else
|
||||
aBuffer.append("<").append(aTag).append(" style=\"").append(aStyle).append("\">");
|
||||
@@ -652,7 +652,7 @@ void HtmlExport::ExportSingleDocument()
|
||||
sStyle += "page-break-before:always; ";
|
||||
sStyle += getParagraphStyle(pOutliner, 0);
|
||||
|
||||
lclAppendStyle(aStr, "h1", sStyle);
|
||||
lclAppendStyle(aStr, u"h1", sStyle);
|
||||
|
||||
aStr.append(sTitleText);
|
||||
aStr.append("</h1>\r\n");
|
||||
@@ -1104,7 +1104,7 @@ bool HtmlExport::CreateHtmlTextForPresPages()
|
||||
|
||||
// page title
|
||||
OUString sTitleText( CreateTextForTitle(pOutliner,pPage, pPage->GetPageBackgroundColor()) );
|
||||
lclAppendStyle(aStr, "h1", getParagraphStyle(pOutliner, 0));
|
||||
lclAppendStyle(aStr, u"h1", getParagraphStyle(pOutliner, 0));
|
||||
aStr.append(sTitleText);
|
||||
aStr.append("</h1>\r\n");
|
||||
|
||||
@@ -1348,7 +1348,7 @@ void HtmlExport::WriteOutlinerParagraph(OUStringBuffer& aStr, SdrOutliner* pOutl
|
||||
aStr.append("</ul>\r\n");
|
||||
nCurrentDepth--;
|
||||
}
|
||||
lclAppendStyle(aStr, "li", getParagraphStyle(pOutliner, nIndex));
|
||||
lclAppendStyle(aStr, u"li", getParagraphStyle(pOutliner, nIndex));
|
||||
aStr.append(aParaText);
|
||||
aStr.append("</li>\r\n");
|
||||
}
|
||||
@@ -1381,7 +1381,7 @@ OUString HtmlExport::CreateTextForNotesPage( SdrOutliner* pOutliner,
|
||||
sal_Int32 nCount = pOutliner->GetParagraphCount();
|
||||
for (sal_Int32 nPara = 0; nPara < nCount; nPara++)
|
||||
{
|
||||
lclAppendStyle(aStr, "p", getParagraphStyle(pOutliner, nPara));
|
||||
lclAppendStyle(aStr, u"p", getParagraphStyle(pOutliner, nPara));
|
||||
aStr.append(ParagraphToHTMLString(pOutliner, nPara, rBackgroundColor));
|
||||
aStr.append("</p>\r\n");
|
||||
}
|
||||
@@ -2098,7 +2098,7 @@ bool HtmlExport::CreateOutlinePages()
|
||||
if (aTitle.isEmpty())
|
||||
aTitle = maPageNames[nSdPage];
|
||||
|
||||
lclAppendStyle(aStr, "p", getParagraphStyle(pOutliner, 0));
|
||||
lclAppendStyle(aStr, u"p", getParagraphStyle(pOutliner, 0));
|
||||
aStr.append(CreateLink(aLink, aTitle));
|
||||
aStr.append("</p>");
|
||||
|
||||
@@ -2406,7 +2406,7 @@ bool HtmlExport::CreateNavBarFrames()
|
||||
aButton);
|
||||
|
||||
if(nFile != 0 && mnSdPageCount > 1)
|
||||
aButton = CreateLink("JavaScript:parent.NavigateAbs(0)", aButton);
|
||||
aButton = CreateLink(u"JavaScript:parent.NavigateAbs(0)", aButton);
|
||||
|
||||
aStr.append(aButton);
|
||||
aStr.append("\r\n");
|
||||
@@ -2419,7 +2419,7 @@ bool HtmlExport::CreateNavBarFrames()
|
||||
aButton);
|
||||
|
||||
if(nFile != 0 && mnSdPageCount > 1)
|
||||
aButton = CreateLink("JavaScript:parent.NavigateRel(-1)", aButton);
|
||||
aButton = CreateLink(u"JavaScript:parent.NavigateRel(-1)", aButton);
|
||||
|
||||
aStr.append(aButton);
|
||||
aStr.append("\r\n");
|
||||
@@ -2432,7 +2432,7 @@ bool HtmlExport::CreateNavBarFrames()
|
||||
aButton);
|
||||
|
||||
if(nFile != 2 && mnSdPageCount > 1)
|
||||
aButton = CreateLink("JavaScript:parent.NavigateRel(1)", aButton);
|
||||
aButton = CreateLink(u"JavaScript:parent.NavigateRel(1)", aButton);
|
||||
|
||||
aStr.append(aButton);
|
||||
aStr.append("\r\n");
|
||||
@@ -2463,7 +2463,7 @@ bool HtmlExport::CreateNavBarFrames()
|
||||
aButton = CreateImage(GetButtonName(BTN_INDEX), aButton);
|
||||
|
||||
// to the overview
|
||||
aStr.append(CreateLink(maIndex, aButton, "_top"));
|
||||
aStr.append(CreateLink(maIndex, aButton, u"_top"));
|
||||
aStr.append("\r\n");
|
||||
}
|
||||
|
||||
@@ -2475,7 +2475,7 @@ bool HtmlExport::CreateNavBarFrames()
|
||||
aButton = CreateImage(GetButtonName(BTN_TEXT), aButton);
|
||||
|
||||
OUString aText0("text0" + gaHTMLExtension);
|
||||
aStr.append(CreateLink(aText0, aButton, "_top"));
|
||||
aStr.append(CreateLink(aText0, aButton, u"_top"));
|
||||
aStr.append("\r\n");
|
||||
}
|
||||
|
||||
@@ -2505,7 +2505,7 @@ bool HtmlExport::CreateNavBarFrames()
|
||||
if(mnButtonThema != -1)
|
||||
aButton = CreateImage(GetButtonName(BTN_MORE), aButton);
|
||||
|
||||
aStr.append(CreateLink("JavaScript:parent.ExpandOutline()", aButton));
|
||||
aStr.append(CreateLink(u"JavaScript:parent.ExpandOutline()", aButton));
|
||||
aStr.append("</body>\r\n</html>");
|
||||
|
||||
bOk = WriteHtml("navbar3", true, aStr.makeStringAndClear());
|
||||
@@ -2528,7 +2528,7 @@ bool HtmlExport::CreateNavBarFrames()
|
||||
if(mnButtonThema != -1)
|
||||
aButton = CreateImage(GetButtonName(BTN_LESS), aButton);
|
||||
|
||||
aStr.append(CreateLink("JavaScript:parent.CollapseOutline()", aButton));
|
||||
aStr.append(CreateLink(u"JavaScript:parent.CollapseOutline()", aButton));
|
||||
aStr.append("</body>\r\n</html>");
|
||||
|
||||
bOk = WriteHtml("navbar4", true, aStr.makeStringAndClear());
|
||||
@@ -2691,13 +2691,13 @@ OUString HtmlExport::CreateBodyTag() const
|
||||
}
|
||||
|
||||
// creates a hyperlink
|
||||
OUString HtmlExport::CreateLink( const OUString& aLink,
|
||||
const OUString& aText,
|
||||
const OUString& aTarget )
|
||||
OUString HtmlExport::CreateLink( std::u16string_view aLink,
|
||||
std::u16string_view aText,
|
||||
std::u16string_view aTarget )
|
||||
{
|
||||
OUStringBuffer aStr( "<a href=\"" );
|
||||
aStr.append(aLink);
|
||||
if (!aTarget.isEmpty())
|
||||
if (!aTarget.empty())
|
||||
{
|
||||
aStr.append("\" target=\"");
|
||||
aStr.append(aTarget);
|
||||
@@ -2710,13 +2710,13 @@ OUString HtmlExport::CreateLink( const OUString& aLink,
|
||||
}
|
||||
|
||||
// creates an image tag
|
||||
OUString HtmlExport::CreateImage( const OUString& aImage, const OUString& aAltText )
|
||||
OUString HtmlExport::CreateImage( std::u16string_view aImage, std::u16string_view aAltText )
|
||||
{
|
||||
OUStringBuffer aStr( "<img src=\"");
|
||||
aStr.append(aImage);
|
||||
aStr.append("\" border=0");
|
||||
|
||||
if (!aAltText.isEmpty())
|
||||
if (!aAltText.empty())
|
||||
{
|
||||
aStr.append(" alt=\"");
|
||||
aStr.append(aAltText);
|
||||
@@ -2766,7 +2766,7 @@ OUString HtmlExport::CreateHTMLCircleArea( sal_uLong nRadius,
|
||||
|
||||
// create area for a polygon; we expect pixel coordinates
|
||||
OUString HtmlExport::CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPolyPolygon,
|
||||
Size aShift, double fFactor, const OUString& rHRef )
|
||||
Size aShift, double fFactor, std::u16string_view rHRef )
|
||||
{
|
||||
OUStringBuffer aStr;
|
||||
const sal_uInt32 nNoOfPolygons(rPolyPolygon.count());
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user