diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-04-08 08:39:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-04-08 08:39:36 +0200 |
commit | 213bc71f84c8f8494f5b5009b730b5a7af2c7cee (patch) | |
tree | 4e26514b812625615d45d317a3987d9b66ba4ac7 /vcl/unx | |
parent | 35a7310e7fc16f609f895c043ceb8e99a251b3ee (diff) |
Clean up function declarations and some unused functions
Change-Id: I382289c7188dfdc9839ff9e6362b6e039ffc5f9e
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/i18n_im.cxx | 88 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk/app/gtksys.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 8 |
6 files changed, 4 insertions, 111 deletions
diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx index e08ea6aae38b..acbca6909e51 100644 --- a/vcl/unx/generic/app/i18n_im.cxx +++ b/vcl/unx/generic/app/i18n_im.cxx @@ -50,16 +50,6 @@ extern "C" char * XSetIMValues(XIM im, ...); // kinput2 IME needs special key handling since key release events are filtered in // preeditmode and XmbResetIC does not work -bool -IMServerKinput2 () -{ - const static char* p_xmodifiers = getenv ("XMODIFIERS"); - const static bool b_kinput2 = (p_xmodifiers != NULL) - && (strcmp(p_xmodifiers, "@im=kinput2") == 0); - - return b_kinput2; -} - class XKeyEventOp : XKeyEvent { private: @@ -427,82 +417,4 @@ SalI18N_InputMethod::HandleDestroyIM() maMethod = NULL; } -// add a connection watch into the SalXLib yieldTable to allow iiimp -// connection processing: soffice waits in select() not in XNextEvent(), so -// there may be requests pending on the iiimp internal connection that will -// not be processed until XNextEvent is called the next time. If we do not -// have the focus because the atok12 lookup choice aux window has it we stay -// deaf and dump otherwise. - -int -InputMethod_HasPendingEvent(int nFileDescriptor, void *pData) -{ - if (pData == NULL) - return 0; - - struct pollfd aFileDescriptor; - #ifdef SOLARIS - nfds_t nNumDescriptor = 1; - #else - unsigned int nNumDescriptor = 1; - #endif - aFileDescriptor.fd = nFileDescriptor; - aFileDescriptor.events = POLLRDNORM; - aFileDescriptor.revents = 0; - - int nPoll = poll (&aFileDescriptor, nNumDescriptor, 0 /* timeout */ ); - - if (nPoll > 0) - { - /* at least some conditions in revent are set */ - if ( (aFileDescriptor.revents & POLLHUP) - || (aFileDescriptor.revents & POLLERR) - || (aFileDescriptor.revents & POLLNVAL)) - return 0; /* oops error condition set */ - - if (aFileDescriptor.revents & POLLRDNORM) - return 1; /* success */ - } - - /* nPoll == 0 means timeout, nPoll < 0 means error */ - return 0; -} - -int -InputMethod_IsEventQueued(int nFileDescriptor, void *pData) -{ - return InputMethod_HasPendingEvent (nFileDescriptor, pData); -} - -int -InputMethod_HandleNextEvent(int nFileDescriptor, void *pData) -{ - if (pData != NULL) - XProcessInternalConnection((Display*)pData, nFileDescriptor); - - return 0; -} - -extern "C" void -InputMethod_ConnectionWatchProc (Display *pDisplay, XPointer pClientData, - int nFileDescriptor, Bool bOpening, XPointer*) -{ - SalXLib *pConnectionHandler = (SalXLib*)pClientData; - - if (pConnectionHandler == NULL) - return; - - if (bOpening) - { - pConnectionHandler->Insert (nFileDescriptor, pDisplay, - InputMethod_HasPendingEvent, - InputMethod_IsEventQueued, - InputMethod_HandleNextEvent); - } - else - { - pConnectionHandler->Remove (nFileDescriptor); - } -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 3394c0ff230e..c838d567d9fb 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -60,17 +60,12 @@ class SalPolyLine XPoint Points_[STATIC_POINTS]; XPoint *pFirst_; public: - inline SalPolyLine( sal_uLong nPoints ); inline SalPolyLine( sal_uLong nPoints, const SalPoint *p ); inline ~SalPolyLine(); inline XPoint &operator [] ( sal_uLong n ) const { return pFirst_[n]; } }; -inline SalPolyLine::SalPolyLine( sal_uLong nPoints ) - : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ ) -{} - inline SalPolyLine::SalPolyLine( sal_uLong nPoints, const SalPoint *p ) : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ ) { diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 471649c6e155..201f5e7b6e3d 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -20,6 +20,7 @@ #include <stdlib.h> #include <stdio.h> +#include <boost/noncopyable.hpp> #include <boost/unordered_map.hpp> #include <comphelper/string.hxx> @@ -267,16 +268,12 @@ namespace struct thePPDCache : public rtl::Static<PPDCache, thePPDCache> {}; } -class PPDDecompressStream +class PPDDecompressStream: private boost::noncopyable { SvFileStream* mpFileStream; SvMemoryStream* mpMemStream; OUString maFileName; - // forbid copying - PPDDecompressStream( const PPDDecompressStream& ); - PPDDecompressStream& operator=(const PPDDecompressStream& ); - public: PPDDecompressStream( const OUString& rFile ); ~PPDDecompressStream(); diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 3a60c1ff6a35..a504baa2837e 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2528,11 +2528,6 @@ LanguageType X11SalFrame::GetInputLanguage() // Settings -inline Color getColorFromLong( long nColor ) -{ - return Color( (nColor & 0xff), (nColor & 0xff00)>>8, (nColor & 0xff0000)>>16); -} - void X11SalFrame::UpdateSettings( AllSettings& rSettings ) { StyleSettings aStyleSettings = rSettings.GetStyleSettings(); diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx index 0a72054aeb9d..058b5f53b7fa 100644 --- a/vcl/unx/gtk/app/gtksys.cxx +++ b/vcl/unx/gtk/app/gtksys.cxx @@ -107,7 +107,9 @@ GtkSalSystem::countScreenMonitors() // Including gdkx.h kills us with the Window / XWindow conflict extern "C" { +#if GTK_CHECK_VERSION(3,0,0) GType gdk_x11_display_get_type (void); +#endif int gdk_x11_screen_get_screen_number (GdkScreen *screen); } diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 1f3dfb65980c..558eba0b63e6 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -377,8 +377,6 @@ public: { } - FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFilters ); - OUString getTitle() const { return m_sTitle; } OUString getFilter() const { return m_sFilter; } @@ -396,12 +394,6 @@ public: const UnoFilterEntry* endSubFilters() const { return m_aSubFilters.getConstArray() + m_aSubFilters.getLength(); } }; -FilterEntry::FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFilters ) - :m_sTitle( _rTitle ) - ,m_aSubFilters( _rSubFilters ) -{ -} - bool FilterEntry::hasSubFilters() const { return( 0 < m_aSubFilters.getLength() ); |