summaryrefslogtreecommitdiff
path: root/shell/source/backends/gconfbe/gconfaccess.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'shell/source/backends/gconfbe/gconfaccess.cxx')
-rw-r--r--shell/source/backends/gconfbe/gconfaccess.cxx194
1 files changed, 101 insertions, 93 deletions
diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx
index 64d0e2e94eae..9b93c737cd2e 100644
--- a/shell/source/backends/gconfbe/gconfaccess.cxx
+++ b/shell/source/backends/gconfbe/gconfaccess.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,8 @@
************************************************************************/
#include "precompiled_shell.hxx"
-#include "sal/config.h"
+#include <sal/macros.h>
+#include <sal/config.h>
#include <string.h>
@@ -36,6 +38,7 @@
#include "osl/thread.h"
#include "rtl/strbuf.hxx"
#include "rtl/ustrbuf.hxx"
+#include "sal/macros.h"
#include "gconfaccess.hxx"
@@ -48,7 +51,11 @@ namespace {
namespace css = com::sun::star ;
namespace uno = css::uno ;
-using namespace rtl;
+
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OStringToOUString;
+using ::rtl::OUStringBuffer;
GConfClient* getGconfClient()
{
@@ -73,8 +80,8 @@ GConfClient* getGconfClient()
mClient = gconf_client_get_default();
if (!mClient)
{
- throw uno::RuntimeException(rtl::OUString::createFromAscii
- ("GconfBackend:GconfLayer: Cannot Initialize Gconf connection"),NULL);
+ throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
+ ("GconfBackend:GconfLayer: Cannot Initialize Gconf connection")),NULL);
}
static const char * const PreloadValuesList[] =
@@ -114,7 +121,7 @@ static OUString xdg_user_dir_lookup (const char *type)
if (!aSecurity.getHomeDir( aHomeDirURL ) )
{
- osl::FileBase::getFileURLFromSystemPath(rtl::OUString::createFromAscii("/tmp"), aDocumentsDirURL);
+ osl::FileBase::getFileURLFromSystemPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/tmp")), aDocumentsDirURL);
return aDocumentsDirURL;
}
@@ -122,12 +129,12 @@ static OUString xdg_user_dir_lookup (const char *type)
if (config_home == NULL || config_home[0] == 0)
{
aConfigFileURL = OUString(aHomeDirURL);
- aConfigFileURL += OUString::createFromAscii( "/.config/user-dirs.dirs" );
+ aConfigFileURL += OUString(RTL_CONSTASCII_USTRINGPARAM("/.config/user-dirs.dirs"));
}
else
{
aConfigFileURL = OUString::createFromAscii(config_home);
- aConfigFileURL += OUString::createFromAscii( "/user-dirs.dirs" );
+ aConfigFileURL += OUString(RTL_CONSTASCII_USTRINGPARAM("/user-dirs.dirs"));
}
if(osl_File_E_None == osl_openFile(aConfigFileURL.pData, &handle, osl_File_OpenFlag_Read))
@@ -225,19 +232,19 @@ static OUString xdg_user_dir_lookup (const char *type)
//------------------------------------------------------------------------------
-uno::Any makeAnyOfGconfValue( GConfValue *aGconfValue )
+uno::Any makeAnyOfGconfValue( GConfValue *pGconfValue )
{
- switch( aGconfValue->type )
+ switch( pGconfValue->type )
{
case GCONF_VALUE_BOOL:
- return uno::makeAny( (sal_Bool) gconf_value_get_bool( aGconfValue ) );
+ return uno::makeAny( (sal_Bool) gconf_value_get_bool( pGconfValue ) );
case GCONF_VALUE_INT:
- return uno::makeAny( (sal_Int32) gconf_value_get_int( aGconfValue ) );
+ return uno::makeAny( (sal_Int32) gconf_value_get_int( pGconfValue ) );
case GCONF_VALUE_STRING:
return uno::makeAny( OStringToOUString( rtl::OString(
- gconf_value_get_string(aGconfValue) ), RTL_TEXTENCODING_UTF8 ) );
+ gconf_value_get_string(pGconfValue) ), RTL_TEXTENCODING_UTF8 ) );
default:
fprintf( stderr, "makeAnyOfGconfValue: Type not handled.\n" );
@@ -249,9 +256,9 @@ uno::Any makeAnyOfGconfValue( GConfValue *aGconfValue )
//------------------------------------------------------------------------------
-static void splitFontName( GConfValue *aGconfValue, rtl::OUString &rName, sal_Int16 &rHeight)
+static void splitFontName( GConfValue *pGconfValue, rtl::OUString &rName, sal_Int16 &rHeight)
{
- rtl::OString aFont( gconf_value_get_string( aGconfValue ) );
+ rtl::OString aFont( gconf_value_get_string( pGconfValue ) );
aFont.trim();
sal_Int32 nIdx = aFont.lastIndexOf( ' ' );
if (nIdx < 1) { // urk
@@ -267,20 +274,20 @@ static void splitFontName( GConfValue *aGconfValue, rtl::OUString &rName, sal_In
//------------------------------------------------------------------------------
-uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValue )
+uno::Any translateToOOo( const ConfigurationValue &rValue, GConfValue *pGconfValue )
{
- switch( aValue.nSettingId )
+ switch( rValue.nSettingId )
{
case SETTING_PROXY_MODE:
{
rtl::OUString aProxyMode;
- uno::Any aOriginalValue = makeAnyOfGconfValue( aGconfValue );
+ uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue );
aOriginalValue >>= aProxyMode;
- if( aProxyMode.equals( rtl::OUString::createFromAscii( "manual" ) ) )
+ if( aProxyMode.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("manual")) ) )
return uno::makeAny( (sal_Int32) 1 );
- else if( aProxyMode.equals( rtl::OUString::createFromAscii( "none" ) ) )
+ else if( aProxyMode.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("none")) ) )
return uno::makeAny( (sal_Int32) 0 );
}
break;
@@ -288,9 +295,9 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu
case SETTING_NO_PROXY_FOR:
{
rtl::OStringBuffer aBuffer;
- if( (GCONF_VALUE_LIST == aGconfValue->type) && (GCONF_VALUE_STRING == gconf_value_get_list_type(aGconfValue)) )
+ if( (GCONF_VALUE_LIST == pGconfValue->type) && (GCONF_VALUE_STRING == gconf_value_get_list_type(pGconfValue)) )
{
- GSList * list = gconf_value_get_list(aGconfValue);
+ GSList * list = gconf_value_get_list(pGconfValue);
for(; list; list = g_slist_next(list))
{
aBuffer.append(gconf_value_get_string((GConfValue *) list->data));
@@ -308,7 +315,7 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu
case SETTING_MAILER_PROGRAM:
{
rtl::OUString aMailer;
- uno::Any aOriginalValue = makeAnyOfGconfValue( aGconfValue );
+ uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue );
aOriginalValue >>= aMailer;
sal_Int32 nIndex = 0;
return uno::makeAny( aMailer.getToken( 0, ' ', nIndex ) );
@@ -319,8 +326,8 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu
case SETTING_FONT_ANTI_ALIASING_MIN_PIXEL:
case SETTING_SYMBOL_SET:
{
- sal_Int32 nShortValue;
- uno::Any aOriginalValue = makeAnyOfGconfValue( aGconfValue );
+ sal_Int32 nShortValue(0);
+ uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue );
aOriginalValue >>= nShortValue;
return uno::makeAny( (sal_Int16) nShortValue );
}
@@ -334,7 +341,7 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu
#endif // ENABLE_LOCKDOWN
{
sal_Bool bBooleanValue = false;
- uno::Any aOriginalValue = makeAnyOfGconfValue( aGconfValue );
+ uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue );
aOriginalValue >>= bBooleanValue;
return uno::makeAny( rtl::OUString::valueOf( (sal_Bool) bBooleanValue ) );
}
@@ -379,8 +386,8 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu
rtl::OUString aName;
sal_Int16 nHeight;
- splitFontName (aGconfValue, aName, nHeight);
- if (aValue.nSettingId == SETTING_SOURCEVIEWFONT_NAME)
+ splitFontName (pGconfValue, aName, nHeight);
+ if (rValue.nSettingId == SETTING_SOURCEVIEWFONT_NAME)
return uno::makeAny( aName );
else
return uno::makeAny( nHeight );
@@ -397,18 +404,18 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const ConfigurationValue aValue )
+sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const ConfigurationValue &rValue )
{
- switch( aValue.nDependsOn )
+ switch( rValue.nDependsOn )
{
case SETTING_PROXY_MODE:
{
- GConfValue* aGconfValue = gconf_client_get( aClient, GCONF_PROXY_MODE_KEY, NULL );
+ GConfValue* pGconfValue = gconf_client_get( pClient, GCONF_PROXY_MODE_KEY, NULL );
- if ( aGconfValue != NULL )
+ if ( pGconfValue != NULL )
{
- bool bOk = g_strcasecmp( "manual", gconf_value_get_string( aGconfValue ) ) == 0;
- gconf_value_free( aGconfValue );
+ bool bOk = g_strcasecmp( "manual", gconf_value_get_string( pGconfValue ) ) == 0;
+ gconf_value_free( pGconfValue );
if (bOk) return sal_True;
}
}
@@ -428,7 +435,7 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const Configurati
{
rtl::OUString aCompleteName( rtl::OStringToOUString(
g_get_real_name(), osl_getThreadTextEncoding() ) );
- if( !aCompleteName.equalsAscii( "Unknown" ) )
+ if( !aCompleteName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Unknown")) )
return sal_True;
}
break;
@@ -437,9 +444,9 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const Configurati
{
rtl::OUString aCompleteName( rtl::OStringToOUString(
g_get_real_name(), osl_getThreadTextEncoding() ) );
- if( !aCompleteName.equalsAscii( "Unknown" ) )
+ if( !aCompleteName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Unknown")) )
{
- if( aCompleteName.trim().indexOf(rtl::OUString::createFromAscii(" "), 0) != -1 )
+ if( aCompleteName.trim().indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")), 0) != -1 )
return sal_True;
}
}
@@ -448,12 +455,12 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const Configurati
#ifdef ENABLE_LOCKDOWN
case SETTING_AUTO_SAVE:
{
- GConfValue* aGconfValue = gconf_client_get( aClient, GCONF_AUTO_SAVE_KEY, NULL );
+ GConfValue* pGconfValue = gconf_client_get( pClient, GCONF_AUTO_SAVE_KEY, NULL );
- if( ( aGconfValue != NULL ) )
+ if( ( pGconfValue != NULL ) )
{
- bool bOk = gconf_value_get_bool( aGconfValue );
- gconf_value_free( aGconfValue );
+ bool bOk = gconf_value_get_bool( pGconfValue );
+ gconf_value_free( pGconfValue );
if (bOk) return sal_True;
}
}
@@ -475,7 +482,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_ENABLE_ACCESSIBILITY,
"/desktop/gnome/interface/accessibility",
- "EnableATToolSupport",
+ RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport"),
sal_True,
SETTINGS_LAST
},
@@ -483,7 +490,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_MODE,
GCONF_PROXY_MODE_KEY,
- "ooInetProxyType",
+ RTL_CONSTASCII_STRINGPARAM("ooInetProxyType"),
sal_True,
SETTINGS_LAST
},
@@ -491,7 +498,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_HTTP_HOST,
"/system/http_proxy/host",
- "ooInetHTTPProxyName",
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName"),
sal_False,
SETTING_PROXY_MODE
},
@@ -499,7 +506,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_HTTP_PORT,
"/system/http_proxy/port",
- "ooInetHTTPProxyPort",
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort"),
sal_False,
SETTING_PROXY_MODE
},
@@ -507,7 +514,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_HTTPS_HOST,
"/system/proxy/secure_host",
- "ooInetHTTPSProxyName",
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName"),
sal_False,
SETTING_PROXY_MODE
},
@@ -515,7 +522,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_HTTPS_PORT,
"/system/proxy/secure_port",
- "ooInetHTTPSProxyPort",
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort"),
sal_False,
SETTING_PROXY_MODE
},
@@ -523,7 +530,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_FTP_HOST,
"/system/proxy/ftp_host",
- "ooInetFTPProxyName",
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName"),
sal_False,
SETTING_PROXY_MODE
},
@@ -531,7 +538,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PROXY_FTP_PORT,
"/system/proxy/ftp_port",
- "ooInetFTPProxyPort",
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort"),
sal_False,
SETTING_PROXY_MODE
},
@@ -539,7 +546,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_NO_PROXY_FOR,
"/system/http_proxy/ignore_hosts",
- "ooInetNoProxy",
+ RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy"),
sal_True,
SETTING_PROXY_MODE
},
@@ -547,21 +554,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
},
@@ -569,7 +576,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
},
@@ -578,7 +585,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WRITER_DEFAULT_DOC_FORMAT,
"/apps/openoffice/writer_default_document_format",
- "TextDocumentSetupFactoryDefaultFilter",
+ RTL_CONSTASCII_STRINGPARAM("TextDocumentSetupFactoryDefaultFilter"),
sal_False,
SETTINGS_LAST
},
@@ -586,7 +593,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_IMPRESS_DEFAULT_DOC_FORMAT,
"/apps/openoffice/impress_default_document_format",
- "PresentationDocumentSetupFactoryDefaultFilter",
+ RTL_CONSTASCII_STRINGPARAM("PresentationDocumentSetupFactoryDefaultFilter"),
sal_False,
SETTINGS_LAST
},
@@ -594,7 +601,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_CALC_DEFAULT_DOC_FORMAT,
"/apps/openoffice/calc_default_document_format",
- "SpreadsheetDocumentSetupFactoryDefaultFilter",
+ RTL_CONSTASCII_STRINGPARAM("SpreadsheetDocumentSetupFactoryDefaultFilter"),
sal_False,
SETTINGS_LAST
},
@@ -602,7 +609,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_AUTO_SAVE,
GCONF_AUTO_SAVE_KEY,
- "AutoSaveEnabled",
+ RTL_CONSTASCII_STRINGPARAM("AutoSaveEnabled"),
sal_False,
SETTINGS_LAST
},
@@ -610,7 +617,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_AUTO_SAVE_INTERVAL,
"/apps/openoffice/auto_save_interval",
- "AutoSaveTimeIntervall",
+ RTL_CONSTASCII_STRINGPARAM("AutoSaveTimeIntervall"),
sal_False,
SETTING_AUTO_SAVE
},
@@ -618,7 +625,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USER_GIVENNAME,
"/desktop/gnome/url-handlers/mailto/command", // dummy
- "givenname",
+ RTL_CONSTASCII_STRINGPARAM("givenname"),
sal_True,
SETTING_USER_GIVENNAME
},
@@ -626,7 +633,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USER_SURNAME,
"/desktop/gnome/url-handlers/mailto/command", // dummy
- "sn",
+ RTL_CONSTASCII_STRINGPARAM("sn"),
sal_True,
SETTING_USER_SURNAME
},
@@ -634,7 +641,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_DISABLE_PRINTING,
"/desktop/gnome/lockdown/disable_printing",
- "DisablePrinting",
+ RTL_CONSTASCII_STRINGPARAM("DisablePrinting"),
sal_True,
SETTINGS_LAST
},
@@ -642,7 +649,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USE_SYSTEM_FILE_DIALOG,
"/apps/openoffice/use_system_file_dialog",
- "UseSystemFileDialog",
+ RTL_CONSTASCII_STRINGPARAM("UseSystemFileDialog"),
sal_False,
SETTINGS_LAST
},
@@ -650,7 +657,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_PRINTING_MODIFIES_DOCUMENT,
"/apps/openoffice/printing_modifies_doc",
- "PrintingModifiesDocument",
+ RTL_CONSTASCII_STRINGPARAM("PrintingModifiesDocument"),
sal_False,
SETTINGS_LAST
},
@@ -658,7 +665,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SHOW_ICONS_IN_MENUS,
"/apps/openoffice/show_menu_icons",
- "ShowIconsInMenues",
+ RTL_CONSTASCII_STRINGPARAM("ShowIconsInMenues"),
sal_False,
SETTINGS_LAST
},
@@ -666,7 +673,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SHOW_INACTIVE_MENUITEMS,
"/apps/openoffice/show_menu_inactive_items",
- "DontHideDisabledEntry",
+ RTL_CONSTASCII_STRINGPARAM("DontHideDisabledEntry"),
sal_False,
SETTINGS_LAST
},
@@ -674,7 +681,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SHOW_FONT_PREVIEW,
"/apps/openoffice/show_font_preview",
- "ShowFontBoxWYSIWYG",
+ RTL_CONSTASCII_STRINGPARAM("ShowFontBoxWYSIWYG"),
sal_False,
SETTINGS_LAST
},
@@ -682,7 +689,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SHOW_FONT_HISTORY,
"/apps/openoffice/show_font_history",
- "FontViewHistory",
+ RTL_CONSTASCII_STRINGPARAM("FontViewHistory"),
sal_False,
SETTINGS_LAST
},
@@ -690,7 +697,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_ENABLE_OPENGL,
"/apps/openoffice/use_opengl",
- "OpenGL",
+ RTL_CONSTASCII_STRINGPARAM("OpenGL"),
sal_False,
SETTINGS_LAST
},
@@ -698,7 +705,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_OPTIMIZE_OPENGL,
"/apps/openoffice/optimize_opengl",
- "OpenGL_Faster",
+ RTL_CONSTASCII_STRINGPARAM("OpenGL_Faster"),
sal_False,
SETTINGS_LAST
},
@@ -706,7 +713,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USE_SYSTEM_FONT,
"/apps/openoffice/use_system_font",
- "AccessibilityIsSystemFont",
+ RTL_CONSTASCII_STRINGPARAM("AccessibilityIsSystemFont"),
sal_False,
SETTINGS_LAST
},
@@ -714,7 +721,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_USE_FONT_ANTI_ALIASING,
"/apps/openoffice/use_font_anti_aliasing",
- "FontAntiAliasingEnabled",
+ RTL_CONSTASCII_STRINGPARAM("FontAntiAliasingEnabled"),
sal_False,
SETTINGS_LAST
},
@@ -722,7 +729,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
},
@@ -730,7 +737,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_CREATE_PDF,
"/apps/openoffice/lockdown/warn_info_create_pdf",
- "WarnCreatePDF",
+ RTL_CONSTASCII_STRINGPARAM("WarnCreatePDF"),
sal_False,
SETTINGS_LAST
},
@@ -738,7 +745,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_PRINT_DOC,
"/apps/openoffice/lockdown/warn_info_printing",
- "WarnPrintDoc",
+ RTL_CONSTASCII_STRINGPARAM("WarnPrintDoc"),
sal_False,
SETTINGS_LAST
},
@@ -746,7 +753,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_SAVEORSEND_DOC,
"/apps/openoffice/lockdown/warn_info_saving",
- "WarnSaveOrSendDoc",
+ RTL_CONSTASCII_STRINGPARAM("WarnSaveOrSendDoc"),
sal_False,
SETTINGS_LAST
},
@@ -754,7 +761,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_SIGN_DOC,
"/apps/openoffice/lockdown/warn_info_signing",
- "WarnSignDoc",
+ RTL_CONSTASCII_STRINGPARAM("WarnSignDoc"),
sal_False,
SETTINGS_LAST
},
@@ -762,7 +769,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_REMOVE_PERSONAL_INFO,
"/apps/openoffice/lockdown/remove_personal_info_on_save",
- "Scripting/RemovePersonalInfoOnSaving",
+ RTL_CONSTASCII_STRINGPARAM("RemovePersonalInfoOnSaving"),
sal_False,
SETTINGS_LAST
},
@@ -770,7 +777,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_RECOMMEND_PASSWORD,
"/apps/openoffice/lockdown/recommend_password_on_save",
- "RecommendPasswordProtection",
+ RTL_CONSTASCII_STRINGPARAM("RecommendPasswordProtection"),
sal_False,
SETTINGS_LAST
},
@@ -778,7 +785,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_UNDO_STEPS,
"/apps/openoffice/undo_steps",
- "UndoSteps",
+ RTL_CONSTASCII_STRINGPARAM("UndoSteps"),
sal_False,
SETTINGS_LAST
},
@@ -786,7 +793,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_SYMBOL_SET,
"/apps/openoffice/icon_size",
- "SymbolSet",
+ RTL_CONSTASCII_STRINGPARAM("SymbolSet"),
sal_True,
SETTINGS_LAST
},
@@ -794,7 +801,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_MACRO_SECURITY_LEVEL,
"/apps/openoffice/lockdown/macro_security_level",
- "MacroSecurityLevel",
+ RTL_CONSTASCII_STRINGPARAM("MacroSecurityLevel"),
sal_False,
SETTINGS_LAST
},
@@ -802,7 +809,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_CREATE_BACKUP,
"/apps/openoffice/create_backup",
- "CreateBackup",
+ RTL_CONSTASCII_STRINGPARAM("CreateBackup"),
sal_False,
SETTINGS_LAST
},
@@ -810,7 +817,7 @@ ConfigurationValue const ConfigurationValues[] =
{
SETTING_WARN_ALIEN_FORMAT,
"/apps/openoffice/warn_alien_format",
- "WarnAlienFormat",
+ RTL_CONSTASCII_STRINGPARAM("WarnAlienFormat"),
sal_False,
SETTINGS_LAST
},
@@ -818,26 +825,25 @@ ConfigurationValue const ConfigurationValues[] =
#endif // ENABLE_LOCKDOWN
};
-std::size_t const nConfigurationValues =
- sizeof ConfigurationValues / sizeof ConfigurationValues[0];
+std::size_t const nConfigurationValues = SAL_N_ELEMENTS(ConfigurationValues);
css::beans::Optional< css::uno::Any > getValue(ConfigurationValue const & data)
{
- GConfClient* aClient = getGconfClient();
- GConfValue* aGconfValue;
- if( ( data.nDependsOn == SETTINGS_LAST ) || isDependencySatisfied( aClient, data ) )
+ GConfClient* pClient = getGconfClient();
+ GConfValue* pGconfValue;
+ if( ( data.nDependsOn == SETTINGS_LAST ) || isDependencySatisfied( pClient, data ) )
{
- aGconfValue = gconf_client_get( aClient, data.GconfItem, NULL );
+ pGconfValue = gconf_client_get( pClient, data.GconfItem, NULL );
- if( aGconfValue != NULL )
+ if( pGconfValue != NULL )
{
css::uno::Any value;
if( data.bNeedsTranslation )
- value = translateToOOo( data, aGconfValue );
+ value = translateToOOo( data, pGconfValue );
else
- value = makeAnyOfGconfValue( aGconfValue );
+ value = makeAnyOfGconfValue( pGconfValue );
- gconf_value_free( aGconfValue );
+ gconf_value_free( pGconfValue );
return css::beans::Optional< css::uno::Any >(true, value);
}
@@ -846,3 +852,5 @@ css::beans::Optional< css::uno::Any > getValue(ConfigurationValue const & data)
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */