[Libreoffice-commits] core.git: desktop/win32
Stephan Bergmann
sbergman at redhat.com
Tue Apr 5 08:15:00 UTC 2016
desktop/win32/source/officeloader/officeloader.cxx | 36 ---------------------
1 file changed, 36 deletions(-)
New commits:
commit 856f7fc68683b2ed92f65bd79f1b6a23570e06cb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Apr 5 10:14:36 2016 +0200
-Werror,-Wunused-function
Change-Id: I2d0a21b0f38feafa6e3fde0245b1fdb9b5771152
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index 68c2e55..3f9760f 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -56,42 +56,6 @@ static LPTSTR *GetCommandArgs( int *pArgc )
#endif
}
-
-namespace {
-
-bool writeArgument(HANDLE pipe, char prefix, WCHAR const * argument) {
- CHAR szBuffer[4096];
- int n = WideCharToMultiByte(
- CP_UTF8, 0, argument, -1, szBuffer, sizeof (szBuffer), NULL, NULL);
- char b[1 + 2 * ((sizeof szBuffer) - 1)]; // hopefully does not overflow
- b[0] = prefix;
- char * p = b + 1;
- for (int i = 0; i < n - 1; ++i) { // cannot underflow (n >= 0)
- char c = szBuffer[i];
- switch (c) {
- case '\0':
- *p++ = '\\';
- *p++ = '0';
- break;
- case ',':
- *p++ = '\\';
- *p++ = ',';
- break;
- case '\\':
- *p++ = '\\';
- *p++ = '\\';
- break;
- default:
- *p++ = c;
- break;
- }
- }
- DWORD w;
- return WriteFile(pipe, b, p - b, &w, NULL);
-}
-
-}
-
#ifdef __MINGW32__
int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
#else
More information about the Libreoffice-commits
mailing list