LibreOffice Module sw (master) 1
|
#include <mailmergehelper.hxx>
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 | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0 |
virtual void | Resize () |
virtual bool | MouseButtonDown (const MouseEvent &) |
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 bool | KeyInput (const KeyEvent &) |
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::DrawingArea * | GetDrawingArea () const |
void | Invalidate () |
void | Invalidate (const tools::Rectangle &rRect) |
virtual void | Show () |
virtual void | Hide () |
void | SetCursor (void *pData) |
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 OUString &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 | SetDragDataTransferable (rtl::Reference< TransferDataContainer > &rTransferable, 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 | |
CustomWidgetController & | operator= (CustomWidgetController const &)=default |
CustomWidgetController & | operator= (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_Impl > | m_pImpl |
std::unique_ptr< weld::ScrolledWindow > | m_xVScrollBar |
Link< LinkParamNone *, void > | m_aSelectHdl |
Definition at line 60 of file mailmergehelper.hxx.
SwAddressPreview::SwAddressPreview | ( | std::unique_ptr< weld::ScrolledWindow > | xParent | ) |
Definition at line 281 of file mailmergehelper.cxx.
References LINK, m_pImpl, and m_xVScrollBar.
|
overridevirtual |
Definition at line 288 of file mailmergehelper.cxx.
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 297 of file mailmergehelper.cxx.
References m_pImpl, and UpdateScrollBar().
void SwAddressPreview::Clear | ( | ) |
Definition at line 328 of file mailmergehelper.cxx.
References m_pImpl, and UpdateScrollBar().
|
private |
|
private |
Definition at line 495 of file mailmergehelper.cxx.
References Point::AdjustY(), COL_TRANSPARENT(), OutputDevice::DrawRect(), OutputDevice::DrawText(), weld::CustomWidgetController::GetTextHeight(), o3tl::getToken(), Point::Move(), nPos, OutputDevice::SetClipRegion(), and OutputDevice::SetFillColor().
Referenced by Paint().
void SwAddressPreview::EnableScrollBar | ( | ) |
Definition at line 357 of file mailmergehelper.cxx.
References m_pImpl.
|
static |
Definition at line 186 of file mailmergehelper.cxx.
References Any, SwMergeAddressItem::bIsColumn, first, SwMailMergeConfigItem::GetColumnAssignment(), SwMailMergeConfigItem::GetCurrentDBData(), SwMailMergeConfigItem::GetDefaultAddressHeaders(), SwMailMergeConfigItem::GetExcludeCountry(), SwMailMergeConfigItem::GetResultSet(), SwAddressIterator::HasMore(), SwMailMergeConfigItem::IsIncludeCountry(), min(), SwAddressIterator::Next(), SwMergeAddressItem::sText, SwResId(), TOOLS_WARN_EXCEPTION, and xColumn.
Referenced by IMPL_LINK_NOARG(), SwMailMergeAddressBlockPage::InsertDataHdl(), and SwMailMergeGreetingsPage::UpdatePreview().
sal_uInt16 SwAddressPreview::GetSelectedAddress | ( | ) | const |
Definition at line 311 of file mailmergehelper.cxx.
References m_pImpl.
|
overrideprivatevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 451 of file mailmergehelper.cxx.
References Link< typename Arg, typename Ret >::Call(), vcl::KeyCode::GetCode(), KeyEvent::GetKeyCode(), weld::CustomWidgetController::Invalidate(), KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, m_aSelectHdl, m_pImpl, and o3tl::make_unsigned().
|
overrideprivatevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 424 of file mailmergehelper.cxx.
References Link< typename Arg, typename Ret >::Call(), weld::CustomWidgetController::GetOutputSizePixel(), MouseEvent::GetPosPixel(), Size::Height(), weld::CustomWidgetController::Invalidate(), MouseEvent::IsLeft(), m_aSelectHdl, m_pImpl, m_xVScrollBar, Size::Width(), Point::X(), and Point::Y().
|
overrideprivatevirtual |
Implements weld::CustomWidgetController.
Definition at line 376 of file mailmergehelper.cxx.
References Size::AdjustHeight(), Size::AdjustWidth(), COL_TRANSPARENT(), OutputDevice::DrawRect(), DrawText_Impl(), StyleSettings::GetDisableColor(), weld::CustomWidgetController::GetDrawingArea(), OutputDevice::GetFont(), weld::CustomWidgetController::GetOutputSizePixel(), OutputDevice::GetSettings(), AllSettings::GetStyleSettings(), StyleSettings::GetWindowColor(), StyleSettings::GetWindowTextColor(), Size::Height(), weld::CustomWidgetController::IsEnabled(), m_pImpl, m_xVScrollBar, Point::Move(), OutputDevice::SetClipRegion(), vcl::Font::SetColor(), OutputDevice::SetFillColor(), OutputDevice::SetFont(), OutputDevice::SetLineColor(), weld::SetPointFont(), and Size::Width().
void SwAddressPreview::RemoveSelectedAddress | ( | ) |
Definition at line 341 of file mailmergehelper.cxx.
References weld::CustomWidgetController::Invalidate(), m_pImpl, and UpdateScrollBar().
void SwAddressPreview::ReplaceSelectedAddress | ( | const OUString & | rNew | ) |
Definition at line 335 of file mailmergehelper.cxx.
References weld::CustomWidgetController::Invalidate(), and m_pImpl.
void SwAddressPreview::SelectAddress | ( | sal_uInt16 | nSelect | ) |
Definition at line 317 of file mailmergehelper.cxx.
References m_pImpl, and m_xVScrollBar.
void SwAddressPreview::SetAddress | ( | const OUString & | rAddress | ) |
Definition at line 303 of file mailmergehelper.cxx.
References weld::CustomWidgetController::Invalidate(), m_pImpl, and m_xVScrollBar.
void SwAddressPreview::SetLayout | ( | sal_uInt16 | nRows, |
sal_uInt16 | nColumns | ||
) |
Definition at line 350 of file mailmergehelper.cxx.
References m_pImpl, and UpdateScrollBar().
|
inline |
Definition at line 107 of file mailmergehelper.hxx.
|
private |
Definition at line 362 of file mailmergehelper.cxx.
References m_pImpl, m_xVScrollBar, and nValue.
Referenced by AddAddress(), Clear(), RemoveSelectedAddress(), and SetLayout().
|
private |
Definition at line 64 of file mailmergehelper.hxx.
Referenced by KeyInput(), and MouseButtonDown().
|
private |
Definition at line 62 of file mailmergehelper.hxx.
Referenced by AddAddress(), Clear(), EnableScrollBar(), GetSelectedAddress(), KeyInput(), MouseButtonDown(), Paint(), RemoveSelectedAddress(), ReplaceSelectedAddress(), SelectAddress(), SetAddress(), SetLayout(), and UpdateScrollBar().
|
private |
Definition at line 63 of file mailmergehelper.hxx.
Referenced by MouseButtonDown(), Paint(), SelectAddress(), SetAddress(), SwAddressPreview(), and UpdateScrollBar().