39 :
SfxTabPage(pPage, pController,
"modules/swriter/ui/conditionpage.ui",
"ConditionPage", &
rSet)
42 , m_xTbLinks(m_xBuilder->weld_tree_view(
"links"))
43 , m_xStyleLB(m_xBuilder->weld_tree_view(
"styles"))
44 , m_xFilterLB(m_xBuilder->weld_combo_box(
"filter"))
45 , m_xRemovePB(m_xBuilder->weld_button(
"remove"))
46 , m_xAssignPB(m_xBuilder->weld_button(
"apply"))
49 const auto nHeightRequest =
m_xStyleLB->get_height_rows(12);
50 m_xStyleLB->set_size_request(-1, nHeightRequest);
51 m_xTbLinks->set_size_request(-1, nHeightRequest);
52 std::vector<int> aWidths
54 o3tl::narrowing<int>(
m_xTbLinks->get_approximate_digit_width() * 40)
58 const sal_Int32 nStrCount =
m_xFilterLB->get_count();
59 for (sal_Int32
i = 0;
i < nStrCount; ++
i)
74 std::optional<SfxStyleFamilies> xFamilies(
SW_MOD()->CreateStyleFamilies());
75 size_t nCount = xFamilies->size();
76 for (
size_t j = 0; j <
nCount; ++j)
79 if (SfxStyleFamily::Para == rFamilyItem.
GetFamily())
82 for (
size_t i = 0;
i < rFilterList.size(); ++
i)
83 m_xFilterLB->append(OUString::number(
int(rFilterList[
i].nFlags)), rFilterList[
i].aName);
101 return DeactivateRC::LeavePage;
106 return std::make_unique<SwCondCollPage>(pPage, pController, *
rSet);
114 const OUString sEntry =
m_xTbLinks->get_text(
i, 1);
136 pBase = pPool->
Next();
209 const sal_Int32 nSelPos =
m_xFilterLB->get_active();
222 pBase = pPool->
Next();
229 int nSelected =
m_xTbLinks->get_selected_index();
230 const OUString sTbEntry = nSelected != -1
233 const OUString sStyle =
m_xStyleLB->get_selected_text();
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxStyleFamily GetFamily() const
const SfxStyleFilter & GetFilterList() const
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
SfxStyleSheetBase * Next()
const OUString & GetName() const
void SetExchangeSupport()
SwTextFormatColl * GetTextFormatColl() const
void SetStyle(const OUString *pStyle, sal_uInt16 nPos)
The Condition tab on the paragraph style dialog for conditional styles, e.g. Text Body.
virtual bool FillItemSet(SfxItemSet *rSet) override
std::vector< OUString > m_aStrArr
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
virtual ~SwCondCollPage() override
std::unique_ptr< weld::Button > m_xAssignPB
void AssignRemove(const weld::Widget *)
std::unique_ptr< weld::Button > m_xRemovePB
SwCondCollPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
void SetCollection(SwFormat *pFormat)
const CommandStruct * m_pCmds
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
std::unique_ptr< weld::TreeView > m_xStyleLB
std::unique_ptr< weld::ComboBox > m_xFilterLB
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::TreeView > m_xTbLinks
static const WhichRangesContainer s_aPageRg
void SelectHdl(const weld::Widget *)
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
SwWrtShell & GetWrtShell() const
SwDocShell * GetDocShell()
const SwView & GetView() const
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(166)
#define LINK(Instance, Class, Member)
std::vector< SfxFilterTuple > SfxStyleFilter
IMPL_LINK(SwCondCollPage, AssignRemoveClickHdl, weld::Button &, rBtn, void)