Kaydet (Commit) 7f850019 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: handle OUString+=OUString(literal)

Change-Id: Ia9386f30413950b42fdbc9849e41e958f9282693
üst 647d7b0c
...@@ -43,11 +43,11 @@ using namespace ::com::sun::star::uno; ...@@ -43,11 +43,11 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans; using namespace ::com::sun::star::beans;
#define ROOTNODE_CMDOPTIONS OUString("Office.Commands/Execute") #define ROOTNODE_CMDOPTIONS OUString("Office.Commands/Execute")
#define PATHDELIMITER OUString("/") #define PATHDELIMITER "/"
#define SETNODE_DISABLED OUString("Disabled") #define SETNODE_DISABLED "Disabled"
#define PROPERTYNAME_CMD OUString("Command") #define PROPERTYNAME_CMD "Command"
/*-**************************************************************************************************************** /*-****************************************************************************************************************
@descr support simple command option structures and operations on it @descr support simple command option structures and operations on it
...@@ -276,20 +276,11 @@ Sequence< OUString > SvtCommandOptions_Impl::impl_GetPropertyNames() ...@@ -276,20 +276,11 @@ Sequence< OUString > SvtCommandOptions_Impl::impl_GetPropertyNames()
// First get ALL names of current existing list items in configuration! // First get ALL names of current existing list items in configuration!
Sequence< OUString > lDisabledItems = GetNodeNames( SETNODE_DISABLED, utl::CONFIG_NAME_LOCAL_PATH ); Sequence< OUString > lDisabledItems = GetNodeNames( SETNODE_DISABLED, utl::CONFIG_NAME_LOCAL_PATH );
OUString aSetNode( SETNODE_DISABLED );
aSetNode += PATHDELIMITER;
OUString aCommandKey( PATHDELIMITER );
aCommandKey += PROPERTYNAME_CMD;
// Expand all keys // Expand all keys
for (sal_Int32 i=0; i<lDisabledItems.getLength(); ++i ) for (sal_Int32 i=0; i<lDisabledItems.getLength(); ++i )
{ {
OUStringBuffer aBuffer( 32 ); lDisabledItems[i] = SETNODE_DISABLED PATHDELIMITER + lDisabledItems[i]
aBuffer.append( aSetNode ); + PATHDELIMITER PROPERTYNAME_CMD;
aBuffer.append( lDisabledItems[i] );
aBuffer.append( aCommandKey );
lDisabledItems[i] = aBuffer.makeStringAndClear();
} }
// Return result. // Return result.
......
...@@ -41,7 +41,7 @@ using namespace ::com::sun::star::uno; ...@@ -41,7 +41,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans; using namespace ::com::sun::star::beans;
#define ROOTNODE_MENUS OUString("Office.Common/Menus/") #define ROOTNODE_MENUS OUString("Office.Common/Menus/")
#define PATHDELIMITER OUString("/") #define PATHDELIMITER "/"
#define SETNODE_NEWMENU OUString("New") #define SETNODE_NEWMENU OUString("New")
#define SETNODE_WIZARDMENU OUString("Wizard") #define SETNODE_WIZARDMENU OUString("Wizard")
...@@ -538,7 +538,6 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence ...@@ -538,7 +538,6 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence
Sequence< OUString >& lDestination , Sequence< OUString >& lDestination ,
const OUString& sSetNode ) const OUString& sSetNode )
{ {
OUString sFixPath;
vector< OUString > lTemp; vector< OUString > lTemp;
sal_Int32 nSourceCount = lSource.getLength(); sal_Int32 nSourceCount = lSource.getLength();
sal_Int32 nDestinationStep = lDestination.getLength(); // start on end of current list ...! sal_Int32 nDestinationStep = lDestination.getLength(); // start on end of current list ...!
...@@ -560,23 +559,12 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence ...@@ -560,23 +559,12 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence
pItem!=lTemp.end(); pItem!=lTemp.end();
++pItem ) ++pItem )
{ {
sFixPath = sSetNode; OUString sFixPath(sSetNode + PATHDELIMITER + *pItem + PATHDELIMITER);
sFixPath += PATHDELIMITER; lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_URL;
sFixPath += *pItem; lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_TITLE;
sFixPath += PATHDELIMITER; lDestination[nDestinationStep++] = sFixPath
+ PROPERTYNAME_IMAGEIDENTIFIER;
lDestination[nDestinationStep] = sFixPath; lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_TARGETNAME;
lDestination[nDestinationStep] += PROPERTYNAME_URL;
++nDestinationStep;
lDestination[nDestinationStep] = sFixPath;
lDestination[nDestinationStep] += PROPERTYNAME_TITLE;
++nDestinationStep;
lDestination[nDestinationStep] = sFixPath;
lDestination[nDestinationStep] += PROPERTYNAME_IMAGEIDENTIFIER;
++nDestinationStep;
lDestination[nDestinationStep] = sFixPath;
lDestination[nDestinationStep] += PROPERTYNAME_TARGETNAME;
++nDestinationStep;
} }
} }
......
...@@ -427,8 +427,7 @@ OUString TempFile::SetTempNameBaseDirectory( const OUString &rBaseName ) ...@@ -427,8 +427,7 @@ OUString TempFile::SetTempNameBaseDirectory( const OUString &rBaseName )
// append own internal directory // append own internal directory
bRet = true; bRet = true;
OUString &rTempNameBase_Impl = TempNameBase_Impl::get(); OUString &rTempNameBase_Impl = TempNameBase_Impl::get();
rTempNameBase_Impl = rBaseName; rTempNameBase_Impl = rBaseName + "/";
rTempNameBase_Impl += OUString('/');
TempFile aBase( NULL, true ); TempFile aBase( NULL, true );
if ( aBase.IsValid() ) if ( aBase.IsValid() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment