summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-14 14:35:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-14 18:34:57 +0000
commit3223c551c37c6b10b5b7de23ffa4520d720338b6 (patch)
treeb6f12badb8470a2ae8acb1c885f27a160d33734f /include/vcl
parentd7afcb0e72aaa1c8f55b6a82fa40bebc6565c283 (diff)
loplugin:mergeclasses merge TextView with ExtTextView
Change-Id: If7e11dd8f6b2cb6dc19c6aa3f7e50e2e88861eac Reviewed-on: https://gerrit.libreoffice.org/29828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/texteng.hxx1
-rw-r--r--include/vcl/textview.hxx37
-rw-r--r--include/vcl/vclmedit.hxx4
-rw-r--r--include/vcl/xtextedt.hxx18
4 files changed, 28 insertions, 32 deletions
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index 5a13c2390f6f..f9d3e1980f47 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -79,7 +79,6 @@ class VCL_DLLPUBLIC TextEngine : public SfxBroadcaster
friend class TextView;
friend class TextSelFunctionSet;
friend class ExtTextEngine;
- friend class ExtTextView;
friend class TextUndo;
friend class TextUndoManager;
diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx
index 6eef0f99ea89..efb197eebc3f 100644
--- a/include/vcl/textview.hxx
+++ b/include/vcl/textview.hxx
@@ -39,11 +39,18 @@ class SelectionEngine;
class VirtualDevice;
struct TextDDInfo;
-namespace com { namespace sun { namespace star { namespace datatransfer { namespace clipboard {
- class XClipboard;
-}}}}}
+namespace com { namespace sun { namespace star {
+ namespace datatransfer { namespace clipboard {
+ class XClipboard;
+ } }
+ namespace util {
+ struct SearchOptions;
+ }
+}}}
+
struct ImpTextView;
+class ExtTextEngine;
class VCL_DLLPUBLIC TextView : public vcl::unohelper::DragAndDropClient
{
@@ -51,7 +58,6 @@ class VCL_DLLPUBLIC TextView : public vcl::unohelper::DragAndDropClient
friend class TextUndo;
friend class TextUndoManager;
friend class TextSelFunctionSet;
- friend class ExtTextView;
private:
std::unique_ptr<ImpTextView> mpImpl;
@@ -60,6 +66,7 @@ private:
TextView& operator=( const TextView& ) = delete;
protected:
+ bool ImpIndentBlock( bool bRight );
void ShowSelection();
void HideSelection();
void ShowSelection( const TextSelection& rSel );
@@ -95,7 +102,7 @@ protected:
using DragAndDropClient::dragOver;
public:
- TextView( TextEngine* pEng, vcl::Window* pWindow );
+ TextView( ExtTextEngine* pEng, vcl::Window* pWindow );
virtual ~TextView() override;
TextEngine* GetTextEngine() const;
@@ -139,7 +146,7 @@ public:
void Undo();
void Redo();
- bool Read( SvStream& rInput );
+ bool Read( SvStream& rInput );
void SetStartDocPos( const Point& rPos );
const Point& GetStartDocPos() const;
@@ -148,18 +155,18 @@ public:
Point GetWindowPos( const Point& rDocPos ) const;
void SetInsertMode( bool bInsert );
- bool IsInsertMode() const;
+ bool IsInsertMode() const;
void SetAutoIndentMode( bool bAutoIndent );
void SetReadOnly( bool bReadOnly );
- bool IsReadOnly() const;
+ bool IsReadOnly() const;
void SetAutoScroll( bool bAutoScroll );
- bool IsAutoScroll() const;
+ bool IsAutoScroll() const;
- bool SetCursorAtPoint( const Point& rPointPixel );
- bool IsSelectionAtPoint( const Point& rPointPixel );
+ bool SetCursorAtPoint( const Point& rPointPixel );
+ bool IsSelectionAtPoint( const Point& rPointPixel );
void SetPaintSelection( bool bPaint);
@@ -194,6 +201,14 @@ public:
if enabled, -1 otherwise.
*/
sal_Int32 GetLineNumberOfCursorInSelection() const;
+
+ bool MatchGroup();
+
+ bool Search( const css::util::SearchOptions& rSearchOptions, bool bForward );
+ sal_uInt16 Replace( const css::util::SearchOptions& rSearchOptions, bool bAll, bool bForward );
+
+ bool IndentBlock();
+ bool UnindentBlock();
};
#endif
diff --git a/include/vcl/vclmedit.hxx b/include/vcl/vclmedit.hxx
index f89447fc116c..84b5a6bea56c 100644
--- a/include/vcl/vclmedit.hxx
+++ b/include/vcl/vclmedit.hxx
@@ -28,7 +28,7 @@
class ImpVclMEdit;
class Timer;
class ExtTextEngine;
-class ExtTextView;
+class TextView;
class VCL_DLLPUBLIC VclMultiLineEdit : public Edit
{
@@ -53,7 +53,7 @@ protected:
static WinBits ImplInitStyle( WinBits nStyle );
ExtTextEngine* GetTextEngine() const;
- ExtTextView* GetTextView() const;
+ TextView* GetTextView() const;
ScrollBar* GetVScrollBar() const;
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
diff --git a/include/vcl/xtextedt.hxx b/include/vcl/xtextedt.hxx
index 565872ee1be2..3db5f6c7e313 100644
--- a/include/vcl/xtextedt.hxx
+++ b/include/vcl/xtextedt.hxx
@@ -43,24 +43,6 @@ public:
bool Search( TextSelection& rSel, const css::util::SearchOptions& rSearchOptions, bool bForward = true );
};
-class VCL_DLLPUBLIC ExtTextView : public TextView
-{
-protected:
- bool ImpIndentBlock( bool bRight );
-
-public:
- ExtTextView( ExtTextEngine* pEng, vcl::Window* pWindow );
- virtual ~ExtTextView() override;
-
- bool MatchGroup();
-
- bool Search( const css::util::SearchOptions& rSearchOptions, bool bForward );
- sal_uInt16 Replace( const css::util::SearchOptions& rSearchOptions, bool bAll, bool bForward );
-
- bool IndentBlock();
- bool UnindentBlock();
-};
-
#endif // INCLUDED_VCL_XTEXTEDT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */