Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


https://bugs.freedesktop.org/show_bug.cgi?id=82579

--- Comment #3 from Tor Lillqvist <tml@iki.fi> ---
I guess handling TimeValue will be problematic here, as it is defined in a
stable API header, <osl/time.h>.

OK to break API (and ABI?) by renaming TimeValue there to OslTimeValue?

Or is something more complicated needed to hide the osl TimeValue in those
(relatively few?) source files that include both the <osl/time.h> and Mac and
iOS system headers? A start of an attempt at that would be as below:

diff --git a/include/postmac.h b/include/postmac.h
index a0cc11b..b489d67 100644
--- a/include/postmac.h
+++ b/include/postmac.h
@@ -21,6 +21,5 @@
 #undef Point
 #undef Polygon
 #undef Size
-#undef TimeValue

 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/premac.h b/include/premac.h
index f22c193..ee201c9 100644
--- a/include/premac.h
+++ b/include/premac.h
@@ -21,6 +21,5 @@
 #define Point MacOSPoint
 #define Polygon MacOSPolygon
 #define Size MacOSSize
-#define TimeValue MacOSTimeValue

 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 8a88a26..2a3032d 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -20,6 +20,8 @@
 #ifndef INCLUDED_VCL_INC_OSX_SALINST_H
 #define INCLUDED_VCL_INC_OSX_SALINST_H

+#include "quartz/hide-osl-timevalue.h"
+
 #include "comphelper/solarmutex.hxx"
 #include "osl/thread.hxx"
 #include "osl/conditn.h"
diff --git a/vcl/osx/a11ycomponentwrapper.mm b/vcl/osx/a11ycomponentwrapper.mm
index b91029d..5a2d52a 100644
--- a/vcl/osx/a11ycomponentwrapper.mm
+++ b/vcl/osx/a11ycomponentwrapper.mm
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */

+#include "quartz/hide-osl-timevalue.h"
+
 #include "quartz/utils.h"
 #include "a11ycomponentwrapper.h"
 #include "a11yrolehelper.h"
diff --git a/vcl/osx/a11yfactory.mm b/vcl/osx/a11yfactory.mm
index 30437a8..3437565 100644
--- a/vcl/osx/a11yfactory.mm
+++ b/vcl/osx/a11yfactory.mm
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */

-
 #include "osx/salinst.h"
 #include "osx/a11yfactory.h"
 #include "osx/a11yfocustracker.hxx"
diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm
index 45423db..2e1aee3 100644
--- a/vcl/osx/a11yrolehelper.mm
+++ b/vcl/osx/a11yrolehelper.mm
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */

+#include "quartz/hide-osl-timevalue.h"

 #include "osx/a11yfactory.h"

diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm
index e2db4c3..35fc28a 100644
--- a/vcl/osx/printaccessoryview.mm
+++ b/vcl/osx/printaccessoryview.mm
@@ -19,6 +19,8 @@

 #include "sal/config.h"

+#include "quartz/hide-osl-timevalue.h"
+
 #include "tools/resary.hxx"

 #include "vcl/print.hxx"
diff --git a/vcl/osx/printview.mm b/vcl/osx/printview.mm
index 8b324b9..498e9ed 100644
--- a/vcl/osx/printview.mm
+++ b/vcl/osx/printview.mm
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */

+#include "quartz/hide-osl-timevalue.h"

 #include "vcl/print.hxx"

diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx
index f4dc179..0a94673 100644
--- a/vcl/osx/saldata.cxx
+++ b/vcl/osx/saldata.cxx
@@ -19,6 +19,8 @@

 #include <config_features.h>

+#include "quartz/hide-osl-timevalue.h"
+
 #include "osx/saldata.hxx"
 #include "osx/salnsmenu.h"
 #include "osx/salinst.h"
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 8e74086..fbedacf 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */

+#include "quartz/hide-osl-timevalue.h"
+
 #include <sal/alloca.h>
 #include <sal/macros.h>

diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index d8adf03..8223214 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -21,6 +21,8 @@

 #include <stdio.h>

+#include "quartz/hide-osl-timevalue.h"
+
 #include <tools/solarmutex.hxx>

 #include "osl/process.h"
@@ -665,7 +667,7 @@ void AquaSalInstance::Yield( bool bWait, bool
bHandleAllCurrentEvents )
         // wait until any thread (most likely the main thread)
         // has dispatched an event, cop out at 200 ms
         osl_resetCondition( maWaitingYieldCond );
-        TimeValue aVal = { 0, 200000000 };
+        OslTimeValue aVal = { 0, 200000000 };
         sal_uLong nCount = ReleaseYieldMutex();
         osl_waitCondition( maWaitingYieldCond, &aVal );
         AcquireYieldMutex( nCount );
diff --git a/vcl/osx/salsys.cxx b/vcl/osx/salsys.cxx
index f10ba61..b75d249 100644
--- a/vcl/osx/salsys.cxx
+++ b/vcl/osx/salsys.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */

+#include "quartz/hide-osl-timevalue.h"
+
 #include "rtl/ustrbuf.hxx"

 #include "vcl/button.hxx"
diff --git a/vcl/osx/saltimer.cxx b/vcl/osx/saltimer.cxx
index 17c4d80..ff3fd49 100644
--- a/vcl/osx/saltimer.cxx
+++ b/vcl/osx/saltimer.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */

+#include "quartz/hide-osl-timevalue.h"
+
 #include "osx/saltimer.h"
 #include "osx/salnstimer.h"
 #include "osx/saldata.hxx"
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index d1d086f..4955ae2 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -19,6 +19,8 @@

 #include <config_features.h>

+#include "quartz/hide-osl-timevalue.h"
+
 #include "sal/config.h"

 #include <vector>
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index cd9771a..de076e6 100644
--- a/vcl/quartz/ctlayout.cxx
+++ b/vcl/quartz/ctlayout.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */

+#include "quartz/hide-osl-timevalue.h"
+
 #include <sal/types.h>
 #include <boost/ptr_container/ptr_vector.hpp>
 #include "tools/debug.hxx"
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 80d6d5e..7130f7d 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -21,10 +21,7 @@

 #include "sal/config.h"

-#include "osl/file.hxx"
-#include "osl/process.h"
-
-#include "osl/mutex.hxx"
+#include "quartz/hide-osl-timevalue.h"

 #include "rtl/bootstrap.h"
 #include "rtl/strbuf.hxx"
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 85b4528..d32d61e 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -52,7 +52,6 @@
 #include "vcl/unohelp2.hxx"

 #include "salinst.hxx"
-#include "svsys.h"

 #include "com/sun/star/i18n/XCharacterClassification.hpp"

diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index a30fd34..90015f6 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -21,7 +21,6 @@

 #include <officecfg/Office/Common.hxx>

-#include <svsys.h>
 #include "comphelper/processfactory.hxx"
 #include <rtl/bootstrap.hxx>
 #include "tools/debug.hxx"
diff --git a/vcl/source/window/accessibility.cxx
b/vcl/source/window/accessibility.cxx
index 0f3b416..720dd4f 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -54,10 +54,6 @@
 #include "vcl/virdev.hxx"
 #include "vcl/settings.hxx"

-// declare system types in sysdata.hxx
-#include "svsys.h"
-#include "vcl/sysdata.hxx"
-
 #include "salframe.hxx"
 #include "salobj.hxx"
 #include "salinst.hxx"
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 78c31f1..d930c3d 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -24,9 +24,6 @@

 #include <tools/rc.h>

-// declare system types in sysdata.hxx
-#include <svsys.h>
-
 #include <vcl/window.hxx>
 #include <vcl/sysdata.hxx>
 #include <vcl/svapp.hxx>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.