[Bug 82580] New: get rid of prewin.h / postwin.h wrapper headers

2014-08-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=82580

  Priority: medium
Bug ID: 82580
CC: libreoffice@lists.freedesktop.org
  Assignee: libreoffice-b...@lists.freedesktop.org
   Summary: get rid of prewin.h / postwin.h wrapper headers
  Severity: normal
Classification: Unclassified
OS: Windows (All)
  Reporter: mst...@redhat.com
  Hardware: Other
Status: NEW
   Version: Inherited From OOo
 Component: Libreoffice
   Product: LibreOffice

includes of Win32 headers in LO are wrapped with
#include prewin.h
and
#include postwin.h

this is because old LO code, especially in tools and vcl,
defines types that have the same names as Win32 types,
so the headers do a bunch of stupid macro hackery
to rename the Win32 types so they don't collide with LO types.

it would be obviously much simpler if the LO types
simply had names that don't collide with Win32 types.

git grep or ctags or opengrok.libreoffice.org
should find the definitions of types in LO that are re-defined
in the wrapper headers.

there are several ways to clean up collisions:

1) if there is no equivalent in LO of the redefined type,
   it can just be removed from the wrapper header

2) in some cases it can be avoided to have the Win32 type
   and the LO type visible in the same LO source file
   by not including both the defining LO and Win32 headers

3) if the Win32 type is not a macro, then putting the LO
   type into a namespace and namespace-qualifying the uses
   should avoid the collisions

4) if the Win32 type is a macro, then adding a namespace-like
   prefix to the LO type is probably required

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-bugs] [Bug 82580] New: get rid of prewin.h / postwin.h wrapper headers

2014-08-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=82580

  Priority: medium
Bug ID: 82580
CC: libreoff...@lists.freedesktop.org
  Assignee: libreoffice-bugs@lists.freedesktop.org
   Summary: get rid of prewin.h / postwin.h wrapper headers
  Severity: normal
Classification: Unclassified
OS: Windows (All)
  Reporter: mst...@redhat.com
  Hardware: Other
Status: NEW
   Version: Inherited From OOo
 Component: Libreoffice
   Product: LibreOffice

includes of Win32 headers in LO are wrapped with
#include prewin.h
and
#include postwin.h

this is because old LO code, especially in tools and vcl,
defines types that have the same names as Win32 types,
so the headers do a bunch of stupid macro hackery
to rename the Win32 types so they don't collide with LO types.

it would be obviously much simpler if the LO types
simply had names that don't collide with Win32 types.

git grep or ctags or opengrok.libreoffice.org
should find the definitions of types in LO that are re-defined
in the wrapper headers.

there are several ways to clean up collisions:

1) if there is no equivalent in LO of the redefined type,
   it can just be removed from the wrapper header

2) in some cases it can be avoided to have the Win32 type
   and the LO type visible in the same LO source file
   by not including both the defining LO and Win32 headers

3) if the Win32 type is not a macro, then putting the LO
   type into a namespace and namespace-qualifying the uses
   should avoid the collisions

4) if the Win32 type is a macro, then adding a namespace-like
   prefix to the LO type is probably required

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs