summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/app/i18n_cb.cxx10
-rw-r--r--vcl/unx/generic/app/saldata.cxx2
-rw-r--r--vcl/unx/generic/app/saldisp.cxx16
-rw-r--r--vcl/unx/generic/app/salinst.cxx2
-rw-r--r--vcl/unx/generic/app/sm.cxx8
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx2
-rw-r--r--vcl/unx/generic/dtrans/bmp.cxx14
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx2
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx4
-rw-r--r--vcl/unx/generic/print/printerjob.cxx6
-rw-r--r--vcl/unx/generic/window/salframe.cxx2
-rw-r--r--vcl/unx/generic/window/screensaverinhibitor.cxx2
-rw-r--r--vcl/unx/glxtest.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkcomponent.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkfactory.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atklistener.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atktext.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atktextattributes.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx2
-rw-r--r--vcl/unx/gtk/gloactiongroup.cxx2
-rw-r--r--vcl/unx/gtk/glomenu.cxx6
-rw-r--r--vcl/unx/gtk/gtkdata.cxx6
-rw-r--r--vcl/unx/gtk/gtksalframe.cxx6
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx10
-rw-r--r--vcl/unx/gtk/salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtkdata.cxx6
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx6
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx10
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx4
-rw-r--r--vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx2
-rw-r--r--vcl/unx/kde4/KDE4FilePicker.cxx4
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx4
32 files changed, 82 insertions, 74 deletions
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index b62f5306de04..0b6cdc49b3dd 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -70,7 +70,7 @@ PreeditDoneCallback ( XIC, XPointer client_data, XPointer )
// Handle deletion of text in a preedit_draw_callback
// from and howmuch are guaranteed to be nonnegative
-void
+static void
Preedit_DeleteText(preedit_text_t *ptext, int from, int howmuch)
{
// If we've been asked to delete no text then just set
@@ -116,7 +116,7 @@ Preedit_DeleteText(preedit_text_t *ptext, int from, int howmuch)
// reallocate the textbuffer with sufficiently large size 2^x
// nnewlimit is presupposed to be larger than ptext->size
-void
+static void
enlarge_buffer ( preedit_text_t *ptext, int nnewlimit )
{
size_t nnewsize = ptext->nSize;
@@ -134,7 +134,7 @@ enlarge_buffer ( preedit_text_t *ptext, int nnewlimit )
// Handle insertion of text in a preedit_draw_callback
// string field of XIMText struct is guaranteed to be != NULL
-void
+static void
Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where)
{
sal_Unicode *pInsertTextString;
@@ -224,7 +224,7 @@ Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where)
// Handle the change of attributes in a preedit_draw_callback
-void
+static void
Preedit_UpdateAttributes ( preedit_text_t* ptext, XIMFeedback const * feedback,
int from, int amount )
{
@@ -245,7 +245,7 @@ Preedit_UpdateAttributes ( preedit_text_t* ptext, XIMFeedback const * feedback,
// Convert the XIM feedback values into appropriate VCL
// EXTTEXTINPUT_ATTR values
// returns an allocate list of attributes, which must be freed by caller
-ExtTextInputAttr*
+static ExtTextInputAttr*
Preedit_FeedbackToSAL ( const XIMFeedback* pfeedback, int nlength, std::vector<ExtTextInputAttr>& rSalAttr )
{
ExtTextInputAttr *psalattr;
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index cf3ba86da73b..860f8fc0def8 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -461,7 +461,7 @@ void SalXLib::Init()
}
extern "C" {
-void EmitFontpathWarning()
+static void EmitFontpathWarning()
{
static Bool bOnce = False;
if ( !bOnce )
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index bd2b9d080611..469bb0012193 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -83,21 +83,21 @@ typedef unsigned long Pixel;
using namespace vcl_sal;
#ifdef DBG_UTIL
-inline const char *Null( const char *p ) { return p ? p : ""; }
-inline const char *GetEnv( const char *p ) { return Null( getenv( p ) ); }
-inline const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); }
+static inline const char *Null( const char *p ) { return p ? p : ""; }
+static inline const char *GetEnv( const char *p ) { return Null( getenv( p ) ); }
+static inline const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); }
-inline const char *GetAtomName( Display *d, Atom a )
+static inline const char *GetAtomName( Display *d, Atom a )
{ return Null( XGetAtomName( d, a ) ); }
-inline double Hypothenuse( long w, long h )
+static inline double Hypothenuse( long w, long h )
{ return sqrt( static_cast<double>((w*w)+(h*h)) ); }
#endif
-inline int ColorDiff( int r, int g, int b )
+static inline int ColorDiff( int r, int g, int b )
{ return (r*r)+(g*g)+(b*b); }
-inline int ColorDiff( Color c1, int r, int g, int b )
+static inline int ColorDiff( Color c1, int r, int g, int b )
{ return ColorDiff( static_cast<int>(c1.GetRed())-r,
static_cast<int>(c1.GetGreen())-g,
static_cast<int>(c1.GetBlue())-b ); }
@@ -765,7 +765,7 @@ OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const
return aRet;
}
-inline KeySym sal_XModifier2Keysym( Display *pDisplay,
+static inline KeySym sal_XModifier2Keysym( Display *pDisplay,
XModifierKeymap const *pXModMap,
int n )
{
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index 96ab14e5596b..e7be404010e2 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -99,7 +99,7 @@ struct PredicateReturn
};
extern "C" {
-Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
+static Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
{
PredicateReturn *pPre = reinterpret_cast<PredicateReturn *>(pData);
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index 25b516c000f3..b750845a0eb7 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -109,11 +109,15 @@ bool IceSalSession::cancelShutdown()
return false;
}
-extern "C" void ICEWatchProc(
+extern "C" {
+
+static void ICEWatchProc(
IceConn ice_conn, IcePointer client_data, Bool opening,
IcePointer * watch_data);
-extern "C" void ICEConnectionWorker(void * data);
+static void ICEConnectionWorker(void * data);
+
+}
class ICEConnectionObserver
{
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 38a2822e049a..fd5ed013982a 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -3826,7 +3826,7 @@ static bool bWasError = false;
extern "C"
{
- int local_xerror_handler(Display* , XErrorEvent*)
+ static int local_xerror_handler(Display* , XErrorEvent*)
{
bWasError = true;
return 0;
diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx
index 8b7f342bfbb6..e6748166e132 100644
--- a/vcl/unx/generic/dtrans/bmp.cxx
+++ b/vcl/unx/generic/dtrans/bmp.cxx
@@ -41,13 +41,13 @@ using namespace x11;
* helper functions
*/
-inline void writeLE( sal_uInt16 nNumber, sal_uInt8* pBuffer )
+static inline void writeLE( sal_uInt16 nNumber, sal_uInt8* pBuffer )
{
pBuffer[ 0 ] = (nNumber & 0xff);
pBuffer[ 1 ] = ((nNumber>>8)&0xff);
}
-inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer )
+static inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer )
{
pBuffer[ 0 ] = (nNumber & 0xff);
pBuffer[ 1 ] = ((nNumber>>8)&0xff);
@@ -55,7 +55,7 @@ inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer )
pBuffer[ 3 ] = ((nNumber>>24)&0xff);
}
-inline sal_uInt16 readLE16( const sal_uInt8* pBuffer )
+static inline sal_uInt16 readLE16( const sal_uInt8* pBuffer )
{
//This is untainted data which comes from a controlled source
//so, using a byte-swapping pattern which coverity doesn't
@@ -66,7 +66,7 @@ inline sal_uInt16 readLE16( const sal_uInt8* pBuffer )
return v;
}
-inline sal_uInt32 readLE32( const sal_uInt8* pBuffer )
+static inline sal_uInt32 readLE32( const sal_uInt8* pBuffer )
{
//This is untainted data which comes from a controlled source
//so, using a byte-swapping pattern which coverity doesn't
@@ -83,7 +83,7 @@ inline sal_uInt32 readLE32( const sal_uInt8* pBuffer )
* scanline helpers
*/
-inline void X11_writeScanlinePixel( unsigned long nColor, sal_uInt8* pScanline, int depth, int x )
+static inline void X11_writeScanlinePixel( unsigned long nColor, sal_uInt8* pScanline, int depth, int x )
{
switch( depth )
{
@@ -194,12 +194,12 @@ static sal_uInt8* X11_getPaletteBmpFromImage(
return pBuffer;
}
-inline unsigned long doRightShift( unsigned long nValue, int nShift )
+static inline unsigned long doRightShift( unsigned long nValue, int nShift )
{
return (nShift > 0) ? (nValue >> nShift) : (nValue << (-nShift));
}
-inline unsigned long doLeftShift( unsigned long nValue, int nShift )
+static inline unsigned long doLeftShift( unsigned long nValue, int nShift )
{
return (nShift > 0) ? (nValue << nShift) : (nValue >> (-nShift));
}
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index b2e3862cefdb..8b6ad13471a0 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -81,7 +81,7 @@ using namespace com::sun::star::lang;
* static helpers
*/
-inline sal_uInt16 getUInt16BE( const sal_uInt8*& pBuffer )
+static inline sal_uInt16 getUInt16BE( const sal_uInt8*& pBuffer )
{
sal_uInt16 nRet = static_cast<sal_uInt16>(pBuffer[1]) |
(static_cast<sal_uInt16>(pBuffer[0]) << 8);
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 8ccbfafb75a0..b7aabb648a6e 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -138,9 +138,9 @@ namespace
}
}
-inline int PtTo10Mu( int nPoints ) { return static_cast<int>((static_cast<double>(nPoints)*35.27777778)+0.5); }
+static inline int PtTo10Mu( int nPoints ) { return static_cast<int>((static_cast<double>(nPoints)*35.27777778)+0.5); }
-inline int TenMuToPt( int nUnits ) { return static_cast<int>((static_cast<double>(nUnits)/35.27777778)+0.5); }
+static inline int TenMuToPt( int nUnits ) { return static_cast<int>((static_cast<double>(nUnits)/35.27777778)+0.5); }
static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
{
diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx
index 8b5cb726fdf9..c1f1a0f718d4 100644
--- a/vcl/unx/generic/print/printerjob.cxx
+++ b/vcl/unx/generic/print/printerjob.cxx
@@ -51,7 +51,7 @@ using namespace psp;
namespace psp
{
-bool
+static bool
AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer)
{
assert(pBuffer);
@@ -183,7 +183,7 @@ PrinterJob::PrinterJob()
/* remove all our temporary files, uses external program "rm", since
osl functionality is inadequate */
-void
+static void
removeSpoolDir (const OUString& rSpoolDir)
{
OUString aSysPath;
@@ -202,7 +202,7 @@ removeSpoolDir (const OUString& rSpoolDir)
/* creates a spool directory with a "pidgin random" value based on
current system time */
-OUString
+static OUString
createSpoolDir ()
{
TimeValue aCur;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 7446dbf360f2..1ecbcdd5e5d5 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2873,7 +2873,7 @@ struct KeyAlternate
KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
};
-inline KeyAlternate
+static inline KeyAlternate
GetAlternateKeyCode( const sal_uInt16 nKeyCode )
{
KeyAlternate aAlternate;
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx
index 2988bb214507..675b79269627 100644
--- a/vcl/unx/generic/window/screensaverinhibitor.cxx
+++ b/vcl/unx/generic/window/screensaverinhibitor.cxx
@@ -66,7 +66,7 @@ void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason,
}
#if ENABLE_GIO
-void dbusInhibit( bool bInhibit,
+static void dbusInhibit( bool bInhibit,
const gchar* service, const gchar* path, const gchar* interface,
const std::function<GVariant*( GDBusProxy*, GError*& )>& fInhibit,
const std::function<GVariant*( GDBusProxy*, const guint, GError*& )>& fUnInhibit,
diff --git a/vcl/unx/glxtest.cxx b/vcl/unx/glxtest.cxx
index 70d34fb7318d..8b5265c88709 100644
--- a/vcl/unx/glxtest.cxx
+++ b/vcl/unx/glxtest.cxx
@@ -101,7 +101,7 @@ x_error_handler(Display *, XErrorEvent *ev)
return 0;
}
-void glxtest()
+static void glxtest()
{
signal(SIGPIPE, SIG_IGN);
// we want to redirect to /dev/null stdout, stderr, and while we're at it,
diff --git a/vcl/unx/gtk/a11y/atkcomponent.cxx b/vcl/unx/gtk/a11y/atkcomponent.cxx
index 7d8a4bdc5bba..f79d1749dc2b 100644
--- a/vcl/unx/gtk/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk/a11y/atkcomponent.cxx
@@ -23,7 +23,7 @@
using namespace ::com::sun::star;
-AtkObjectWrapper* getObjectWrapper(AtkComponent *pComponent)
+static AtkObjectWrapper* getObjectWrapper(AtkComponent *pComponent)
{
AtkObjectWrapper *pWrap = nullptr;
if (ATK_IS_OBJECT_WRAPPER(pComponent))
diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx
index 5c163cd38ece..c95830f752df 100644
--- a/vcl/unx/gtk/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk/a11y/atkfactory.cxx
@@ -74,7 +74,7 @@ atk_noop_object_wrapper_get_type()
return type;
}
-AtkObject*
+static AtkObject*
atk_noop_object_wrapper_new()
{
AtkObject *accessible;
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index 1c1cff15dd4b..bba1a3a09d53 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -64,7 +64,7 @@ AtkListener::~AtkListener()
/*****************************************************************************/
-AtkStateType mapState( const uno::Any &rAny )
+static AtkStateType mapState( const uno::Any &rAny )
{
sal_Int16 nState = accessibility::AccessibleStateType::INVALID;
rAny >>= nState;
diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx
index 5faac5ee526c..532b55013ddd 100644
--- a/vcl/unx/gtk/a11y/atktext.cxx
+++ b/vcl/unx/gtk/a11y/atktext.cxx
@@ -409,7 +409,7 @@ text_wrapper_set_caret_offset (AtkText *text,
}
// #i92232#
-AtkAttributeSet*
+static AtkAttributeSet*
handle_text_markup_as_run_attribute( css::uno::Reference<css::accessibility::XAccessibleTextMarkup> const & pTextMarkup,
const gint nTextMarkupType,
const gint offset,
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index 018a755fd234..b40598a65fd1 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -1015,7 +1015,9 @@ DefaultTabStops2String( const uno::Any& rAny )
/*****************************************************************************/
-extern "C" int
+extern "C" {
+
+static int
attr_compare(const void *p1,const void *p2)
{
const rtl_uString * pustr = static_cast<const rtl_uString *>(p1);
@@ -1024,6 +1026,8 @@ attr_compare(const void *p1,const void *p2)
return rtl_ustr_ascii_compare_WithLength(pustr->buffer, pustr->length, pc);
}
+}
+
static void
find_exported_attributes( sal_Int32 *pArray,
const css::uno::Sequence< css::beans::PropertyValue >& rAttributeList )
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index b5748c12d1a9..d714b08f2dde 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -620,7 +620,7 @@ static void handle_menu_highlighted(::VclMenuEvent const * pEvent)
/*****************************************************************************/
-void WindowEventHandler(void *, VclSimpleEvent& rEvent)
+static void WindowEventHandler(void *, VclSimpleEvent& rEvent)
{
try
{
diff --git a/vcl/unx/gtk/gloactiongroup.cxx b/vcl/unx/gtk/gloactiongroup.cxx
index 0ba1112f928f..b058417b821f 100644
--- a/vcl/unx/gtk/gloactiongroup.cxx
+++ b/vcl/unx/gtk/gloactiongroup.cxx
@@ -49,7 +49,7 @@ G_DEFINE_TYPE (GLOAction, g_lo_action, G_TYPE_OBJECT);
#pragma GCC diagnostic pop
#endif
-GLOAction*
+static GLOAction*
g_lo_action_new()
{
return G_LO_ACTION (g_object_new (G_TYPE_LO_ACTION, nullptr));
diff --git a/vcl/unx/gtk/glomenu.cxx b/vcl/unx/gtk/glomenu.cxx
index 4ba8f3f8587c..5457ac6eaa05 100644
--- a/vcl/unx/gtk/glomenu.cxx
+++ b/vcl/unx/gtk/glomenu.cxx
@@ -169,7 +169,7 @@ g_lo_menu_new()
return G_LO_MENU( g_object_new (G_TYPE_LO_MENU, nullptr) );
}
-void
+static void
g_lo_menu_set_attribute_value (GLOMenu *menu,
gint position,
const gchar *attribute,
@@ -190,7 +190,7 @@ g_lo_menu_set_attribute_value (GLOMenu *menu,
g_hash_table_remove (menu_item.attributes, attribute);
}
-GVariant*
+static GVariant*
g_lo_menu_get_attribute_value_from_item_in_section (GLOMenu *menu,
gint section,
gint position,
@@ -468,7 +468,7 @@ g_lo_menu_get_command_from_item_in_section (GLOMenu *menu,
return command;
}
-void
+static void
g_lo_menu_set_link (GLOMenu *menu,
gint position,
const gchar *link,
diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx
index 7263685368ce..298442954c83 100644
--- a/vcl/unx/gtk/gtkdata.cxx
+++ b/vcl/unx/gtk/gtkdata.cxx
@@ -55,7 +55,7 @@ using namespace vcl_sal;
* class GtkSalDisplay *
***************************************************************/
extern "C" {
-GdkFilterReturn call_filterGdkEvent( GdkXEvent* sys_event,
+static GdkFilterReturn call_filterGdkEvent( GdkXEvent* sys_event,
GdkEvent* /*event*/,
gpointer data )
{
@@ -103,13 +103,13 @@ GtkSalDisplay::~GtkSalDisplay()
extern "C" {
-void signalScreenSizeChanged( GdkScreen* pScreen, gpointer data )
+static void signalScreenSizeChanged( GdkScreen* pScreen, gpointer data )
{
GtkSalDisplay* pDisp = static_cast<GtkSalDisplay*>(data);
pDisp->screenSizeChanged( pScreen );
}
-void signalMonitorsChanged( GdkScreen* pScreen, gpointer data )
+static void signalMonitorsChanged( GdkScreen* pScreen, gpointer data )
{
GtkSalDisplay* pDisp = static_cast<GtkSalDisplay*>(data);
pDisp->monitorsChanged( pScreen );
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index c3f9b25d677b..8b96ea38e577 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -348,7 +348,7 @@ struct KeyAlternate
KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
};
-inline KeyAlternate
+static inline KeyAlternate
GetAlternateKeyCode( const sal_uInt16 nKeyCode )
{
KeyAlternate aAlternate;
@@ -585,7 +585,7 @@ static const GActionEntry app_entries[] = {
{ "New", activate_uno, nullptr, nullptr, nullptr, {0} }
};
-gboolean ensure_dbus_setup( gpointer data )
+static gboolean ensure_dbus_setup( gpointer data )
{
GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( data );
GdkWindow* gdkWindow = widget_get_window( pSalFrame->getWindow() );
@@ -3645,7 +3645,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand
pThis->updateIMSpotLocation();
}
-uno::Reference<accessibility::XAccessibleEditableText>
+static uno::Reference<accessibility::XAccessibleEditableText>
FindFocus(const uno::Reference< accessibility::XAccessibleContext >& xContext)
{
if (!xContext.is())
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 84add236d0be..aa2f0eeab396 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -58,7 +58,7 @@ bool GtkSalMenu::PrepUpdate()
* Menu updating methods
*/
-void RemoveSpareItemsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, unsigned nSection, unsigned nValidItems )
+static void RemoveSpareItemsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, unsigned nSection, unsigned nValidItems )
{
sal_Int32 nSectionItems = g_lo_menu_get_n_items_from_section( pMenu, nSection );
@@ -97,7 +97,7 @@ namespace
}
}
-void RemoveDisabledItemsFromNativeMenu(GLOMenu* pMenu, GList** pOldCommandList,
+static void RemoveDisabledItemsFromNativeMenu(GLOMenu* pMenu, GList** pOldCommandList,
sal_Int32 nSection, GActionGroup* pActionGroup)
{
while (nSection >= 0)
@@ -156,7 +156,7 @@ void RemoveDisabledItemsFromNativeMenu(GLOMenu* pMenu, GList** pOldCommandList,
}
}
-void RemoveSpareSectionsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, sal_Int32 nLastSection )
+static void RemoveSpareSectionsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, sal_Int32 nLastSection )
{
if ( pMenu == nullptr || pOldCommandList == nullptr )
return;
@@ -170,12 +170,12 @@ void RemoveSpareSectionsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList,
}
}
-gint CompareStr( gpointer str1, gpointer str2 )
+static gint CompareStr( gpointer str1, gpointer str2 )
{
return g_strcmp0( static_cast<const gchar*>(str1), static_cast<const gchar*>(str2) );
}
-void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList, GList* pNewCommandList )
+static void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList, GList* pNewCommandList )
{
if ( pActionGroup == nullptr || pOldCommandList == nullptr )
{
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index f932cd4ba47c..ac188941d819 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -450,7 +450,7 @@ void NWPixmapCacheList::ThemeChanged( )
/*********************************************************
* Make border manipulation easier
*********************************************************/
-inline void NW_gtk_border_set_from_border( GtkBorder& aDst, const GtkBorder * pSrc )
+static inline void NW_gtk_border_set_from_border( GtkBorder& aDst, const GtkBorder * pSrc )
{
aDst.left = pSrc->left;
aDst.top = pSrc->top;
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index 48047240e643..db810d745cd4 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -61,7 +61,7 @@ using namespace vcl_sal;
* class GtkSalDisplay *
***************************************************************/
extern "C" {
-GdkFilterReturn call_filterGdkEvent( GdkXEvent* sys_event,
+static GdkFilterReturn call_filterGdkEvent( GdkXEvent* sys_event,
GdkEvent* /*event*/,
gpointer data )
{
@@ -103,13 +103,13 @@ GtkSalDisplay::~GtkSalDisplay()
extern "C" {
-void signalScreenSizeChanged( GdkScreen* pScreen, gpointer data )
+static void signalScreenSizeChanged( GdkScreen* pScreen, gpointer data )
{
GtkSalDisplay* pDisp = static_cast<GtkSalDisplay*>(data);
pDisp->screenSizeChanged( pScreen );
}
-void signalMonitorsChanged( GdkScreen* pScreen, gpointer data )
+static void signalMonitorsChanged( GdkScreen* pScreen, gpointer data )
{
GtkSalDisplay* pDisp = static_cast<GtkSalDisplay*>(data);
pDisp->monitorsChanged( pScreen );
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 1f36f039a58c..1953c055a39a 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -351,7 +351,7 @@ struct KeyAlternate
KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
};
-inline KeyAlternate
+static inline KeyAlternate
GetAlternateKeyCode( const sal_uInt16 nKeyCode )
{
KeyAlternate aAlternate;
@@ -599,7 +599,7 @@ static const GActionEntry app_entries[] = {
{ "New", activate_uno, nullptr, nullptr, nullptr, {0} }
};
-gboolean ensure_dbus_setup( gpointer data )
+static gboolean ensure_dbus_setup( gpointer data )
{
GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( data );
GdkWindow* gdkWindow = widget_get_window( pSalFrame->getWindow() );
@@ -4176,7 +4176,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand
pThis->updateIMSpotLocation();
}
-uno::Reference<accessibility::XAccessibleEditableText>
+static uno::Reference<accessibility::XAccessibleEditableText>
FindFocus(uno::Reference< accessibility::XAccessibleContext > const & xContext)
{
if (!xContext.is())
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 1d5ca9e415ef..d99fa04f09fb 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2235,7 +2235,7 @@ public:
}
};
-GType crippled_viewport_get_type();
+static GType crippled_viewport_get_type();
#define CRIPPLED_TYPE_VIEWPORT (crippled_viewport_get_type ())
#define CRIPPLED_VIEWPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CRIPPLED_TYPE_VIEWPORT, CrippledViewport))
@@ -2380,7 +2380,7 @@ GType crippled_viewport_get_type()
return type;
}
-VclPolicyType GtkToVcl(GtkPolicyType eType)
+static VclPolicyType GtkToVcl(GtkPolicyType eType)
{
VclPolicyType eRet(VclPolicyType::NEVER);
switch (eType)
@@ -2399,7 +2399,7 @@ VclPolicyType GtkToVcl(GtkPolicyType eType)
return eRet;
}
-GtkPolicyType VclToGtk(VclPolicyType eType)
+static GtkPolicyType VclToGtk(VclPolicyType eType)
{
GtkPolicyType eRet(GTK_POLICY_ALWAYS);
switch (eType)
@@ -2417,7 +2417,7 @@ GtkPolicyType VclToGtk(VclPolicyType eType)
return eRet;
}
-GtkMessageType VclToGtk(VclMessageType eType)
+static GtkMessageType VclToGtk(VclMessageType eType)
{
GtkMessageType eRet(GTK_MESSAGE_INFO);
switch (eType)
@@ -2438,7 +2438,7 @@ GtkMessageType VclToGtk(VclMessageType eType)
return eRet;
}
-GtkButtonsType VclToGtk(VclButtonsType eType)
+static GtkButtonsType VclToGtk(VclButtonsType eType)
{
GtkButtonsType eRet(GTK_BUTTONS_NONE);
switch (eType)
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 9037cff8c11b..17433d0a8f8e 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -2577,7 +2577,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
return true;
}
-tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, GtkWidget* widget)
+static tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, GtkWidget* widget)
{
GtkRequisition aReq;
gtk_widget_get_preferred_size(widget, nullptr, &aReq);
@@ -2585,7 +2585,7 @@ tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, GtkWidget
return tools::Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight));
}
-tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const tools::Rectangle& rControlRegion)
+static tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const tools::Rectangle& rControlRegion)
{
GtkBorder border;
gtk_style_context_get_border(pStyle, gtk_style_context_get_state(pStyle), &border);
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index aeb864eae2ef..15ff95f02074 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -44,7 +44,7 @@ void sendIpcArg(std::ostream& stream, const QString& string)
sendIpcStringArg(stream, utf8.size(), utf8.data());
}
-void sendIpcArg(std::ostream& stream, const QStringList& list)
+static void sendIpcArg(std::ostream& stream, const QStringList& list)
{
stream << static_cast<uint32_t>(list.size()) << ' ';
for (const auto& entry : list)
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index c6ce35128e09..5454344b949d 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -98,13 +98,13 @@ namespace
}
}
-OUString toOUString(const QString& s)
+static OUString toOUString(const QString& s)
{
// QString stores UTF16, just like OUString
return OUString(reinterpret_cast<const sal_Unicode*>(s.data()), s.length());
}
-QString toQString(const OUString& s)
+static QString toQString(const OUString& s)
{
return QString::fromUtf16(
reinterpret_cast<ushort const *>(s.getStr()), s.getLength());
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 01da2c5fad8f..7cbcfeab3ed6 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -41,7 +41,7 @@
@param nControlState State of the widget (default, focused, ...) in Native Widget Framework.
@param aValue Value held by the widget (on, off, ...)
*/
-QStyle::State vclStateValue2StateFlag( ControlState nControlState,
+static QStyle::State vclStateValue2StateFlag( ControlState nControlState,
const ImplControlValue& aValue )
{
QStyle::State nState =
@@ -67,7 +67,7 @@ QStyle::State vclStateValue2StateFlag( ControlState nControlState,
@param rControlRegion The tools::Rectangle to convert.
@return The matching QRect
*/
-QRect region2QRect( const tools::Rectangle& rControlRegion )
+static QRect region2QRect( const tools::Rectangle& rControlRegion )
{
return QRect(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
}