summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-05-28 17:13:38 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-05-29 09:50:14 +0200
commit6bccdf23fdf755494e840a3a21380a754969df73 (patch)
tree3cfe6b88e1b4a739e05b68c19402e24457c56632 /include
parent7a3d25c5916dc293a8d30e24c41aee4b7154a39a (diff)
SvxSearchItem: add m_nStartPoint{X,Y}
The idea is that if you have your cursor at the begining of a Writer document, and you scroll down a lot, then search, then it's annoying that search jumps back to the start of the document for the first hit. Add an optional way to provide what is the starting point of such a search, so we can have "when nothing is selected, then search from the top left corner of the visible area". No UI yet to enable this, but available via the UNO API. Change-Id: Ibcf3a5f2eeba1372b1dfe8474081e6591a6e0134 (cherry picked from commit 1dc60bc9e99304c58007bfd5a964ff3f78480106)
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/msg.hxx2
-rw-r--r--include/svl/memberid.hrc2
-rw-r--r--include/svl/srchitem.hxx9
3 files changed, 12 insertions, 1 deletions
diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx
index 58785ff82d5d..89faffd09c06 100644
--- a/include/sfx2/msg.hxx
+++ b/include/sfx2/msg.hxx
@@ -155,7 +155,7 @@ SFX_DECL_TYPE(13); // for SwAddPrinterItem, Sd...
SFX_DECL_TYPE(14);
SFX_DECL_TYPE(16); // for SwDocDisplayItem
SFX_DECL_TYPE(17); // for SvxAddressItem
-SFX_DECL_TYPE(18); // for SvxSearchItem
+SFX_DECL_TYPE(20); // for SvxSearchItem
// all SfxTypes must be in this header
#undef SFX_DECL_TYPE
diff --git a/include/svl/memberid.hrc b/include/svl/memberid.hrc
index ef5639523e8e..1593e2379aec 100644
--- a/include/svl/memberid.hrc
+++ b/include/svl/memberid.hrc
@@ -53,6 +53,8 @@
#define MID_SEARCH_INSERTEDCHARS 17
#define MID_SEARCH_TRANSLITERATEFLAGS 18
#define MID_SEARCH_COMMAND 19
+#define MID_SEARCH_STARTPOINTX 20
+#define MID_SEARCH_STARTPOINTY 21
#endif
diff --git a/include/svl/srchitem.hxx b/include/svl/srchitem.hxx
index 7ce0f77c8922..9a298585e43a 100644
--- a/include/svl/srchitem.hxx
+++ b/include/svl/srchitem.hxx
@@ -84,6 +84,10 @@ class SVL_DLLPUBLIC SvxSearchItem :
bool bContent; // search in content
bool bAsianOptions; // use asian options?
+ // Start search at this point (absolute twips).
+ sal_Int32 m_nStartPointX;
+ sal_Int32 m_nStartPointY;
+
virtual void ImplCommit() SAL_OVERRIDE;
public:
@@ -184,6 +188,11 @@ public:
inline bool IsUseAsianOptions() const { return bAsianOptions; }
inline void SetUseAsianOptions( bool bVal ) { bAsianOptions = bVal; }
+
+ sal_Int32 GetStartPointX() const;
+ sal_Int32 GetStartPointY() const;
+ /// Either x or y start point is set.
+ bool HasStartPoint() const;
};
const OUString SvxSearchItem::GetSearchString() const