sendreportw32.cxx (ff3f4ebc) sendreportw32.cxx (599cc5b4)
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

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

88 namespace DocRecovery{
89
90 bool ErrorRepSendDialog::ReadParams()
91 {
92 _TCHAR szBuffer[2048];
93
94 if ( ERROR_SUCCESS == RegReadValue(
95 HKEY_CURRENT_USER,
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

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

88 namespace DocRecovery{
89
90 bool ErrorRepSendDialog::ReadParams()
91 {
92 _TCHAR szBuffer[2048];
93
94 if ( ERROR_SUCCESS == RegReadValue(
95 HKEY_CURRENT_USER,
96 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
96 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
97 TEXT("HTTPProxyServer"),
98 szBuffer,
99 sizeof(szBuffer) ) )
100 maParams.maHTTPProxyServer = (sal_Unicode *)szBuffer;
101
102 DWORD dwProxyPort;
103 if ( ERROR_SUCCESS == RegReadValue(
104 HKEY_CURRENT_USER,
97 TEXT("HTTPProxyServer"),
98 szBuffer,
99 sizeof(szBuffer) ) )
100 maParams.maHTTPProxyServer = (sal_Unicode *)szBuffer;
101
102 DWORD dwProxyPort;
103 if ( ERROR_SUCCESS == RegReadValue(
104 HKEY_CURRENT_USER,
105 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
105 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
106 TEXT("HTTPProxyPort"),
107 &dwProxyPort,
108 sizeof(dwProxyPort) ) )
109 {
110 _stprintf( szBuffer, _T("%d"), dwProxyPort );
111 maParams.maHTTPProxyPort = (sal_Unicode *)szBuffer;
112 }
113
114 if ( ERROR_SUCCESS == RegReadValue(
115 HKEY_CURRENT_USER,
106 TEXT("HTTPProxyPort"),
107 &dwProxyPort,
108 sizeof(dwProxyPort) ) )
109 {
110 _stprintf( szBuffer, _T("%d"), dwProxyPort );
111 maParams.maHTTPProxyPort = (sal_Unicode *)szBuffer;
112 }
113
114 if ( ERROR_SUCCESS == RegReadValue(
115 HKEY_CURRENT_USER,
116 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
116 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
117 TEXT("ReturnAddress"),
118 szBuffer,
119 sizeof(szBuffer) ) )
120 maEMailAddrED.SetText( (sal_Unicode *)szBuffer );
121
122 DWORD fAllowContact = sal_False;
123 RegReadValue(
124 HKEY_CURRENT_USER,
117 TEXT("ReturnAddress"),
118 szBuffer,
119 sizeof(szBuffer) ) )
120 maEMailAddrED.SetText( (sal_Unicode *)szBuffer );
121
122 DWORD fAllowContact = sal_False;
123 RegReadValue(
124 HKEY_CURRENT_USER,
125 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
125 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
126 TEXT("AllowContact"),
127 &fAllowContact,
128 sizeof(fAllowContact) );
129 maContactCB.Check( (sal_Bool)fAllowContact );
130
131 DWORD uInternetConnection = 0;
132 RegReadValue(
133 HKEY_CURRENT_USER,
126 TEXT("AllowContact"),
127 &fAllowContact,
128 sizeof(fAllowContact) );
129 maContactCB.Check( (sal_Bool)fAllowContact );
130
131 DWORD uInternetConnection = 0;
132 RegReadValue(
133 HKEY_CURRENT_USER,
134 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
134 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
135 TEXT("HTTPConnection"),
136 &uInternetConnection,
137 sizeof(uInternetConnection) );
138 maParams.miHTTPConnectionType = uInternetConnection;
139
140 return true;
141 }
142
143 bool ErrorRepSendDialog::SaveParams()
144 {
145 const _TCHAR *lpHTTPProxyServer = reinterpret_cast<LPCTSTR>(maParams.maHTTPProxyServer.GetBuffer());
146 RegWriteValue(
147 HKEY_CURRENT_USER,
135 TEXT("HTTPConnection"),
136 &uInternetConnection,
137 sizeof(uInternetConnection) );
138 maParams.miHTTPConnectionType = uInternetConnection;
139
140 return true;
141 }
142
143 bool ErrorRepSendDialog::SaveParams()
144 {
145 const _TCHAR *lpHTTPProxyServer = reinterpret_cast<LPCTSTR>(maParams.maHTTPProxyServer.GetBuffer());
146 RegWriteValue(
147 HKEY_CURRENT_USER,
148 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
148 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
149 TEXT("HTTPProxyServer"), REG_SZ,
150 lpHTTPProxyServer,
151 sizeof(TCHAR) * (_tcslen(lpHTTPProxyServer) + 1) );
152
153 _TCHAR* endptr = NULL;
154 DWORD dwProxyPort = _tcstoul( reinterpret_cast<LPCTSTR>(maParams.maHTTPProxyPort.GetBuffer()), &endptr, 10 );
155
156 RegWriteValue(
157 HKEY_CURRENT_USER,
149 TEXT("HTTPProxyServer"), REG_SZ,
150 lpHTTPProxyServer,
151 sizeof(TCHAR) * (_tcslen(lpHTTPProxyServer) + 1) );
152
153 _TCHAR* endptr = NULL;
154 DWORD dwProxyPort = _tcstoul( reinterpret_cast<LPCTSTR>(maParams.maHTTPProxyPort.GetBuffer()), &endptr, 10 );
155
156 RegWriteValue(
157 HKEY_CURRENT_USER,
158 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
158 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
159 TEXT("HTTPProxyPort"), REG_DWORD,
160 &dwProxyPort,
161 sizeof(DWORD) );
162
163 DWORD fAllowContact = IsContactAllowed();
164 RegWriteValue(
165 HKEY_CURRENT_USER,
159 TEXT("HTTPProxyPort"), REG_DWORD,
160 &dwProxyPort,
161 sizeof(DWORD) );
162
163 DWORD fAllowContact = IsContactAllowed();
164 RegWriteValue(
165 HKEY_CURRENT_USER,
166 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
166 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
167 TEXT("AllowContact"), REG_DWORD,
168 &fAllowContact,
169 sizeof(DWORD) );
170
171
172 DWORD uInternetConnection = maParams.miHTTPConnectionType;
173
174 RegWriteValue(
175 HKEY_CURRENT_USER,
167 TEXT("AllowContact"), REG_DWORD,
168 &fAllowContact,
169 sizeof(DWORD) );
170
171
172 DWORD uInternetConnection = maParams.miHTTPConnectionType;
173
174 RegWriteValue(
175 HKEY_CURRENT_USER,
176 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
176 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
177 TEXT("HTTPConnection"), REG_DWORD,
178 &uInternetConnection,
179 sizeof(DWORD) );
180
181 const _TCHAR *lpEmail = reinterpret_cast<LPCTSTR>(GetEMailAddress().GetBuffer());
182 RegWriteValue(
183 HKEY_CURRENT_USER,
177 TEXT("HTTPConnection"), REG_DWORD,
178 &uInternetConnection,
179 sizeof(DWORD) );
180
181 const _TCHAR *lpEmail = reinterpret_cast<LPCTSTR>(GetEMailAddress().GetBuffer());
182 RegWriteValue(
183 HKEY_CURRENT_USER,
184 TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
184 TEXT("SOFTWARE\\OpenOffice\\CrashReport"),
185 TEXT("ReturnAddress"), REG_SZ,
186 lpEmail,
187 sizeof(TCHAR) * (_tcslen(lpEmail) + 1) );
188
189 return true;
190 }
191
192 bool ErrorRepSendDialog::SendReport()

--- 64 unchanged lines hidden ---
185 TEXT("ReturnAddress"), REG_SZ,
186 lpEmail,
187 sizeof(TCHAR) * (_tcslen(lpEmail) + 1) );
188
189 return true;
190 }
191
192 bool ErrorRepSendDialog::SendReport()

--- 64 unchanged lines hidden ---