summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-01-17 10:29:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-01-17 10:29:58 +0000
commit47cfe443cd7f2eb9c32a18f40bc0442ce79a5557 (patch)
treea8abf0e0ac81060b5ce314846d37bab248321b16 /shell
parent5d1e49049453298e993a98d8aa61c35bb860acd6 (diff)
speed up startup a little bit
Diffstat (limited to 'shell')
-rw-r--r--shell/source/backends/gconfbe/gconfaccess.cxx86
-rw-r--r--shell/source/backends/gconfbe/gconfaccess.hxx1
-rw-r--r--shell/source/backends/gconfbe/gconfbackend.cxx8
3 files changed, 49 insertions, 46 deletions
diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx
index 67d3d09eb4..41f0c8adc3 100644
--- a/shell/source/backends/gconfbe/gconfaccess.cxx
+++ b/shell/source/backends/gconfbe/gconfaccess.cxx
@@ -478,7 +478,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_ENABLE_ACCESSIBILITY,
"/desktop/gnome/interface/accessibility",
- "EnableATToolSupport",
+ RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport"),
sal_True,
SETTINGS_LAST
},
@@ -486,7 +486,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_MODE,
GCONF_PROXY_MODE_KEY,
- "ooInetProxyType",
+ RTL_CONSTASCII_STRINGPARAM("ooInetProxyType"),
sal_True,
SETTINGS_LAST
},
@@ -494,7 +494,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_HTTP_HOST,
"/system/http_proxy/host",
- "ooInetHTTPProxyName",
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName"),
sal_False,
SETTING_PROXY_MODE
},
@@ -502,7 +502,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_HTTP_PORT,
"/system/http_proxy/port",
- "ooInetHTTPProxyPort",
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort"),
sal_False,
SETTING_PROXY_MODE
},
@@ -510,7 +510,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_HTTPS_HOST,
"/system/proxy/secure_host",
- "ooInetHTTPSProxyName",
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName"),
sal_False,
SETTING_PROXY_MODE
},
@@ -518,7 +518,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_HTTPS_PORT,
"/system/proxy/secure_port",
- "ooInetHTTPSProxyPort",
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort"),
sal_False,
SETTING_PROXY_MODE
},
@@ -526,7 +526,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_FTP_HOST,
"/system/proxy/ftp_host",
- "ooInetFTPProxyName",
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName"),
sal_False,
SETTING_PROXY_MODE
},
@@ -534,7 +534,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_FTP_PORT,
"/system/proxy/ftp_port",
- "ooInetFTPProxyPort",
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort"),
sal_False,
SETTING_PROXY_MODE
},
@@ -542,7 +542,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_NO_PROXY_FOR,
"/system/http_proxy/ignore_hosts",
- "ooInetNoProxy",
+ RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy"),
sal_True,
SETTING_PROXY_MODE
},
@@ -550,21 +550,21 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_MAILER_PROGRAM,
"/desktop/gnome/url-handlers/mailto/command",
- "ExternalMailer",
+ RTL_CONSTASCII_STRINGPARAM("ExternalMailer"),
sal_True,
SETTINGS_LAST
},
{
SETTING_SOURCEVIEWFONT_NAME,
"/desktop/gnome/interface/monospace_font_name",
- "SourceViewFontName",
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontName"),
sal_True,
SETTINGS_LAST
},
{
SETTING_SOURCEVIEWFONT_HEIGHT,
"/desktop/gnome/interface/monospace_font_name",
- "SourceViewFontHeight",
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight"),
sal_True,
SETTINGS_LAST
},
@@ -572,7 +572,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WORK_DIRECTORY,
"/desktop/gnome/url-handlers/mailto/command", // dummy
- "WorkPathVariable",
+ RTL_CONSTASCII_STRINGPARAM("WorkPathVariable"),
sal_True,
SETTING_WORK_DIRECTORY, // so that the existence of the dir can be checked
},
@@ -581,7 +581,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WRITER_DEFAULT_DOC_FORMAT,
"/apps/openoffice/writer_default_document_format",
- "TextDocumentSetupFactoryDefaultFilter",
+ RTL_CONSTASCII_STRINGPARAM("TextDocumentSetupFactoryDefaultFilter"),
sal_False,
SETTINGS_LAST
},
@@ -589,7 +589,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_IMPRESS_DEFAULT_DOC_FORMAT,
"/apps/openoffice/impress_default_document_format",
- "PresentationDocumentSetupFactoryDefaultFilter",
+ RTL_CONSTASCII_STRINGPARAM("PresentationDocumentSetupFactoryDefaultFilter"),
sal_False,
SETTINGS_LAST
},
@@ -597,7 +597,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_CALC_DEFAULT_DOC_FORMAT,
"/apps/openoffice/calc_default_document_format",
- "SpreadsheetDocumentSetupFactoryDefaultFilter",
+ RTL_CONSTASCII_STRINGPARAM("SpreadsheetDocumentSetupFactoryDefaultFilter"),
sal_False,
SETTINGS_LAST
},
@@ -605,7 +605,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_AUTO_SAVE,
GCONF_AUTO_SAVE_KEY,
- "AutoSaveEnabled",
+ RTL_CONSTASCII_STRINGPARAM("AutoSaveEnabled"),
sal_False,
SETTINGS_LAST
},
@@ -613,7 +613,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_AUTO_SAVE_INTERVAL,
"/apps/openoffice/auto_save_interval",
- "AutoSaveTimeIntervall",
+ RTL_CONSTASCII_STRINGPARAM("AutoSaveTimeIntervall"),
sal_False,
SETTING_AUTO_SAVE
},
@@ -621,7 +621,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USER_GIVENNAME,
"/desktop/gnome/url-handlers/mailto/command", // dummy
- "givenname",
+ RTL_CONSTASCII_STRINGPARAM("givenname"),
sal_True,
SETTING_USER_GIVENNAME
},
@@ -629,7 +629,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USER_SURNAME,
"/desktop/gnome/url-handlers/mailto/command", // dummy
- "sn",
+ RTL_CONSTASCII_STRINGPARAM("sn"),
sal_True,
SETTING_USER_SURNAME
},
@@ -637,7 +637,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_DISABLE_PRINTING,
"/desktop/gnome/lockdown/disable_printing",
- "DisablePrinting",
+ RTL_CONSTASCII_STRINGPARAM("DisablePrinting"),
sal_True,
SETTINGS_LAST
},
@@ -645,7 +645,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USE_SYSTEM_FILE_DIALOG,
"/apps/openoffice/use_system_file_dialog",
- "UseSystemFileDialog",
+ RTL_CONSTASCII_STRINGPARAM("UseSystemFileDialog"),
sal_False,
SETTINGS_LAST
},
@@ -653,7 +653,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PRINTING_MODIFIES_DOCUMENT,
"/apps/openoffice/printing_modifies_doc",
- "PrintingModifiesDocument",
+ RTL_CONSTASCII_STRINGPARAM("PrintingModifiesDocument"),
sal_False,
SETTINGS_LAST
},
@@ -661,7 +661,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SHOW_ICONS_IN_MENUS,
"/apps/openoffice/show_menu_icons",
- "ShowIconsInMenues",
+ RTL_CONSTASCII_STRINGPARAM("ShowIconsInMenues"),
sal_False,
SETTINGS_LAST
},
@@ -669,7 +669,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SHOW_INACTIVE_MENUITEMS,
"/apps/openoffice/show_menu_inactive_items",
- "DontHideDisabledEntry",
+ RTL_CONSTASCII_STRINGPARAM("DontHideDisabledEntry"),
sal_False,
SETTINGS_LAST
},
@@ -677,7 +677,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SHOW_FONT_PREVIEW,
"/apps/openoffice/show_font_preview",
- "ShowFontBoxWYSIWYG",
+ RTL_CONSTASCII_STRINGPARAM("ShowFontBoxWYSIWYG"),
sal_False,
SETTINGS_LAST
},
@@ -685,7 +685,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SHOW_FONT_HISTORY,
"/apps/openoffice/show_font_history",
- "FontViewHistory",
+ RTL_CONSTASCII_STRINGPARAM("FontViewHistory"),
sal_False,
SETTINGS_LAST
},
@@ -693,7 +693,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_ENABLE_OPENGL,
"/apps/openoffice/use_opengl",
- "OpenGL",
+ RTL_CONSTASCII_STRINGPARAM("OpenGL"),
sal_False,
SETTINGS_LAST
},
@@ -701,7 +701,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_OPTIMIZE_OPENGL,
"/apps/openoffice/optimize_opengl",
- "OpenGL_Faster",
+ RTL_CONSTASCII_STRINGPARAM("OpenGL_Faster"),
sal_False,
SETTINGS_LAST
},
@@ -709,7 +709,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USE_SYSTEM_FONT,
"/apps/openoffice/use_system_font",
- "AccessibilityIsSystemFont",
+ RTL_CONSTASCII_STRINGPARAM("AccessibilityIsSystemFont"),
sal_False,
SETTINGS_LAST
},
@@ -717,7 +717,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USE_FONT_ANTI_ALIASING,
"/apps/openoffice/use_font_anti_aliasing",
- "FontAntiAliasingEnabled",
+ RTL_CONSTASCII_STRINGPARAM("FontAntiAliasingEnabled"),
sal_False,
SETTINGS_LAST
},
@@ -725,7 +725,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_FONT_ANTI_ALIASING_MIN_PIXEL,
"/apps/openoffice/font_anti_aliasing_min_pixel",
- "FontAntiAliasingMinPixelHeight",
+ RTL_CONSTASCII_STRINGPARAM("FontAntiAliasingMinPixelHeight"),
sal_True,
SETTINGS_LAST
},
@@ -733,7 +733,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_CREATE_PDF,
"/apps/openoffice/lockdown/warn_info_create_pdf",
- "WarnCreatePDF",
+ RTL_CONSTASCII_STRINGPARAM("WarnCreatePDF"),
sal_False,
SETTINGS_LAST
},
@@ -741,7 +741,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_PRINT_DOC,
"/apps/openoffice/lockdown/warn_info_printing",
- "WarnPrintDoc",
+ RTL_CONSTASCII_STRINGPARAM("WarnPrintDoc"),
sal_False,
SETTINGS_LAST
},
@@ -749,7 +749,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_SAVEORSEND_DOC,
"/apps/openoffice/lockdown/warn_info_saving",
- "WarnSaveOrSendDoc",
+ RTL_CONSTASCII_STRINGPARAM("WarnSaveOrSendDoc"),
sal_False,
SETTINGS_LAST
},
@@ -757,7 +757,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_SIGN_DOC,
"/apps/openoffice/lockdown/warn_info_signing",
- "WarnSignDoc",
+ RTL_CONSTASCII_STRINGPARAM("WarnSignDoc"),
sal_False,
SETTINGS_LAST
},
@@ -765,7 +765,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_REMOVE_PERSONAL_INFO,
"/apps/openoffice/lockdown/remove_personal_info_on_save",
- "RemovePersonalInfoOnSaving",
+ RTL_CONSTASCII_STRINGPARAM("RemovePersonalInfoOnSaving"),
sal_False,
SETTINGS_LAST
},
@@ -773,7 +773,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_RECOMMEND_PASSWORD,
"/apps/openoffice/lockdown/recommend_password_on_save",
- "RecommendPasswordProtection",
+ RTL_CONSTASCII_STRINGPARAM("RecommendPasswordProtection"),
sal_False,
SETTINGS_LAST
},
@@ -781,7 +781,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_UNDO_STEPS,
"/apps/openoffice/undo_steps",
- "UndoSteps",
+ RTL_CONSTASCII_STRINGPARAM("UndoSteps"),
sal_False,
SETTINGS_LAST
},
@@ -789,7 +789,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SYMBOL_SET,
"/apps/openoffice/icon_size",
- "SymbolSet",
+ RTL_CONSTASCII_STRINGPARAM("SymbolSet"),
sal_True,
SETTINGS_LAST
},
@@ -797,7 +797,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_MACRO_SECURITY_LEVEL,
"/apps/openoffice/lockdown/macro_security_level",
- "MacroSecurityLevel",
+ RTL_CONSTASCII_STRINGPARAM("MacroSecurityLevel"),
sal_False,
SETTINGS_LAST
},
@@ -805,7 +805,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_CREATE_BACKUP,
"/apps/openoffice/create_backup",
- "CreateBackup",
+ RTL_CONSTASCII_STRINGPARAM("CreateBackup"),
sal_False,
SETTINGS_LAST
},
@@ -813,7 +813,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_ALIEN_FORMAT,
"/apps/openoffice/warn_alien_format",
- "WarnAlienFormat",
+ RTL_CONSTASCII_STRINGPARAM("WarnAlienFormat"),
sal_False,
SETTINGS_LAST
},
diff --git a/shell/source/backends/gconfbe/gconfaccess.hxx b/shell/source/backends/gconfbe/gconfaccess.hxx
index 2b9fd170cb..6c45ef5497 100644
--- a/shell/source/backends/gconfbe/gconfaccess.hxx
+++ b/shell/source/backends/gconfbe/gconfaccess.hxx
@@ -104,6 +104,7 @@ struct ConfigurationValue
const ConfigurationSetting nSettingId;
const gchar *GconfItem;
const char *OOoConfItem;
+ const sal_Int32 nOOoConfItemLen;
const sal_Bool bNeedsTranslation;
const ConfigurationSetting nDependsOn;
};
diff --git a/shell/source/backends/gconfbe/gconfbackend.cxx b/shell/source/backends/gconfbe/gconfbackend.cxx
index 7a548ac160..70e39f3987 100644
--- a/shell/source/backends/gconfbe/gconfbackend.cxx
+++ b/shell/source/backends/gconfbe/gconfbackend.cxx
@@ -190,9 +190,11 @@ css::uno::Any Service::getPropertyValue(rtl::OUString const & PropertyName)
css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
css::uno::RuntimeException)
{
- for (std::size_t i = 0; i < gconfaccess::nConfigurationValues; ++i) {
- if (PropertyName.equalsAscii(
- gconfaccess::ConfigurationValues[i].OOoConfItem))
+ for (std::size_t i = 0; i < gconfaccess::nConfigurationValues; ++i)
+ {
+ if (PropertyName.equalsAsciiL(
+ gconfaccess::ConfigurationValues[i].OOoConfItem,
+ gconfaccess::ConfigurationValues[i].nOOoConfItemLen))
{
return css::uno::makeAny(
enabled_