summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/a11y
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-09-15 19:13:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-09-17 09:05:38 +0200
commit206b5b2661be37efdff3c6aedb6f248c4636be79 (patch)
treeaf385e5b4725dcfea23988d9113cced8e9ccaf3c /vcl/unx/gtk/a11y
parenta85d3ba1c0de313b60324b9ecfa488bb99d69d06 (diff)
New loplugin:external
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/unx/gtk/a11y')
-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
6 files changed, 10 insertions, 6 deletions
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
{