From 389491aedd659a3c4b24b9902b6cb54075874d3e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 18 Dec 2018 15:16:04 +0000 Subject: weld SwMultiTOXTabDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic1ae4cfe43bdf31d511e9ac0f65a821c53ab59eb Reviewed-on: https://gerrit.libreoffice.org/65432 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/UIConfig_swriter.mk | 1 + sw/inc/swabstdlg.hxx | 2 +- sw/source/ui/dialog/swdlgfact.cxx | 26 +- sw/source/ui/dialog/swdlgfact.hxx | 12 +- sw/source/ui/index/cntex.cxx | 9 +- sw/source/ui/index/cnttab.cxx | 175 ++-- sw/source/uibase/inc/swuicnttab.hxx | 32 +- sw/source/uibase/inc/unotools.hxx | 46 + sw/source/uibase/shells/textidx.cxx | 7 +- sw/source/uibase/utlui/glbltree.cxx | 2 +- sw/source/uibase/utlui/unotools.cxx | 416 +++++++- sw/uiconfig/swriter/ui/previewmenu.ui | 44 + sw/uiconfig/swriter/ui/tocdialog.ui | 188 +++- sw/uiconfig/swriter/ui/tocentriespage.ui | 42 +- sw/uiconfig/swriter/ui/tocindexpage.ui | 1511 +++++++++++++++--------------- sw/uiconfig/swriter/ui/tocstylespage.ui | 2 + sw/uiconfig/swriter/ui/tokenwidget.ui | 41 +- 17 files changed, 1611 insertions(+), 945 deletions(-) create mode 100644 sw/uiconfig/swriter/ui/previewmenu.ui (limited to 'sw') diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index b8fad62dce47..5d2cb616b928 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -229,6 +229,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/paradialog \ sw/uiconfig/swriter/ui/picturedialog \ sw/uiconfig/swriter/ui/picturepage \ + sw/uiconfig/swriter/ui/previewmenu \ sw/uiconfig/swriter/ui/previewzoomdialog \ sw/uiconfig/swriter/ui/printeroptions \ sw/uiconfig/swriter/ui/printmergedialog \ diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index b057b0567353..144c0bdb0e8b 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -472,7 +472,7 @@ public: const SfxItemSet* pSwItemSet, SwWrtShell &) = 0; virtual VclPtr CreateMultiTOXTabDialog( - vcl::Window* pParent, const SfxItemSet& rSet, + weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, bool bGlobal) = 0; diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 43e7cbf5cfdd..c8f5fa5d1104 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -245,7 +245,15 @@ short AbstractMailMergeFieldConnectionsDlg_Impl::Execute() return m_xDlg->run(); } -IMPL_ABSTDLG_BASE(AbstractMultiTOXTabDialog_Impl); +short AbstractMultiTOXTabDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +bool AbstractMultiTOXTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} short AbstractEditRegionDlg_Impl::Execute() { @@ -657,17 +665,17 @@ bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const CurTOXType AbstractMultiTOXTabDialog_Impl::GetCurrentTOXType() const { - return pDlg->GetCurrentTOXType(); + return m_xDlg->GetCurrentTOXType(); } SwTOXDescription& AbstractMultiTOXTabDialog_Impl::GetTOXDescription(CurTOXType eTOXTypes) { - return pDlg->GetTOXDescription(eTOXTypes); + return m_xDlg->GetTOXDescription(eTOXTypes); } const SfxItemSet* AbstractMultiTOXTabDialog_Impl::GetOutputItemSet() const { - return pDlg->GetOutputItemSet(); + return m_xDlg->GetOutputItemSet(); } void AbstractEditRegionDlg_Impl::SelectSection(const OUString& rSectionName) @@ -1071,14 +1079,10 @@ VclPtr SwAbstractDialogFactory_Impl::CreateOutlineTabDialo return VclPtr::Create(std::make_unique(pParent, pSwItemSet, rWrtSh)); } -VclPtr SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( - vcl::Window* pParent, const SfxItemSet& rSet, - SwWrtShell &rShell, - SwTOXBase* pCurTOX, - bool bGlobal) +VclPtr SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog(weld::Window* pParent, const SfxItemSet& rSet, + SwWrtShell &rShell, SwTOXBase* pCurTOX, bool bGlobal) { - VclPtr pDlg = VclPtr::Create( pParent, rSet, rShell, pCurTOX, USHRT_MAX, bGlobal ); - return VclPtr::Create( pDlg ); + return VclPtr::Create(std::make_unique(pParent, rSet, rShell, pCurTOX, USHRT_MAX, bGlobal)); } VclPtr SwAbstractDialogFactory_Impl::CreateEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh) diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index a84b966f8c33..42f6797f2d3d 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -513,7 +513,15 @@ public: class SwMultiTOXTabDialog; class AbstractMultiTOXTabDialog_Impl : public AbstractMultiTOXTabDialog { - DECL_ABSTDLG_BASE(AbstractMultiTOXTabDialog_Impl,SwMultiTOXTabDialog) +protected: + std::shared_ptr m_xDlg; +public: + explicit AbstractMultiTOXTabDialog_Impl(std::unique_ptr p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override; virtual CurTOXType GetCurrentTOXType() const override ; virtual SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes) override; //from SfxTabDialog @@ -700,7 +708,7 @@ public: const SfxItemSet* pSwItemSet, SwWrtShell &) override; virtual VclPtr CreateMultiTOXTabDialog( - vcl::Window* pParent, const SfxItemSet& rSet, + weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, bool bGlobal) override; diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index d569144abec0..e70fd8d4f179 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -94,11 +94,11 @@ static void lcl_SetBOOLProp( } } -IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void) +IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, OneExampleFrame&, void) { try { - uno::Reference< frame::XModel > & xModel = m_pExampleFrame->GetModel(); + uno::Reference< frame::XModel > & xModel = m_xExampleFrame->GetModel(); uno::Reference< lang::XUnoTunnel > xDocTunnel(xModel, uno::UNO_QUERY); SwXTextDocument* pDoc = reinterpret_cast(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId())); @@ -138,7 +138,7 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void void SwMultiTOXTabDialog::CreateOrUpdateExample( TOXTypes nTOXIndex, sal_uInt16 nPage, sal_uInt16 nCurrentLevel) { - if(!m_pExampleFrame || !m_pExampleFrame->IsInitialized()) + if(!m_xExampleFrame || !m_xExampleFrame->IsInitialized()) return; try @@ -157,7 +157,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( OSL_ENSURE(m_vTypeData[nTOXIndex].m_pxIndexSections && m_vTypeData[nTOXIndex].m_pxIndexSections->xContainerSection.is(), "Section not created"); - uno::Reference< frame::XModel > & xModel = m_pExampleFrame->GetModel(); + uno::Reference< frame::XModel > & xModel = m_xExampleFrame->GetModel(); bool bInitialCreate = true; if(!m_vTypeData[nTOXIndex].m_pxIndexSections->xDocumentIndex.is()) { @@ -401,6 +401,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( { OSL_FAIL("::CreateExample() - exception caught"); } + m_xExampleFrame->Invalidate(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 915133cc54b5..8f2a9a14fb55 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -208,12 +208,10 @@ sal_uInt16 CurTOXType::GetFlatIndex() const ? TOX_AUTHORITIES + nIndex : eType ); } -SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& rSet, - SwWrtShell &rShell, - SwTOXBase* pCurTOX, - sal_uInt16 nToxType, bool bGlobal) - : SfxTabDialog(pParent, "TocDialog", - "modules/swriter/ui/tocdialog.ui", &rSet) +SwMultiTOXTabDialog::SwMultiTOXTabDialog(weld::Window* pParent, const SfxItemSet& rSet, + SwWrtShell &rShell, SwTOXBase* pCurTOX, + sal_uInt16 nToxType, bool bGlobal) + : SfxTabDialogController(pParent, "modules/swriter/ui/tocdialog.ui", "TocDialog", &rSet) , m_pMgr( new SwTOXMgr( &rShell ) ) , m_rWrtShell(rShell) , m_pParamTOXBase(pCurTOX) @@ -222,14 +220,8 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& , m_bEditTOX(false) , m_bExampleCreated(false) , m_bGlobalFlag(bGlobal) + , m_xShowExampleCB(m_xBuilder->weld_check_button("showexample")) { - get(m_pShowExampleCB, "showexample"); - get(m_pExampleContainerWIN, "example"); - Size aWinSize(LogicToPixel(Size(150, 188), MapMode(MapUnit::MapAppFont))); - m_pExampleContainerWIN->set_width_request(aWinSize.Width()); - m_pExampleContainerWIN->set_height_request(aWinSize.Height()); - m_pExampleContainerWIN->SetSizePixel(aWinSize); - m_eCurrentTOXType.eType = TOX_CONTENT; m_eCurrentTOXType.nIndex = 0; @@ -286,64 +278,42 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& } } SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - m_nSelectId = AddTabPage("index", SwTOXSelectTabPage::Create); - AddTabPage("styles", SwTOXStylesTabPage::Create); - m_nColumnId = AddTabPage("columns", SwColumnPage::Create); - m_nBackGroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG )); - m_nEntriesId = AddTabPage("entries", SwTOXEntryTabPage::Create); - if(!pCurTOX) - SetCurPageId(m_nSelectId); - - m_pShowExampleCB->SetClickHdl(LINK(this, SwMultiTOXTabDialog, ShowPreviewHdl)); - - m_pShowExampleCB->Check( SW_MOD()->GetModuleConfig()->IsShowIndexPreview()); + AddTabPage("index", SwTOXSelectTabPage::Create, nullptr); + AddTabPage("styles", SwTOXStylesTabPage::Create, nullptr); + AddTabPage("columns", SwColumnPage::Create, nullptr); + AddTabPage("background", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BKG), nullptr); + AddTabPage("entries", SwTOXEntryTabPage::Create, nullptr); + if (!pCurTOX) + SetCurPageId("index"); - SetViewAlign( WindowAlign::Left ); - // SetViewWindow does not work if the dialog is visible! + m_xShowExampleCB->connect_toggled(LINK(this, SwMultiTOXTabDialog, ShowPreviewHdl)); + m_xShowExampleCB->set_active(SW_MOD()->GetModuleConfig()->IsShowIndexPreview()); - if(!m_pShowExampleCB->IsChecked()) - SetViewWindow(m_pExampleContainerWIN); - - ShowPreviewHdl(nullptr); + ShowPreviewHdl(*m_xShowExampleCB); } SwMultiTOXTabDialog::~SwMultiTOXTabDialog() { - disposeOnce(); -} - -void SwMultiTOXTabDialog::dispose() -{ - SW_MOD()->GetModuleConfig()->SetShowIndexPreview(m_pShowExampleCB->IsChecked()); - - // fdo#38515 Avoid setting focus on deleted controls in the destructors - EnableInput( false ); - - m_vTypeData.clear(); - m_pMgr.reset(); - m_pExampleFrame.reset(); - m_pExampleContainerWIN.clear(); - m_pShowExampleCB.clear(); - SfxTabDialog::dispose(); + SW_MOD()->GetModuleConfig()->SetShowIndexPreview(m_xShowExampleCB->get_active()); } -void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) +void SwMultiTOXTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage) { - if (nId == m_nBackGroundId) + if (rId == "background") { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast(SvxBackgroundTabFlags::SHOW_SELECTOR))); rPage.PageCreated(aSet); } - else if(nId == m_nColumnId) + else if (rId == "columns") { const SwFormatFrameSize& rSize = GetInputSetImpl()->Get(RES_FRM_SIZE); static_cast(rPage).SetPageWidth(rSize.GetWidth()); } - else if (nId == m_nEntriesId) + else if (rId == "entries") static_cast(rPage).SetWrtShell(m_rWrtShell); - else if (nId == m_nSelectId) + else if (rId == "index") { static_cast(rPage).SetWrtShell(m_rWrtShell); if(USHRT_MAX != m_nInitialTOXType) @@ -353,7 +323,7 @@ void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) short SwMultiTOXTabDialog::Ok() { - short nRet = SfxTabDialog::Ok(); + short nRet = SfxTabDialogController::Ok(); SwTOXDescription& rDesc = GetTOXDescription(m_eCurrentTOXType); SwTOXBase aNewDef(*m_rWrtShell.GetDefaultTOXBase( m_eCurrentTOXType.eType, true )); @@ -451,11 +421,11 @@ std::unique_ptr SwMultiTOXTabDialog::CreateTOXDescFromTOXBase( return pDesc; } -IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void ) +IMPL_LINK_NOARG(SwMultiTOXTabDialog, ShowPreviewHdl, weld::ToggleButton&, void) { - if(m_pShowExampleCB->IsChecked()) + if (m_xShowExampleCB->get_active()) { - if(!m_pExampleFrame && !m_bExampleCreated) + if(!m_xExampleFrame && !m_bExampleCreated) { m_bExampleCreated = true; OUString sTemplate("internal/idxexample.odt"); @@ -468,32 +438,31 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void ) OUString sInfo(SwResId(STR_FILE_NOT_FOUND)); sInfo = sInfo.replaceFirst( "%1", sTemplate ); sInfo = sInfo.replaceFirst( "%2", aOpt.GetTemplatePath() ); - std::unique_ptr xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), + std::unique_ptr xInfoBox(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Info, VclButtonsType::Ok, sInfo)); xInfoBox->run(); } else { - Link aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl)); - m_pExampleFrame.reset(new SwOneExampleFrame( - *m_pExampleContainerWIN, EX_SHOW_ONLINE_LAYOUT, &aLink, &sTemplate)); - - if(!m_pExampleFrame->IsServiceAvailable()) - { - SwOneExampleFrame::CreateErrorMessage(); - } + Link aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl)); + m_xExampleFrame.reset(new OneExampleFrame(EX_SHOW_ONLINE_LAYOUT, &aLink, &sTemplate)); + m_xExampleFrameWin.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame)); } - m_pShowExampleCB->Show(m_pExampleFrame && m_pExampleFrame->IsServiceAvailable()); + m_xShowExampleCB->set_visible(m_xExampleFrame != nullptr); } } - bool bSetViewWindow = m_pShowExampleCB->IsChecked() - && m_pExampleFrame && m_pExampleFrame->IsServiceAvailable(); - m_pExampleContainerWIN->Show( bSetViewWindow ); - SetViewWindow( bSetViewWindow ? m_pExampleContainerWIN.get() : nullptr ); + if (m_xExampleFrame) + { + const bool bSetViewWindow = m_xShowExampleCB->get_active(); + if (bSetViewWindow) + m_xExampleFrame->Show(); + else + m_xExampleFrame->Hide(); + } - setOptimalLayoutSize(); + m_xDialog->resize_to_request(); } bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName) @@ -783,10 +752,10 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(TabPageParent pParent, const SfxItemSet& false ); //Default mode is arranged to be the tallest mode - //of alphabetical index, lock that height in now + //of alphabetical index, lock that size in now LanguageHdl(nullptr); //fill sort algorithm list - Size aPrefSize(get_preferred_size()); - set_height_request(aPrefSize.Height()); + Size aPrefSize(m_xContainer->get_preferred_size()); + m_xContainer->set_size_request(aPrefSize.Width(), aPrefSize.Height()); sAddStyleContent = m_xAddStylesCB->get_label(); @@ -826,7 +795,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(TabPageParent pParent, const SfxItemSet& m_xLevelNF->connect_value_changed(LINK(this, SwTOXSelectTabPage, ModifySpinHdl)); m_xSortAlgorithmLB->connect_changed(LINK(this, SwTOXSelectTabPage, ModifyListBoxHdl)); - aLk = LINK(this, SwTOXSelectTabPage, RadioButtonHdl); + aLk = LINK(this, SwTOXSelectTabPage, RadioButtonHdl); m_xFromCaptionsRB->connect_toggled(aLk); m_xFromObjectNamesRB->connect_toggled(aLk); RadioButtonHdl(*m_xFromCaptionsRB); @@ -932,7 +901,7 @@ static CurTOXType lcl_UserData2TOXTypes(sal_uInt16 nData) void SwTOXSelectTabPage::ApplyTOXDescription() { - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType(); SwTOXDescription& rDesc = pTOXDlg->GetTOXDescription(aCurType); m_xReadOnlyCB->set_active(rDesc.IsReadonly()); @@ -1048,7 +1017,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription() void SwTOXSelectTabPage::FillTOXDescription() { - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); CurTOXType aCurType = pTOXDlg->GetCurrentTOXType(); SwTOXDescription& rDesc = pTOXDlg->GetTOXDescription(aCurType); rDesc.SetTitle(m_xTitleED->get_text()); @@ -1159,7 +1128,7 @@ void SwTOXSelectTabPage::FillTOXDescription() void SwTOXSelectTabPage::Reset( const SfxItemSet* ) { - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); SwWrtShell& rSh = pTOXDlg->GetWrtShell(); const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType(); sal_uInt32 nData = lcl_TOXTypesToUserData(aCurType); @@ -1216,7 +1185,7 @@ VclPtr SwTOXSelectTabPage::Create(TabPageParent pParent, const SfxIt IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, weld::ComboBox&, rBox, void) { - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); const sal_uInt16 nType = rBox.get_active_id().toUInt32(); CurTOXType eCurType = lcl_UserData2TOXTypes(nType); pTOXDlg->SetCurrentTOXType(eCurType); @@ -1284,7 +1253,7 @@ void SwTOXSelectTabPage::ModifyHdl() if(!m_bWaitingInitialSettings) { FillTOXDescription(); - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); pTOXDlg->CreateOrUpdateExample(pTOXDlg->GetCurrentTOXType().eType, TOX_PAGE_SELECT); } } @@ -1306,7 +1275,7 @@ IMPL_LINK_NOARG(SwTOXSelectTabPage, ModifySpinHdl, weld::SpinButton&, void) IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, weld::ToggleButton&, rButton, void) { - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType(); if(TOX_CONTENT == aCurType.eType) { @@ -1377,7 +1346,7 @@ void SwTOXSelectTabPage::LanguageHdl(const weld::ComboBox* pBox) IMPL_LINK_NOARG(SwTOXSelectTabPage, AddStylesHdl, weld::Button&, void) { - SwAddStylesDlg_Impl aDlg(GetDialogFrameWeld(), static_cast(GetTabDialog())->GetWrtShell(), + SwAddStylesDlg_Impl aDlg(GetDialogFrameWeld(), static_cast(GetDialogController())->GetWrtShell(), aStyleArr); aDlg.run(); ModifyHdl(); @@ -1408,8 +1377,7 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, const OString&, rIdent, void) return; } - VclPtrInstance pAutoMarkDlg( - GetTabDialog(), sAutoMarkURL, bNew); + VclPtrInstance pAutoMarkDlg(nullptr, sAutoMarkURL, bNew); if( RET_OK != pAutoMarkDlg->Execute() && bNew ) sAutoMarkURL = sSaveAutoMarkURL; @@ -1447,7 +1415,7 @@ public: , aFormToken(rToken) , bNextControl(false) , m_pParent(pTokenWin) - , m_xEntry(m_xBuilder->weld_entry("entry")) + , m_xEntry(m_xBuilder->weld_entry("entry", true)) { m_xEntry->connect_changed(LINK(this, SwTOXEdit, ModifyHdl)); m_xEntry->connect_key_press(LINK(this, SwTOXEdit, KeyInputHdl)); @@ -1603,7 +1571,7 @@ public: , aFormToken(rToken) , bNextControl(false) , m_pParent(pTokenWin) - , m_xButton(m_xBuilder->weld_toggle_button("button")) + , m_xButton(m_xBuilder->weld_toggle_button("button", true)) { m_xButton->connect_key_press(LINK(this, SwTOXButton, KeyInputHdl)); m_xButton->connect_focus_in(LINK(this, SwTOXButton, FocusInHdl)); @@ -1938,6 +1906,10 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(TabPageParent pParent, const SfxItemSet& rA m_xFirstKeyLB->set_active(0); m_xSecondKeyLB->set_active(0); m_xThirdKeyLB->set_active(0); + + //lock size + Size aPrefSize(m_xContainer->get_preferred_size()); + m_xContainer->set_size_request(aPrefSize.Width(), aPrefSize.Height()); } SwTOXEntryTabPage::~SwTOXEntryTabPage() @@ -1966,7 +1938,7 @@ void SwTOXEntryTabPage::OnModify(bool bAllLevels) { UpdateDescriptor(); - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); if (pTOXDlg) { sal_uInt16 nCurLevel = m_xLevelLB->get_selected_index() + 1; @@ -1985,7 +1957,7 @@ bool SwTOXEntryTabPage::FillItemSet( SfxItemSet* ) void SwTOXEntryTabPage::Reset( const SfxItemSet* ) { - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType(); m_pCurrentForm = pTOXDlg->GetForm(aCurType); if(TOX_INDEX == aCurType.eType) @@ -2008,7 +1980,7 @@ void SwTOXEntryTabPage::Reset( const SfxItemSet* ) void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) { - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType(); m_pCurrentForm = pTOXDlg->GetForm(aCurType); @@ -2114,7 +2086,7 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) void SwTOXEntryTabPage::UpdateDescriptor() { WriteBackLevel(); - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); SwTOXDescription& rDesc = pTOXDlg->GetTOXDescription(aLastTOXType); if(TOX_INDEX == aLastTOXType.eType) { @@ -2162,7 +2134,7 @@ IMPL_LINK_NOARG(SwTOXEntryTabPage, EditStyleHdl, weld::Button&, void) { SfxStringItem aStyle(SID_STYLE_EDIT, m_xCharStyleLB->get_active_text()); SfxUInt16Item aFamily(SID_STYLE_FAMILY, sal_uInt16(SfxStyleFamily::Char)); - static_cast(GetTabDialog())->GetWrtShell(). + static_cast(GetDialogController())->GetWrtShell(). GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_STYLE_EDIT, SfxCallMode::SYNCHRON, { &aStyle, &aFamily }); @@ -2628,8 +2600,9 @@ SwTokenWindow::SwTokenWindow(std::unique_ptr xParent) , m_sCharStyle(SwResId(STR_CHARSTYLE)) , m_pActiveCtrl(nullptr) , m_pParent(nullptr) - , m_xBuilder(Application::CreateBuilder(xParent.get(), "modules/swriter/ui/tokenwidget.ui")) - , m_xContainer(std::move(xParent)) + , m_xParentWidget(std::move(xParent)) + , m_xBuilder(Application::CreateBuilder(m_xParentWidget.get(), "modules/swriter/ui/tokenwidget.ui")) + , m_xContainer(m_xBuilder->weld_container("TokenWidget")) , m_xLeftScrollWin(m_xBuilder->weld_button("left")) , m_xCtrlParentWin(m_xBuilder->weld_container("ctrl")) , m_xScrollWin(m_xBuilder->weld_scrolled_window("scrollwin")) @@ -2637,6 +2610,7 @@ SwTokenWindow::SwTokenWindow(std::unique_ptr xParent) { m_xScrollWin->connect_hadjustment_changed(LINK(this, SwTokenWindow, ScrollHdl)); m_xCtrlParentWin->set_size_request(-1, Edit::GetMinimumEditSize().Height()); + m_xCtrlParentWin->connect_size_allocate(LINK(this, SwTokenWindow, AdjustPositionsHdl)); for (sal_uInt32 i = 0; i < TOKEN_END; ++i) { @@ -3062,11 +3036,15 @@ void SwTokenWindow::RemoveControl(const SwTOXButton* pDel, bool bInternalCall) m_aModifyHdl.Call(nullptr); } +IMPL_LINK_NOARG(SwTokenWindow, AdjustPositionsHdl, const Size&, void) +{ + AdjustScrolling(); +} + void SwTokenWindow::AdjustPositions() { for (size_t i = 0; i < m_aControlList.size(); ++i) m_aControlList[i]->set_grid_left_attach(i); - AdjustScrolling(); } @@ -3089,6 +3067,7 @@ void SwTokenWindow::AdjustScrolling() auto nLeft = m_xScrollWin->hadjustment_get_value(); auto nSpace = m_xScrollWin->hadjustment_get_page_size(); auto nWidth = m_xScrollWin->hadjustment_get_upper(); + bool bEnable = nWidth > nSpace; //the active control must be visible @@ -3480,7 +3459,7 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) m_xLevelLB->thaw(); // initialise templates - SwWrtShell& rSh = static_cast(GetTabDialog())->GetWrtShell(); + SwWrtShell& rSh = static_cast(GetDialogController())->GetWrtShell(); const sal_uInt16 nSz = rSh.GetTextFormatCollCount(); m_xParaLayLB->freeze(); @@ -3522,7 +3501,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, EditStyleHdl, weld::Button&, void) { SfxStringItem aStyle(SID_STYLE_EDIT, m_xParaLayLB->get_selected_text()); SfxUInt16Item aFamily(SID_STYLE_FAMILY, sal_uInt16(SfxStyleFamily::Para)); - SwWrtShell& rSh = static_cast(GetTabDialog())->GetWrtShell(); + SwWrtShell& rSh = static_cast(GetDialogController())->GetWrtShell(); rSh.GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_STYLE_EDIT, SfxCallMode::SYNCHRON, { &aStyle, &aFamily }); @@ -3567,7 +3546,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, StdHdl, weld::Button&, void) IMPL_LINK_NOARG(SwTOXStylesTabPage, DoubleClickHdl, weld::TreeView&, void) { const OUString aTmpName(m_xParaLayLB->get_selected_text()); - SwWrtShell& rSh = static_cast(GetTabDialog())->GetWrtShell(); + SwWrtShell& rSh = static_cast(GetDialogController())->GetWrtShell(); if(m_xParaLayLB->get_selected_index() != -1 && (m_xLevelLB->get_selected_index() == 0 || SwMultiTOXTabDialog::IsNoNum(rSh, aTmpName))) @@ -3579,7 +3558,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, EnableSelectHdl, weld::TreeView&, void) { m_xStdBT->set_sensitive(m_xLevelLB->get_selected_index() != -1); - SwWrtShell& rSh = static_cast(GetTabDialog())->GetWrtShell(); + SwWrtShell& rSh = static_cast(GetDialogController())->GetWrtShell(); const OUString aTmpName(m_xParaLayLB->get_selected_text()); m_xAssignBT->set_sensitive(m_xParaLayLB->get_selected_index() != -1 && m_xLevelLB->get_selected_index() != -1 && @@ -3589,7 +3568,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, EnableSelectHdl, weld::TreeView&, void) void SwTOXStylesTabPage::Modify() { - SwMultiTOXTabDialog* pTOXDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); if (pTOXDlg) { GetForm() = *m_pCurrentForm; diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index d93d4032a802..753ac348c00a 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -43,7 +43,7 @@ class SwTOXWidget; class SwTOXEdit; class SwTOXButton; class SwTOXEntryTabPage; -class SwOneExampleFrame; +class OneExampleFrame; class SwWrtShell; namespace com{namespace sun{namespace star{ @@ -59,20 +59,11 @@ struct SwIndexSections_Impl css::uno::Reference< css::text::XDocumentIndex > xDocumentIndex; }; -class SwMultiTOXTabDialog : public SfxTabDialog +class SwMultiTOXTabDialog : public SfxTabDialogController { - VclPtr m_pExampleContainerWIN; - VclPtr m_pShowExampleCB; std::unique_ptr m_pMgr; SwWrtShell& m_rWrtShell; - sal_uInt16 m_nSelectId; - sal_uInt16 m_nColumnId; - sal_uInt16 m_nBackGroundId; - sal_uInt16 m_nEntriesId; - - std::unique_ptr m_pExampleFrame; - struct TypeData { std::unique_ptr m_pForm; @@ -92,21 +83,24 @@ class SwMultiTOXTabDialog : public SfxTabDialog bool m_bExampleCreated; bool const m_bGlobalFlag; + std::unique_ptr m_xExampleFrame; + std::unique_ptr m_xShowExampleCB; + std::unique_ptr m_xExampleFrameWin; + virtual short Ok() override; std::unique_ptr CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX); - DECL_LINK(CreateExample_Hdl, SwOneExampleFrame&, void); - DECL_LINK(ShowPreviewHdl, Button*, void); + DECL_LINK(CreateExample_Hdl, OneExampleFrame&, void); + DECL_LINK(ShowPreviewHdl, weld::ToggleButton&, void); public: - SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& rSet, + SwMultiTOXTabDialog(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, sal_uInt16 nToxType, bool bGlobal); virtual ~SwMultiTOXTabDialog() override; - virtual void dispose() override; - virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; + virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override; SwForm* GetForm(CurTOXType eType); @@ -254,7 +248,10 @@ class SwTokenWindow OUString m_sAdditionalAccnameString2; OUString m_sAdditionalAccnameString3; + Idle m_aAdjustPositionsIdle; + VclPtr m_pParent; + std::unique_ptr m_xParentWidget; std::unique_ptr m_xBuilder; std::unique_ptr m_xContainer; std::unique_ptr m_xLeftScrollWin; @@ -270,6 +267,7 @@ class SwTokenWindow DECL_LINK(TbxFocusBtnHdl, SwTOXWidget&, void); DECL_LINK(ScrollBtnHdl, weld::Button&, void); DECL_LINK(ScrollHdl, weld::ScrolledWindow&, void); + DECL_LINK(AdjustPositionsHdl, const Size&, void); void SetActiveControl(SwTOXWidget* pSet); @@ -436,7 +434,7 @@ class SwTOXStylesTabPage : public SfxTabPage SwForm& GetForm() { - SwMultiTOXTabDialog* pDlg = static_cast(GetTabDialog()); + SwMultiTOXTabDialog* pDlg = static_cast(GetDialogController()); return *pDlg->GetForm(pDlg->GetCurrentTOXType()); } diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx index 9ea3edb99490..7f860fbb8f58 100644 --- a/sw/source/uibase/inc/unotools.hxx +++ b/sw/source/uibase/inc/unotools.hxx @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include "actctrl.hxx" #include #include @@ -101,6 +103,50 @@ public: static void CreateErrorMessage(); }; +class SW_DLLPUBLIC OneExampleFrame : public weld::CustomWidgetController +{ + ScopedVclPtr m_xVirDev; + css::uno::Reference< css::frame::XModel > m_xModel; + css::uno::Reference< css::frame::XController > m_xController; + css::uno::Reference< css::text::XTextCursor > m_xCursor; + + Idle m_aLoadedIdle; + Link m_aInitializedLink; + + OUString m_sArgumentURL; + + SwView* const m_pModuleView; + + sal_uInt32 const m_nStyleFlags; + + bool m_bIsInitialized; + + DECL_DLLPRIVATE_LINK( TimeoutHdl, Timer*, void ); + void PopupHdl(const OString& rId); + + SAL_DLLPRIVATE void CreateControl(); + SAL_DLLPRIVATE void DisposeControl(); + +public: + OneExampleFrame(sal_uInt32 nStyleFlags, + const Link* pInitalizedLink, + const OUString* pURL = nullptr); + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; + virtual bool ContextMenu(const CommandEvent& rCEvt) override; + virtual ~OneExampleFrame() override; + + css::uno::Reference< css::frame::XModel > & GetModel() {return m_xModel;} + css::uno::Reference< css::frame::XController > & GetController() {return m_xController;} + css::uno::Reference< css::text::XTextCursor > & GetTextCursor() {return m_xCursor;} + + void ClearDocument(); + + bool IsInitialized() const {return m_bIsInitialized;} + + bool CreatePopup(const Point& rPt); +}; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx index 75858cb2c0aa..2ee71262d768 100644 --- a/sw/source/uibase/shells/textidx.cxx +++ b/sw/source/uibase/shells/textidx.cxx @@ -49,7 +49,6 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq) pArgs->GetItemState(nSlot, false, &pItem ); SfxViewFrame* pVFrame = GetView().GetViewFrame(); - vcl::Window *pMDI = &pVFrame->GetWindow(); switch( nSlot ) { @@ -133,9 +132,11 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq) } SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); VclPtr pDlg(pFact->CreateMultiTOXTabDialog( - pMDI, aSet, rSh, const_cast(pCurTOX), + GetView().GetFrameWeld(), aSet, rSh, const_cast(pCurTOX), bGlobal)); - pDlg->StartExecuteAsync(nullptr); + pDlg->StartExecuteAsync([pDlg](sal_Int32 /*nResult*/){ + pDlg->disposeOnce(); + }); } break; case FN_REMOVE_CUR_TOX: diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index df5d5656ab41..d45a8efd00bf 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -906,7 +906,7 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); ScopedVclPtr pDlg(pFact->CreateMultiTOXTabDialog( - this, aSet, + GetFrameWeld(), aSet, *m_pActiveShell, nullptr, true)); diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index ce935fb17ead..8fe3631f1f4c 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -24,9 +24,13 @@ #include #include #include -#include -#include +#include +#include #include +#include +#include +#include +#include #include #include #include @@ -281,7 +285,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void ) //From here, a cursor is defined, which goes through the template, //and overwrites the template words where it is necessary. - uno::Reference< lang::XUnoTunnel> xTunnel( m_xCursor, uno::UNO_QUERY); + uno::Reference< lang::XUnoTunnel> xTunnel(m_xCursor, uno::UNO_QUERY); if( xTunnel.is() ) { OTextCursorHelper* pCursor = reinterpret_cast( xTunnel->getSomething( @@ -507,6 +511,412 @@ IMPL_LINK(SwOneExampleFrame, PopupHdl, Menu*, pMenu, bool ) return false; }; +OneExampleFrame::OneExampleFrame(sal_uInt32 nFlags, + const Link* pInitializedLink, + const OUString* pURL) + : m_aLoadedIdle("sw uibase OneExampleFrame Loaded") + , m_pModuleView(SW_MOD()->GetView()) + , m_nStyleFlags(nFlags) + , m_bIsInitialized(false) +{ + if (pURL && !pURL->isEmpty()) + m_sArgumentURL = *pURL; + + if( pInitializedLink ) + m_aInitializedLink = *pInitializedLink; + + // the controller is asynchronously set + m_aLoadedIdle.SetInvokeHandler(LINK(this, OneExampleFrame, TimeoutHdl)); + m_aLoadedIdle.SetPriority(TaskPriority::HIGH_IDLE); +} + +void OneExampleFrame::SetDrawingArea(weld::DrawingArea* pDrawingArea) +{ + CustomWidgetController::SetDrawingArea(pDrawingArea); + m_xVirDev = VclPtr::Create(); + Size aSize(m_xVirDev->LogicToPixel(Size(150, 188), MapMode(MapUnit::MapAppFont))); + pDrawingArea->set_size_request(aSize.Width(), aSize.Height()); + SetOutputSizePixel(aSize); + CreateControl(); +} + +bool OneExampleFrame::ContextMenu(const CommandEvent& rCEvt) +{ + switch (rCEvt.GetCommand()) + { + case CommandEventId::ContextMenu: + { + //#125881# quickly clicking crashes because the control is not fully initialized + if (GetController().is()) + return CreatePopup(rCEvt.GetMousePosPixel()); + } + break; + default:; + break; + } + return false; +} + +void OneExampleFrame::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) +{ + Size aSize(GetOutputSizePixel()); + // m_xVirDev instead of rRenderContext just to avoid overlays in writer re-triggering + // invalidate on rRenderContext if it is a vcl::Window, which is the "classic" gen mode + m_xVirDev->SetOutputSizePixel(aSize); + + Color aBgColor = SW_MOD()->GetColorConfig().GetColorValue(::svtools::DOCCOLOR).nColor; + m_xVirDev->DrawWallpaper(tools::Rectangle(Point(), aSize), aBgColor); + + OTextCursorHelper* pCursor = nullptr; + uno::Reference xTunnel(m_xCursor, uno::UNO_QUERY); + if (xTunnel.is()) + { + pCursor = reinterpret_cast(xTunnel->getSomething( + OTextCursorHelper::getUnoTunnelId())); + } + + if (pCursor) + { + uno::Reference xSettings(m_xController, uno::UNO_QUERY); + uno::Reference xViewProps = xSettings->getViewSettings(); + uno::Any aZoom = xViewProps->getPropertyValue(UNO_NAME_ZOOM_VALUE); + sal_Int16 nZoom = 100; + aZoom >>= nZoom; + + double fZoom = 100.0 / nZoom; + + m_xVirDev->Push(PushFlags::ALL); + m_xVirDev->SetMapMode(MapMode(MapUnit::MapTwip)); + SwDoc *pDoc = pCursor->GetDoc(); + SwDocShell* pShell = pDoc->GetDocShell(); + tools::Rectangle aRect(Point(), m_xVirDev->PixelToLogic(aSize)); + pShell->SetVisArea(tools::Rectangle(Point(), Size(aRect.GetWidth() * fZoom, + aRect.GetHeight() * fZoom))); + pShell->DoDraw(m_xVirDev.get(), aRect.TopLeft(), aRect.GetSize(), JobSetup(), ASPECT_CONTENT); + m_xVirDev->Pop(); + } + + rRenderContext.DrawOutDev(Point(), aSize, Point(), aSize, *m_xVirDev); +} + +OneExampleFrame::~OneExampleFrame() +{ + DisposeControl(); +} + +void OneExampleFrame::CreateControl() +{ + // create new doc + OUString sTempURL(cFactory); + if(!m_sArgumentURL.isEmpty()) + sTempURL = m_sArgumentURL; + + uno::Reference xDesktop = frame::Desktop::create(::comphelper::getProcessComponentContext()); + uno::Reference xLoader(xDesktop, uno::UNO_QUERY); + uno::Sequence args( comphelper::InitPropertySequence({ + { "DocumentService", uno::Any(OUString("com.sun.star.text.TextDocument")) }, + { "OpenFlags", uno::Any(OUString("-RB")) }, + { "Referer", uno::Any(OUString("private:user")) }, + { "ReadOnly", uno::Any(true) }, + { "Hidden", uno::Any(true) } + })); + + m_xModel.set(xLoader->loadComponentFromURL(sTempURL, "_blank", 0, args), uno::UNO_QUERY); + + m_aLoadedIdle.Start(); +} + +void OneExampleFrame::DisposeControl() +{ + m_aLoadedIdle.Stop(); + m_xCursor = nullptr; + if (m_xModel) + { + m_xModel->dispose(); + m_xModel = nullptr; + } + m_xController = nullptr; +} + +IMPL_LINK( OneExampleFrame, TimeoutHdl, Timer*, pTimer, void ) +{ + if (!m_xModel.is()) + return; + + m_xController = m_xModel->getCurrentController(); + + if (m_xController.is()) + { + uno::Reference xFrame(m_xController->getFrame(), uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY ); + if ( xPropSet.is() ) + { + try + { + uno::Reference< frame::XLayoutManager > xLayoutManager; + uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); + aValue >>= xLayoutManager; + if ( xLayoutManager.is() ) + xLayoutManager->setVisible( false ); + } + catch (const uno::Exception&) + { + } + } + + //now the ViewOptions should be set properly + uno::Reference< view::XViewSettingsSupplier > xSettings(m_xController, uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings(); + + const uno::Any aTrueSet( true ); + const uno::Any aFalseSet( false ); + + if( !m_bIsInitialized ) + { + xViewProps->setPropertyValue(UNO_NAME_SHOW_BREAKS, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_DRAWINGS, aTrueSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_FIELD_COMMANDS, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_GRAPHICS, aTrueSet); + xViewProps->setPropertyValue(UNO_NAME_HIDE_WHITESPACE, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_HIDDEN_PARAGRAPHS, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_HIDDEN_TEXT, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_HORI_RULER, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_PARA_BREAKS, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_PROTECTED_SPACES, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_SOFT_HYPHENS, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_SPACES, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_TABLES, aTrueSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_TABSTOPS, aFalseSet); + xViewProps->setPropertyValue(UNO_NAME_SHOW_VERT_RULER, aFalseSet); + + if(0 ==(m_nStyleFlags&EX_SHOW_ONLINE_LAYOUT)) + { + uno::Any aZoom; + aZoom <<= sal_Int16(view::DocumentZoomType::PAGE_WIDTH_EXACT); + xViewProps->setPropertyValue(UNO_NAME_ZOOM_TYPE, aZoom); + } + else + { + uno::Any aZoom; + aZoom <<= sal_Int16(view::DocumentZoomType::BY_VALUE); + xViewProps->setPropertyValue(UNO_NAME_ZOOM_TYPE, aZoom); + + sal_Int16 nZoomValue = 75; + if(EX_SHOW_BUSINESS_CARDS == m_nStyleFlags) + { + nZoomValue = 80; + } + aZoom <<= nZoomValue; + xViewProps->setPropertyValue(UNO_NAME_ZOOM_VALUE, aZoom); + } + + // set onlinelayout property after setting the zoom + disableScrollBars(xViewProps, (m_nStyleFlags&EX_SHOW_ONLINE_LAYOUT) != 0); + m_bIsInitialized = true; + } + + uno::Reference< text::XTextDocument > xDoc(m_xModel, uno::UNO_QUERY); + uno::Reference< text::XText > xText = xDoc->getText(); + m_xCursor = xText->createTextCursor(); + + //From here, a cursor is defined, which goes through the template, + //and overwrites the template words where it is necessary. + + OTextCursorHelper* pCursor = nullptr; + uno::Reference< lang::XUnoTunnel> xTunnel( m_xCursor, uno::UNO_QUERY); + if (xTunnel.is()) + { + pCursor = reinterpret_cast(xTunnel->getSomething( + OTextCursorHelper::getUnoTunnelId())); + } + + SwDoc *pDoc = pCursor ? pCursor->GetDoc() : nullptr; + if (pDoc) + { + SwEditShell* pSh = pDoc->GetEditShell(); + + do + { + if (pSh->GetCurWord() == "HEADING1") + { + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING1)); + } + else if (pSh->GetCurWord() == "ENTRY1") + { + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY1)); + } + else if (pSh->GetCurWord() == "HEADING11") + { + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING11)); + } + else if (pSh->GetCurWord() == "ENTRY11") + { + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY11)); + } + else if (pSh->GetCurWord() == "HEADING12") + { + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING12)); + } + else if (pSh->GetCurWord() == "ENTRY12") + { + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY12)); + } + else if (pSh->GetCurWord() == "TABLE1") + { + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_TABLE1)); + } + else if (pSh->GetCurWord() == "IMAGE1") + { + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_IMAGE1)); + } + } + while(pSh->Right(sal_uInt16(1), sal_uInt16(1), true)); + } + + uno::Reference< beans::XPropertySet > xCursorProp(m_xCursor, uno::UNO_QUERY); + uno::Any aPageStyle = xCursorProp->getPropertyValue(UNO_NAME_PAGE_STYLE_NAME); + OUString sPageStyle; + aPageStyle >>= sPageStyle; + + uno::Reference< style::XStyleFamiliesSupplier > xSSupp( xDoc, uno::UNO_QUERY); + uno::Reference< container::XNameAccess > xStyles = xSSupp->getStyleFamilies(); + uno::Any aPFamily = xStyles->getByName( "PageStyles" ); + uno::Reference< container::XNameContainer > xPFamily; + + if( EX_SHOW_DEFAULT_PAGE != m_nStyleFlags + && (aPFamily >>= xPFamily) && !sPageStyle.isEmpty() ) + { + uno::Any aPStyle = xPFamily->getByName( sPageStyle ); + uno::Reference< style::XStyle > xPStyle; + aPStyle >>= xPStyle; + uno::Reference< beans::XPropertySet > xPProp(xPStyle, uno::UNO_QUERY); + uno::Any aSize = xPProp->getPropertyValue(UNO_NAME_SIZE); + awt::Size aPSize; + aSize >>= aPSize; + //TODO: set page width to card width + aPSize.Width = 10000; + aSize <<= aPSize; + xPProp->setPropertyValue(UNO_NAME_SIZE, aSize); + + uno::Any aZero; aZero <<= sal_Int32(0); + xPProp->setPropertyValue(UNO_NAME_LEFT_MARGIN, aZero); + xPProp->setPropertyValue(UNO_NAME_RIGHT_MARGIN, aZero); + } + + uno::Reference xWin = xFrame->getContainerWindow(); + Size aWinSize(GetOutputSizePixel()); + xWin->setPosSize(0, 0, aWinSize.Width(), aWinSize.Height(), awt::PosSize::SIZE); + + // can only be done here - the SFX changes the ScrollBar values + disableScrollBars(xViewProps, (m_nStyleFlags&EX_SHOW_ONLINE_LAYOUT) != 0); + + m_aInitializedLink.Call(*this); + + uno::Reference< text::XTextViewCursorSupplier > xCursorSupp(m_xController, uno::UNO_QUERY); + uno::Reference< view::XScreenCursor > xScrCursor(xCursorSupp->getViewCursor(), uno::UNO_QUERY); + if(xScrCursor.is()) + xScrCursor->screenUp(); + + if (pDoc) + { + SwEditShell* pSh = pDoc->GetEditShell(); + if( pSh->ActionCount() ) + { + pSh->EndAllAction(); + pSh->UnlockPaint(); + } + } + + SW_MOD()->SetView(m_pModuleView); + + Invalidate(); + } + else + pTimer->Start(); +} + +void OneExampleFrame::ClearDocument() +{ + uno::Reference< lang::XUnoTunnel> xTunnel( m_xCursor, uno::UNO_QUERY); + if( xTunnel.is() ) + { + OTextCursorHelper* pCursor = reinterpret_cast(xTunnel->getSomething( + OTextCursorHelper::getUnoTunnelId()) ); + if( pCursor ) + { + SwDoc* pDoc = pCursor->GetDoc(); + SwEditShell* pSh = pDoc->GetEditShell(); + pSh->LockPaint(); + pSh->StartAllAction(); + pSh->KillPams(); + pSh->ClearMark(); + pDoc->ClearDoc(); + pSh->ClearUpCursors(); + + if( m_aLoadedIdle.IsActive()) + { + pSh->EndAllAction(); + pSh->UnlockPaint(); + } + m_aLoadedIdle.Start(); + } + else + { + m_xCursor->gotoStart(false); + m_xCursor->gotoEnd(true); + m_xCursor->setString(OUString()); + } + } +} + +bool OneExampleFrame::CreatePopup(const Point& rPt) +{ + if (EX_SHOW_ONLINE_LAYOUT != m_nStyleFlags) + return false; + + std::unique_ptr xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/previewmenu.ui")); + std::unique_ptr xPop(xBuilder->weld_menu("previewmenu")); + + uno::Reference< view::XViewSettingsSupplier > xSettings(m_xController, uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings(); + + uno::Any aZoom = xViewProps->getPropertyValue(UNO_NAME_ZOOM_VALUE); + sal_Int16 nZoom = 0; + aZoom >>= nZoom; + + for (size_t i = 0; i < SAL_N_ELEMENTS(nZoomValues); ++i) + { + OUString sTemp = unicode::formatPercent(nZoomValues[i], + Application::GetSettings().GetUILanguageTag()); + OString sIdent = "zoom" + OString::number(nZoomValues[i]); + xPop->set_label(sIdent, sTemp); + if (nZoom == nZoomValues[i]) + xPop->set_active(sIdent, true); + } + + PopupHdl(xPop->popup_at_rect(GetDrawingArea(), tools::Rectangle(rPt, Size(1, 1)))); + + return true; +} + +void OneExampleFrame::PopupHdl(const OString& rId) +{ + OString sZoomValue; + if (rId.startsWith("zoom", &sZoomValue)) + { + sal_Int16 nZoom = sZoomValue.toInt32(); + uno::Reference< view::XViewSettingsSupplier > xSettings(m_xController, uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings(); + + uno::Any aZoom; + aZoom <<= nZoom; + xViewProps->setPropertyValue(UNO_NAME_ZOOM_VALUE, aZoom); + aZoom <<= sal_Int16(view::DocumentZoomType::BY_VALUE); + xViewProps->setPropertyValue(UNO_NAME_ZOOM_TYPE, aZoom); + } + Invalidate(); +} + SwFrameCtrlWindow::SwFrameCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame) : VclEventBox(pParent) , pExampleFrame(pFrame) diff --git a/sw/uiconfig/swriter/ui/previewmenu.ui b/sw/uiconfig/swriter/ui/previewmenu.ui new file mode 100644 index 000000000000..c993411a33ac --- /dev/null +++ b/sw/uiconfig/swriter/ui/previewmenu.ui @@ -0,0 +1,44 @@ + + + + + + True + False + + + True + False + True + + + + + True + False + True + + + + + True + False + True + + + + + True + False + True + + + + + True + False + True + + + + diff --git a/sw/uiconfig/swriter/ui/tocdialog.ui b/sw/uiconfig/swriter/ui/tocdialog.ui index 91919aa21243..e69d475ffc05 100644 --- a/sw/uiconfig/swriter/ui/tocdialog.ui +++ b/sw/uiconfig/swriter/ui/tocdialog.ui @@ -1,13 +1,18 @@ - + False 6 Table of Contents, Index or Bibliography - False + True + 0 + 0 dialog + + + False @@ -18,14 +23,11 @@ False end - - gtk-ok + + gtk-revert-to-saved True True - True - True True - True True @@ -35,11 +37,14 @@ - - gtk-close + + gtk-ok True True + True + True True + True True @@ -49,8 +54,8 @@ - - gtk-help + + gtk-close True True True @@ -60,12 +65,11 @@ False True 2 - True - - gtk-revert-to-saved + + gtk-help True True True @@ -75,6 +79,7 @@ False True 3 + True @@ -110,22 +115,6 @@ True True 12 - - - True - False - - - Preview - - - - - False - True - 2 - - True @@ -141,6 +130,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -160,6 +173,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + 1 @@ -183,6 +220,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + 2 @@ -206,6 +267,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + 3 @@ -229,6 +314,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + 4 @@ -252,6 +361,23 @@ 1 + + + False + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK + True + + + Preview + + + + + False + True + 2 + + False @@ -262,10 +388,10 @@ + reset ok cancel help - reset diff --git a/sw/uiconfig/swriter/ui/tocentriespage.ui b/sw/uiconfig/swriter/ui/tocentriespage.ui index dba1ae33f18c..47114aad60d4 100644 --- a/sw/uiconfig/swriter/ui/tocentriespage.ui +++ b/sw/uiconfig/swriter/ui/tocentriespage.ui @@ -2,15 +2,6 @@ - - - - - - - - - 19.989999999999998 0.050000000000000003 @@ -26,32 +17,40 @@ True False - res/sc10712.png + res/sc10712.png True False - res/sc10713.png + res/sc10713.png True False - res/sc10712.png + res/sc10712.png True False - res/sc10712.png + res/sc10712.png True False - res/sc10713.png + res/sc10713.png True False - res/sc10713.png + res/sc10713.png + + + + + + + + True @@ -162,6 +161,7 @@ True False + start True 12 @@ -473,8 +473,8 @@ True - True False + True False @@ -492,9 +492,9 @@ _Insert - True True True + True True @@ -506,9 +506,9 @@ _Remove - True True True + True True @@ -520,9 +520,9 @@ Chapter No. - True True True + True True @@ -748,8 +748,8 @@ - True False + True True 0 none @@ -821,8 +821,8 @@ - True False + True True 0 none diff --git a/sw/uiconfig/swriter/ui/tocindexpage.ui b/sw/uiconfig/swriter/ui/tocindexpage.ui index 6a9d2e24927f..334a39a9c668 100644 --- a/sw/uiconfig/swriter/ui/tocindexpage.ui +++ b/sw/uiconfig/swriter/ui/tocindexpage.ui @@ -51,163 +51,49 @@ - + True False + True + True 6 - vertical - 12 - + True False + start True - 0 - none - - - True - False - True - True - 6 - 12 - - - True - False - 6 - 12 - - - True - False - _Title: - True - title - 0 - - - 0 - 0 - - - - - True - True - True - True - - - 1 - 0 - - - - - True - False - Type: - True - type - 0 - - - 0 - 1 - - - - - True - False - start - - Table of Contents - Alphabetical Index - Table of Figures - Index of Tables - User-Defined - Table of Objects - Bibliography - - - - 1 - 1 - - - - - Protected against manual changes - True - True - False - True - 0 - True - True - - - 0 - 2 - 2 - - - - - - - - - True - False - Type and Title - - - - - - - - False - True - 0 - - - - - True - False - True - 0 - none + True + vertical + 12 - + True False True - True - 6 - 12 + 0 + none - + True False - 18 + True + True + 6 + 12 - + True False + 6 12 - + True False - For: + _Title: True - scope + title 0 @@ -216,239 +102,383 @@ - + True - False - - Entire document - Chapter - + True + True + True 1 0 - - - 0 - 0 - - - - - True - False - 12 - + True False - Evaluate up to level: + Type: True - level + type 0 0 - 0 + 1 - + True - True - True - adjustment1 + False + start + + Table of Contents + Alphabetical Index + Table of Figures + Index of Tables + User-Defined + Table of Objects + Bibliography + 1 - 0 + 1 + + + + + Protected against manual changes + True + True + False + True + 0 + True + True + + + 0 + 2 + 2 - - 1 - 0 - + + + True + False + Type and Title + + + + + + + 0 + 0 + - - - True - False - Create Index or Table of Contents - - - - - - - - False - True - 1 - - - - - False - True - True - 0 - none - + True False True - True - 6 - 12 + 0 + none - + True False - 6 + True + True + 6 + 12 - + True False - 6 - 12 - - - Outline - True - False - True - True - 0 - True - True - - - 0 - 0 - - + 18 - - Inde_x marks + True - True - False - True - 0 - True - True + False + 12 + + + True + False + For: + True + scope + 0 + + + 0 + 0 + + + + + True + False + + Entire document + Chapter + + + + 1 + 0 + + 0 - 2 - - - - - Tables - True - True - False - True - 0 - True - - - 1 - 1 - - - - - Te_xt frames - True - True - False - True - 0 - True - - - 2 - 1 - - - - - Graphics - True - True - False - True - 0 - True - - - 1 - 2 - - - - - OLE objects - True - True - False - True - 0 - True - - - 2 - 2 + 0 - - Use level from source chapter + True - True - False - 12 - True - 0 - True + False + 12 + + + True + False + Evaluate up to level: + True + level + 0 + + + 0 + 0 + + + + + True + True + True + adjustment1 + + + 1 + 0 + + 1 - 3 - 2 + 0 + + + + + + + True + False + Create Index or Table of Contents + + + + + + + + 0 + 1 + + + + + False + True + True + 0 + none + + + True + False + True + True + 6 + 12 + + + True + False + 6 - + True False - center - 12 + 6 + 12 + + + Outline + True + False + True + True + 0 + True + True + + + 0 + 0 + + + + + Inde_x marks + True + True + False + True + 0 + True + True + + + 0 + 2 + + + + + Tables + True + True + False + True + 0 + True + + + 1 + 1 + + + + + Te_xt frames + True + True + False + True + 0 + True + + + 2 + 1 + + - + + Graphics + True + True + False + True + 0 + True + + + 1 + 2 + + + + + OLE objects + True + True + False + True + 0 + True + + + 2 + 2 + + + + + Use level from source chapter + True + True + False + 12 + True + 0 + True + + + 1 + 3 + 2 + + + + True False center - vertical + 12 - - _Additional styles + True - True - False - True - 0 - True + False + center + vertical + + + _Additional styles + True + True + False + True + 0 + True + + + False + True + 0 + + + + + Styl_es + True + False + True + True + 0 + True + + + False + True + 1 + + False @@ -457,14 +487,16 @@ - - Styl_es + + Assign styles... + True True - False - True - True - 0 - True + True + start + center + + + False @@ -474,103 +506,42 @@ - False - True - 0 + 0 + 1 - - Assign styles... - True - True - True - start - center - - - - - - False - True - 1 - + + + + + + + 0 - 1 - - - - - - - - - - - - - - 0 - 0 - - - - - True - False - True - 6 - 12 - - - Captions - True - False - True - True - 0 - True - objnames - - - 0 - 0 - - - - - Object names - True - False - True - True - 0 - True - True - - - 1 0 - + True False + True 6 12 - - False + + Captions + True + False True - Category: True - category 0 + True + objnames 0 @@ -578,9 +549,15 @@ - - False + + Object names + True + False True + True + 0 + True + True 1 @@ -588,260 +565,192 @@ - + + True False - True - Display: - True - display - 0 + 6 + 12 + + + False + True + Category: + True + category + 0 + + + 0 + 0 + + + + + False + True + + + 1 + 0 + + + + + False + True + Display: + True + display + 0 + + + 0 + 1 + + + + + False + True + + References + Category and Number + Caption Text + + + + 1 + 1 + + 0 1 - - - - - False - True - - References - Category and Number - Caption Text - - - - 1 - 1 + 2 0 1 - 2 - - 0 - 1 - + + + True + False + Create From + + + + + + + 0 + 2 + - - - True - False - Create From - - - - - - - - False - True - 2 - - - - - False - True - True - True - 0 - none - - True + False + True True True - 6 - 12 + 0 + none - + True - True + False True True - in + 6 + 12 - + True True - True True True - liststore1 - False - 0 - False - - - + in - - True - 6 - 0.5 - - - - 0 - + + True + True + True + True + True + liststore1 + False + 0 + False + + - - - - - True - 6 - True - 0 - - - 1 - + + True + 6 + 0.5 + + + + 0 + + + - - - - - - - - - - - True - False - Create From the Following Objects - - - - - - - - False - True - 3 - - - - - False - True - True - 0 - none - - - True - False - True - True - 6 - 12 - - - True - False - 6 - 12 - - - True - False - _Brackets: - True - brackets - 0 - - - 0 - 1 - - - - - _Number entries - True - True - False - True - 0 - True - - - 0 - 0 - 2 - - - - - True - False - start - - [none] - [] - () - {} - <> - + + + True + 6 + True + 0 + + + + 1 + + + + + + - - 1 - 1 - + + + True + False + Create From the Following Objects + + + + + + + 0 + 3 + - - - True - False - Formatting of the Entries - - - - - - - - False - True - 5 - - - - - True - False - vertical - 12 - - True + False + True True 0 none - + True False True @@ -849,36 +758,19 @@ 6 12 - + True False 6 12 - - Combine identical entries - True - True - False - True - 0 - True - - - 0 - 0 - - - - - Combine identical entries with p or _pp + True - True - False - 12 + False + _Brackets: True + brackets 0 - True 0 @@ -886,101 +778,37 @@ - - Combine with - - True - True - False - 12 - True - 0 - True - - - 0 - 2 - - - - - Case sensitive + + _Number entries True True False - 12 True 0 True 0 - 3 - - - - - AutoCapitalize entries - True - True - False - True - 0 - True - - - 1 0 + 2 - - Keys as separate entries - True - True - False - True - 0 - True - - - 1 - 1 - - - - - _Concordance file - True - True - False - True - 0 - True - - - 1 - 2 - - - - - _File + True - True - True + False start - 12 - True - filemenu - False - True - - - + + [none] + [] + () + {} + <> + 1 - 3 + 1 @@ -988,10 +816,10 @@ - + True False - Options + Formatting of the Entries @@ -999,44 +827,46 @@ - False - True - 0 + 0 + 4 - + True False - True - 0 - none + vertical + 12 - + True False True - True - 6 - 12 + 0 + none - + True False - 18 + True + True + 6 + 12 - + True False + 6 12 - + + Combine identical entries True - False - Language: + True + False True - lang 0 + True 0 @@ -1044,34 +874,189 @@ - + + Combine identical entries with p or _pp True - False + True + False + 12 + True + 0 + True + + + 0 + 1 + + + + + Combine with - + True + True + False + 12 + True + 0 + True + + + 0 + 2 + + + + + Case sensitive + True + True + False + 12 + True + 0 + True + + + 0 + 3 + + + + + AutoCapitalize entries + True + True + False + True + 0 + True 1 0 + + + Keys as separate entries + True + True + False + True + 0 + True + + + 1 + 1 + + + + + _Concordance file + True + True + False + True + 0 + True + + + 1 + 2 + + + + + _File + True + True + True + start + 12 + True + filemenu + False + True + + + + + + 1 + 3 + + - - 0 - 0 - + + + + + True + False + Options + + + + + + + + False + True + 0 + + + + + True + False + True + 0 + none + + + True + False + True + True + 6 + 12 - + True False - 12 + 18 - + True False - Key type: - True - keytype - 0 + 12 + + + True + False + Language: + True + lang + 0 + + + 0 + 0 + + + + + True + False + + + 1 + 0 + + 0 @@ -1079,9 +1064,34 @@ - + True False + 12 + + + True + False + Key type: + True + keytype + 0 + + + 0 + 0 + + + + + True + False + + + 1 + 0 + + 1 @@ -1089,37 +1099,36 @@ - - 1 - 0 - + + + True + False + Sort + + + + + - - - - True - False - Sort - - - - + + False + True + 1 + - False - True - 1 + 0 + 5 - False - True - 6 + 0 + 0 diff --git a/sw/uiconfig/swriter/ui/tocstylespage.ui b/sw/uiconfig/swriter/ui/tocstylespage.ui index 5d340676b88a..f172b4f8763b 100644 --- a/sw/uiconfig/swriter/ui/tocstylespage.ui +++ b/sw/uiconfig/swriter/ui/tocstylespage.ui @@ -26,6 +26,8 @@ True False + True + True 6 vertical 12 diff --git a/sw/uiconfig/swriter/ui/tokenwidget.ui b/sw/uiconfig/swriter/ui/tokenwidget.ui index 0ff2bb068aae..0b2ecae146ad 100644 --- a/sw/uiconfig/swriter/ui/tokenwidget.ui +++ b/sw/uiconfig/swriter/ui/tokenwidget.ui @@ -45,12 +45,49 @@ False True - + True False True + True - + + True + False + start + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + -- cgit v1.2.3