cid#1545975 COPY_INSTEAD_OF_MOVE

and

cid#1545955 COPY_INSTEAD_OF_MOVE
cid#1545954 COPY_INSTEAD_OF_MOVE
cid#1545952 COPY_INSTEAD_OF_MOVE
cid#1545948 COPY_INSTEAD_OF_MOVE
cid#1545943 COPY_INSTEAD_OF_MOVE
cid#1545935 COPY_INSTEAD_OF_MOVE
cid#1545930 COPY_INSTEAD_OF_MOVE
cid#1545928 COPY_INSTEAD_OF_MOVE
cid#1545925 COPY_INSTEAD_OF_MOVE
cid#1545922 COPY_INSTEAD_OF_MOVE

Change-Id: I28d830504337f417829c675b1eb9c763b83b30c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160522
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2023-12-09 21:30:30 +00:00
parent 9c2c815d85
commit 15ff0c3828
12 changed files with 19 additions and 37 deletions

View File

@@ -129,12 +129,12 @@ namespace desktop {
struct CallbackData
{
CallbackData(OString payload)
: PayloadString(payload)
: PayloadString(std::move(payload))
{
}
CallbackData(OString payload, int viewId)
: PayloadString(payload)
: PayloadString(std::move(payload))
, PayloadObject(viewId)
{
}

View File

@@ -1099,14 +1099,13 @@ void SAL_CALL UIConfigurationManager::insertSettings( const OUString& NewResourc
Reference< XIndexAccess > xInsertSettings( aUIElementData.xSettings );
Reference< XUIConfigurationManager > xThis(this);
Reference< XInterface > xIfac( xThis, UNO_QUERY );
// Create event to notify listener about removed element settings
ConfigurationEvent aEvent;
aEvent.ResourceURL = NewResourceURL;
aEvent.Accessor <<= xThis;
aEvent.Source = xIfac;
aEvent.Source.set(xThis, UNO_QUERY);
aEvent.Element <<= xInsertSettings;
aGuard.clear();

View File

@@ -177,7 +177,7 @@ class SVT_DLLPUBLIC AcceleratorExecute final
const css::uno::Reference< css::frame::XFrame >& xFrame);
static css::uno::Reference<css::ui::XAcceleratorConfiguration> lok_createNewAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& rxContext, OUString sModule);
void lok_setModuleConfig(css::uno::Reference<css::ui::XAcceleratorConfiguration> acceleratorConfig);
void lok_setModuleConfig(const css::uno::Reference<css::ui::XAcceleratorConfiguration>& acceleratorConfig);
/** TODO document me */
static css::uno::Reference< css::ui::XAcceleratorConfiguration > st_openDocConfig(const css::uno::Reference< css::frame::XModel >& xModel);

View File

@@ -202,20 +202,17 @@ bool hashCalc(std::vector<sal_uInt8>& output,
{
if (sAlgorithm == u"SHA1")
{
std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA1);
output = out;
output = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA1);
return true;
}
else if (sAlgorithm == u"SHA384")
{
std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA384);
output = out;
output = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA384);
return true;
}
else if (sAlgorithm == u"SHA512")
{
std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA512);
output = out;
output = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA512);
return true;
}
return false;

View File

