summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/emf-win32-inout.cpp
diff options
context:
space:
mode:
authorJasper van de Gronde <jasper.vandegronde@gmail.com>2011-04-15 07:17:08 +0000
committerJasper van de Gronde <jasper.vandegronde@gmail.com>2011-04-15 07:17:08 +0000
commitc260fcd615791615b33f55459dabe38e64ee3471 (patch)
tree0eb19c8b2ccae81bad3ce9ea16df296e29fc8245 /src/extension/internal/emf-win32-inout.cpp
parentFix a rounding error that resulted in seams at some zoom levels when (diff)
downloadinkscape-c260fcd615791615b33f55459dabe38e64ee3471.tar.gz
inkscape-c260fcd615791615b33f55459dabe38e64ee3471.zip
No more PrintWin32, including no special cases for non-Unicode Windows anymore.
(bzr r9508.1.82)
Diffstat (limited to 'src/extension/internal/emf-win32-inout.cpp')
-rw-r--r--src/extension/internal/emf-win32-inout.cpp40
1 files changed, 8 insertions, 32 deletions
diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp
index 979be1b63..2716faee2 100644
--- a/src/extension/internal/emf-win32-inout.cpp
+++ b/src/extension/internal/emf-win32-inout.cpp
@@ -42,7 +42,6 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include "win32.h"
#include "emf-win32-print.h"
#include "emf-win32-inout.h"
@@ -2262,12 +2261,7 @@ EmfWin32::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
HMETAFILE hmf;
HENHMETAFILE hemf;
- if (PrintWin32::is_os_wide()) {
- fp = CreateFileW(unicode_uri, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- }
- else {
- fp = CreateFileA(ansi_uri, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- }
+ fp = CreateFileW(unicode_uri, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if ( fp != INVALID_HANDLE_VALUE ) {
filesize = GetFileSize(fp, NULL);
@@ -2275,36 +2269,21 @@ EmfWin32::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
}
// Try open as Enhanced Metafile
- if (PrintWin32::is_os_wide())
- hemf = GetEnhMetaFileW(unicode_uri);
- else
- hemf = GetEnhMetaFileA(ansi_uri);
+ hemf = GetEnhMetaFileW(unicode_uri);
if (!hemf) {
// Try open as Windows Metafile
- if (PrintWin32::is_os_wide())
- hmf = GetMetaFileW(unicode_uri);
- else
- hmf = GetMetaFileA(ansi_uri);
+ hmf = GetMetaFileW(unicode_uri);
METAFILEPICT mp;
HDC hDC;
if (!hmf) {
- if (PrintWin32::is_os_wide()) {
- WCHAR szTemp[MAX_PATH];
+ WCHAR szTemp[MAX_PATH];
- DWORD dw = GetShortPathNameW( unicode_uri, szTemp, MAX_PATH );
- if (dw) {
- hmf = GetMetaFileW( szTemp );
- }
- } else {
- CHAR szTemp[MAX_PATH];
-
- DWORD dw = GetShortPathNameA( ansi_uri, szTemp, MAX_PATH );
- if (dw) {
- hmf = GetMetaFileA( szTemp );
- }
+ DWORD dw = GetShortPathNameW( unicode_uri, szTemp, MAX_PATH );
+ if (dw) {
+ hmf = GetMetaFileW( szTemp );
}
}
@@ -2351,10 +2330,7 @@ EmfWin32::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
else {
// Try open as Aldus Placeable Metafile
HANDLE hFile;
- if (PrintWin32::is_os_wide())
- hFile = CreateFileW( unicode_uri, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
- else
- hFile = CreateFileA( ansi_uri, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
+ hFile = CreateFileW( unicode_uri, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
if (hFile != INVALID_HANDLE_VALUE) {
DWORD nSize = GetFileSize( hFile, NULL );