summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-07 10:47:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-07 11:00:47 +0000
commitfae35e535d2757244eccf4b5f5555293a24180b3 (patch)
tree0253f7d409c4e49bcd20d6604495b45a2354d1cc
parent0f96b3f33f98ecd56f0fe55a65315d6762ff978a (diff)
loplugin:oncevar in cui..connectivity
Change-Id: Ibe9d04932b0a57040db4fee11886dc1701f6ea17 Reviewed-on: https://gerrit.libreoffice.org/30653 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--connectivity/source/commontools/AutoRetrievingBase.cxx3
-rw-r--r--connectivity/source/commontools/DriversConfig.cxx7
-rw-r--r--connectivity/source/commontools/predicateinput.cxx7
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx3
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx3
-rw-r--r--connectivity/source/drivers/hsqldb/HCatalog.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HTables.cxx10
-rw-r--r--connectivity/source/drivers/hsqldb/HUser.cxx27
-rw-r--r--connectivity/source/drivers/mysql/YCatalog.cxx9
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx13
-rw-r--r--connectivity/source/drivers/mysql/YUser.cxx27
-rw-r--r--connectivity/source/parse/sqliterator.cxx6
-rw-r--r--cui/source/customize/acccfg.cxx13
-rw-r--r--cui/source/customize/cfg.cxx6
-rw-r--r--cui/source/customize/cfgutil.cxx17
-rw-r--r--cui/source/customize/macropg.cxx3
-rw-r--r--cui/source/dialogs/hlinettp.cxx3
-rw-r--r--cui/source/options/optupdt.cxx3
-rw-r--r--cui/source/tabpages/autocdlg.cxx15
-rw-r--r--cui/source/tabpages/numpages.cxx18
20 files changed, 66 insertions, 133 deletions
diff --git a/connectivity/source/commontools/AutoRetrievingBase.cxx b/connectivity/source/commontools/AutoRetrievingBase.cxx
index ac573acfce80..f64d4417ad1d 100644
--- a/connectivity/source/commontools/AutoRetrievingBase.cxx
+++ b/connectivity/source/commontools/AutoRetrievingBase.cxx
@@ -31,10 +31,9 @@ namespace connectivity
if ( sStmt.startsWith("INSERT") )
{
sStatement = m_sGeneratedValueStatement;
- static const char sColumn[] = "$column";
static const char sTable[] = "$table";
sal_Int32 nIndex = 0;
- nIndex = sStatement.indexOf(sColumn,nIndex);
+ nIndex = sStatement.indexOf("$column",nIndex);
if ( -1 != nIndex )
{ // we need a column
}
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index f7b544105b01..c40ed479177b 100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -45,13 +45,12 @@ namespace
if ( aPropertiesNode.isValid() )
{
uno::Sequence< OUString > aStringSeq;
- static const char s_sValue[] = "/Value";
const uno::Sequence< OUString > aProperties = aPropertiesNode.getNodeNames();
const OUString* pPropertiesIter = aProperties.getConstArray();
const OUString* pPropertiesEnd = pPropertiesIter + aProperties.getLength();
for (;pPropertiesIter != pPropertiesEnd ; ++pPropertiesIter)
{
- uno::Any aValue = aPropertiesNode.getNodeValue(*pPropertiesIter + s_sValue);
+ uno::Any aValue = aPropertiesNode.getNodeValue(*pPropertiesIter + "/Value");
if ( aValue >>= aStringSeq )
{
lcl_convert(aStringSeq,aValue);
@@ -98,8 +97,8 @@ void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rx
{
if ( !m_aInstalled.isValid() )
{
- static const char s_sNodeName[] = "org.openoffice.Office.DataAccess.Drivers/Installed"; ///Installed
- m_aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
+ m_aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(_rxORB,
+ "org.openoffice.Office.DataAccess.Drivers/Installed", -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
}
if ( m_aInstalled.isValid() )
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index c32f225c0436..c3c91fad6972 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -146,19 +146,16 @@ namespace dbtools
)
{
static const char sSingleQuote[] = "'";
- static const char sDoubleQuote[] = "''";
sal_Int32 nIndex = -1;
sal_Int32 nTemp = 0;
while ( -1 != ( nIndex = sQuoted.indexOf( '\'',nTemp ) ) )
{
- sQuoted = sQuoted.replaceAt( nIndex, 1, sDoubleQuote );
+ sQuoted = sQuoted.replaceAt( nIndex, 1, "''" );
nTemp = nIndex+2;
}
- OUString sTemp( sSingleQuote );
- ( sTemp += sQuoted ) += sSingleQuote;
- sQuoted = sTemp;
+ sQuoted = sSingleQuote + sQuoted + sSingleQuote;
}
pReturn = const_cast< OSQLParser& >( m_aParser ).predicateTree( _rErrorMessage, sQuoted, m_xFormatter, _rxField );
}
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 858de8e37678..11d35d1359a1 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -628,13 +628,12 @@ OUString ODbaseTable::getEntry(OConnection* _pConnection,const OUString& _sName
OUString sName;
OUString sExt;
INetURLObject aURL;
- static const char s_sSeparator[] = "/";
xDir->beforeFirst();
while(xDir->next())
{
sName = xRow->getString(1);
aURL.SetSmartProtocol(INetProtocol::File);
- OUString sUrl = _pConnection->getURL() + s_sSeparator + sName;
+ OUString sUrl = _pConnection->getURL() + "/" + sName;
aURL.SetSmartURL( sUrl );
// cut the extension
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index b40c7f97fd28..034aa77487ee 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -460,12 +460,11 @@ OUString OFlatTable::getEntry()
INetURLObject aURL;
xDir->beforeFirst();
- static const char s_sSeparator[] = "/";
while(xDir->next())
{
sName = xRow->getString(1);
aURL.SetSmartProtocol(INetProtocol::File);
- OUString sUrl = m_pConnection->getURL() + s_sSeparator + sName;
+ OUString sUrl = m_pConnection->getURL() + "/" + sName;
aURL.SetSmartURL( sUrl );
// cut the extension
diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx
index 13cc609cfb8a..a3baf0f021d5 100644
--- a/connectivity/source/drivers/hsqldb/HCatalog.cxx
+++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx
@@ -52,12 +52,10 @@ void OHCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStrin
void OHCatalog::refreshTables()
{
TStringVector aVector;
- static const char s_sTableTypeView[] = "VIEW";
- static const char s_sTableTypeTable[] = "TABLE";
Sequence< OUString > sTableTypes(2);
- sTableTypes[0] = s_sTableTypeView;
- sTableTypes[1] = s_sTableTypeTable;
+ sTableTypes[0] = "VIEW";
+ sTableTypes[1] = "TABLE";
refreshObjects(sTableTypes,aVector);
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx
index 0175f6745387..30ff90cea020 100644
--- a/connectivity/source/drivers/hsqldb/HTables.cxx
+++ b/connectivity/source/drivers/hsqldb/HTables.cxx
@@ -51,14 +51,10 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation);
- static const char s_sTableTypeView[] = "VIEW";
- static const char s_sTableTypeTable[] = "TABLE";
- static const char s_sAll[] = "%";
-
Sequence< OUString > sTableTypes(3);
- sTableTypes[0] = s_sTableTypeView;
- sTableTypes[1] = s_sTableTypeTable;
- sTableTypes[2] = s_sAll; // just to be sure to include anything else ....
+ sTableTypes[0] = "VIEW";
+ sTableTypes[1] = "TABLE";
+ sTableTypes[2] = "%"; // just to be sure to include anything else ....
Any aCatalog;
if ( !sCatalog.isEmpty() )
diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx
index dc7f20087aa8..e736830af6be 100644
--- a/connectivity/source/drivers/hsqldb/HUser.cxx
+++ b/connectivity/source/drivers/hsqldb/HUser.cxx
@@ -119,15 +119,6 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_In
if ( xRes.is() )
{
- static const char sSELECT [] = "SELECT";
- static const char sINSERT [] = "INSERT";
- static const char sUPDATE [] = "UPDATE";
- static const char sDELETE [] = "DELETE";
- static const char sREAD [] = "READ";
- static const char sCREATE [] = "CREATE";
- static const char sALTER [] = "ALTER";
- static const char sREFERENCE[] = "REFERENCE";
- static const char sDROP [] = "DROP";
static const char sYes [] = "YES";
nRightsWithGrant = nRights = 0;
@@ -142,55 +133,55 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_In
if (!m_Name.equalsIgnoreAsciiCase(sGrantee))
continue;
- if (sPrivilege.equalsIgnoreAsciiCase(sSELECT))
+ if (sPrivilege.equalsIgnoreAsciiCase("SELECT"))
{
nRights |= Privilege::SELECT;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::SELECT;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sINSERT))
+ else if (sPrivilege.equalsIgnoreAsciiCase("INSERT"))
{
nRights |= Privilege::INSERT;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::INSERT;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sUPDATE))
+ else if (sPrivilege.equalsIgnoreAsciiCase("UPDATE"))
{
nRights |= Privilege::UPDATE;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::UPDATE;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sDELETE))
+ else if (sPrivilege.equalsIgnoreAsciiCase("DELETE"))
{
nRights |= Privilege::DELETE;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::DELETE;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sREAD))
+ else if (sPrivilege.equalsIgnoreAsciiCase("READ"))
{
nRights |= Privilege::READ;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::READ;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sCREATE))
+ else if (sPrivilege.equalsIgnoreAsciiCase("CREATE"))
{
nRights |= Privilege::CREATE;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::CREATE;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sALTER))
+ else if (sPrivilege.equalsIgnoreAsciiCase("ALTER"))
{
nRights |= Privilege::ALTER;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::ALTER;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sREFERENCE))
+ else if (sPrivilege.equalsIgnoreAsciiCase("REFERENCE"))
{
nRights |= Privilege::REFERENCE;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::REFERENCE;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sDROP))
+ else if (sPrivilege.equalsIgnoreAsciiCase("DROP"))
{
nRights |= Privilege::DROP;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx
index 6c98d12ea94e..c98890c5f6d3 100644
--- a/connectivity/source/drivers/mysql/YCatalog.cxx
+++ b/connectivity/source/drivers/mysql/YCatalog.cxx
@@ -53,14 +53,11 @@ void OMySQLCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TS
void OMySQLCatalog::refreshTables()
{
TStringVector aVector;
- static const char s_sTableTypeView[] = "VIEW";
- static const char s_sTableTypeTable[] = "TABLE";
- static const char s_sAll[] = "%";
Sequence< OUString > sTableTypes(3);
- sTableTypes[0] = s_sTableTypeView;
- sTableTypes[1] = s_sTableTypeTable;
- sTableTypes[2] = s_sAll; // just to be sure to include anything else ....
+ sTableTypes[0] = "VIEW";
+ sTableTypes[1] = "TABLE";
+ sTableTypes[2] = "%"; // just to be sure to include anything else ....
refreshObjects(sTableTypes,aVector);
diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx
index 7d12bf82cf19..3cad5360c033 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -51,14 +51,10 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation);
- static const char s_sTableTypeView[] = "VIEW";
- static const char s_sTableTypeTable[] = "TABLE";
- static const char s_sAll[] = "%";
-
Sequence< OUString > sTableTypes(3);
- sTableTypes[0] = s_sTableTypeView;
- sTableTypes[1] = s_sTableTypeTable;
- sTableTypes[2] = s_sAll; // just to be sure to include anything else ....
+ sTableTypes[0] = "VIEW";
+ sTableTypes[1] = "TABLE";
+ sTableTypes[2] = "%"; // just to be sure to include anything else ....
Any aCatalog;
if ( !sCatalog.isEmpty() )
@@ -180,8 +176,7 @@ OUString OTables::adjustSQL(const OUString& _sSql)
void OTables::createTable( const Reference< XPropertySet >& descriptor )
{
const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection();
- static const char s_sCreatePattern[] = "(M,D)";
- const OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern));
+ const OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection, this, "(M,D)"));
Reference< XStatement > xStmt = xConnection->createStatement( );
if ( xStmt.is() )
{
diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx
index 0cd8d5ad341a..e386d9b385ed 100644
--- a/connectivity/source/drivers/mysql/YUser.cxx
+++ b/connectivity/source/drivers/mysql/YUser.cxx
@@ -119,15 +119,6 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I
if ( xRes.is() )
{
- static const char sSELECT [] = "SELECT";
- static const char sINSERT [] = "INSERT";
- static const char sUPDATE [] = "UPDATE";
- static const char sDELETE [] = "DELETE";
- static const char sREAD [] = "READ";
- static const char sCREATE [] = "CREATE";
- static const char sALTER [] = "ALTER";
- static const char sREFERENCE[] = "REFERENCES";
- static const char sDROP [] = "DROP";
static const char sYes [] = "YES";
nRightsWithGrant = nRights = 0;
@@ -142,55 +133,55 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I
if (!m_Name.equalsIgnoreAsciiCase(sGrantee))
continue;
- if (sPrivilege.equalsIgnoreAsciiCase(sSELECT))
+ if (sPrivilege.equalsIgnoreAsciiCase("SELECT"))
{
nRights |= Privilege::SELECT;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::SELECT;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sINSERT))
+ else if (sPrivilege.equalsIgnoreAsciiCase("INSERT"))
{
nRights |= Privilege::INSERT;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::INSERT;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sUPDATE))
+ else if (sPrivilege.equalsIgnoreAsciiCase("UPDATE"))
{
nRights |= Privilege::UPDATE;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::UPDATE;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sDELETE))
+ else if (sPrivilege.equalsIgnoreAsciiCase("DELETE"))
{
nRights |= Privilege::DELETE;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::DELETE;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sREAD))
+ else if (sPrivilege.equalsIgnoreAsciiCase("READ"))
{
nRights |= Privilege::READ;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::READ;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sCREATE))
+ else if (sPrivilege.equalsIgnoreAsciiCase("CREATE"))
{
nRights |= Privilege::CREATE;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::CREATE;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sALTER))
+ else if (sPrivilege.equalsIgnoreAsciiCase("ALTER"))
{
nRights |= Privilege::ALTER;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::ALTER;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sREFERENCE))
+ else if (sPrivilege.equalsIgnoreAsciiCase("REFERENCES"))
{
nRights |= Privilege::REFERENCE;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
nRightsWithGrant |= Privilege::REFERENCE;
}
- else if (sPrivilege.equalsIgnoreAsciiCase(sDROP))
+ else if (sPrivilege.equalsIgnoreAsciiCase("DROP"))
{
nRights |= Privilege::DROP;
if ( sGrantable.equalsIgnoreAsciiCase(sYes) )
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 4ace9f0ba354..0f0e0d3cc1de 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -261,14 +261,12 @@ namespace
{
OUString sComposedName;
- static const char s_sTableTypeView[] = "VIEW";
- static const char s_sTableTypeTable[] = "TABLE";
static const char s_sWildcard[] = "%" ;
// we want all catalogues, all schemas, all tables
Sequence< OUString > sTableTypes(3);
- sTableTypes[0] = s_sTableTypeView;
- sTableTypes[1] = s_sTableTypeTable;
+ sTableTypes[0] = "VIEW";
+ sTableTypes[1] = "TABLE";
sTableTypes[2] = s_sWildcard; // just to be sure to include anything else ....
if ( _rxDBMeta.is() )
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index ae7d1cc5d26f..6d36d9c2dc1d 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -74,14 +74,9 @@
using namespace css;
-static const char MODULEPROP_SHORTNAME [] = "ooSetupFactoryShortName";
-static const char MODULEPROP_UINAME [] = "ooSetupFactoryUIName";
-static const char CMDPROP_UINAME [] = "Name";
-
static const char FOLDERNAME_UICONFIG [] = "Configurations2";
static const char MEDIATYPE_PROPNAME [] = "MediaType";
-static const char MEDIATYPE_UICONFIG [] = "application/vnd.sun.xml.ui.configuration";
static const sal_uInt16 KEYCODE_ARRAY[] =
{
@@ -884,8 +879,8 @@ void SfxAcceleratorConfigPage::InitAccCfg()
frame::ModuleManager::create(m_xContext);
m_sModuleLongName = xModuleManager->identify(m_xFrame);
comphelper::SequenceAsHashMap lModuleProps(xModuleManager->getByName(m_sModuleLongName));
- m_sModuleShortName = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_SHORTNAME, OUString());
- m_sModuleUIName = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_UINAME , OUString());
+ m_sModuleShortName = lModuleProps.getUnpackedValueOrDefault("ooSetupFactoryShortName", OUString());
+ m_sModuleUIName = lModuleProps.getUnpackedValueOrDefault("ooSetupFactoryUIName", OUString());
// get global accelerator configuration
m_xGlobal = css::ui::GlobalAcceleratorConfiguration::create(m_xContext);
@@ -1357,7 +1352,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, void
OUString sMediaType;
xUIConfigProps->getPropertyValue(MEDIATYPE_PROPNAME) >>= sMediaType;
if (sMediaType.isEmpty())
- xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, uno::makeAny(OUString(MEDIATYPE_UICONFIG)));
+ xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, uno::makeAny(OUString("application/vnd.sun.xml.ui.configuration")));
uno::Reference<ui::XUIConfigurationManager2> xCfgMgr2 = ui::UIConfigurationManager::create(m_xContext);
xCfgMgr2->setStorage(xUIConfig);
@@ -1522,7 +1517,7 @@ OUString SfxAcceleratorConfigPage::GetLabel4Command(const OUString& sCommand)
if (xModuleConf.is())
{
::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand));
- OUString sLabel = lProps.getUnpackedValueOrDefault(CMDPROP_UINAME, OUString());
+ OUString sLabel = lProps.getUnpackedValueOrDefault("Name", OUString());
if (!sLabel.isEmpty())
return sLabel;
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 20dece223187..cf734f776336 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -114,9 +114,7 @@ static const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar";
static const char ITEM_TOOLBAR_URL[] = "private:resource/toolbar/";
static const char CUSTOM_TOOLBAR_STR[] = "custom_toolbar_";
-static const char CUSTOM_MENU_STR[] = "vnd.openoffice.org:CustomMenu";
-static const char aSeparatorStr[] = "----------------------------------";
static const char aMenuSeparatorStr[] = " | ";
namespace uno = com::sun::star::uno;
@@ -337,7 +335,7 @@ generateCustomMenuURL(
SvxEntries* entries,
sal_Int32 suffix = 1 )
{
- OUString url = CUSTOM_MENU_STR + OUString::number( suffix );
+ OUString url = "vnd.openoffice.org:CustomMenu" + OUString::number( suffix );
if (!entries)
return url;
@@ -2321,7 +2319,7 @@ SvTreeListEntry* SvxConfigPage::InsertEntryIntoUI(
if (pNewEntryData->IsSeparator())
{
pNewEntry = m_pContentsListBox->InsertEntry(
- OUString(aSeparatorStr),
+ OUString("----------------------------------"),
nullptr, false, nPos, pNewEntryData);
}
else
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 1209658c0d60..99cc9fec65d1 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -76,9 +76,6 @@ void SfxStylesInfo_Impl::setModel(const css::uno::Reference< css::frame::XModel
m_xDoc = xModel;
}
-static const char CMDURL_SPART [] = ".uno:StyleApply?Style:string=";
-static const char CMDURL_FPART2[] = "&FamilyName:string=";
-
static const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
static const char CMDURL_SPART_ONLY [] = "Style:string=";
static const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
@@ -87,12 +84,10 @@ static const char STYLEPROP_UINAME[] = "DisplayName";
OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle)
{
- OUStringBuffer sCommand(1024);
- sCommand.append(CMDURL_SPART );
- sCommand.append(sStyle );
- sCommand.append(CMDURL_FPART2);
- sCommand.append(sFamily );
- return sCommand.makeStringAndClear();
+ return ".uno:StyleApply?Style:string="
+ + sStyle
+ + "&FamilyName:string="
+ + sFamily;
}
bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle)
@@ -206,8 +201,6 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const OUString& sFamily)
{
- static const char PROP_UINAME[] = "DisplayName";
-
css::uno::Sequence< OUString > lStyleNames;
css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNameAccess > xFamilies = xModel->getStyleFamilies();
@@ -238,7 +231,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
xStyleSet->getByName(aStyleInfo.sStyle) >>= xStyle;
if (!xStyle.is())
continue;
- xStyle->getPropertyValue(PROP_UINAME) >>= aStyleInfo.sLabel;
+ xStyle->getPropertyValue("DisplayName") >>= aStyleInfo.sLabel;
}
catch(const css::uno::RuntimeException&)
{ throw; }
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 4575e9ffa4e2..70dbf42d335b 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -51,7 +51,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
static const char aVndSunStarUNO[] = "vnd.sun.star.UNO:";
-static const char aVndSunStarScript[] = "vnd.sun.star.script:";
SvxMacroTabPage_Impl::SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet )
: pAssignPB(nullptr)
@@ -470,7 +469,7 @@ void IconLBoxString::Paint(const Point& aPos, SvTreeListBox& /*aDevice*/, vcl::R
}
else
{
- aPureMethod = aURL.copy(strlen(aVndSunStarScript));
+ aPureMethod = aURL.copy(strlen("vnd.sun.star.script:"));
aPureMethod = aPureMethod.copy( 0, aPureMethod.indexOf( '?' ) );
}
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 71cc15c57c38..0f6d2c6efd30 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -25,7 +25,6 @@
#include "hlmarkwn_def.hxx"
sal_Char const sAnonymous[] = "anonymous";
-sal_Char const sHTTPScheme[] = INET_HTTP_SCHEME;
sal_Char const sFTPScheme[] = INET_FTP_SCHEME;
/*************************************************************************
@@ -276,7 +275,7 @@ void SvxHyperlinkInternetTp::SetScheme(const OUString& rScheme)
m_pCbAnonymous->Show( bFTP );
//update 'link target in document'-window and opening-button
- if (rScheme.startsWith(sHTTPScheme) || rScheme.isEmpty())
+ if (rScheme.startsWith(INET_HTTP_SCHEME) || rScheme.isEmpty())
{
if ( mbMarkWndOpen )
ShowMarkWnd ();
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 58bd1aa60a00..36e2b998c879 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -277,8 +277,7 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet* )
{
bool bValue = false;
m_xUpdateAccess->getByName( "AutoCheckEnabled" ) >>= bValue;
- OUStringLiteral sPath("/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/AutoCheckEnabled");
- beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(sPath);
+ beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName("/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/AutoCheckEnabled");
bool bReadOnly = (aProperty.Attributes & beans::PropertyAttribute::READONLY) != 0;
m_pAutoCheckCheckBox->Check(bValue);
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 67efba2e1b2c..3ebc03a73cfb 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2391,16 +2391,9 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const
if (m_pAutoCompleteList && nSelCnt)
{
TransferDataContainer* pCntnr = new TransferDataContainer;
- css::uno::Reference<
- css::datatransfer::XTransferable > xRef( pCntnr );
+ css::uno::Reference< css::datatransfer::XTransferable > xRef( pCntnr );
OStringBuffer sData;
- const sal_Char aLineEnd[] =
-#if defined(_WIN32)
- "\015\012";
-#else
- "\012";
-#endif
rtl_TextEncoding nEncode = osl_getThreadTextEncoding();
@@ -2408,7 +2401,11 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const
{
sData.append(OUStringToOString(m_pLBEntries->GetSelectEntry(n),
nEncode));
- sData.append(aLineEnd);
+#if defined(_WIN32)
+ sData.append("\015\012");
+#else
+ sData.append("\012");
+#endif
}
pCntnr->CopyByteString( SotClipboardFormatId::STRING, sData.makeStringAndClear() );
pCntnr->CopyToClipboard( static_cast<vcl::Window*>(const_cast<OfaAutoCompleteTabPage *>(this)) );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 5846d9ea4f65..6aacd7e695b7 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -101,12 +101,6 @@ using namespace css::style;
#define SEARCHFILENAME_DELIMITER ((sal_Unicode)'/')
static bool bLastRelative = false;
-static const sal_Char cNumberingType[] = "NumberingType";
-static const sal_Char cParentNumbering[] = "ParentNumbering";
-static const sal_Char cPrefix[] = "Prefix";
-static const sal_Char cSuffix[] = "Suffix";
-static const sal_Char cBulletChar[] = "BulletChar";
-static const sal_Char cBulletFontName[] = "BulletFontName";
static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValue>& rLevelProps)
{
@@ -114,17 +108,17 @@ static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValu
SvxNumSettings_Impl* pNew = new SvxNumSettings_Impl;
for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++)
{
- if ( pValues[j].Name == cNumberingType )
+ if ( pValues[j].Name == "NumberingType" )
pValues[j].Value >>= pNew->nNumberType;
- else if ( pValues[j].Name == cPrefix )
+ else if ( pValues[j].Name == "Prefix" )
pValues[j].Value >>= pNew->sPrefix;
- else if ( pValues[j].Name == cSuffix )
+ else if ( pValues[j].Name == "Suffix" )
pValues[j].Value >>= pNew->sSuffix;
- else if ( pValues[j].Name == cParentNumbering )
+ else if ( pValues[j].Name == "ParentNumbering" )
pValues[j].Value >>= pNew->nParentNumbering;
- else if ( pValues[j].Name == cBulletChar )
+ else if ( pValues[j].Name == "BulletChar" )
pValues[j].Value >>= pNew->sBulletChar;
- else if ( pValues[j].Name == cBulletFontName )
+ else if ( pValues[j].Name == "BulletFontName" )
pValues[j].Value >>= pNew->sBulletFont;
}
return pNew;