[Libreoffice-commits] core.git: vcl/osx
Tor Lillqvist
tml at collabora.com
Fri Jun 13 11:08:32 PDT 2014
vcl/osx/salnativewidgets.cxx | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit b8bee05dbf85bc4f5834520aa5d64e9ae18aba4e
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Jun 13 11:37:51 2014 +0300
Don't use the CoreUI private framework when sandboxed (i.e., for App Store)
This conditionally reverts 0c7e6080519014f1fb345ed25e2f12c9a043b3ae.
Change-Id: I462016cd43c489fced7fb3739aa98c521d52f78e
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index da756f0..5aebe47 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "vcl/salnativewidgets.hxx"
#include "vcl/decoview.hxx"
#include "vcl/svapp.hxx"
@@ -36,6 +38,8 @@
#define NSAppKitVersionNumber10_7 1138
#endif
+#if !HAVE_FEATURE_MACOSX_SANDBOX
+
extern "C"
{
typedef CFTypeRef CUIRendererRef;
@@ -46,6 +50,8 @@ extern "C"
+ (CUIRendererRef)coreUIRenderer;
@end
+#endif
+
class AquaBlinker : public Timer
{
AquaSalFrame* mpFrame;
@@ -535,6 +541,13 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
case CTRL_TOOLBAR:
{
+#if HAVE_FEATURE_MACOSX_SANDBOX
+ HIThemeMenuItemDrawInfo aMenuItemDrawInfo;
+ aMenuItemDrawInfo.version = 0;
+ aMenuItemDrawInfo.state = kThemeMenuActive;
+ aMenuItemDrawInfo.itemType = kThemeMenuItemHierBackground;
+ HIThemeDrawMenuItem(&rc,&rc,&aMenuItemDrawInfo,mrContext,kHIThemeOrientationNormal,NULL);
+#else
if (rControlRegion.Top() == 0 && nPart == PART_DRAW_BACKGROUND_HORZ)
{
BOOL isMain = [mpFrame->getNSWindow() isMainWindow];
@@ -559,6 +572,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
aMenuItemDrawInfo.itemType = kThemeMenuItemHierBackground;
HIThemeDrawMenuItem(&rc, &rc, &aMenuItemDrawInfo, mrContext, kHIThemeOrientationNormal, NULL);
}
+#endif
bOK = true;
}
break;
More information about the Libreoffice-commits
mailing list