diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-01 14:20:31 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-02 06:38:20 +0000 |
commit | 837f171810a95a1d87907dd08d67e969276f0559 (patch) | |
tree | 6891aa9774c63b759b29d365e0d141f5d7bf3a8c /vcl/unx | |
parent | Make external/firebird work with C++14 sized deallocation (diff) | |
download | core-837f171810a95a1d87907dd08d67e969276f0559.tar.gz core-837f171810a95a1d87907dd08d67e969276f0559.zip |
loplugin:unusedmethods in vcl
Change-Id: Ib404310761fd555b033ab6594ba8636d37f23463
Reviewed-on: https://gerrit.libreoffice.org/19074
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/i18n_cb.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/app/salinst.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/app/wmadaptor.cxx | 66 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_clipboard.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.hxx | 1 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/bmp.hxx | 1 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/cairo_xlib_cairo.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.hxx | 1 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/xrender_peer.hxx | 50 | ||||
-rw-r--r-- | vcl/unx/gtk/app/gtksys.cxx | 30 | ||||
-rw-r--r-- | vcl/unx/gtk/window/glomenu.cxx | 21 | ||||
-rw-r--r-- | vcl/unx/x11/x11sys.cxx | 41 |
13 files changed, 2 insertions, 240 deletions
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx index 1d6be55e1952..9f267a36ea87 100644 --- a/vcl/unx/generic/app/i18n_cb.cxx +++ b/vcl/unx/generic/app/i18n_cb.cxx @@ -519,13 +519,6 @@ StatusDrawCallback (XIC, XPointer, XIMStatusDrawCallbackStruct *call_data) return; } -void -SwitchIMCallback (XIC, XPointer, XPointer call_data) -{ - XIMSwitchIMNotifyCallbackStruct* pCallData = reinterpret_cast<XIMSwitchIMNotifyCallbackStruct*>(call_data); - vcl::I18NStatus::get().changeIM( OStringToOUString(pCallData->to->name, RTL_TEXTENCODING_UTF8) ); -} - // vii. destroy callbacks: internally disable all IC/IM calls void diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index 1cefa882c924..e27ca1bff8ac 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -190,16 +190,14 @@ extern "C" { static void SAL_CALL thisModule() {} } void X11SalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) { - const OUString SYM_ADD_TO_RECENTLY_USED_FILE_LIST("add_to_recently_used_file_list"); - const OUString LIB_RECENT_FILE("librecentfile.so"); typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const OUString&, const OUString&, const OUString&); PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = 0; osl::Module module; - module.loadRelative( &thisModule, LIB_RECENT_FILE ); + module.loadRelative( &thisModule, "librecentfile.so" ); if (module.is()) - add_to_recently_used_file_list = reinterpret_cast<PFUNC_ADD_TO_RECENTLY_USED_LIST>(module.getFunctionSymbol(SYM_ADD_TO_RECENTLY_USED_FILE_LIST)); + add_to_recently_used_file_list = reinterpret_cast<PFUNC_ADD_TO_RECENTLY_USED_LIST>(module.getFunctionSymbol("add_to_recently_used_file_list")); if (add_to_recently_used_file_list) add_to_recently_used_file_list(rFileUrl, rMimeType, rDocumentService); } diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 43432cf24696..74a32f66b280 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -61,12 +61,6 @@ public: virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const SAL_OVERRIDE; virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const SAL_OVERRIDE; virtual void frameIsMapping( X11SalFrame* pFrame ) const SAL_OVERRIDE; - virtual void setFrameStruts( X11SalFrame* pFrame, - int left, int right, int top, int bottom, - int left_start_y, int left_end_y, - int right_start_y, int right_end_y, - int top_start_x, int top_end_x, - int bottom_start_x, int bottom_end_x ) const SAL_OVERRIDE; virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const SAL_OVERRIDE; }; @@ -2228,66 +2222,6 @@ void NetWMAdaptor::frameIsMapping( X11SalFrame* pFrame ) const } /* - * WMAdaptor::setFrameStruts - */ -void WMAdaptor::setFrameStruts( X11SalFrame*, - int, int, int, int, - int, int, int, int, - int, int, int, int ) const -{ -} - -/* - * NetWMAdaptor::setFrameStruts - */ -void NetWMAdaptor::setFrameStruts( X11SalFrame* pFrame, - int left, int right, int top, int bottom, - int left_start_y, int left_end_y, - int right_start_y, int right_end_y, - int top_start_x, int top_end_x, - int bottom_start_x, int bottom_end_x ) const -{ - long nData[12]; - nData[0] = left; - nData[1] = right; - nData[2] = top; - nData[3] = bottom; - nData[4] = left_start_y; - nData[5] = left_end_y; - nData[6] = right_start_y; - nData[7] = right_end_y; - nData[8] = top_start_x; - nData[9] = top_end_x; - nData[10]= bottom_start_x; - nData[11]= bottom_end_x; - Atom aProperty = None; - int nSetData = 0; - - if( m_aWMAtoms[NET_WM_STRUT_PARTIAL] ) - { - aProperty = m_aWMAtoms[NET_WM_STRUT_PARTIAL]; - nSetData = 12; - } - else if( m_aWMAtoms[NET_WM_STRUT] ) - { - aProperty = m_aWMAtoms[NET_WM_STRUT]; - nSetData = 4; - } - if( nSetData ) - { - XChangeProperty( m_pDisplay, - pFrame->GetShellWindow(), - aProperty, - XA_CARDINAL, - 32, - PropModeReplace, - reinterpret_cast<unsigned char*>(&nData), - nSetData - ); - } -} - -/* * WMAdaptor::setUserTime */ void WMAdaptor::setUserTime( X11SalFrame*, long ) const diff --git a/vcl/unx/generic/dtrans/X11_clipboard.hxx b/vcl/unx/generic/dtrans/X11_clipboard.hxx index fc1e4db40ef5..b212dbe288ea 100644 --- a/vcl/unx/generic/dtrans/X11_clipboard.hxx +++ b/vcl/unx/generic/dtrans/X11_clipboard.hxx @@ -62,8 +62,6 @@ namespace x11 { virtual ~X11Clipboard(); - static X11Clipboard* get( const OUString& rDisplayName, Atom aSelection ); - /* * XServiceInfo */ diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx index d7ec585272c1..7c4e523cecc2 100644 --- a/vcl/unx/generic/dtrans/X11_selection.hxx +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -428,7 +428,6 @@ namespace x11 { static SelectionManager& get( const OUString& rDisplayName = OUString() ); Display * getDisplay() { return m_pDisplay; }; - ::Window getWindow() { return m_aWindow; }; void registerHandler( Atom selection, SelectionAdaptor& rAdaptor ); void deregisterHandler( Atom selection ); diff --git a/vcl/unx/generic/dtrans/bmp.hxx b/vcl/unx/generic/dtrans/bmp.hxx index 6a0c801b0eac..dbcd74c96a98 100644 --- a/vcl/unx/generic/dtrans/bmp.hxx +++ b/vcl/unx/generic/dtrans/bmp.hxx @@ -71,7 +71,6 @@ public: Pixmap getPixmap() const { return m_aPixmap; } Pixmap getBitmap() const { return m_aBitmap; } VisualID getVisualID() const { return m_aInfo.visualid; } - int getClass() const { return m_aInfo.c_class; } int getDepth() const { return m_aInfo.depth; } }; diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx index 7cb5b5b39b40..f710a3f28656 100644 --- a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx +++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx @@ -60,8 +60,6 @@ namespace cairo { {} ~X11Pixmap(); - - void clear() { mpDisplay=NULL; mhDrawable=0; } }; typedef std::shared_ptr<X11Pixmap> X11PixmapSharedPtr; diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index d350d019f961..e85b096560cc 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -326,20 +326,6 @@ GC X11SalGraphicsImpl::GetTrackingGC() return mpTrackingGC; } -inline GC X11SalGraphicsImpl::GetMonoGC( Pixmap hPixmap ) -{ - if( !mpMonoGC ) - mpMonoGC = CreateGC( hPixmap ); - - if( !mbMonoGC ) - { - mrParent.SetClipRegion( mpMonoGC ); - mbMonoGC = true; - } - - return mpMonoGC; -} - GC X11SalGraphicsImpl::GetInvertGC() { if( !mpInvertGC ) diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx index 24173c787ddf..b4540537f423 100644 --- a/vcl/unx/generic/gdi/gdiimpl.hxx +++ b/vcl/unx/generic/gdi/gdiimpl.hxx @@ -80,7 +80,6 @@ private: GC GetTrackingGC(); GC GetInvertGC(); GC GetInvert50GC(); - inline GC GetMonoGC( Pixmap hPixmap ); void DrawLines( sal_uIntPtr nPoints, const SalPolyLine &rPoints, diff --git a/vcl/unx/generic/gdi/xrender_peer.hxx b/vcl/unx/generic/gdi/xrender_peer.hxx index bf8dfd6147cb..dd0a420b79b0 100644 --- a/vcl/unx/generic/gdi/xrender_peer.hxx +++ b/vcl/unx/generic/gdi/xrender_peer.hxx @@ -60,20 +60,11 @@ public: int nXDst, int nYDst, unsigned nWidth, unsigned nHeight ) const; void FreePicture( Picture ) const; - GlyphSet CreateGlyphSet() const; - void FreeGlyphSet( GlyphSet ) const; - void AddGlyph( GlyphSet, XRenderGlyph nXRGlyph, const XGlyphInfo&, - const char* pBuffer, int nBufSize ) const; - static void FreeGlyph( GlyphSet, XRenderGlyph nXRGlyphId ); - void CompositeString32( Picture aSrc, Picture aDst, GlyphSet, - int nDstX, int nDstY, const unsigned* pText, int nTextLen ) const; void FillRectangle( int nOp, Picture aDst, const XRenderColor*, int nX, int nY, unsigned nW, unsigned nH ) const; void CompositeTrapezoids( int nOp, Picture aSrc, Picture aDst, const XRenderPictFormat*, int nXSrc, int nYSrc, const XTrapezoid*, int nCount ) const; - void AddTraps( Picture aDst, int nXOfs, int nYOfs, - const _XTrap*, int nCount ) const; }; inline XRenderPictFormat* XRenderPeer::GetStandardFormatA8() const @@ -131,41 +122,6 @@ inline void XRenderPeer::FreePicture( Picture aPicture ) const XRenderFreePicture( mpDisplay, aPicture ); } -inline GlyphSet XRenderPeer::CreateGlyphSet() const -{ - return XRenderCreateGlyphSet( mpDisplay, mpStandardFormatA8 ); -} - -inline void XRenderPeer::FreeGlyphSet( GlyphSet aGS ) const -{ - XRenderFreeGlyphSet( mpDisplay, aGS ); -} - -inline void XRenderPeer::AddGlyph( GlyphSet aGS, XRenderGlyph nXRGlyph, - const XGlyphInfo& rGI, const char* pBuffer, int nBufSize ) const -{ - XRenderAddGlyphs( mpDisplay, aGS, &nXRGlyph, &rGI, 1, - pBuffer, nBufSize ); -} - -inline void XRenderPeer::FreeGlyph( GlyphSet aGS, XRenderGlyph nXRGlyph ) -{ - (void)aGS; (void)nXRGlyph; - - // XRenderFreeGlyphs not implemented yet for version<=0.2 - // #108209# disabled because of crash potential, - // the glyph leak is not too bad because they will - // be cleaned up when the glyphset is released -} - -inline void XRenderPeer::CompositeString32( Picture aSrc, Picture aDst, - GlyphSet aGlyphSet, int nDstX, int nDstY, - const unsigned* pText, int nTextLen ) const -{ - XRenderCompositeString32( mpDisplay, PictOpOver, aSrc, aDst, NULL, - aGlyphSet, 0, 0, nDstX, nDstY, pText, nTextLen ); -} - inline void XRenderPeer::FillRectangle( int a, Picture b, const XRenderColor* c, int d, int e, unsigned int f, unsigned int g) const { @@ -180,12 +136,6 @@ inline void XRenderPeer::CompositeTrapezoids( int nOp, nXSrc, nYSrc, pXT, nCount ); } -inline void XRenderPeer::AddTraps( Picture aDst, int nXOfs, int nYOfs, - const _XTrap* pTraps, int nCount ) const -{ - XRenderAddTraps( mpDisplay, aDst, nXOfs, nYOfs, pTraps, nCount ); -} - inline XRenderColor GetXRenderColor( const SalColor& rSalColor, double fTransparency = 0.0 ) { XRenderColor aRetVal; diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx index f1142210cf3e..7c5e7817a396 100644 --- a/vcl/unx/gtk/app/gtksys.cxx +++ b/vcl/unx/gtk/app/gtksys.cxx @@ -247,36 +247,6 @@ Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen) return Rectangle (Point(aRect.x, aRect.y), Size(aRect.width, aRect.height)); } -OUString GtkSalSystem::GetDisplayScreenName(unsigned int nScreen) -{ - gchar *pStr; - gint nMonitor; - GdkScreen *pScreen; - pScreen = getScreenMonitorFromIdx (nScreen, nMonitor); - if (!pScreen) - return OUString(); - -#if GTK_CHECK_VERSION(3,0,0) || GTK_CHECK_VERSION(2,14,0) - pStr = gdk_screen_get_monitor_plug_name (pScreen, nMonitor); -#else - static gchar * (*get_fn) (GdkScreen *, int) = NULL; - - GModule *module = g_module_open (NULL, (GModuleFlags) 0); - if (!g_module_symbol (module, "gdk_screen_get_monitor_plug_name", - (gpointer *)&get_fn)) - get_fn = NULL; - g_module_close (module); - - if (get_fn) - pStr = get_fn (pScreen, nMonitor); - else - pStr = g_strdup_printf ("%d", nScreen); -#endif - OUString aRet (pStr, strlen (pStr), RTL_TEXTENCODING_UTF8); - g_free (pStr); - return aRet; -} - // convert ~ to indicate mnemonic to '_' static OString MapToGtkAccelerator(const OUString &rStr) { diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx index 5a9095cb6d77..b6d86c23346d 100644 --- a/vcl/unx/gtk/window/glomenu.cxx +++ b/vcl/unx/gtk/window/glomenu.cxx @@ -509,27 +509,6 @@ g_lo_menu_new_submenu_in_item_in_section (GLOMenu *menu, } } -void -g_lo_menu_set_submenu_to_item_in_section (GLOMenu *menu, - gint section, - gint position, - GMenuModel *submenu) -{ - g_return_if_fail (G_IS_LO_MENU (menu)); - g_return_if_fail (0 <= section && section < (gint) menu->items->len); - - GLOMenu *model = g_lo_menu_get_section (menu, section); - - g_return_if_fail (model != NULL); - - g_lo_menu_set_link (model, position, G_MENU_LINK_SUBMENU, submenu); - - // Notify the update. - g_menu_model_items_changed (G_MENU_MODEL (model), position, 1, 1); - - g_object_unref (model); -} - GLOMenu * g_lo_menu_get_submenu_from_item_in_section (GLOMenu *menu, gint section, diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index fbb625a6e25e..31fd0084abab 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -85,47 +85,6 @@ Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) return aRet; } -OUString X11SalSystem::GetDisplayScreenName( unsigned int nScreen ) -{ - OUString aScreenName; - SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericData()); - if( pSalDisp->IsXinerama() ) - { - const std::vector< Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); - if( nScreen >= rScreens.size() ) - nScreen = 0; - OUStringBuffer aBuf( 256 ); - aBuf.append( OStringToOUString( OString( DisplayString( pSalDisp->GetDisplay() ) ), osl_getThreadTextEncoding() ) ); - aBuf.append( " [" ); - aBuf.append( static_cast<sal_Int32>(nScreen) ); - aBuf.append( ']' ); - aScreenName = aBuf.makeStringAndClear(); - } - else - { - if( nScreen >= static_cast<unsigned int>(pSalDisp->GetXScreenCount()) ) - nScreen = 0; - OUStringBuffer aBuf( 256 ); - aBuf.append( OStringToOUString( OString( DisplayString( pSalDisp->GetDisplay() ) ), osl_getThreadTextEncoding() ) ); - // search backwards for ':' - int nPos = aBuf.getLength(); - if( nPos > 0 ) - nPos--; - while( nPos > 0 && aBuf[nPos] != ':' ) - nPos--; - // search forward to '.' - while( nPos < aBuf.getLength() && aBuf[nPos] != '.' ) - nPos++; - if( nPos < aBuf.getLength() ) - aBuf.setLength( nPos+1 ); - else - aBuf.append( '.' ); - aBuf.append( static_cast<sal_Int32>(nScreen) ); - aScreenName = aBuf.makeStringAndClear(); - } - return aScreenName; -} - int X11SalSystem::ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, const std::list< OUString >& rButtons, int nDefButton ) { int nRet = -1; |