LibreOffice Module sw (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwAddressPreview Class Referencefinal

#include <mailmergehelper.hxx>

Inheritance diagram for SwAddressPreview:
[legend]
Collaboration diagram for SwAddressPreview:
[legend]

Public Member Functions

 SwAddressPreview (std::unique_ptr< weld::ScrolledWindow > xParent)
 
virtual ~SwAddressPreview () override
 
void AddAddress (const OUString &rAddress)
 The address string is a list of address elements separated by spaces and breaks. More...
 
void SetAddress (const OUString &rAddress)
 
void Clear ()
 
sal_uInt16 GetSelectedAddress () const
 
void SelectAddress (sal_uInt16 nSelect)
 
void ReplaceSelectedAddress (const OUString &)
 
void RemoveSelectedAddress ()
 
void SetLayout (sal_uInt16 nRows, sal_uInt16 nColumns)
 
void EnableScrollBar ()
 
void SetSelectHdl (const Link< LinkParamNone *, void > &rLink)
 
- Public Member Functions inherited from weld::CustomWidgetController
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible ()
 
virtual void Resize ()
 
virtual bool MouseMove (const MouseEvent &)
 
virtual bool MouseButtonUp (const MouseEvent &)
 
virtual void GetFocus ()
 
virtual void LoseFocus ()
 
virtual void StyleUpdated ()
 
virtual bool Command (const CommandEvent &)
 
virtual tools::Rectangle GetFocusRect ()
 
virtual FactoryFunction GetUITestFactory () const
 
virtual OUString RequestHelp (tools::Rectangle &)
 
virtual OUString GetHelpText () const
 
Size const & GetOutputSizePixel () const
 
void SetOutputSizePixel (const Size &rSize)
 
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea)
 
weld::DrawingAreaGetDrawingArea () const
 
void Invalidate ()
 
void Invalidate (const tools::Rectangle &rRect)
 
virtual void Show ()
 
virtual void Hide ()
 
void GrabFocus ()
 
bool HasFocus () const
 
bool HasChildFocus () const
 
bool IsVisible () const
 
bool IsReallyVisible () const
 
bool IsEnabled () const
 
void Enable () const
 
void Disable () const
 
bool IsActive () const
 
int GetTextHeight () const
 
int GetTextWidth (const OUString &rText) const
 
OUString GetAccessibleName () const
 
OUString GetAccessibleDescription () const
 
void CaptureMouse ()
 
bool IsMouseCaptured () const
 
Point GetPointerPosPixel () const
 
void EnableRTL (bool bEnable)
 
bool IsRTLEnabled () const
 
void ReleaseMouse ()
 
void SetPointer (PointerStyle ePointerStyle)
 
void SetHelpId (const OString &rHelpId)
 
void SetAccessibleName (const OUString &rName)
 
void SetInputContext (const InputContext &rInputContext)
 
void SetCursorRect (const tools::Rectangle &rCursorRect, int nExtTextInputWidth)
 
virtual int GetSurroundingText (OUString &)
 
virtual bool DeleteSurroundingText (const Selection &)
 
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget ()
 
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard () const
 
void SetDragDataTransferrable (rtl::Reference< TransferDataContainer > &rTransferrable, sal_uInt8 eDNDConstants)
 
virtual bool StartDrag ()
 
void set_size_request (int nWidth, int nHeight)
 
void queue_resize ()
 
 CustomWidgetController ()
 
virtual ~CustomWidgetController ()
 
 CustomWidgetController (CustomWidgetController const &)=default
 
 CustomWidgetController (CustomWidgetController &&)=default
 
CustomWidgetControlleroperator= (CustomWidgetController const &)=default
 
CustomWidgetControlleroperator= (CustomWidgetController &&)=default
 

Static Public Member Functions

static OUString FillData (const OUString &rAddress, SwMailMergeConfigItem const &rConfigItem, const css::uno::Sequence< OUString > *pAssignments=nullptr)
 
- Static Public Member Functions inherited from weld::CustomWidgetController
static bool IsUpdateMode ()
 

Private Member Functions

void DrawText_Impl (vcl::RenderContext &rRenderContext, std::u16string_view rAddress, const Point &rTopLeft, const Size &rSize, bool bIsSelected)
 
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
 
virtual bool MouseButtonDown (const MouseEvent &rMEvt) override
 
virtual bool KeyInput (const KeyEvent &rKEvt) override
 
