[Libreoffice-commits] .: framework/source
August Sodora
augsod at kemper.freedesktop.org
Mon Nov 21 16:58:42 PST 2011
framework/source/lomenubar/FrameJob.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 487968707f9ea36f3873a9349ebb87655f6abb3d
Author: August Sodora <augsod at gmail.com>
Date: Mon Nov 21 19:56:51 2011 -0500
cppcheck: C-style pointer casting
diff --git a/framework/source/lomenubar/FrameJob.cxx b/framework/source/lomenubar/FrameJob.cxx
index 06af939..fd9d5da 100644
--- a/framework/source/lomenubar/FrameJob.cxx
+++ b/framework/source/lomenubar/FrameJob.cxx
@@ -153,7 +153,7 @@ on_registrar_available (GDBusConnection * /*connection*/,
GError *error = NULL;
GDBusProxy *proxy;
- FrameHelper *helper = (FrameHelper*)user_data;
+ FrameHelper *helper = static_cast<FrameHelper*>(user_data);
unsigned long xid = helper->getXID();
proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
@@ -207,7 +207,7 @@ on_registrar_unavailable (GDBusConnection * /*connection*/,
//TODO: Unregister window?
// Show menubar
- FrameHelper *helper = (FrameHelper*)user_data;
+ FrameHelper *helper = static_cast<FrameHelper*>(user_data);
Reference < XFrame > xFrame = helper->getFrame ();
Reference< XPropertySet > frameProps (xFrame, UNO_QUERY);
Reference < XLayoutManager > xLayoutManager(frameProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager"))),
@@ -343,8 +343,9 @@ FrameJob::getRootMenuitem (Reference < XMenu > xMenu, gpointer helper)
{
DbusmenuMenuitem *root = dbusmenu_menuitem_new_with_id (0);
- ((FrameHelper*)helper)->setRootItem(root);
- ((FrameHelper*)helper)->rebuildMenu (xMenu, root);
+ FrameHelper* fHelper = static_cast<FrameHelper*>(helper);
+ fHelper->setRootItem(root);
+ fHelper->rebuildMenu (xMenu, root);
return root;
}
More information about the Libreoffice-commits
mailing list