@@ -2090,14 +2090,12 @@ void ScOrucsImportCellStyle::reset()
void ScOrucsImportCellStyle::set_name(std::string_view name)
{
OUString aName(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
maCurrentStyle.maName = aName;
maCurrentStyle.maName = OUString(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
}
void ScOrucsImportCellStyle::set_display_name(std::string_view name)
{
OUString aName(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
maCurrentStyle.maDisplayName = aName;
maCurrentStyle.maDisplayName = OUString(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
}
void ScOrucsImportCellStyle::set_xf(size_t index)
@@ -2112,8 +2110,7 @@ void ScOrucsImportCellStyle::set_builtin(size_t index)
void ScOrucsImportCellStyle::set_parent_name(std::string_view name)
{
const OUString aParentName(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
maCurrentStyle.maParentName = aParentName;
maCurrentStyle.maParentName = OUString(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
}
void ScOrucsImportCellStyle::commit()

View File

@@ -217,12 +217,11 @@ Reference< XAnimationNode > implImportEffects( const Reference< XMultiServiceFac
{
// create stream
std::unique_ptr<SvStream> pIStm = ::utl::UcbStreamHelper::CreateStream( rPath, StreamMode::READ );
Reference<XInputStream> xInputStream( new utl::OInputStreamWrapper( std::move(pIStm) ) );
// prepare ParserInputSource
xml::sax::InputSource aParserInput;
aParserInput.sSystemId = rPath;
aParserInput.aInputStream = xInputStream;
aParserInput.aInputStream.set(new utl::OInputStreamWrapper(std::move(pIStm)));
// get filter
Reference< xml::sax::XFastParser > xFilter( xServiceFactory->createInstance("com.sun.star.comp.Xmloff.AnimationsImport" ), UNO_QUERY_THROW );

View File

@@ -2715,12 +2715,10 @@ std::unique_ptr<SmExpressionNode> SmParser5::DoError(SmParseError eError)
{
DepthProtect aDepthGuard(m_nParseDepth);
// Identify error message
OUString sStrBuf(SmResId(RID_ERR_IDENT) + starmathdatabase::getParseErrorDesc(eError));
// Generate error node
m_aCurToken.eType = TERROR;
m_aCurToken.cMathChar = sStrBuf;
// Identify error message
m_aCurToken.cMathChar = SmResId(RID_ERR_IDENT) + starmathdatabase::getParseErrorDesc(eError);
auto xSNode = std::make_unique<SmExpressionNode>(m_aCurToken);
SmErrorNode* pErr(new SmErrorNode(m_aCurToken));
pErr->SetSelection(m_aCurESelection);

View File

@@ -429,7 +429,7 @@ css::uno::Reference<css::ui::XAcceleratorConfiguration> AcceleratorExecute::lok_
return css::uno::Reference<css::ui::XAcceleratorConfiguration>();
}
void AcceleratorExecute::lok_setModuleConfig(css::uno::Reference<css::ui::XAcceleratorConfiguration> acceleratorConfig)
void AcceleratorExecute::lok_setModuleConfig(const css::uno::Reference<css::ui::XAcceleratorConfiguration>& acceleratorConfig)
{
this->m_xModuleCfg = acceleratorConfig;
}

View File

@@ -1177,10 +1177,7 @@ OUString SvtLinguConfig::GetSynonymsContextImage(
{
OUString aRes;
if (!rServiceImplName.isEmpty())
{
OUString aPath( GetVendorImageUrl_Impl( rServiceImplName, "SynonymsContextMenuImage" ) );
aRes = aPath;
}
aRes = GetVendorImageUrl_Impl(rServiceImplName, "SynonymsContextMenuImage");
return aRes;
}

View File

@@ -381,7 +381,7 @@ public:
JSWidget(JSDialogSender* pSender, VclClass* pObject, SalInstanceBuilder* pBuilder,
const a11yref& rAlly, FactoryFunction pUITestFactoryFunction, void* pUserData,
bool bTakeOwnership)
: BaseInstanceClass(pObject, pBuilder, rAlly, pUITestFactoryFunction, pUserData,
: BaseInstanceClass(pObject, pBuilder, rAlly, std::move(pUITestFactoryFunction), pUserData,
bTakeOwnership)
, m_bIsFreezed(false)
, m_pSender(pSender)

View File

@@ -120,12 +120,8 @@ XMLImageMapObjectContext::XMLImageMapObjectContext(
Reference<XInterface> xIfc = xFactory->createInstance(
OUString::createFromAscii(pServiceName));
DBG_ASSERT(xIfc.is(), "can't create image map object!");
if( xIfc.is() )
{
Reference<XPropertySet> xPropertySet( xIfc, UNO_QUERY );
xMapEntry = xPropertySet;
}
if (xIfc.is())
xMapEntry.set(xIfc, UNO_QUERY);
// else: can't create service -> ignore
// else: can't even get factory -> ignore
}

View File

@@ -969,8 +969,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
Reference < XInterface > xIfc = xFactory->createInstance("com.sun.star.style.NumberingStyle");
if( !xIfc.is() )
return;
Reference < XStyle > xTmp( xIfc, UNO_QUERY );
xStyle = xTmp;
xStyle.set(xIfc, UNO_QUERY);
if( !xStyle.is() )
return;