LibreOffice Module sw (master) 1
|
#include <autoformatpreview.hxx>
Public Member Functions | |
AutoFormatPreview () | |
void | NotifyChange (const SwTableAutoFormat &rNewData) |
void | DetectRTL (SwWrtShell const *pWrtShell) |
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 |
Private Member Functions | |
void | Init () |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override |
virtual void | Resize () override |
void | CalcCellArray (bool bFitWidth) |
void | CalcLineMap () |
void | PaintCells (vcl::RenderContext &rRenderContext) |
sal_uInt8 | GetFormatIndex (size_t nCol, size_t nRow) const |
void | DrawString (vcl::RenderContext &rRenderContext, size_t nCol, size_t nRow) |
void | DrawBackground (vcl::RenderContext &rRenderContext) |
void | MakeFonts (vcl::RenderContext const &rRenderContext, sal_uInt8 nIndex, vcl::Font &rFont, vcl::Font &rCJKFont, vcl::Font &rCTLFont) |
Private Attributes | |
SwTableAutoFormat | maCurrentData |
svx::frame::Array | maArray |
bool | mbFitWidth |
Implementation to draw the frame borders. More... | |
bool | mbRTL |
Size | maPreviousSize |
tools::Long | mnLabelColumnWidth |
tools::Long | mnDataColumnWidth1 |
tools::Long | mnDataColumnWidth2 |
tools::Long | mnRowHeight |
const OUString | maStringJan |
const OUString | maStringFeb |
const OUString | maStringMar |
const OUString | maStringNorth |
const OUString | maStringMid |
const OUString | maStringSouth |
const OUString | maStringSum |
std::unique_ptr< SvNumberFormatter > | mxNumFormat |
uno::Reference< i18n::XBreakIterator > | m_xBreak |
Additional Inherited Members | |
Static Public Member Functions inherited from weld::CustomWidgetController | |
static bool | IsUpdateMode () |
Definition at line 34 of file autoformatpreview.hxx.
AutoFormatPreview::AutoFormatPreview | ( | ) |
Definition at line 46 of file autoformatpreview.cxx.
References comphelper::getProcessComponentContext(), Init(), LANGUAGE_SYSTEM, m_xBreak, and mxNumFormat.
|
private |
Definition at line 376 of file autoformatpreview.cxx.
References svx::frame::Array::GetHeight(), svx::frame::Array::GetWidth(), maArray, maPreviousSize, mnDataColumnWidth1, mnDataColumnWidth2, mnLabelColumnWidth, mnRowHeight, svx::frame::Array::SetAllColWidths(), svx::frame::Array::SetAllRowHeights(), svx::frame::Array::SetColWidth(), Size::setHeight(), and Size::setWidth().
Referenced by Init(), and NotifyChange().
|
private |
Definition at line 394 of file autoformatpreview.cxx.
References SvxBoxItem::GetBottom(), AutoFormatBase::GetBox(), SwTableAutoFormat::GetBoxFormat(), GetFormatIndex(), SvxBoxItem::GetLeft(), SvxBoxItem::GetRight(), SvxBoxItem::GetTop(), lclSetStyleFromBorder(), maArray, maCurrentData, svx::frame::Array::SetCellStyleBottom(), svx::frame::Array::SetCellStyleLeft(), svx::frame::Array::SetCellStyleRight(), and svx::frame::Array::SetCellStyleTop().
Referenced by Init(), and NotifyChange().
void AutoFormatPreview::DetectRTL | ( | SwWrtShell const * | pWrtShell | ) |
Definition at line 76 of file autoformatpreview.cxx.
References AllSettings::GetLayoutRTL(), SwCursorShell::IsCursorInTable(), SwFEShell::IsTableRightToLeft(), and mbRTL.
Referenced by SwInsTableDlg::InitAutoTableFormat(), and SwAutoFormatDlg::SwAutoFormatDlg().
|
private |
Definition at line 317 of file autoformatpreview.cxx.
References OutputDevice::DrawRect(), vcl::FILLCOLOR, basegfx::fround(), SwTableAutoFormat::GetBoxFormat(), svx::frame::Array::GetCellRange(), SvxBrushItem::GetColor(), GetFormatIndex(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxY(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY(), vcl::LINECOLOR, maArray, maCurrentData, OutputDevice::Pop(), OutputDevice::Push(), OutputDevice::SetFillColor(), and OutputDevice::SetLineColor().
Referenced by PaintCells().
|
private |
Definition at line 134 of file autoformatpreview.cxx.
References Point::AdjustX(), Point::AdjustY(), SvtScriptedTextHelper::DrawText(), FRAME_OFFSET, basegfx::fround(), SvxAdjustItem::GetAdjust(), AutoFormatBase::GetAdjust(), SwTableAutoFormat::GetBoxFormat(), svx::frame::Array::GetCellIndex(), svx::frame::Array::GetCellRange(), GetFormatIndex(), tools::Rectangle::GetHeight(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxY(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY(), SvtScriptedTextHelper::GetTextSize(), tools::Rectangle::GetWidth(), Size::Height(), SwTableAutoFormat::IsFont(), SwTableAutoFormat::IsJustify(), SwTableAutoFormat::IsValueFormat(), m_xBreak, maArray, maCurrentData, MakeFonts(), maStringFeb, maStringJan, maStringMar, maStringMid, maStringNorth, maStringSouth, maStringSum, mbRTL, mnRowHeight, mxNumFormat, nIndex, nType, SvtScriptedTextHelper::SetDefaultFont(), SvtScriptedTextHelper::SetFonts(), SvtScriptedTextHelper::SetText(), tools::Rectangle::TopLeft(), and Size::Width().
Referenced by PaintCells().
|
private |
Definition at line 127 of file autoformatpreview.cxx.
References svx::frame::Array::GetCellIndex(), maArray, and mbRTL.
Referenced by CalcLineMap(), DrawBackground(), and DrawString().
|
private |
Definition at line 365 of file autoformatpreview.cxx.
References CalcCellArray(), CalcLineMap(), svx::frame::Array::Initialize(), maArray, mnDataColumnWidth1, mnDataColumnWidth2, mnLabelColumnWidth, and mnRowHeight.
Referenced by AutoFormatPreview().
|
private |
Definition at line 102 of file autoformatpreview.cxx.
References SwTableAutoFormat::GetBoxFormat(), AutoFormatBase::GetCJKFont(), AutoFormatBase::GetCJKPosture(), AutoFormatBase::GetCJKWeight(), AutoFormatBase::GetColor(), AutoFormatBase::GetContour(), AutoFormatBase::GetCrossedOut(), AutoFormatBase::GetCTLFont(), AutoFormatBase::GetCTLPosture(), AutoFormatBase::GetCTLWeight(), OutputDevice::GetDPIScaleFactor(), AutoFormatBase::GetFont(), OutputDevice::GetFont(), vcl::Font::GetFontSize(), AutoFormatBase::GetOverline(), AutoFormatBase::GetPosture(), AutoFormatBase::GetShadowed(), AutoFormatBase::GetUnderline(), SvxColorItem::GetValue(), AutoFormatBase::GetWeight(), lcl_SetFontProperties(), maCurrentData, nIndex, SETONALLFONTS, and Size::Width().
Referenced by DrawString().
void AutoFormatPreview::NotifyChange | ( | const SwTableAutoFormat & | rNewData | ) |
Definition at line 422 of file autoformatpreview.cxx.
References CalcCellArray(), CalcLineMap(), weld::CustomWidgetController::Invalidate(), SwTableAutoFormat::IsJustify(), maCurrentData, and mbFitWidth.
Referenced by Resize().
|
overrideprivatevirtual |
Implements weld::CustomWidgetController.
Definition at line 431 of file autoformatpreview.cxx.
References vcl::ALL, OutputDevice::DrawRect(), OutputDevice::Erase(), OutputDevice::GetDrawMode(), OutputDevice::GetFont(), StyleSettings::GetHighContrastMode(), OutputDevice::GetLineColor(), OutputDevice::GetOutputSizePixel(), OutputDevice::GetSettings(), AllSettings::GetStyleSettings(), Size::Height(), maArray, maPreviousSize, PaintCells(), OutputDevice::Pop(), OutputDevice::Push(), OutputDevice::SetBackground(), OutputDevice::SetDrawMode(), OutputDevice::SetFont(), OutputDevice::SetLineColor(), vcl::Font::SetTransparent(), svx::frame::Array::SetXOffset(), svx::frame::Array::SetYOffset(), SW_MOD, and Size::Width().
|
private |
Definition at line 338 of file autoformatpreview.cxx.
References svx::frame::Array::CreateB2DPrimitiveArray(), drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(), DrawBackground(), DrawString(), SwTableAutoFormat::IsBackground(), SwTableAutoFormat::IsFrame(), maArray, and maCurrentData.
Referenced by Paint().
|
overrideprivatevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 65 of file autoformatpreview.cxx.
References weld::CustomWidgetController::GetOutputSizePixel(), Size::Height(), maCurrentData, maPreviousSize, mnDataColumnWidth1, mnDataColumnWidth2, mnLabelColumnWidth, mnRowHeight, NotifyChange(), and Size::Width().
|
private |
Definition at line 62 of file autoformatpreview.hxx.
Referenced by AutoFormatPreview(), and DrawString().
|
private |
Definition at line 45 of file autoformatpreview.hxx.
Referenced by CalcCellArray(), CalcLineMap(), DrawBackground(), DrawString(), GetFormatIndex(), Init(), Paint(), and PaintCells().
|
private |
Definition at line 44 of file autoformatpreview.hxx.
Referenced by CalcLineMap(), DrawBackground(), DrawString(), MakeFonts(), NotifyChange(), PaintCells(), and Resize().
|
private |
Definition at line 48 of file autoformatpreview.hxx.
Referenced by CalcCellArray(), Paint(), and Resize().
|
private |
Definition at line 54 of file autoformatpreview.hxx.
Referenced by DrawString().
|
private |
Definition at line 53 of file autoformatpreview.hxx.
Referenced by DrawString().
|
private |
Definition at line 55 of file autoformatpreview.hxx.
Referenced by DrawString().
|
private |
Definition at line 57 of file autoformatpreview.hxx.
Referenced by DrawString().
|
private |
Definition at line 56 of file autoformatpreview.hxx.
Referenced by DrawString().
|
private |
Definition at line 58 of file autoformatpreview.hxx.
Referenced by DrawString().
|
private |
Definition at line 59 of file autoformatpreview.hxx.
Referenced by DrawString().
|
private |
Implementation to draw the frame borders.
Definition at line 46 of file autoformatpreview.hxx.
Referenced by NotifyChange().
|
private |
Definition at line 47 of file autoformatpreview.hxx.
Referenced by DetectRTL(), DrawString(), and GetFormatIndex().
|
private |
Definition at line 50 of file autoformatpreview.hxx.
Referenced by CalcCellArray(), Init(), and Resize().
|
private |
Definition at line 51 of file autoformatpreview.hxx.
Referenced by CalcCellArray(), Init(), and Resize().
|
private |
Definition at line 49 of file autoformatpreview.hxx.
Referenced by CalcCellArray(), Init(), and Resize().
|
private |
Definition at line 52 of file autoformatpreview.hxx.
Referenced by CalcCellArray(), DrawString(), Init(), and Resize().
|
private |
Definition at line 60 of file autoformatpreview.hxx.
Referenced by AutoFormatPreview(), and DrawString().