LibreOffice Module sfx2 (master) 1
|
#include <memory>
#include <unordered_map>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <utility>
#include <vcl/commandevent.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/event.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weldutils.hxx>
#include <vcl/window.hxx>
#include <svl/intitem.hxx>
#include <svl/style.hxx>
#include <comphelper/processfactory.hxx>
#include <officecfg/Office/Common.hxx>
#include <osl/diagnose.h>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
#include <templdgi.hxx>
#include <tplcitem.hxx>
#include <sfx2/styfitem.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/newstyle.hxx>
#include <sfx2/tplpitem.hxx>
#include <sfx2/sfxresid.hxx>
#include <sfx2/sfxsids.hrc>
#include <sfx2/strings.hrc>
#include <sfx2/docfac.hxx>
#include <sfx2/module.hxx>
#include <helpids.h>
#include <sfx2/viewfrm.hxx>
#include <comphelper/string.hxx>
#include <sfx2/StyleManager.hxx>
#include <sfx2/StylePreviewRenderer.hxx>
#include <StyleList.hxx>
#include <vcl/virdev.hxx>
#include <basegfx/color/bcolortools.hxx>
Go to the source code of this file.
Classes | |
class | TreeViewDropTarget |
Namespaces | |
namespace | SfxTemplate |
Typedefs | |
typedef std::vector< std::unique_ptr< StyleTree_Impl > > | StyleTreeArr_Impl |
Functions | |
IMPL_LINK_NOARG (StyleList, Cleanup, void *, void) | |
IMPL_LINK_NOARG (StyleList, ReadResource, void *, size_t) | |
IMPL_LINK (StyleList, SetFamily, sal_uInt16, nId, void) | |
IMPL_LINK (StyleList, ExecuteDrop, const ExecuteDropEvent &, rEvt, sal_Int8) | |
IMPL_LINK_NOARG (StyleList, NewMenuExecuteAction, void *, void) | |
static void | MakeTree_Impl (StyleTreeArr_Impl &rArr, const OUString &aUIName) |
static bool | IsExpanded_Impl (const std::vector< OUString > &rEntries, std::u16string_view rStr) |
static void | lcl_Insert (weld::TreeView &rTreeView, const OUString &rName, SfxStyleFamily eFam, const weld::TreeIter *pParent, weld::TreeIter *pRet, SfxViewShell *pViewSh) |
static void | FillBox_Impl (weld::TreeView &rBox, StyleTree_Impl *pEntry, const std::vector< OUString > &rEntries, SfxStyleFamily eStyleFamily, const weld::TreeIter *pParent, bool blcl_insert, SfxViewShell *pViewShell) |
static sal_uInt16 | SfxTemplate::SfxFamilyIdToNId (SfxStyleFamily nFamily) |
static SfxStyleFamily | SfxTemplate::NIdToSfxFamilyId (sal_uInt16 nId) |
IMPL_LINK_NOARG (StyleList, IsSafeForWaterCan, void *, bool) | |
Is it safe to show the water-can / fill icon. More... | |
IMPL_LINK (StyleList, SetWaterCanState, const SfxBoolItem *, pItem, void) | |
static void | MakeExpanded_Impl (const weld::TreeView &rBox, std::vector< OUString > &rEntries) |
IMPL_LINK (StyleList, EnableTreeDrag, bool, m_bEnable, void) | |
static OUString | lcl_GetStyleFamilyName (SfxStyleFamily nFamily) |
IMPL_LINK_NOARG (StyleList, HasSelectedStyle, void *, bool) | |
IMPL_LINK_NOARG (StyleList, UpdateStyleDependents, void *, void) | |
IMPL_LINK_NOARG (StyleList, EnableDelete, void *, void) | |
IMPL_LINK_NOARG (StyleList, Clear, void *, void) | |
IMPL_LINK_NOARG (StyleList, TimeOut, Timer *, void) | |
IMPL_LINK_NOARG (StyleList, MenuSelectAsyncHdl, void *, void) | |
IMPL_LINK (StyleList, DragBeginHdl, bool &, rUnsetDragIcon, bool) | |
IMPL_LINK (StyleList, KeyInputHdl, const KeyEvent &, rKeyEvent, bool) | |
IMPL_LINK (StyleList, QueryTooltipHdl, const weld::TreeIter &, rEntry, OUString) | |
IMPL_LINK (StyleList, CustomRenderHdl, weld::TreeView::render_args, aPayload, void) | |
IMPL_LINK (StyleList, FmtSelectHdl, weld::TreeView &, rListBox, void) | |
IMPL_LINK_NOARG (StyleList, TreeListApplyHdl, weld::TreeView &, bool) | |
IMPL_LINK (StyleList, MousePressHdl, const MouseEvent &, rMEvt, bool) | |
IMPL_STATIC_LINK (StyleList, CustomGetSizeHdl, weld::TreeView::get_size_args, aPayload, Size) | |
IMPL_LINK (StyleList, PopupFlatMenuHdl, const CommandEvent &, rCEvt, bool) | |
IMPL_LINK (StyleList, PopupTreeMenuHdl, const CommandEvent &, rCEvt, bool) | |
typedef std::vector<std::unique_ptr<StyleTree_Impl> > StyleTreeArr_Impl |
Definition at line 607 of file StyleList.cxx.
|
static |
Definition at line 738 of file StyleList.cxx.
References FillBox_Impl(), i, weld::TreeView::insert(), lcl_Insert(), weld::TreeView::make_iterator(), and size.
Referenced by FillBox_Impl(), and StyleList::FillTreeBox().
IMPL_LINK | ( | StyleList | , |
CustomRenderHdl | , | ||
weld::TreeView::render_args | , | ||
aPayload | , | ||
void | |||
) |
Definition at line 1672 of file StyleList.cxx.
References vcl::ALL, sfx2::StyleManager::CreateStylePreviewRenderer(), SfxObjectShell::Current(), OutputDevice::DrawText(), StyleSettings::GetDialogTextColor(), StyleSettings::GetDisableColor(), tools::Rectangle::GetHeight(), StyleSettings::GetHighlightTextColor(), OutputDevice::GetOutputSize(), Application::GetSettings(), SfxObjectShell::GetStyleManager(), AllSettings::GetStyleSettings(), SfxStyleSheetBase::IsHidden(), OutputDevice::Pop(), OutputDevice::Push(), sfx2::StyleManager::Search(), OutputDevice::SetTextColor(), vcl::TEXTCOLOR, and Size::Width().
IMPL_LINK | ( | StyleList | , |
DragBeginHdl | , | ||
bool & | , | ||
rUnsetDragIcon | , | ||
bool | |||
) |
Definition at line 1620 of file StyleList.cxx.
IMPL_LINK | ( | StyleList | , |
EnableTreeDrag | , | ||
bool | , | ||
m_bEnable | , | ||
void | |||
) |
Definition at line 994 of file StyleList.cxx.
References SfxStyleFamilyItem::GetFamily(), and SfxStyleSheetBase::HasParentSupport().
IMPL_LINK | ( | StyleList | , |
ExecuteDrop | , | ||
const ExecuteDropEvent & | , | ||
rEvt | , | ||
sal_Int8 | |||
) |
Definition at line 473 of file StyleList.cxx.
References aHelper, DND_ACTION_NONE, weld::TreeView::get_drag_source(), SfxObjectFactory::GetClassId(), SfxObjectShell::GetFactory(), i, LINK, TransferableObjectDescriptor::maClassName, nId, Application::PostUserEvent(), and xTarget.
IMPL_LINK | ( | StyleList | , |
FmtSelectHdl | , | ||
weld::TreeView & | , | ||
rListBox | , | ||
void | |||
) |
Definition at line 1724 of file StyleList.cxx.
Definition at line 1627 of file StyleList.cxx.
References vcl::KeyCode::GetCode(), vcl::KeyCode::GetModifier(), and KEY_DELETE.
IMPL_LINK | ( | StyleList | , |
MousePressHdl | , | ||
const MouseEvent & | , | ||
rMEvt | , | ||
bool | |||
) |
Definition at line 1756 of file StyleList.cxx.
IMPL_LINK | ( | StyleList | , |
PopupFlatMenuHdl | , | ||
const CommandEvent & | , | ||
rCEvt | , | ||
bool | |||
) |
Definition at line 1881 of file StyleList.cxx.
IMPL_LINK | ( | StyleList | , |
PopupTreeMenuHdl | , | ||
const CommandEvent & | , | ||
rCEvt | , | ||
bool | |||
) |
Definition at line 1899 of file StyleList.cxx.
IMPL_LINK | ( | StyleList | , |
QueryTooltipHdl | , | ||
const weld::TreeIter & | , | ||
rEntry | , | ||
OUString | |||
) |
Definition at line 1639 of file StyleList.cxx.
References weld::TreeView::get_text(), weld::Widget::get_visible(), SfxStyleSheetBase::GetFamily(), SfxStyleFamilyItem::GetFamily(), SfxStyleSheetBase::GetUsedBy(), SfxStyleSheetBase::IsUsed(), and SfxResId().
Definition at line 322 of file StyleList.cxx.
References nId.
IMPL_LINK | ( | StyleList | , |
SetWaterCanState | , | ||
const SfxBoolItem * | , | ||
pItem | , | ||
void | |||
) |
Definition at line 853 of file StyleList.cxx.
References SfxControllerItem::IsBound(), n, nCount, SfxControllerItem::ReBind(), and SfxControllerItem::UnBind().
IMPL_LINK_NOARG | ( | StyleList | , |
Cleanup | , | ||
void * | , | ||
void | |||
) |
Definition at line 163 of file StyleList.cxx.
IMPL_LINK_NOARG | ( | StyleList | , |
Clear | , | ||
void * | , | ||
void | |||
) |
Definition at line 1458 of file StyleList.cxx.
References SfxViewShell::GetStylesHighlighterCharColorMap(), SfxViewShell::GetStylesHighlighterParaColorMap(), SfxShell::GetViewShell(), and i.
IMPL_LINK_NOARG | ( | StyleList | , |
EnableDelete | , | ||
void * | , | ||
void | |||
) |
Definition at line 1429 of file StyleList.cxx.
References SfxStyleFamilyItem::GetFamily(), SfxStyleFamilyItem::GetFilterList(), SfxStyleSheetBase::HasClearParentSupport(), SfxStyleSheetBase::IsUsed(), and SfxStyleSheetBase::IsUserDefined().
IMPL_LINK_NOARG | ( | StyleList | , |
HasSelectedStyle | , | ||
void * | , | ||
bool | |||
) |
Definition at line 1141 of file StyleList.cxx.
IMPL_LINK_NOARG | ( | StyleList | , |
IsSafeForWaterCan | , | ||
void * | , | ||
bool | |||
) |
Is it safe to show the water-can / fill icon.
If we've a hierarchical widget - we have only single select, otherwise we need to check if we have a multi-selection. We either have a m_xTreeBox showing or an m_xFmtLb (which we hide when not shown)
Definition at line 845 of file StyleList.cxx.
IMPL_LINK_NOARG | ( | StyleList | , |
MenuSelectAsyncHdl | , | ||
void * | , | ||
void | |||
) |
Definition at line 1605 of file StyleList.cxx.
IMPL_LINK_NOARG | ( | StyleList | , |
NewMenuExecuteAction | , | ||
void * | , | ||
void | |||
) |
Definition at line 551 of file StyleList.cxx.
References SfxStyleFamilyItem::GetFilterList(), SfxNewStyleDlg::GetName(), RET_OK, weld::DialogController::run(), and UpdateFamily.
IMPL_LINK_NOARG | ( | StyleList | , |
ReadResource | , | ||
void * | , | ||
size_t | |||
) |
Definition at line 210 of file StyleList.cxx.
References COUNT_BOUND_FUNC, SfxModule::CreateStyleFamilies(), SfxViewFrame::GetFrame(), SfxObjectShell::GetModule(), SfxViewFrame::GetObjectShell(), i, nCount, and StartListening.
Definition at line 1581 of file StyleList.cxx.
References SfxTemplateItem::GetStyleName(), and UpdateFamilyList.
IMPL_LINK_NOARG | ( | StyleList | , |
TreeListApplyHdl | , | ||
weld::TreeView & | , | ||
bool | |||
) |
Definition at line 1733 of file StyleList.cxx.
References SfxViewFrame::GetFrame(), SfxShell::GetViewShell(), SfxViewShell::GetWindow(), and vcl::Window::GrabFocus().
IMPL_LINK_NOARG | ( | StyleList | , |
UpdateStyleDependents | , | ||
void * | , | ||
void | |||
) |
Definition at line 1147 of file StyleList.cxx.
IMPL_STATIC_LINK | ( | StyleList | , |
CustomGetSizeHdl | , | ||
weld::TreeView::get_size_args | , | ||
aPayload | , | ||
Size | |||
) |
Definition at line 1875 of file StyleList.cxx.
References OutputDevice::GetDPIScaleFactor().
|
static |
Definition at line 686 of file StyleList.cxx.
Referenced by StyleList::FillTreeBox().
|
static |
Definition at line 1089 of file StyleList.cxx.
Referenced by StyleList::getDefaultStyleName().
|
static |
Definition at line 696 of file StyleList.cxx.
References COL_BLACK(), VclPtr< class reference_type >::get(), StyleSettings::GetListBoxPreviewDefaultPixelSize(), Application::GetSettings(), AllSettings::GetStyleSettings(), SfxViewShell::GetStylesHighlighterCharColorMap(), SfxViewShell::GetStylesHighlighterParaColorMap(), and weld::TreeView::insert().
Referenced by FillBox_Impl(), and StyleList::UpdateStyles().
|
static |
Definition at line 981 of file StyleList.cxx.
References weld::TreeView::get_iter_first(), weld::TreeView::get_row_expanded(), weld::TreeView::get_text(), weld::TreeView::iter_next(), and weld::TreeView::make_iterator().
Referenced by StyleList::FillTreeBox().
|
static |
Definition at line 634 of file StyleList.cxx.
References aUIName, getLocale(), and Application::GetSettings().
Referenced by StyleList::FillTreeBox().