Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
0ee2cddf
Kaydet (Commit)
0ee2cddf
authored
Kas 27, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Properly encapsulate svt::TextWindowPeer
Change-Id: Iffa67c345a03852ad7872031b4c5a87e223ffcad
üst
758abf01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
53 deletions
+56
-53
baside2b.cxx
basctl/source/basicide/baside2b.cxx
+1
-1
textwindowpeer.hxx
include/svtools/textwindowpeer.hxx
+11
-32
textwindowpeer.cxx
svtools/source/edit/textwindowpeer.cxx
+44
-20
No files found.
basctl/source/basicide/baside2b.cxx
Dosyayı görüntüle @
0ee2cddf
...
...
@@ -2102,7 +2102,7 @@ EditorWindow::GetComponentInterface(sal_Bool bCreate)
if
(
!
pEditEngine
)
CreateEditEngine
();
xPeer
=
new
::
svt
::
TextWindowPeer
(
*
GetEditView
());
xPeer
=
svt
::
create
TextWindowPeer
(
*
GetEditView
());
SetComponentInterface
(
xPeer
);
}
return
xPeer
;
...
...
include/svtools/textwindowpeer.hxx
Dosyayı görüntüle @
0ee2cddf
...
...
@@ -20,45 +20,24 @@
#ifndef INCLUDED_SVTOOLS_TEXTWINDOWPEER_HXX
#define INCLUDED_SVTOOLS_TEXTWINDOWPEER_HXX
#include <svtools/svtdllapi.h>
#include <toolkit/awt/vclxwindow.hxx>
#include <sal/config.h>
#include <memory>
#include <com/sun/star/uno/Reference.hxx>
#include <sal/types.h>
#include <svtools/svtdllapi.h>
class
TextEngine
;
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
awt
{
class
XWindowPeer
;
}
}
}
}
class
TextView
;
namespace
svt
{
class
AccessibleFactoryAccess
;
class
TextWindowPeer
:
public
::
VCLXWindow
{
public
:
SVT_DLLPUBLIC
TextWindowPeer
(
::
TextView
&
rView
);
virtual
~
TextWindowPeer
();
private
:
// VCLXWindow inherits funny copy constructor and assignment operator from
// ::cppu::OWeakObject, so override them here:
TextWindowPeer
(
TextWindowPeer
&
);
// not implemented
void
operator
=
(
TextWindowPeer
);
// not implemented
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessibleContext
>
CreateAccessibleContext
();
::
TextEngine
&
m_rEngine
;
::
TextView
&
m_rView
;
namespace
svt
{
::
std
::
auto_ptr
<
::
svt
::
AccessibleFactoryAccess
>
m_pFactoryAccess
;
}
;
css
::
uno
::
Reference
<
css
::
awt
::
XWindowPeer
>
SVT_DLLPUBLIC
createTextWindowPeer
(
TextView
&
view
)
;
}
#endif
// INCLUDED_SVTOOLS_TEXTWINDOWPEER_HXX
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svtools/source/edit/textwindowpeer.cxx
Dosyayı görüntüle @
0ee2cddf
...
...
@@ -17,31 +17,55 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <svtaccessiblefactory.hxx>
#include <boost/noncopyable.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/awt/XWindowPeer.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <sal/types.h>
#include <svtools/textwindowpeer.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <vcl/texteng.hxx>
#include <vcl/textview.hxx>
#include "svtaccessiblefactory.hxx"
namespace
svt
namespace
{
class
TextWindowPeer
:
public
VCLXWindow
,
private
boost
::
noncopyable
{
public
:
explicit
TextWindowPeer
(
TextView
&
view
);
virtual
~
TextWindowPeer
()
{}
private
:
virtual
css
::
uno
::
Reference
<
css
::
accessibility
::
XAccessibleContext
>
CreateAccessibleContext
();
TextEngine
&
m_rEngine
;
TextView
&
m_rView
;
svt
::
AccessibleFactoryAccess
m_aFactoryAccess
;
};
TextWindowPeer
::
TextWindowPeer
(
TextView
&
view
)
:
m_rEngine
(
*
view
.
GetTextEngine
()),
m_rView
(
view
)
{
SetWindow
(
view
.
GetWindow
());
}
css
::
uno
::
Reference
<
css
::
accessibility
::
XAccessibleContext
>
TextWindowPeer
::
CreateAccessibleContext
()
{
return
m_aFactoryAccess
.
getFactory
().
createAccessibleTextWindowContext
(
this
,
m_rEngine
,
m_rView
);
}
}
css
::
uno
::
Reference
<
css
::
awt
::
XWindowPeer
>
svt
::
createTextWindowPeer
(
TextView
&
view
)
{
TextWindowPeer
::
TextWindowPeer
(
::
TextView
&
rView
)
:
m_rEngine
(
*
rView
.
GetTextEngine
()),
m_rView
(
rView
)
{
SetWindow
(
rView
.
GetWindow
());
m_pFactoryAccess
.
reset
(
new
AccessibleFactoryAccess
);
}
// virtual
TextWindowPeer
::~
TextWindowPeer
()
{
}
css
::
uno
::
Reference
<
css
::
accessibility
::
XAccessibleContext
>
TextWindowPeer
::
CreateAccessibleContext
()
{
return
m_pFactoryAccess
->
getFactory
().
createAccessibleTextWindowContext
(
this
,
m_rEngine
,
m_rView
);
}
return
new
TextWindowPeer
(
view
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment