summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appuno.cxx40
-rw-r--r--sfx2/source/control/bindings.cxx2
-rw-r--r--sfx2/source/control/msg.cxx6
-rw-r--r--sfx2/source/control/request.cxx4
-rw-r--r--sfx2/source/control/shell.cxx4
-rw-r--r--sfx2/source/control/statcach.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx4
7 files changed, 30 insertions, 32 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 1c4030bb6070..7aa37e031143 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -202,7 +202,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
const beans::PropertyValue& rProp = pPropsVal[0];
const OUString& rName = rProp.Name;
- if ( nCount == 1 && rName == pSlot->pUnoName )
+ if ( nCount == 1 && rName == pSlot->aUnoName )
{
// there is only one parameter and its name matches the name of the property,
// so it's either a simple property or a complex property in one single UNO struct
@@ -211,7 +211,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
rSet.Put( std::move(pItem) );
else
{
- SAL_WARN( "sfx", "Property not convertible: " << pSlot->pUnoName );
+ SAL_WARN( "sfx", "Property not convertible: " << pSlot->aUnoName );
}
}
#ifdef DBG_UTIL
@@ -242,8 +242,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
for ( nSub=0; nSub<nSubCount; nSub++ )
{
// search sub item by name
- OUString aStr = pSlot->pUnoName + "." + OUString::createFromAscii(pType->aAttrib[nSub].pName);
- if ( rPropValue.Name == aStr )
+ if ( rPropValue.Name == (pSlot->aUnoName + "." + pType->aAttrib[nSub].aName) )
{
sal_uInt8 nSubId = static_cast<sal_uInt8>(static_cast<sal_Int8>(pType->aAttrib[nSub].nAID));
if ( bConvertTwips )
@@ -252,7 +251,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
nFound++;
else
{
- SAL_WARN( "sfx.appl", "Property not convertible: " << pSlot->pUnoName);
+ SAL_WARN( "sfx.appl", "Property not convertible: " << pSlot->aUnoName);
}
break;
}
@@ -283,7 +282,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
std::unique_ptr<SfxPoolItem> pItem(rArg.CreateItem());
if ( !pItem )
{
- SAL_WARN( "sfx", "No creator method for argument: " << rArg.pName );
+ SAL_WARN( "sfx", "No creator method for argument: " << rArg.aName );
return;
}
@@ -296,7 +295,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
{
// "simple" (base type) argument
auto pProp = std::find_if(rArgs.begin(), rArgs.end(),
- [&rArg](const beans::PropertyValue& rProp) { return rProp.Name.equalsAscii(rArg.pName); });
+ [&rArg](const beans::PropertyValue& rProp) { return rProp.Name == rArg.aName; });
if (pProp != rArgs.end())
{
#ifdef DBG_UTIL
@@ -307,7 +306,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
rSet.Put( std::move(pItem) );
else
{
- SAL_WARN( "sfx", "Property not convertible: " << rArg.pName );
+ SAL_WARN( "sfx", "Property not convertible: " << rArg.aName );
}
}
}
@@ -318,7 +317,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
for ( const beans::PropertyValue& rProp : rArgs )
{
const OUString& rName = rProp.Name;
- if ( rName == OUString(rArg.pName, strlen(rArg.pName), RTL_TEXTENCODING_UTF8) )
+ if ( rName == rArg.aName )
{
bAsWholeItem = true;
#ifdef DBG_UTIL
@@ -329,7 +328,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
rSet.Put( std::move(pItem) );
else
{
- SAL_WARN( "sfx", "Property not convertible: " << rArg.pName );
+ SAL_WARN( "sfx", "Property not convertible: " << rArg.aName );
}
}
}
@@ -345,8 +344,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
for ( sal_uInt16 nSub=0; nSub<nSubCount; nSub++ )
{
// search sub item by name
- OString aStr = OString::Concat(rArg.pName) + "." + pType->aAttrib[nSub].pName;
- if ( rProp.Name.equalsAsciiL(aStr.getStr(), aStr.getLength()) )
+ if ( rProp.Name == (rArg.aName + "." + pType->aAttrib[nSub].aName) )
{
// at least one member found ...
bRet = true;
@@ -360,7 +358,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
{
// ... but it was not convertible
bRet = false;
- SAL_WARN( "sfx", "Property not convertible: " << rArg.pName );
+ SAL_WARN( "sfx", "Property not convertible: " << rArg.aName );
}
break;
@@ -884,7 +882,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
else
{
// transform parameter "OptionsPageURL" of slot "OptionsTreeDialog"
- if ( "OptionsTreeDialog" == pSlot->pUnoName )
+ if ( "OptionsTreeDialog" == pSlot->aUnoName )
{
auto pProp = std::find_if(rArgs.begin(), rArgs.end(),
[](const PropertyValue& rProp) { return rProp.Name == "OptionsPageURL" || rProp.Name == "OptionsPageID"; });
@@ -903,7 +901,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
if ( nFoundArgs == nCount )
{
// except for the "special" slots: assure that every argument was convertible
- SAL_INFO( "sfx.appl", "MacroPlayer: Some properties didn't match to any formal argument for slot: "<< pSlot->pUnoName );
+ SAL_INFO( "sfx.appl", "MacroPlayer: Some properties didn't match to any formal argument for slot: "<< pSlot->aUnoName );
}
#endif
}
@@ -1302,7 +1300,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
sal_uInt16 nSubCount = pType->nAttribs;
if ( !nSubCount )
{
- pValue[nActProp].Name = pSlot->pUnoName;
+ pValue[nActProp].Name = pSlot->aUnoName;
if ( !pItem->QueryValue( pValue[nActProp].Value ) )
{
SAL_WARN( "sfx", "Item not convertible: " << nSlotId );
@@ -1318,9 +1316,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
nSubId |= CONVERT_TWIPS;
DBG_ASSERT(( pType->aAttrib[n-1].nAID ) <= 127, "Member ID out of range" );
- pValue[nActProp].Name = pSlot->pUnoName +
+ pValue[nActProp].Name = pSlot->aUnoName +
"." +
- OUString::createFromAscii( pType->aAttrib[n-1].pName );
+ pType->aAttrib[n-1].aName;
if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) )
{
SAL_WARN( "sfx", "Sub item " << pType->aAttrib[n-1].nAID
@@ -1347,7 +1345,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
sal_uInt16 nSubCount = rArg.pType->nAttribs;
if ( !nSubCount )
{
- pValue[nActProp].Name = OUString::createFromAscii( rArg.pName ) ;
+ pValue[nActProp].Name = rArg.aName;
if ( !pItem->QueryValue( pValue[nActProp++].Value ) )
{
SAL_WARN( "sfx", "Item not convertible: " << rArg.nSlotId );
@@ -1363,9 +1361,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
nSubId |= CONVERT_TWIPS;
DBG_ASSERT((rArg.pType->aAttrib[n-1].nAID) <= 127, "Member ID out of range" );
- pValue[nActProp].Name = OUString::createFromAscii( rArg.pName ) +
+ pValue[nActProp].Name = rArg.aName +
"." +
- OUString::createFromAscii( rArg.pType->aAttrib[n-1].pName ) ;
+ rArg.pType->aAttrib[n-1].aName ;
if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) )
{
SAL_WARN( "sfx", "Sub item "
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index f07287ee631c..a56174b96d94 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1513,7 +1513,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, std::unique_ptr<SfxPoolI
if ( xDisp.is() || !pCache )
{
const SfxSlot* pSlot = SfxSlotPool::GetSlotPool( pDispatcher->GetFrame() ).GetSlot( nSlot );
- if ( !pSlot || pSlot->pUnoName.isEmpty() )
+ if ( !pSlot || pSlot->aUnoName.isEmpty() )
return SfxItemState::DISABLED;
css::util::URL aURL;
diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
index c15c46c86f66..9df69d00c5d4 100644
--- a/sfx2/source/control/msg.cxx
+++ b/sfx2/source/control/msg.cxx
@@ -45,10 +45,10 @@ sal_uInt16 SfxSlot::GetWhich( const SfxItemPool &rPool ) const
OUString SfxSlot::GetCommand() const
{
- if("FocusToFindbar" == pUnoName)
- return "vnd.sun.star.findbar:" + pUnoName;
+ if("FocusToFindbar" == aUnoName)
+ return "vnd.sun.star.findbar:" + aUnoName;
else
- return ".uno:" + pUnoName;
+ return ".uno:" + aUnoName;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index e58475c325f1..edb17a3f8bb3 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -576,10 +576,10 @@ void SfxRequest::Done_Impl
// recordable?
// new Recording uses UnoName!
- SAL_WARN_IF( pImpl->pSlot->pUnoName.isEmpty(), "sfx", "Recording not exported slot: "
+ SAL_WARN_IF( pImpl->pSlot->aUnoName.isEmpty(), "sfx", "Recording not exported slot: "
<< pImpl->pSlot->GetSlotId() );
- if ( pImpl->pSlot->pUnoName.isEmpty() ) // playing it safe
+ if ( pImpl->pSlot->aUnoName.isEmpty() ) // playing it safe
return;
// often required values
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 3511d33ff69d..f368d3d2824d 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -562,7 +562,7 @@ void SfxShell::SetVerbs(const css::uno::Sequence < css::embed::VerbDescriptor >&
if (nSlotId > SID_VERB_END)
break;
- SfxSlot* pNewSlot = new SfxSlot(
+ SfxSlot* pNewSlot = new SfxSlot{
nSlotId, SfxGroupId::NONE,
// Verb slots must be executed asynchronously, so that they can be
// destroyed while executing.
@@ -570,7 +570,7 @@ void SfxShell::SetVerbs(const css::uno::Sequence < css::embed::VerbDescriptor >&
0, 0,
SFX_STUB_PTR(SfxShell, VerbExec), SFX_STUB_PTR(SfxShell, VerbState),
nullptr, // HACK(SFX_TYPE(SfxVoidItem)) ???
- nullptr, nullptr, 0, SfxDisableFlags::NONE, "");
+ nullptr, nullptr, 0, SfxDisableFlags::NONE, u""_ustr};
if (!pImpl->aSlotArr.empty())
{
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 7ce4f11e3ff2..daf1f37a56c3 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -245,7 +245,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
// get the slot - even if it is disabled on the dispatcher
pSlot = SfxSlotPool::GetSlotPool( rDispat.GetFrame() ).GetSlot( nId );
- if ( !pSlot || pSlot->pUnoName.isEmpty() )
+ if ( !pSlot || pSlot->aUnoName.isEmpty() )
{
bSlotDirty = false;
bCtrlDirty = true;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index c6250e27d170..7d518f435d81 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -335,7 +335,7 @@ SfxDispatchController_Impl::SfxDispatchController_Impl(
, bMasterSlave( false )
, bVisible( true )
{
- if ( aDispatchURL.Protocol == "slot:" && !pSlot->pUnoName.isEmpty() )
+ if ( aDispatchURL.Protocol == "slot:" && !pSlot->aUnoName.isEmpty() )
{
aDispatchURL.Complete = pSlot->GetCommand();
Reference< XURLTransformer > xTrans( URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
@@ -658,7 +658,7 @@ void SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
sal_Int32 nIndex = lNewArgs.getLength();
lNewArgs.realloc( nIndex+1 );
auto plNewArgs = lNewArgs.getArray();
- plNewArgs[nIndex].Name = pSlot->pUnoName;
+ plNewArgs[nIndex].Name = pSlot->aUnoName;
plNewArgs[nIndex].Value <<= SfxDispatchController_Impl::getSlaveCommand( aDispatchURL );
}