summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-04 18:26:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-04 18:29:31 +0100
commit3042fa532a9b26203491b36f94d709c3b73e46ff (patch)
tree11b75a3e6f3d71e930b71a456eac57439386edd3 /vcl/inc
parent967331ef6a2765b7021bf835ce85f783257a936c (diff)
Move SalGenericData::GetSalDisplay() out of generic/gendata.hxx
...as it needs SalDisplay to be a complete type, but unx/saldisp.hxx depends on X11 headers and can thus e.g. not be included in generic/gendata.hxx on Android. Change-Id: Iec5f51408eef0d6eb7e2d04105a7408372b06079
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/generic/gendata.hxx9
-rw-r--r--vcl/inc/unx/saldata.hxx4
-rw-r--r--vcl/inc/unx/saldisp.hxx10
3 files changed, 14 insertions, 9 deletions
diff --git a/vcl/inc/generic/gendata.hxx b/vcl/inc/generic/gendata.hxx
index 6cd17b26ca86..384c20a55549 100644
--- a/vcl/inc/generic/gendata.hxx
+++ b/vcl/inc/generic/gendata.hxx
@@ -12,12 +12,12 @@
#include <osl/socket.hxx>
-#include <generic/gendisp.hxx>
#include <saldatabasic.hxx>
-#include <unx/saldisp.hxx>
// Not the prettiest - but helpful for migrating old code ...
class GtkSalDisplay;
+class SalGenericDisplay;
+
enum SalGenericDataType { SAL_DATA_GTK, SAL_DATA_GTK3,
SAL_DATA_TDE3, SAL_DATA_KDE3, SAL_DATA_KDE4,
SAL_DATA_UNX, SAL_DATA_SVP,
@@ -61,11 +61,6 @@ class VCL_DLLPUBLIC SalGenericData : public SalData
virtual bool ErrorTrapPop( bool bIgnoreError = true ) = 0; // true on error
// Not the prettiest - but helpful for migrating old code ...
- inline SalDisplay *GetSalDisplay() const
- {
- OSL_ASSERT( m_eType != SAL_DATA_GTK3 );
- return static_cast<SalDisplay *>(GetDisplay());
- }
inline GtkSalDisplay *GetGtkDisplay() const
{
return (GtkSalDisplay *)GetDisplay();
diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx
index f2f7b1e8cc15..2c5823177217 100644
--- a/vcl/inc/unx/saldata.hxx
+++ b/vcl/inc/unx/saldata.hxx
@@ -23,6 +23,7 @@
#include <prex.h>
#include <postx.h>
+#include <unx/saldisp.hxx>
#include <unx/salunx.h>
#include <vcl/salgtype.hxx>
#include <salframe.hxx>
@@ -68,7 +69,8 @@ public:
virtual void initNWF();
virtual void deInitNWF();
- SalDisplay* GetX11Display() const { return GetSalDisplay(); }
+ SalDisplay* GetX11Display() const
+ { return vcl_sal::getSalDisplay(this); }
void DeleteDisplay(); // for shutdown
inline SalXLib* GetLib() const { return pXLib_; }
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 5f0e8941f710..896ac5234248 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -36,6 +36,7 @@ class SalXLib;
#include <boost/unordered_map.hpp>
#include <tools/gen.hxx>
#include <salwtype.hxx>
+#include <generic/gendata.hxx>
#include <generic/gendisp.hxx>
#include <vclpluginapi.h>
@@ -404,11 +405,18 @@ public:
void SetupInput( SalI18N_InputMethod *pInputMethod );
};
-// get foreign key names
namespace vcl_sal {
+ // get foreign key names
OUString getKeysymReplacementName(
const OUString& pLang,
KeySym nSymbol );
+
+ inline SalDisplay *getSalDisplay(SalGenericData const * data)
+ {
+ assert(data != nullptr);
+ assert(data->GetType() != SAL_DATA_GTK3);
+ return static_cast<SalDisplay *>(data->GetDisplay());
+ }
}
#endif // INCLUDED_VCL_INC_UNX_SALDISP_HXX