regpathhelper.cxx (dde7d3fa) regpathhelper.cxx (49b34792)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 89 unchanged lines hidden (view full) ---

98{
99 OUString uBuffer, userRegistryName;
100 OUString portalUserDir;
101
102 sal_Bool bIsPortalUser = retrievePortalUserDir( &portalUserDir );
103
104 if ( bIsPortalUser )
105 {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 89 unchanged lines hidden (view full) ---

98{
99 OUString uBuffer, userRegistryName;
100 OUString portalUserDir;
101
102 sal_Bool bIsPortalUser = retrievePortalUserDir( &portalUserDir );
103
104 if ( bIsPortalUser )
105 {
106 if( portalUserDir.getLength() )
106 if( !portalUserDir.isEmpty() )
107 {
108 FileBase::getFileURLFromSystemPath( portalUserDir , portalUserDir );
109 userRegistryName = portalUserDir;
110 userRegistryName += OUString( RTL_CONSTASCII_USTRINGPARAM(
111 "/user/" REGISTRY_LOCAL_NAME ) );
112
113 // Directory creation is probably necessary for bootstrapping a new
114 // user in the portal environment (the ucb uses this function).

--- 37 unchanged lines hidden (view full) ---

152
153OUString getPathToUserRegistry()
154{
155 OUString userRegistryName;
156 FILE *f=NULL;
157
158 // search the environment STAR_USER_REGISTRY
159 OString sBuffer( getenv(USER_REGISTRY_NAME_ENV) );
107 {
108 FileBase::getFileURLFromSystemPath( portalUserDir , portalUserDir );
109 userRegistryName = portalUserDir;
110 userRegistryName += OUString( RTL_CONSTASCII_USTRINGPARAM(
111 "/user/" REGISTRY_LOCAL_NAME ) );
112
113 // Directory creation is probably necessary for bootstrapping a new
114 // user in the portal environment (the ucb uses this function).

--- 37 unchanged lines hidden (view full) ---

152
153OUString getPathToUserRegistry()
154{
155 OUString userRegistryName;
156 FILE *f=NULL;
157
158 // search the environment STAR_USER_REGISTRY
159 OString sBuffer( getenv(USER_REGISTRY_NAME_ENV) );
160 if ( sBuffer.getLength() > 0 )
160 if ( !sBuffer.isEmpty() )
161 {
162 f = fopen( sBuffer.getStr(), "r" );
163
164 if (f != NULL)
165 {
166 fclose(f);
167 userRegistryName = OStringToOUString( sBuffer, osl_getThreadTextEncoding() );
168 }
169 }
170
161 {
162 f = fopen( sBuffer.getStr(), "r" );
163
164 if (f != NULL)
165 {
166 fclose(f);
167 userRegistryName = OStringToOUString( sBuffer, osl_getThreadTextEncoding() );
168 }
169 }
170
171 if ( !userRegistryName.getLength() )
171 if ( userRegistryName.isEmpty() )
172 {
173 userRegistryName = getDefaultLocalRegistry();
174 }
175
176 return userRegistryName;
177}
178
179OUString getPathToSystemRegistry()

--- 21 unchanged lines hidden (view full) ---

201 f = fopen( tmpStr.getStr(), "r" );
202 }
203 }
204
205 if (f == NULL)
206 {
207 // search the environment STAR_REGISTRY
208 OString tmpStr( getenv(SYSTEM_REGISTRY_NAME_ENV) );
172 {
173 userRegistryName = getDefaultLocalRegistry();
174 }
175
176 return userRegistryName;
177}
178
179OUString getPathToSystemRegistry()

--- 21 unchanged lines hidden (view full) ---

201 f = fopen( tmpStr.getStr(), "r" );
202 }
203 }
204
205 if (f == NULL)
206 {
207 // search the environment STAR_REGISTRY
208 OString tmpStr( getenv(SYSTEM_REGISTRY_NAME_ENV) );
209 if ( tmpStr.getLength() > 0 )
209 if ( !tmpStr.isEmpty() )
210 {
211 f = fopen(tmpStr.getStr(), "r");
212
213 if (f != NULL)
214 {
215 fclose(f);
216 systemRegistryName = OStringToOUString( tmpStr, osl_getThreadTextEncoding() );
217 } else

--- 14 unchanged lines hidden ---
210 {
211 f = fopen(tmpStr.getStr(), "r");
212
213 if (f != NULL)
214 {
215 fclose(f);
216 systemRegistryName = OStringToOUString( tmpStr, osl_getThreadTextEncoding() );
217 } else

--- 14 unchanged lines hidden ---