diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-08-30 23:23:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-31 09:04:17 +0200 |
commit | 56d7b9db443f5ace23677629869ffbd599e43d69 (patch) | |
tree | 590f9f4297bf007f50b7131b05a81e88a99cb21b /vcl | |
parent | 146a4ec3bdedede32fcc3a9b2039351dfe44b5db (diff) |
-Werror,-Wunused-private-field (Clang towards 3.2)
Change-Id: I3bb7559101c27eacefbf43f751f96135f8792845
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/aqua/source/dtrans/DragSource.cxx | 8 | ||||
-rw-r--r-- | vcl/aqua/source/dtrans/DragSourceContext.cxx | 5 | ||||
-rw-r--r-- | vcl/aqua/source/dtrans/DragSourceContext.hxx | 7 | ||||
-rw-r--r-- | vcl/inc/aqua/salgdicommon.hxx | 30 |
4 files changed, 23 insertions, 27 deletions
diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx index 2cf2722d6001..c1c381f836f3 100644 --- a/vcl/aqua/source/dtrans/DragSource.cxx +++ b/vcl/aqua/source/dtrans/DragSource.cxx @@ -119,7 +119,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames() (void)anImage; (void)aPoint; DragSourceDragEvent dsde(static_cast<OWeakObject*>(mDragSource), - new DragSourceContext(mDragSource), + new DragSourceContext, mDragSource, DNDConstants::ACTION_COPY, DNDConstants::ACTION_COPY); @@ -139,7 +139,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames() bDropSuccess = DragSource::g_DropSuccess; DragSourceDropEvent dsde(static_cast<OWeakObject*>(mDragSource), - new DragSourceContext(mDragSource), + new DragSourceContext, static_cast< XDragSource* >(mDragSource), SystemToOfficeDragActions(operation), bDropSuccess ); @@ -154,7 +154,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames() (void)draggedImage; (void)screenPoint; DragSourceDragEvent dsde(static_cast<OWeakObject*>(mDragSource), - new DragSourceContext(mDragSource), + new DragSourceContext, mDragSource, DNDConstants::ACTION_COPY, DNDConstants::ACTION_COPY); @@ -263,7 +263,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger, trigger.Event >>= mMouseEvent; m_MouseButton= mMouseEvent.Buttons; mXDragSrcListener = listener; - mXCurrentContext = static_cast<XDragSourceContext*>(new DragSourceContext(this)); + mXCurrentContext = static_cast<XDragSourceContext*>(new DragSourceContext); auto_ptr<AquaClipboard> clipb(new AquaClipboard(NULL, false)); g_XTransferable = transferable; clipb->setContents(g_XTransferable, uno::Reference<XClipboardOwner>()); diff --git a/vcl/aqua/source/dtrans/DragSourceContext.cxx b/vcl/aqua/source/dtrans/DragSourceContext.cxx index 82d161f9c1f0..b5689c133c3d 100644 --- a/vcl/aqua/source/dtrans/DragSourceContext.cxx +++ b/vcl/aqua/source/dtrans/DragSourceContext.cxx @@ -28,9 +28,8 @@ using namespace com::sun::star::datatransfer::dnd::DNDConstants; using namespace com::sun::star::uno; using namespace cppu; -DragSourceContext::DragSourceContext( DragSource* pSource) : - WeakComponentImplHelper1<XDragSourceContext>(m_aMutex), - m_pDragSource( pSource) +DragSourceContext::DragSourceContext() : + WeakComponentImplHelper1<XDragSourceContext>(m_aMutex) { } diff --git a/vcl/aqua/source/dtrans/DragSourceContext.hxx b/vcl/aqua/source/dtrans/DragSourceContext.hxx index 99f0a629b0cf..100edef7828b 100644 --- a/vcl/aqua/source/dtrans/DragSourceContext.hxx +++ b/vcl/aqua/source/dtrans/DragSourceContext.hxx @@ -27,8 +27,6 @@ #include <boost/utility.hpp> -#include "DragSource.hxx" - // This class fires events to XDragSourceListener implementations. // Of that interface only dragDropEnd and dropActionChanged are called. // The functions dragEnter, dragExit and dragOver are not supported @@ -40,7 +38,7 @@ class DragSourceContext: public cppu::BaseMutex, private ::boost::noncopyable { public: - DragSourceContext(DragSource* pSource); + DragSourceContext(); ~DragSourceContext(); virtual sal_Int32 SAL_CALL getCurrentCursor( ) @@ -54,9 +52,6 @@ public: virtual void SAL_CALL transferablesFlavorsChanged( ) throw( com::sun::star::uno::RuntimeException); - -private: - DragSource* m_pDragSource; }; diff --git a/vcl/inc/aqua/salgdicommon.hxx b/vcl/inc/aqua/salgdicommon.hxx index 21307ee14551..6d674fd1eb0c 100644 --- a/vcl/inc/aqua/salgdicommon.hxx +++ b/vcl/inc/aqua/salgdicommon.hxx @@ -9,26 +9,28 @@ class RGBAColor public: RGBAColor( SalColor ); RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET - const float* AsArray() const { return &m_fRed; } - bool IsVisible() const { return m_fAlpha > 0; } - void SetAlpha( float fAlpha ) { m_fAlpha = fAlpha; } + const float* AsArray() const { return m_fRGBA; } + bool IsVisible() const { return m_fRGBA[3] > 0; } + void SetAlpha( float fAlpha ) { m_fRGBA[3] = fAlpha; } private: - float m_fRed, m_fGreen, m_fBlue, m_fAlpha; + float m_fRGBA[4]; // red, green, blue, alpha }; inline RGBAColor::RGBAColor( SalColor nSalColor ) -: m_fRed( SALCOLOR_RED(nSalColor) * (1.0/255)) -, m_fGreen( SALCOLOR_GREEN(nSalColor) * (1.0/255)) -, m_fBlue( SALCOLOR_BLUE(nSalColor) * (1.0/255)) -, m_fAlpha( 1.0 ) // opaque -{} +{ + m_fRGBA[0] = SALCOLOR_RED(nSalColor) * (1.0/255); + m_fRGBA[1] = SALCOLOR_GREEN(nSalColor) * (1.0/255); + m_fRGBA[2] = SALCOLOR_BLUE(nSalColor) * (1.0/255); + m_fRGBA[3] = 1.0; // opaque +} inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ) -: m_fRed( fRed ) -, m_fGreen( fGreen ) -, m_fBlue( fBlue ) -, m_fAlpha( fAlpha ) -{} +{ + m_fRGBA[0] = fRed; + m_fRGBA[1] = fGreen; + m_fRGBA[2] = fBlue; + m_fRGBA[3] = fAlpha; +} class XorEmulation { |