void UpdateScrollBar ()
 
 DECL_DLLPRIVATE_LINK (ScrollHdl, weld::ScrolledWindow &, void)
 

Private Attributes

std::unique_ptr< SwAddressPreview_Implm_pImpl
 
std::unique_ptr< weld::ScrolledWindowm_xVScrollBar
 
Link< LinkParamNone *, voidm_aSelectHdl
 

Detailed Description

Definition at line 60 of file mailmergehelper.hxx.

Constructor & Destructor Documentation

SwAddressPreview::SwAddressPreview ( std::unique_ptr< weld::ScrolledWindow xParent)

Definition at line 280 of file mailmergehelper.cxx.

References LINK, m_pImpl, and m_xVScrollBar.

SwAddressPreview::~SwAddressPreview ( )
overridevirtual

Definition at line 287 of file mailmergehelper.cxx.

Member Function Documentation

void SwAddressPreview::AddAddress ( const OUString &  rAddress)

The address string is a list of address elements separated by spaces and breaks.

The addresses fit into the given layout. If more addresses then rows/columns should be used a scrollbar will be added.

AddAddress appends the new address to the already added ones. Initially the first added address will be selected

Definition at line 296 of file mailmergehelper.cxx.

References m_pImpl, and UpdateScrollBar().

void SwAddressPreview::Clear ( )

Definition at line 327 of file mailmergehelper.cxx.

References m_pImpl, and UpdateScrollBar().

SwAddressPreview::DECL_DLLPRIVATE_LINK ( ScrollHdl  ,
weld::ScrolledWindow ,
void   
)
private
void SwAddressPreview::DrawText_Impl ( vcl::RenderContext rRenderContext,
std::u16string_view  rAddress,
const Point rTopLeft,
const Size rSize,
bool  bIsSelected 
)
private
void SwAddressPreview::EnableScrollBar ( )

Definition at line 356 of file mailmergehelper.cxx.

References m_pImpl.

OUString SwAddressPreview::FillData ( const OUString &  rAddress,
SwMailMergeConfigItem const &  rConfigItem,
const css::uno::Sequence< OUString > *  pAssignments = nullptr 
)
static
sal_uInt16 SwAddressPreview::GetSelectedAddress ( ) const

Definition at line 310 of file mailmergehelper.cxx.

References m_pImpl.

bool SwAddressPreview::KeyInput ( const KeyEvent rKEvt)
overrideprivatevirtual
bool SwAddressPreview::MouseButtonDown ( const MouseEvent rMEvt)
overrideprivatevirtual
void SwAddressPreview::Paint ( vcl::RenderContext rRenderContext,
const tools::Rectangle  
)
overrideprivatevirtual
void SwAddressPreview::RemoveSelectedAddress ( )
void SwAddressPreview::ReplaceSelectedAddress ( const OUString &  rNew)

Definition at line 334 of file mailmergehelper.cxx.

References weld::CustomWidgetController::Invalidate(), and m_pImpl.

void SwAddressPreview::SelectAddress ( sal_uInt16  nSelect)

Definition at line 316 of file mailmergehelper.cxx.

References m_pImpl, and m_xVScrollBar.

void SwAddressPreview::SetAddress ( const OUString &  rAddress)
void SwAddressPreview::SetLayout ( sal_uInt16  nRows,
sal_uInt16  nColumns 
)

Definition at line 349 of file mailmergehelper.cxx.

References m_pImpl, and UpdateScrollBar().

void SwAddressPreview::SetSelectHdl ( const Link< LinkParamNone *, void > &  rLink)
inline

Definition at line 107 of file mailmergehelper.hxx.

void SwAddressPreview::UpdateScrollBar ( )
private

Definition at line 361 of file mailmergehelper.cxx.

References m_pImpl, m_xVScrollBar, and nValue.

Referenced by AddAddress(), Clear(), RemoveSelectedAddress(), and SetLayout().

Member Data Documentation

Link<LinkParamNone*,void> SwAddressPreview::m_aSelectHdl
private

Definition at line 64 of file mailmergehelper.hxx.

Referenced by KeyInput(), and MouseButtonDown().

std::unique_ptr<SwAddressPreview_Impl> SwAddressPreview::m_pImpl
private
std::unique_ptr<weld::ScrolledWindow> SwAddressPreview::m_xVScrollBar
private

The documentation for this class was generated from the following files: