summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx2
-rw-r--r--basctl/source/basicide/bastype3.cxx2
-rw-r--r--basctl/source/basicide/moduldl2.cxx2
-rw-r--r--basic/source/runtime/dllmgr-x86.cxx4
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx2
-rw-r--r--cui/source/tabpages/border.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx2
-rw-r--r--embeddedobj/source/msole/oleembed.cxx2
-rw-r--r--embedserv/source/embed/ed_ipersiststr.cxx6
-rw-r--r--extensions/source/bibliography/toolbar.cxx6
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx2
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx2
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx4
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx2
-rw-r--r--include/rtl/string.hxx2
-rw-r--r--include/rtl/ustring.hxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx4
-rw-r--r--sax/qa/cppunit/xmlimport.cxx2
-rw-r--r--sax/source/tools/converter.cxx32
-rw-r--r--sc/source/filter/excel/xestream.cxx4
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/unoobj/targuno.cxx2
-rw-r--r--sc/source/ui/vba/vbadialog.cxx2
-rw-r--r--sc/source/ui/view/olinewin.cxx2
-rw-r--r--sd/source/core/stlsheet.cxx2
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx4
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx22
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--svl/source/items/itemprop.cxx2
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/fmcomp/fmgridif.cxx10
-rw-r--r--svx/source/form/fmshimp.cxx2
-rw-r--r--svx/source/form/fmundo.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx8
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx2
-rw-r--r--sw/source/ui/fldui/changedb.cxx2
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx4
-rw-r--r--writerperfect/source/common/WPFTEncodingDialog.cxx2
-rw-r--r--writerperfect/source/writer/exp/xmlimp.cxx2
-rw-r--r--xmloff/source/core/xmluconv.cxx24
-rw-r--r--xmloff/source/draw/animimp.cxx10
-rw-r--r--xmloff/source/draw/shapeimport.cxx18
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx5
-rw-r--r--xmloff/source/forms/elementexport.cxx2
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx2
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx2
49 files changed, 121 insertions, 112 deletions
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 01c25c291ec5..50110cfd1748 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -191,7 +191,7 @@ uno::Reference<media::XPlayer> MediaWindowImpl::createPlayer(const OUString& rUR
for (const auto& rServiceName : aServiceManagers)
{
- xPlayer = createPlayer(rURL, rServiceName, xContext);
+ xPlayer = createPlayer(rURL, OUString(rServiceName), xContext);
if (xPlayer)
break;
}
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 5ebca907749e..3bb09f3bb140 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1419,7 +1419,7 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext)
Size const aOutSz = GetOutputSize();
tools::Long const nLineHeight = GetTextHeight();
- Image aMarker = GetImage(bErrorMarker ? std::u16string_view(u"" RID_BMP_ERRORMARKER) : std::u16string_view(u"" RID_BMP_STEPMARKER));
+ Image aMarker = GetImage(OUString(bErrorMarker ? std::u16string_view(u"" RID_BMP_ERRORMARKER) : std::u16string_view(u"" RID_BMP_STEPMARKER)));
Size aMarkerSz(aMarker.GetSizePixel());
aMarkerSz = rRenderContext.PixelToLogic(aMarkerSz);
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index aedc8ee307f8..4318ad803306 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -102,7 +102,7 @@ IMPL_LINK(SbTreeListBox, RequestingChildrenHdl, const weld::TreeIter&, rEntry, b
// exchange image
const bool bDlgMode = (nMode & BrowseMode::Dialogs) && !(nMode & BrowseMode::Modules);
auto const aImage(bDlgMode ? std::u16string_view(u"" RID_BMP_DLGLIB) : std::u16string_view(u"" RID_BMP_MODLIB));
- SetEntryBitmaps(rEntry, aImage);
+ SetEntryBitmaps(rEntry, OUString(aImage));
}
else
{
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 5b78745613da..e04558a42e7f 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1351,7 +1351,7 @@ void createLibImpl(weld::Window* pWin, const ScriptDocument& rDocument,
BrowseMode nMode = pBasicBox->GetMode();
bool bDlgMode = ( nMode & BrowseMode::Dialogs ) && !( nMode & BrowseMode::Modules );
const auto sId = bDlgMode ? std::u16string_view(u"" RID_BMP_DLGLIB) : std::u16string_view(u"" RID_BMP_MODLIB);
- pBasicBox->AddEntry(aLibName, sId, xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_LIBRARY));
+ pBasicBox->AddEntry(aLibName, OUString(sId), xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_LIBRARY));
pBasicBox->AddEntry(aModName, RID_BMP_MODULE, xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_MODULE));
pBasicBox->set_cursor(*xRootEntry);
pBasicBox->select(*xRootEntry);
diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx
index 12588d798aea..f07495949dff 100644
--- a/basic/source/runtime/dllmgr-x86.cxx
+++ b/basic/source/runtime/dllmgr-x86.cxx
@@ -710,13 +710,13 @@ ErrCode SbiDllMgr::Call(
if (cdeclConvention) {
return ERRCODE_BASIC_NOT_IMPLEMENTED;
}
- OUString dllName(fullDllName(library));
+ OUString dllName(fullDllName(OUString(library)));
Dll * dll = impl_->getDll(dllName);
if (dll == 0) {
return ERRCODE_BASIC_BAD_DLL_LOAD;
}
ProcData proc;
- ErrCode e = dll->getProc(function, &proc);
+ ErrCode e = dll->getProc(OUString(function), &proc);
if (e != ERRCODE_NONE) {
return e;
}
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 8afe2a8b2e68..3ce0a4374a4c 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -290,7 +290,7 @@ void DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const
rOutAttrs->Put(SfxBoolItem( SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, m_xCBCustomLeaderLines->get_active()) );
auto const aSep = our_aLBEntryMap[m_xLB_Separator->get_active()];
- rOutAttrs->Put( SfxStringItem( SCHATTR_DATADESCR_SEPARATOR, aSep) );
+ rOutAttrs->Put( SfxStringItem( SCHATTR_DATADESCR_SEPARATOR, OUString(aSep)) );
std::map< sal_uInt16, sal_Int32 >::const_iterator aIt( m_aListBoxToPlacementMap.find(m_xLB_LabelPlacement->get_active()) );
if(aIt!=m_aListBoxToPlacementMap.end())
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 1c39571cccf8..b6e3d8d39ed5 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -362,7 +362,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle
}
for (auto const & rImageId : aBorderImageIds)
- m_aBorderImgVec.emplace_back(StockImage::Yes, rImageId);
+ m_aBorderImgVec.emplace_back(StockImage::Yes, OUString(rImageId));
static std::vector<std::u16string_view> aShadowImageIds;
if (aShadowImageIds.empty())
@@ -390,7 +390,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle
}
for (auto const & rImageId : aShadowImageIds)
- m_aShadowImgVec.emplace_back(StockImage::Yes, rImageId);
+ m_aShadowImgVec.emplace_back(StockImage::Yes, OUString(rImageId));
assert(m_aShadowImgVec.size() == SVX_BORDER_SHADOW_COUNT);
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 082a1949d875..2b0104a4374f 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2231,7 +2231,7 @@ OUString OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 n
switch (nCellIndex)
{
case BROW_VIS_ROW :
- return pEntry->IsVisible() ? std::u16string_view(u"1") : std::u16string_view(u"0");
+ return OUString(pEntry->IsVisible() ? std::u16string_view(u"1") : std::u16string_view(u"0"));
case BROW_ORDER_ROW:
{
sal_Int32 nIdx = m_pOrderCell->get_widget().get_active();
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 91b19bcdd78c..1d5da382a8f7 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -718,7 +718,7 @@ namespace
uno::Reference<io::XStream> xEmbeddedFile;
try
{
- xNameContainer->getByName(aStreamNames[i]) >>= xEmbeddedFile;
+ xNameContainer->getByName(OUString(aStreamNames[i])) >>= xEmbeddedFile;
}
catch (const container::NoSuchElementException&)
{
diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx
index 2302bc2380ce..68d3a45dd94b 100644
--- a/embedserv/source/embed/ed_ipersiststr.cxx
+++ b/embedserv/source/embed/ed_ipersiststr.cxx
@@ -400,7 +400,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::InitNew( IStorage *pStg )
if ( m_xFactory.is() && pStg )
{
uno::Reference< frame::XModel > aDocument(
- m_xFactory->createInstance( getServiceNameFromGUID_Impl( &m_guid ) ),
+ m_xFactory->createInstance( OUString(getServiceNameFromGUID_Impl( &m_guid )) ),
uno::UNO_QUERY );
if ( aDocument.is() )
{
@@ -535,7 +535,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::Load( IStorage *pStg )
if ( xTempIn.is() )
{
uno::Reference< frame::XModel > aDocument(
- m_xFactory->createInstance( getServiceNameFromGUID_Impl( &m_guid ) ),
+ m_xFactory->createInstance( OUString(getServiceNameFromGUID_Impl( &m_guid )) ),
uno::UNO_QUERY );
if ( aDocument.is() )
{
@@ -768,7 +768,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::Load( LPCOLESTR pszFileNam
uno::Reference< frame::XModel > aDocument(
- m_xFactory->createInstance( getServiceNameFromGUID_Impl( &m_guid ) ),
+ m_xFactory->createInstance( OUString(getServiceNameFromGUID_Impl( &m_guid )) ),
uno::UNO_QUERY );
if ( aDocument.is() )
{
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 9770428804e3..ae054801d8db 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -593,9 +593,9 @@ void BibToolBar::RebuildToolbar()
void BibToolBar::ApplyImageList()
{
- SetItemImage(nTBC_BT_AUTOFILTER, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? std::u16string_view(u"" RID_EXTBMP_AUTOFILTER_SC) : std::u16string_view(u"" RID_EXTBMP_AUTOFILTER_LC)));
- SetItemImage(nTBC_BT_FILTERCRIT, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? std::u16string_view(u"" RID_EXTBMP_FILTERCRIT_SC) : std::u16string_view(u"" RID_EXTBMP_FILTERCRIT_LC)));
- SetItemImage(nTBC_BT_REMOVEFILTER, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? std::u16string_view(u"" RID_EXTBMP_REMOVE_FILTER_SORT_SC) : std::u16string_view(u"" RID_EXTBMP_REMOVE_FILTER_SORT_LC)));
+ SetItemImage(nTBC_BT_AUTOFILTER, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUString(RID_EXTBMP_AUTOFILTER_SC) : OUString(RID_EXTBMP_AUTOFILTER_LC)));
+ SetItemImage(nTBC_BT_FILTERCRIT, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUString(RID_EXTBMP_FILTERCRIT_SC) : OUString(RID_EXTBMP_FILTERCRIT_LC)));
+ SetItemImage(nTBC_BT_REMOVEFILTER, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUString(RID_EXTBMP_REMOVE_FILTER_SORT_SC) : OUString(RID_EXTBMP_REMOVE_FILTER_SORT_LC)));
AdjustToolBox();
}
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 6834ec637c1f..4bb06962ed0d 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -313,7 +313,7 @@ static bool RenderAsBMPThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRea
oslProcessError eErr = osl_Process_E_Unknown;
for (const auto& rProgName : aProgNames)
{
- eErr = runProcessWithPathSearch(rProgName, pArgs, nArgs, &aProcess, &pIn, &pOut, &pErr);
+ eErr = runProcessWithPathSearch(OUString(rProgName), pArgs, nArgs, &aProcess, &pIn, &pOut, &pErr);
if (eErr == osl_Process_E_None)
break;
}
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 6732eaaf5116..27cb2974cf8d 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -1579,7 +1579,7 @@ void SAL_CALL ModuleUIConfigurationManager::storeToStorage( const Reference< XSt
try
{
Reference< XStorage > xElementTypeStorage( Storage->openStorageElement(
- UIELEMENTTYPENAMES[i], ElementModes::READWRITE ));
+ OUString(UIELEMENTTYPENAMES[i]), ElementModes::READWRITE ));
UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][i];
if ( rElementType.bModified && xElementTypeStorage.is() )
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 498279eb40bc..e97cd33bb6c9 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -635,7 +635,7 @@ void UIConfigurationManager::impl_Initialize()
Reference< XStorage > xElementTypeStorage;
try
{
- xElementTypeStorage = m_xDocConfigStorage->openStorageElement( UIELEMENTTYPENAMES[i], nModes );
+ xElementTypeStorage = m_xDocConfigStorage->openStorageElement( OUString(UIELEMENTTYPENAMES[i]), nModes );
}
catch ( const css::container::NoSuchElementException& )
{
@@ -1307,7 +1307,7 @@ void SAL_CALL UIConfigurationManager::storeToStorage( const Reference< XStorage
try
{
Reference< XStorage > xElementTypeStorage( Storage->openStorageElement(
- UIELEMENTTYPENAMES[i], ElementModes::READWRITE ));
+ OUString(UIELEMENTTYPENAMES[i]), ElementModes::READWRITE ));
UIElementType& rElementType = m_aUIElements[i];
if ( rElementType.bModified && xElementTypeStorage.is() )
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 8741b3d872b0..fb5362307068 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -175,7 +175,7 @@ void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu )
OString sIdent = OString(aCommands[i]).copy(5);
sal_uInt16 nId = pPopupMenu->GetItemId(sIdent);
if (m_bShowMenuImages)
- pPopupMenu->SetItemImage(nId, Image(StockImage::Yes, aImgIds[i]));
+ pPopupMenu->SetItemImage(nId, Image(StockImage::Yes, OUString(aImgIds[i])));
else
pPopupMenu->SetItemImage(nId, Image());
}
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 3c540198f95f..e5e7f5716b74 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -329,7 +329,7 @@ public:
#endif
#if defined LIBO_INTERNAL_ONLY
- OString(std::string_view sv) {
+ explicit OString(std::string_view sv) {
if (sv.size() > sal_uInt32(std::numeric_limits<sal_Int32>::max())) {
throw std::bad_alloc();
}
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 9f8d08c8f9a5..270eedd2c32d 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -468,7 +468,7 @@ public:
#endif
#if defined LIBO_INTERNAL_ONLY
- OUString(std::u16string_view sv) {
+ explicit OUString(std::u16string_view sv) {
if (sv.size() > sal_uInt32(std::numeric_limits<sal_Int32>::max())) {
throw std::bad_alloc();
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 4e97d9cdde04..5f5386555a2e 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2075,8 +2075,8 @@ void OReportController::onLoadedMenu(const Reference< frame::XLayoutManager >& _
};
for (const auto & i : s_sMenu)
{
- _xLayoutManager->createElement( i );
- _xLayoutManager->requestElement( i );
+ _xLayoutManager->createElement( OUString(i) );
+ _xLayoutManager->requestElement( OUString(i) );
}
}
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 6ef6c81626cd..9d7832b8c4b6 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -368,7 +368,7 @@ void XMLImportTest::setUp()
namespaceArgs[0] <<= OUString( "registerNamespaces" );
for (sal_Int32 i = 1; i <= nNamespaceCount; i++ )
{
- css::beans::Pair<OUString, sal_Int32> rPair( DummyTokenHandler::namespaceURIs[i - 1], i << 16 );
+ css::beans::Pair<OUString, sal_Int32> rPair( OUString(DummyTokenHandler::namespaceURIs[i - 1]), i << 16 );
namespaceArgs[i] <<= rPair;
}
xInit->initialize( namespaceArgs );
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 8c59586cea38..de2c66dc7435 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -899,27 +899,26 @@ void Converter::convertDouble( OUStringBuffer& rBuffer, double fNumber)
bool Converter::convertDouble(double& rValue,
std::u16string_view rString, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit)
{
- rtl_math_ConversionStatus eStatus;
- rValue = ::rtl::math::stringToDouble( rString, '.', ',', &eStatus );
-
- if(eStatus == rtl_math_ConversionStatus_Ok)
- {
- OUStringBuffer sUnit;
- // fdo#48969: switch source and target because factor is used to divide!
- double const fFactor =
- GetConversionFactor(sUnit, nTargetUnit, nSourceUnit);
- if(fFactor != 1.0 && fFactor != 0.0)
- rValue /= fFactor;
- }
+ if (!convertDouble(rValue, rString))
+ return false;
- return ( eStatus == rtl_math_ConversionStatus_Ok );
+ OUStringBuffer sUnit;
+ // fdo#48969: switch source and target because factor is used to divide!
+ double const fFactor =
+ GetConversionFactor(sUnit, nTargetUnit, nSourceUnit);
+ if(fFactor != 1.0 && fFactor != 0.0)
+ rValue /= fFactor;
+ return true;
}
/** convert string to double number (using ::rtl::math) */
bool Converter::convertDouble(double& rValue, std::u16string_view rString)
{
rtl_math_ConversionStatus eStatus;
- rValue = ::rtl::math::stringToDouble( rString, '.', ',', &eStatus );
+ rValue = rtl_math_uStringToDouble(rString.data(),
+ rString.data() + rString.size(),
+ /*cDecSeparator*/'.', /*cGroupSeparator*/',',
+ &eStatus, nullptr);
return ( eStatus == rtl_math_ConversionStatus_Ok );
}
@@ -927,7 +926,10 @@ bool Converter::convertDouble(double& rValue, std::u16string_view rString)
bool Converter::convertDouble(double& rValue, std::string_view rString)
{
rtl_math_ConversionStatus eStatus;
- rValue = ::rtl::math::stringToDouble( rString, '.', ',', &eStatus );
+ rValue = rtl_math_stringToDouble(rString.data(),
+ rString.data() + rString.size(),
+ /*cDecSeparator*/'.', /*cGroupSeparator*/',',
+ &eStatus, nullptr);
return ( eStatus == rtl_math_ConversionStatus_Ok );
}
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 14e0fb24be2c..28f9e9f815ab 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -947,9 +947,9 @@ sax_fastparser::FSHelperPtr XclExpXmlStream::CreateOutputStream (
{
OUString sRelationshipId;
if (xParentRelation.is())
- sRelationshipId = addRelation( xParentRelation, sRelationshipType, sRelativeStream );
+ sRelationshipId = addRelation( xParentRelation, OUString(sRelationshipType), sRelativeStream );
else
- sRelationshipId = addRelation( sRelationshipType, sRelativeStream );
+ sRelationshipId = addRelation( OUString(sRelationshipType), sRelativeStream );
if( pRelationshipId )
*pRelationshipId = sRelationshipId;
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 9686f77a940d..b42fae2d64e6 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -188,7 +188,7 @@ void ScContentTree::InitRoot( ScContentId nType )
sal_uInt16 nPos = nRootType != ScContentId::ROOT ? 0 : pPosList[nType]-1;
m_aRootNodes[nType] = m_xTreeView->make_iterator();
m_xTreeView->insert(nullptr, nPos, &aName, nullptr, nullptr, nullptr, false, m_aRootNodes[nType].get());
- m_xTreeView->set_image(*m_aRootNodes[nType], aImage);
+ m_xTreeView->set_image(*m_aRootNodes[nType], OUString(aImage));
}
void ScContentTree::ClearAll()
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 339f3b10d60b..35e695451ce1 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -232,7 +232,7 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& rRet, sal_uInt16 nType
}
if (nImgId != ScContentId::ROOT)
{
- BitmapEx aBitmapEx(aContentBmps[static_cast<int>(nImgId) -1 ]);
+ BitmapEx aBitmapEx { OUString(aContentBmps[static_cast<int>(nImgId) -1 ]) };
rRet <<= VCLUnoHelper::CreateBitmap(aBitmapEx);
}
}
diff --git a/sc/source/ui/vba/vbadialog.cxx b/sc/source/ui/vba/vbadialog.cxx
index afd0a561f446..5537c65a3caf 100644
--- a/sc/source/ui/vba/vbadialog.cxx
+++ b/sc/source/ui/vba/vbadialog.cxx
@@ -63,7 +63,7 @@ OUString
ScVbaDialog::mapIndexToName( sal_Int32 nIndex )
{
if( nIndex < nDialogSize )
- return aStringList[ nIndex ];
+ return OUString(aStringList[ nIndex ]);
return OUString();
}
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index 9bc743e90360..579d8d717be3 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -637,7 +637,7 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
{
tools::Long nEntryPos = GetHeaderEntryPos();
for ( size_t nLevel = 0; nLevel < nLevelCount; ++nLevel )
- DrawImageRel(GetLevelPos(nLevel), nEntryPos, aLevelBmps[nLevel]);
+ DrawImageRel(GetLevelPos(nLevel), nEntryPos, OUString(aLevelBmps[nLevel]));
SetLineColor( maLineColor );
tools::Long nLinePos = mnHeaderPos + (mbMirrorEntries ? 0 : (mnHeaderSize - 1));
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 8b4ca07413bd..270b1c5d63b7 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -618,7 +618,7 @@ OUString GetApiNameForHelpId(sal_uLong nId)
for (const auto& i : pApiNameMap)
if (nId == i.mnHelpId)
- return i.mpApiName;
+ return OUString(i.mpApiName);
return OUString();
}
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index 5c309ba4cf67..95c34d0655bd 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -99,8 +99,8 @@ static BitmapEx* getButtonImage( int index, bool large )
{
for (size_t i = 0; i < SAL_N_ELEMENTS(aSmallPlaceHolders); i++ )
{
- gSmallButtonImages[i].set(std::make_unique<BitmapEx>(aSmallPlaceHolders[i]));
- gLargeButtonImages[i].set(std::make_unique<BitmapEx>(aBigPlaceHolders[i]));
+ gSmallButtonImages[i].set(std::make_unique<BitmapEx>(OUString(aSmallPlaceHolders[i])));
+ gLargeButtonImages[i].set(std::make_unique<BitmapEx>(OUString(aBigPlaceHolders[i])));
}
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 1b39b59bf0c8..b876fd1a9082 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -123,23 +123,21 @@ namespace
}
}
-static const std::u16string_view* GetLastFilterConfigId( FileDialogHelper::Context _eContext )
+static std::optional<OUString> GetLastFilterConfigId( FileDialogHelper::Context _eContext )
{
- static const std::u16string_view aSD_EXPORT_IDENTIFIER(u"SdExportLastFilter");
- static const std::u16string_view aSI_EXPORT_IDENTIFIER(u"SiExportLastFilter");
- static const std::u16string_view aSW_EXPORT_IDENTIFIER(u"SwExportLastFilter");
-
- const std::u16string_view* pRet = nullptr;
+ static const OUStringLiteral aSD_EXPORT_IDENTIFIER(u"SdExportLastFilter");
+ static const OUStringLiteral aSI_EXPORT_IDENTIFIER(u"SiExportLastFilter");
+ static const OUStringLiteral aSW_EXPORT_IDENTIFIER(u"SwExportLastFilter");
switch( _eContext )
{
- case FileDialogHelper::SD_EXPORT: pRet = &aSD_EXPORT_IDENTIFIER; break;
- case FileDialogHelper::SI_EXPORT: pRet = &aSI_EXPORT_IDENTIFIER; break;
- case FileDialogHelper::SW_EXPORT: pRet = &aSW_EXPORT_IDENTIFIER; break;
+ case FileDialogHelper::SD_EXPORT: return aSD_EXPORT_IDENTIFIER;
+ case FileDialogHelper::SI_EXPORT: return aSI_EXPORT_IDENTIFIER;
+ case FileDialogHelper::SW_EXPORT: return aSW_EXPORT_IDENTIFIER;
default: break;
}
- return pRet;
+ return {};
}
static OUString EncodeSpaces_Impl( const OUString& rSource );
@@ -346,7 +344,7 @@ void FileDialogHelper_Impl::LoadLastUsedFilter( const OUString& _rContextIdentif
void FileDialogHelper_Impl::SaveLastUsedFilter()
{
- const std::u16string_view* pConfigId = GetLastFilterConfigId( meContext );
+ std::optional<OUString> pConfigId = GetLastFilterConfigId( meContext );
if( pConfigId )
SvtViewOptions( EViewType::Dialog, IODLG_CONFIGNAME ).SetUserItem( *pConfigId,
makeAny( getFilterWithExtension( getFilter() ) ) );
@@ -2250,7 +2248,7 @@ void FileDialogHelper_Impl::SetContext( FileDialogHelper::Context _eNewContext )
{
meContext = _eNewContext;
- const std::u16string_view* pConfigId = GetLastFilterConfigId( _eNewContext );
+ std::optional<OUString> pConfigId = GetLastFilterConfigId( _eNewContext );
if( pConfigId )
LoadLastUsedFilter( *pConfigId );
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 8e5fbd4df93d..d59d334bd55b 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1322,7 +1322,7 @@ ErrCode SfxObjectShell::CallBasic( std::u16string_view rMacro,
BasicManager *pMgr = GetBasicManager();
if( pApp->GetName() == rBasic )
pMgr = SfxApplication::GetBasicManager();
- ErrCode nRet = SfxApplication::CallBasic( rMacro, pMgr, pArgs, pRet );
+ ErrCode nRet = SfxApplication::CallBasic( OUString(rMacro), pMgr, pArgs, pRet );
return nRet;
}
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 1d8a3f5b1ec1..7f9c6cba72f3 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -143,7 +143,7 @@ PropertyEntryVector_t SfxItemPropertyMap::getPropertyEntries() const
for( const auto& rEntry : *m_pImpl )
{
const SfxItemPropertySimpleEntry* pEntry = &rEntry.second;
- aRet.emplace_back( rEntry.first, * pEntry );
+ aRet.emplace_back( OUString(rEntry.first), * pEntry );
}
return aRet;
}
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 8854f7d8272c..09a72b3b9918 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -343,7 +343,7 @@ void FrameSelectorImpl::InitArrowImageList()
assert(SAL_N_ELEMENTS(aImageIds) == 16);
for (size_t i = 0; i < SAL_N_ELEMENTS(aImageIds); ++i)
{
- BitmapEx aBmpEx(aImageIds[i]);
+ BitmapEx aBmpEx { OUString(aImageIds[i]) };
aBmpEx.Replace(pColorAry1, pColorAry2, 3);
maArrows.emplace_back(aBmpEx);
}
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index d70a853b3f91..b74a31cec7d9 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1561,11 +1561,11 @@ void FmXGridPeer::addColumnListeners(const Reference< XPropertySet >& xCol)
Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo();
for (size_t i=0; i<SAL_N_ELEMENTS(aPropsListenedTo); ++i)
{
- if ( xInfo->hasPropertyByName( aPropsListenedTo[i] ) )
+ if ( xInfo->hasPropertyByName( OUString(aPropsListenedTo[i]) ) )
{
- Property aPropDesc = xInfo->getPropertyByName( aPropsListenedTo[i] );
+ Property aPropDesc = xInfo->getPropertyByName( OUString(aPropsListenedTo[i]) );
if ( 0 != ( aPropDesc.Attributes & PropertyAttribute::BOUND ) )
- xCol->addPropertyChangeListener( aPropsListenedTo[i], this );
+ xCol->addPropertyChangeListener( OUString(aPropsListenedTo[i]), this );
}
}
}
@@ -1583,8 +1583,8 @@ void FmXGridPeer::removeColumnListeners(const Reference< XPropertySet >& xCol)
Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo();
for (const auto & i : aPropsListenedTo)
- if (xInfo->hasPropertyByName(i))
- xCol->removePropertyChangeListener(i, this);
+ if (xInfo->hasPropertyByName(OUString(i)))
+ xCol->removePropertyChangeListener(OUString(i), this);
}
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 9fabb0f386de..d532ff4aaeee 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1015,7 +1015,7 @@ void FmXFormShell::GetConversionMenu_Lock(weld::Menu& rNewMenu)
for (size_t i = 0; i < SAL_N_ELEMENTS(aConvertSlots); ++i)
{
// the corresponding image at it
- rNewMenu.append(OUString::createFromAscii(aConvertSlots[i]), SvxResId(RID_SVXSW_CONVERTMENU[i]), aImgIds[i]);
+ rNewMenu.append(OUString::createFromAscii(aConvertSlots[i]), SvxResId(RID_SVXSW_CONVERTMENU[i]), OUString(aImgIds[i]));
}
}
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index e934e7c6574c..355736067a75 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -555,7 +555,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
{
try
{
- xSet->setPropertyValue(aValueProperties[i], evt.NewValue);
+ xSet->setPropertyValue(OUString(aValueProperties[i]), evt.NewValue);
}
catch(const Exception&)
{
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 387957e95d9c..ea3b7603b962 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -126,7 +126,7 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow(
for (sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i)
{
- maImgDirection[i] = Image(StockImage::Yes, aDirectionBmps[i]);
+ maImgDirection[i] = Image(StockImage::Yes, OUString(aDirectionBmps[i]));
}
mxDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectValueSetHdl ) );
@@ -582,10 +582,10 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(svt::PopupWindowController* pCo
{
if( i != FROM_FRONT )
{
- maImgLightingOff[i] = Image(StockImage::Yes, aLightOffBmps[i]);
- maImgLightingOn[i] = Image(StockImage::Yes, aLightOnBmps[i]);
+ maImgLightingOff[i] = Image(StockImage::Yes, OUString(aLightOffBmps[i]));
+ maImgLightingOn[i] = Image(StockImage::Yes, OUString(aLightOnBmps[i]));
}
- maImgLightingPreview[i] = Image(StockImage::Yes, aLightPreviewBmps[i]);
+ maImgLightingPreview[i] = Image(StockImage::Yes, OUString(aLightPreviewBmps[i]));
}
mxLightingSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 1a94982df7e9..0e2fea644244 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -673,7 +673,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testConditionalText, "conditional-text.fodt"
// - Expression: xmlXPathNodeSetGetLength(pXmlNodes) > 0
// - In <...>, XPath '/w:document/w:body/w:p/w:r[2]/w:instrText' not found
// i.e. the field was lost on export.
- assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", aExpected);
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", OUString(aExpected));
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 6871bd4b6d26..6228aed5bf23 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -116,7 +116,7 @@ std::unique_ptr<weld::TreeIter> SwChangeDBDlg::Insert(const OUString& rDBName)
OUString sUserData = rDBName.getToken(0, DB_DELIM, nIdx);
sal_Int32 nCommandType = sUserData.toInt32();
- OUString rToInsert = nCommandType ? std::u16string_view(u"" RID_BMP_DBQUERY) : std::u16string_view(u"" RID_BMP_DBTABLE);
+ OUString rToInsert ( nCommandType ? std::u16string_view(u"" RID_BMP_DBQUERY) : std::u16string_view(u"" RID_BMP_DBTABLE) );
std::unique_ptr<weld::TreeIter> xIter(m_xUsedDBTLB->make_iterator());
if (m_xUsedDBTLB->get_iter_first(*xIter))
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index e6f3fa7948a0..e31483102e53 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -681,7 +681,7 @@ NavElementBox_Base::NavElementBox_Base(
m_xWidget->make_sorted();
m_xWidget->freeze();
for (sal_uInt16 i = 0; i < NID_COUNT; i++)
- m_xWidget->append(OUString::number(aNavigationInsertIds[i]), SwResId(aNavigationStrIds[i]), aNavigationImgIds[i]);
+ m_xWidget->append(OUString::number(aNavigationInsertIds[i]), SwResId(aNavigationStrIds[i]), OUString(aNavigationImgIds[i]));
m_xWidget->thaw();
m_xWidget->connect_changed(LINK(this, NavElementBox_Base, SelectHdl));
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index dd2a85ce142f..4d0c4cbd9cc1 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1437,7 +1437,7 @@ void GraphicFilter::preload()
// Look at the library in each element inside the filter path.
for (sal_Int32 i = 0; i < nTokenCount; ++i)
{
- pFilter = rCache.GetFilter(aFilterPath.getToken(i, ';'), SVLIBRARY("gie"), rFilterName);
+ pFilter = rCache.GetFilter(aFilterPath.getToken(i, ';'), SVLIBRARY("gie"), OUString(rFilterName));
if (pFilter)
{
break;
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 654f2648ac78..fd21827211bb 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1492,7 +1492,7 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab
// before merge.
table::BorderLine2 aBorderValues[4];
for (size_t i = 0; i < aBorderNames.size(); ++i)
- xFirstCell->getPropertyValue(aBorderNames[i])
+ xFirstCell->getPropertyValue(OUString(aBorderNames[i]))
>>= aBorderValues[i];
uno::Reference<beans::XPropertySet> xLastCell(
@@ -1513,7 +1513,7 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab
{
if (aBorderValues[i].LineStyle != table::BorderLineStyle::NONE)
xFirstCell->setPropertyValue(
- aBorderNames[i], uno::makeAny(aBorderValues[i]));
+ OUString(aBorderNames[i]), uno::makeAny(aBorderValues[i]));
}
}
}
diff --git a/writerperfect/source/common/WPFTEncodingDialog.cxx b/writerperfect/source/common/WPFTEncodingDialog.cxx
index 5ee935ba2307..b0c955481fb5 100644
--- a/writerperfect/source/common/WPFTEncodingDialog.cxx
+++ b/writerperfect/source/common/WPFTEncodingDialog.cxx
@@ -82,7 +82,7 @@ std::size_t const numEncodings = SAL_N_ELEMENTS(s_encodings);
void insertEncodings(weld::ComboBox& box)
{
for (std::size_t i = 0; i < numEncodings; ++i)
- box.append(s_encodings[i].first, s_encodings[i].second);
+ box.append(OUString(s_encodings[i].first), OUString(s_encodings[i].second));
}
void selectEncoding(weld::ComboBox& box, const OUString& encoding) { box.set_active_id(encoding); }
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx
index 33870c026e78..62d004197f67 100644
--- a/writerperfect/source/writer/exp/xmlimp.cxx
+++ b/writerperfect/source/writer/exp/xmlimp.cxx
@@ -119,7 +119,7 @@ OUString FindCoverImage(const OUString& rDocumentBaseURL, OUString& rMimeType,
SvFileStream aStream(aRet, StreamMode::READ);
if (aStream.IsOpen())
{
- rMimeType = GetMimeType(rExtension);
+ rMimeType = GetMimeType(OUString(rExtension));
// File exists.
return aRet;
}
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 48c94ed3a3fb..8c137e131427 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -504,34 +504,34 @@ bool SvXMLTokenEnumerator::getNextToken( OUString& rToken )
return true;
}
-static bool lcl_getPositions(const OUString& _sValue,OUString& _rContentX,OUString& _rContentY,OUString& _rContentZ)
+static bool lcl_getPositions(std::u16string_view _sValue, OUString& _rContentX, OUString& _rContentY, OUString& _rContentZ)
{
- if(_sValue.isEmpty() || _sValue[0] != '(')
+ if(_sValue.empty() || _sValue[0] != '(')
return false;
- sal_Int32 nPos(1);
- sal_Int32 nFound = _sValue.indexOf(' ', nPos);
+ size_t nPos(1);
+ size_t nFound = _sValue.find(' ', nPos);
- if(nFound == -1 || nFound <= nPos)
+ if(nFound == std::u16string_view::npos || nFound <= nPos)
return false;
- _rContentX = _sValue.copy(nPos, nFound - nPos);
+ _rContentX = _sValue.substr(nPos, nFound - nPos);
nPos = nFound + 1;
- nFound = _sValue.indexOf(' ', nPos);
+ nFound = _sValue.find(' ', nPos);
- if(nFound == -1 || nFound <= nPos)
+ if(nFound == std::u16string_view::npos || nFound <= nPos)
return false;
- _rContentY = _sValue.copy(nPos, nFound - nPos);
+ _rContentY = _sValue.substr(nPos, nFound - nPos);
nPos = nFound + 1;
- nFound = _sValue.indexOf(')', nPos);
+ nFound = _sValue.find(')', nPos);
- if(nFound == -1 || nFound <= nPos)
+ if(nFound == std::u16string_view::npos || nFound <= nPos)
return false;
- _rContentZ = _sValue.copy(nPos, nFound - nPos);
+ _rContentZ = _sValue.substr(nPos, nFound - nPos);
return true;
}
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 3ae369745f43..de189cab7d22 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -325,12 +325,12 @@ namespace
constexpr OUStringLiteral gsDimColor = u"DimColor";
constexpr OUStringLiteral gsDimHide = u"DimHide";
constexpr OUStringLiteral gsDimPrev = u"DimPrevious";
- constexpr std::u16string_view gsEffect = u"Effect";
+ constexpr OUStringLiteral gsEffect = u"Effect";
constexpr OUStringLiteral gsPlayFull = u"PlayFull";
constexpr OUStringLiteral gsSound = u"Sound";
constexpr OUStringLiteral gsSoundOn = u"SoundOn";
constexpr OUStringLiteral gsSpeed = u"Speed";
- constexpr std::u16string_view gsTextEffect = u"TextEffect";
+ constexpr OUStringLiteral gsTextEffect = u"TextEffect";
constexpr OUStringLiteral gsPresShapeService = u"com.sun.star.presentation.Shape";
constexpr OUStringLiteral gsAnimPath = u"AnimationPath";
constexpr OUStringLiteral gsIsAnimation = u"IsAnimation";
@@ -546,8 +546,10 @@ void XMLAnimationsEffectContext::endFastElement(sal_Int32 )
{
const AnimationEffect eEffect = ImplSdXMLgetEffect( meEffect, meDirection, mnStartScale, meKind == XMLE_SHOW );
- auto const s = mbTextEffect ? gsTextEffect : gsEffect;
- xSet->setPropertyValue( s, makeAny( eEffect ) );
+ if (mbTextEffect)
+ xSet->setPropertyValue( gsTextEffect, makeAny( eEffect ) );
+ else
+ xSet->setPropertyValue( gsEffect, makeAny( eEffect ) );
xSet->setPropertyValue( gsSpeed, makeAny( meSpeed ) );
if( eEffect == AnimationEffect_PATH && !maPathShapeId.isEmpty() )
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index bf0b1d7a951b..2ac15ae78ed5 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -112,10 +112,10 @@ struct XMLShapeImportHelperImpl
bool mbIsPresentationShapesSupported;
};
-const std::u16string_view gsStartShape(u"StartShape");
-const std::u16string_view gsEndShape(u"EndShape");
-const std::u16string_view gsStartGluePointIndex(u"StartGluePointIndex");
-const std::u16string_view gsEndGluePointIndex(u"EndGluePointIndex");
+const OUStringLiteral gsStartShape(u"StartShape");
+const OUStringLiteral gsEndShape(u"EndShape");
+const OUStringLiteral gsStartGluePointIndex(u"StartGluePointIndex");
+const OUStringLiteral gsEndGluePointIndex(u"EndGluePointIndex");
XMLShapeImportHelper::XMLShapeImportHelper(
SvXMLImport& rImporter,
@@ -819,10 +819,16 @@ void XMLShapeImportHelper::restoreConnections()
mrImporter.getInterfaceToIdentifierMapper().getReference( rHint.aDestShapeId ), uno::UNO_QUERY );
if( xShape.is() )
{
- xConnector->setPropertyValue( rHint.bStart ? gsStartShape : gsEndShape, uno::Any(xShape) );
+ if (rHint.bStart)
+ xConnector->setPropertyValue( gsStartShape, uno::Any(xShape) );
+ else
+ xConnector->setPropertyValue( gsEndShape, uno::Any(xShape) );
sal_Int32 nGlueId = rHint.nDestGlueId < 4 ? rHint.nDestGlueId : getGluePointId( xShape, rHint.nDestGlueId );
- xConnector->setPropertyValue( rHint.bStart ? gsStartGluePointIndex : gsEndGluePointIndex, uno::Any(nGlueId) );
+ if(rHint.bStart)
+ xConnector->setPropertyValue( gsStartGluePointIndex, uno::Any(nGlueId) );
+ else
+ xConnector->setPropertyValue( gsEndGluePointIndex, uno::Any(nGlueId) );
}
// #86637# restore line deltas
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index 897f8dcc375c..ebaf15651950 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -143,8 +143,9 @@ static void GetDoublePercentage( std::vector< css::beans::PropertyValue >& rDest
return;
rtl_math_ConversionStatus eStatus;
- double fAttrDouble = ::rtl::math::stringToDouble( rValue,
- '.', ',', &eStatus );
+ double fAttrDouble = rtl_math_stringToDouble(rValue.data(),
+ rValue.data() + rValue.size(),
+ '.', ',', &eStatus, nullptr);
if ( eStatus == rtl_math_ConversionStatus_Ok )
{
beans::PropertyValue aProp;
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 4fdad0a36ee2..02632fa08c8b 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -1140,7 +1140,7 @@ namespace xmloff
exportStringPropertyAttribute(
OAttributeMetaData::getSpecialAttributeNamespace( nStringPropertyAttributeIds[i] ),
OAttributeMetaData::getSpecialAttributeName( nStringPropertyAttributeIds[i] ),
- pStringPropertyNames[i]
+ OUString(pStringPropertyNames[i])
);
#if OSL_DEBUG_LEVEL > 0
// reset the bit for later checking
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index fbbdcf53514d..2e1a2e49adf2 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -364,7 +364,7 @@ void CertificateViewerCertPathTP::InsertCert(const weld::TreeIter* pParent, cons
maUserData.emplace_back(std::make_unique<CertPath_UserData>(rxCert, bValid));
OUString sId(OUString::number(reinterpret_cast<sal_Int64>(maUserData.back().get())));
mxCertPathLB->insert(pParent, -1, &rName, &sId, nullptr, nullptr, false, mxScratchIter.get());
- mxCertPathLB->set_image(*mxScratchIter, sImage);
+ mxCertPathLB->set_image(*mxScratchIter, OUString(sImage));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index c29f43b4b91b..1d373417fd27 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -496,7 +496,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, CertMgrButtonHdl, weld::Button&, void)
for ( auto const &rServer : aGUIServers )
{
- osl::FileBase::RC searchError = osl::File::searchFileURL(rServer, aPath, sFoundGUIServer );
+ osl::FileBase::RC searchError = osl::File::searchFileURL(OUString(rServer), aPath, sFoundGUIServer );
if (searchError == osl::FileBase::E_None)
{
osl::File::getSystemPathFromFileURL( sFoundGUIServer, sExecutable );