[Libreoffice-commits] core.git: Branch 'feature/kde5' - 2 commits - vcl/unx
Katarina Behrens
Katarina.Behrens at cib.de
Wed Oct 4 19:52:05 UTC 2017
vcl/unx/kde5/KDE5Data.hxx | 2 ++
vcl/unx/kde5/KDE5SalFrame.cxx | 14 ++++++++++++++
vcl/unx/kde5/KDE5SalFrame.hxx | 1 +
vcl/unx/kde5/KDE5SalInstance.hxx | 5 +++++
vcl/unx/kde5/main.cxx | 2 +-
5 files changed, 23 insertions(+), 1 deletion(-)
New commits:
commit 6e1fceb09d30dba85a97b69d3956fde2ad7ae777
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Wed Oct 4 21:20:15 2017 +0200
Implement getCairoContext
Change-Id: Ib39ca1e1d73ad4dc91c70ac3f4cdd1bdd24c2b29
diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx
index 1e405ef629d1..a58c2d3723f1 100644
--- a/vcl/unx/kde5/KDE5SalFrame.cxx
+++ b/vcl/unx/kde5/KDE5SalFrame.cxx
@@ -383,4 +383,18 @@ SalGraphics* KDE5SalFrame::AcquireGraphics()
return nullptr;
}
+cairo_t* KDE5SalFrame::getCairoContext() const
+{
+ for( int i = 0; i < nMaxGraphics; i++ )
+ {
+ if( ! m_aGraphics[i].bInUse )
+ {
+ cairo_t* cr = cairo_create( m_aGraphics[i].pSurface );
+ assert(cr);
+ return cr;
+ }
+ }
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde5/KDE5SalFrame.hxx b/vcl/unx/kde5/KDE5SalFrame.hxx
index ab98ee933c2a..7cc2a8e97662 100644
--- a/vcl/unx/kde5/KDE5SalFrame.hxx
+++ b/vcl/unx/kde5/KDE5SalFrame.hxx
@@ -111,6 +111,7 @@ class KDE5SalFrame : public SalFrame
virtual void Flush() override { return; }
+ cairo_t* getCairoContext() const;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 61fa5a01d8c2cbde1d5d2016198edc811e7c81ec
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Wed Oct 4 20:45:28 2017 +0200
Get/SetLib works again
Change-Id: Icc007d5c08f88ffdeb6e2d033615dccb140862ea
diff --git a/vcl/unx/kde5/KDE5Data.hxx b/vcl/unx/kde5/KDE5Data.hxx
index 1106663d3910..6feedbe81734 100644
--- a/vcl/unx/kde5/KDE5Data.hxx
+++ b/vcl/unx/kde5/KDE5Data.hxx
@@ -35,6 +35,8 @@ class KDE5Data //: public X11SalData
virtual void Init() ;
virtual void initNWF() ;
virtual void deInitNWF() ;
+
+ KDE5XLib* GetLib() { return pXLib_; }
private:
KDE5XLib *pXLib_;
QApplication* qMyApp;
diff --git a/vcl/unx/kde5/KDE5SalInstance.hxx b/vcl/unx/kde5/KDE5SalInstance.hxx
index e6169256020e..54f2798dc65e 100644
--- a/vcl/unx/kde5/KDE5SalInstance.hxx
+++ b/vcl/unx/kde5/KDE5SalInstance.hxx
@@ -23,6 +23,7 @@
class SalYieldMutex;
class SalFrame;
+class KDE5XLib;
class KDE5SalInstance : public SvpSalInstance
{
@@ -41,6 +42,10 @@ public:
css::uno::XComponentContext >& ) override;
virtual bool IsMainThread() const override;
+ void SetLib( KDE5XLib *pXLib ) { m_pXLib = pXLib; }
+
+private:
+ KDE5XLib *m_pXLib;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde5/main.cxx b/vcl/unx/kde5/main.cxx
index c26d2ab25c4f..654a9d654ee8 100644
--- a/vcl/unx/kde5/main.cxx
+++ b/vcl/unx/kde5/main.cxx
@@ -79,7 +79,7 @@ extern "C" {
KDE5Data *salData = new KDE5Data( pInstance );
salData->Init();
salData->initNWF();
- //pInstance->SetLib(salData->GetLib());
+ pInstance->SetLib(salData->GetLib());
return pInstance;
}
More information about the Libreoffice-commits
mailing list