LibreOffice Module sfx2 (master) 1
Classes | Namespaces | Typedefs | Functions
StyleList.cxx File Reference
#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>
Include dependency graph for StyleList.cxx:

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 Documentation

◆ StyleTreeArr_Impl

typedef std::vector<std::unique_ptr<StyleTree_Impl> > StyleTreeArr_Impl

Definition at line 607 of file StyleList.cxx.

Function Documentation

◆ FillBox_Impl()

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

◆ IMPL_LINK() [1/12]

IMPL_LINK ( StyleList  ,
CustomRenderHdl  ,
weld::TreeView::render_args  ,
aPayload  ,
void   
)

◆ IMPL_LINK() [2/12]

IMPL_LINK ( StyleList  ,
DragBeginHdl  ,
bool &  ,
rUnsetDragIcon  ,
bool   
)

Definition at line 1620 of file StyleList.cxx.

◆ IMPL_LINK() [3/12]

IMPL_LINK ( StyleList  ,
EnableTreeDrag  ,
bool  ,
m_bEnable  ,
void   
)

◆ IMPL_LINK() [4/12]

IMPL_LINK ( StyleList  ,
ExecuteDrop  ,
const ExecuteDropEvent ,
rEvt  ,
sal_Int8   
)

◆ IMPL_LINK() [5/12]

IMPL_LINK ( StyleList  ,
FmtSelectHdl  ,
weld::TreeView ,
rListBox  ,
void   
)

Definition at line 1724 of file StyleList.cxx.

◆ IMPL_LINK() [6/12]

IMPL_LINK ( StyleList  ,
KeyInputHdl  ,
const KeyEvent ,
rKeyEvent  ,
bool   
)

Definition at line 1627 of file StyleList.cxx.

References vcl::KeyCode::GetCode(), vcl::KeyCode::GetModifier(), and KEY_DELETE.

◆ IMPL_LINK() [7/12]

IMPL_LINK ( StyleList  ,
MousePressHdl  ,
const MouseEvent ,
rMEvt  ,
bool   
)

Definition at line 1756 of file StyleList.cxx.

◆ IMPL_LINK() [8/12]

IMPL_LINK ( StyleList  ,
PopupFlatMenuHdl  ,
const CommandEvent ,
rCEvt  ,
bool   
)

Definition at line 1881 of file StyleList.cxx.

◆ IMPL_LINK() [9/12]

IMPL_LINK ( StyleList  ,
PopupTreeMenuHdl  ,
const CommandEvent ,
rCEvt  ,
bool   
)

Definition at line 1899 of file StyleList.cxx.

◆ IMPL_LINK() [10/12]

IMPL_LINK ( StyleList  ,
QueryTooltipHdl  ,
const weld::TreeIter ,
rEntry  ,
OUString   
)

◆ IMPL_LINK() [11/12]

IMPL_LINK ( StyleList  ,
SetFamily  ,
sal_uInt16  ,
nId  ,
void   
)

Definition at line 322 of file StyleList.cxx.

References nId.

◆ IMPL_LINK() [12/12]

IMPL_LINK ( StyleList  ,
SetWaterCanState  ,
const SfxBoolItem ,
pItem  ,
void   
)

◆ IMPL_LINK_NOARG() [1/11]

IMPL_LINK_NOARG ( StyleList  ,
Cleanup  ,
void *  ,
void   
)

Definition at line 163 of file StyleList.cxx.

◆ IMPL_LINK_NOARG() [2/11]

IMPL_LINK_NOARG ( StyleList  ,
Clear  ,
void *  ,
void   
)

◆ IMPL_LINK_NOARG() [3/11]

IMPL_LINK_NOARG ( StyleList  ,
EnableDelete  ,
void *  ,
void   
)

◆ IMPL_LINK_NOARG() [4/11]

IMPL_LINK_NOARG ( StyleList  ,
HasSelectedStyle  ,
void *  ,
bool   
)

Definition at line 1141 of file StyleList.cxx.

◆ IMPL_LINK_NOARG() [5/11]

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() [6/11]

IMPL_LINK_NOARG ( StyleList  ,
MenuSelectAsyncHdl  ,
void *  ,
void   
)

Definition at line 1605 of file StyleList.cxx.

◆ IMPL_LINK_NOARG() [7/11]

IMPL_LINK_NOARG ( StyleList  ,
NewMenuExecuteAction  ,
void *  ,
void   
)

◆ IMPL_LINK_NOARG() [8/11]

IMPL_LINK_NOARG ( StyleList  ,
ReadResource  ,
void *  ,
size_t   
)

◆ IMPL_LINK_NOARG() [9/11]

IMPL_LINK_NOARG ( StyleList  ,
TimeOut  ,
Timer ,
void   
)

Definition at line 1581 of file StyleList.cxx.

References SfxTemplateItem::GetStyleName(), and UpdateFamilyList.

◆ IMPL_LINK_NOARG() [10/11]

IMPL_LINK_NOARG ( StyleList  ,
TreeListApplyHdl  ,
weld::TreeView ,
bool   
)

◆ IMPL_LINK_NOARG() [11/11]

IMPL_LINK_NOARG ( StyleList  ,
UpdateStyleDependents  ,
void *  ,
void   
)

Definition at line 1147 of file StyleList.cxx.

◆ IMPL_STATIC_LINK()

IMPL_STATIC_LINK ( StyleList  ,
CustomGetSizeHdl  ,
weld::TreeView::get_size_args  ,
aPayload  ,
Size   
)

Definition at line 1875 of file StyleList.cxx.

References OutputDevice::GetDPIScaleFactor().

◆ IsExpanded_Impl()

static bool IsExpanded_Impl ( const std::vector< OUString > &  rEntries,
std::u16string_view  rStr 
)
static

Definition at line 686 of file StyleList.cxx.

Referenced by StyleList::FillTreeBox().

◆ lcl_GetStyleFamilyName()

static OUString lcl_GetStyleFamilyName ( SfxStyleFamily  nFamily)
static

Definition at line 1089 of file StyleList.cxx.

Referenced by StyleList::getDefaultStyleName().

◆ lcl_Insert()

static void lcl_Insert ( weld::TreeView rTreeView,
const OUString &  rName,
SfxStyleFamily  eFam,
const weld::TreeIter pParent,
weld::TreeIter pRet,
SfxViewShell pViewSh 
)
static

◆ MakeExpanded_Impl()

static void MakeExpanded_Impl ( const weld::TreeView rBox,
std::vector< OUString > &  rEntries 
)
static

◆ MakeTree_Impl()

static void MakeTree_Impl ( StyleTreeArr_Impl rArr,
const OUString &  aUIName 
)
static

Definition at line 634 of file StyleList.cxx.

References aUIName, getLocale(), and Application::GetSettings().

Referenced by StyleList::FillTreeBox().