[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/content.hxx |2 + sw/source/uibase/utlui/content.cxx | 44 ++--- sw/uiconfig/swriter/ui/navigatorcontextmenu.ui | 16 + 3 files changed, 58 insertions(+), 4 deletions(-) New commits: commit 01a02ee7f1dbe7501a89b41e62599fba6a8b33f3 Author: Jim Raykowski AuthorDate: Sat Nov 18 18:56:56 2023 -0900 Commit: Jim Raykowski CommitDate: Wed Nov 29 04:24:57 2023 +0100 tdf#157681 SwNavigator: Add Protect and Hide menu items to Sections context menu Change-Id: I6a79c06abe2cf4dd44d491046d8ee73d35dfe6ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159718 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index 77cb156b744c..c6698f4b0322 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -72,6 +72,8 @@ class SwRegionContent final : public SwContent m_nRegionLevel(nLevel), m_pSectionFormat(pSectionFormat){} sal_uInt8 GetRegionLevel() const {return m_nRegionLevel;} const SwSectionFormat* GetSectionFormat() const {return m_pSectionFormat;} + +bool IsProtect() const override; }; class SwURLFieldContent final : public SwContent diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 07fd64dc3bf9..ff354273ff82 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -260,6 +260,11 @@ bool SwURLFieldContent::IsProtect() const return m_pINetAttr->IsProtect(); } +bool SwRegionContent::IsProtect() const +{ +return m_pSectionFormat->GetSection()->IsProtect(); +} + SwGraphicContent::~SwGraphicContent() { } @@ -810,7 +815,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged) m_bAlphabeticSort ? 0 : getYPos(pNodeIndex->GetNode()), pFormat)); -if(!pFormat->IsVisible()) +if (!pFormat->IsVisible() || pSection->IsHidden()) pCnt->SetInvisible(); m_pMember->insert(std::move(pCnt)); } @@ -1718,6 +1723,9 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bool bRemoveSortEntry = true; +bool bRemoveProtectSection = true; +bool bRemoveHideSection = true; + if (xEntry) { const SwContentType* pType; @@ -1811,7 +1819,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) && m_pActiveShell->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS); const bool bEditable = pType->IsEditable() && ((bVisible && !bProtected) || ContentTypeId::REGION == nContentType); -const bool bDeletable = pType->IsDeletable() && bVisible && !bProtected && !bProtectBM; +const bool bDeletable = pType->IsDeletable() +&& ((bVisible && !bProtected && !bProtectBM) || ContentTypeId::REGION == nContentType); const bool bRenamable = bEditable && !bReadonly && (ContentTypeId::TABLE == nContentType || ContentTypeId::FRAME == nContentType || @@ -1913,8 +1922,17 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) } else if(ContentTypeId::REGION == nContentType) { -bRemoveSelectEntry = false; bRemoveEditEntry = false; +bRemoveProtectSection = false; +bRemoveHideSection = false; +SwContent* pCnt = weld::fromId(m_xTreeView->get_id(*xEntry)); + assert(dynamic_cast(static_cast(pCnt))); +const SwSectionFormat* pSectionFormat += static_cast(pCnt)->GetSectionFormat(); +bool bHidden = pSectionFormat->GetSection()->IsHidden(); +bRemoveSelectEntry = bHidden || !bVisible; +xPop->set_active("protectsection", bProtected); +xPop->set_active("hidesection", bHidden); } else if (bEditable) bRemoveEditEntry = false; @@ -2106,6 +2124,10 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) xPop->remove("endnotetracking"); if (bRemoveSortEntry) xPop->remove("sort"); +if (bRemoveProtectSection) +xPop->remove("protectsection"); +if (bRemoveHideSection) +xPop->remove("hidesection"); bool bSetSensitiveCollapseAllCategories = false; if (!m_bIsRoot && xEntry) @@ -4811,7 +4833,21 @@ void SwContentTree::ExecuteContextMenuAction(const OUString& rSelectedPopupEntry if
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx | 36 ++ sw/source/uibase/inc/optpage.hxx |1 sw/uiconfig/swriter/ui/viewoptionspage.ui | 12 +- 3 files changed, 39 insertions(+), 10 deletions(-) New commits: commit 49c200cf9f3e8f61716a15bf67dee9f54d2931fa Author: Balazs Varga AuthorDate: Tue Nov 21 13:26:01 2023 +0100 Commit: Balazs Varga CommitDate: Tue Nov 21 21:03:03 2023 +0100 tdf#158140 - UI: Part 33 - Unify lockdown behavior of Options dialog for Writer/Web - View Page. Change-Id: Idcd271493461bbd7a945e0ad5484715279a19c98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159780 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 294e25772da0..90ea14acf64f 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -108,6 +109,7 @@ SwContentOptPage::SwContentOptPage(weld::Container* pPage, weld::DialogControlle , m_xSettingsLabel(m_xBuilder->weld_label("settingslabel")) , m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel")) , m_xMetricLB(m_xBuilder->weld_combo_box("measureunit")) +, m_xMetricImg(m_xBuilder->weld_widget("lockmeasureunit")) , m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip")) , m_xShowInlineTooltipsImg(m_xBuilder->weld_widget("lockchangestooltip")) , m_xShowOutlineContentVisibilityButton(m_xBuilder->weld_check_button("outlinecontentvisibilitybutton")) @@ -203,35 +205,42 @@ static void lcl_SelectMetricLB(weld::ComboBox& rMetric, TypedWhichIdis_visible(); const SwElemItem* pElemAttr = rSet->GetItemIfSet( FN_PARAM_ELEM , false ); if(pElemAttr) { -bReadOnly = officecfg::Office::Writer::Content::Display::Table::isReadOnly(); +bReadOnly = !bWebOptionsPage ? officecfg::Office::Writer::Content::Display::Table::isReadOnly() : + officecfg::Office::WriterWeb::Content::Display::Table::isReadOnly(); m_xTableCB->set_active(pElemAttr->m_bTable); m_xTableCB->set_sensitive(!bReadOnly); m_xTableImg->set_visible(bReadOnly); -bReadOnly = officecfg::Office::Writer::Content::Display::GraphicObject::isReadOnly(); +bReadOnly = !bWebOptionsPage ? officecfg::Office::Writer::Content::Display::GraphicObject::isReadOnly() : + officecfg::Office::WriterWeb::Content::Display::GraphicObject::isReadOnly(); m_xGrfCB->set_active(pElemAttr->m_bGraphic); m_xGrfCB->set_sensitive(!bReadOnly); m_xGrfImg->set_visible(bReadOnly); -bReadOnly = officecfg::Office::Writer::Content::Display::DrawingControl::isReadOnly(); +bReadOnly = !bWebOptionsPage ? officecfg::Office::Writer::Content::Display::DrawingControl::isReadOnly() : + officecfg::Office::WriterWeb::Content::Display::DrawingControl::isReadOnly(); m_xDrwCB->set_active(pElemAttr->m_bDrawing); m_xDrwCB->set_sensitive(!bReadOnly); m_xDrwImg->set_visible(bReadOnly); -bReadOnly = officecfg::Office::Writer::Content::Display::Note::isReadOnly(); +bReadOnly = !bWebOptionsPage ? officecfg::Office::Writer::Content::Display::Note::isReadOnly() : +officecfg::Office::WriterWeb::Content::Display::Note::isReadOnly(); m_xPostItCB->set_active(pElemAttr->m_bNotes); m_xPostItCB->set_sensitive(!bReadOnly); m_xPostItCB->set_visible(pElemAttr->m_bNotes); -bReadOnly = officecfg::Office::Writer::Layout::Line::Guide::isReadOnly(); +bReadOnly = !bWebOptionsPage ? officecfg::Office::Writer::Layout::Line::Guide::isReadOnly() : +officecfg::Office::WriterWeb::Layout::Line::Guide::isReadOnly(); m_xCrossCB->set_active(pElemAttr->m_bCrosshair); m_xCrossCB->set_sensitive(!bReadOnly); m_xCrossImg->set_visible(bReadOnly); -bReadOnly = officecfg::Office::Writer::Layout::Window::VerticalRuler::isReadOnly(); +bReadOnly = !bWebOptionsPage ? officecfg::Office::Writer::Layout::Window::VerticalRuler::isReadOnly() : + officecfg::Office::WriterWeb::Layout::Window::VerticalRuler::isReadOnly(); m_xVRulerCBox->set_active(pElemAttr->m_bVertRuler); m_xVRulerCBox->set_sensitive(!bReadOnly); m_xVRulerImg->set_visible(bReadOnly); @@ -241,7 +250,8 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet) m_xVRulerRightCBox->set_sensitive(!bReadOnly); m_xVRulerRightImg->set_visible(bReadOnly); -bReadOnly = officecfg::Office::Writer::Layout::Window::SmoothScroll::isReadOnly(); +bReadOnly = !bWebOptionsPage ? officecfg::Office::Writer::Layout::Window::SmoothScroll::isReadOnly() : + officecfg::Office::WriterWeb::Layout::Window::SmoothScroll::isReadOnly();
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/mailconfigpage.cxx | 85 - sw/source/uibase/inc/mailconfigpage.hxx|7 sw/uiconfig/swriter/ui/authenticationsettingsdialog.ui | 159 ++--- sw/uiconfig/swriter/ui/mailconfigpage.ui | 124 +++-- 4 files changed, 332 insertions(+), 43 deletions(-) New commits: commit ddf9f30869a9808097135f77384e2679c3f73e36 Author: Balazs Varga AuthorDate: Mon Nov 20 15:22:11 2023 +0100 Commit: Balazs Varga CommitDate: Tue Nov 21 12:17:45 2023 +0100 tdf#158137 - UI: Part 32 - Unify lockdown behavior of Options dialog for Writer - Mail Merge, Email Page. Change-Id: Ibd484a4ae815ad94dd6c418fbe66901a9b84c7fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159741 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 468d9f761d8a..0bf9633abd1d 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -68,23 +69,31 @@ class SwAuthenticationSettingsDialog : public SfxDialogController SwMailMergeConfigItem& m_rConfigItem; std::unique_ptr m_xAuthenticationCB; +std::unique_ptr m_xAuthenticationImg; std::unique_ptr m_xSeparateAuthenticationRB; +std::unique_ptr m_xSeparateAuthenticationImg; std::unique_ptr m_xSMTPAfterPOPRB; +std::unique_ptr m_xSMTPAfterPOPImg; std::unique_ptr m_xOutgoingServerFT; std::unique_ptr m_xUserNameFT; std::unique_ptr m_xUserNameED; +std::unique_ptr m_xUserNameImg; std::unique_ptr m_xOutPasswordFT; std::unique_ptr m_xOutPasswordED; std::unique_ptr m_xIncomingServerFT; std::unique_ptr m_xServerFT; std::unique_ptr m_xServerED; +std::unique_ptr m_xServerImg; std::unique_ptr m_xPortFT; std::unique_ptr m_xPortNF; +std::unique_ptr m_xPortImg; std::unique_ptr m_xProtocolFT; std::unique_ptr m_xPOP3RB; +std::unique_ptr m_xPOP3Img; std::unique_ptr m_xIMAPRB; std::unique_ptr m_xInUsernameFT; std::unique_ptr m_xInUsernameED; +std::unique_ptr m_xInUsernameImg; std::unique_ptr m_xInPasswordFT; std::unique_ptr m_xInPasswordED; std::unique_ptr m_xOKPB; @@ -104,13 +113,20 @@ SwMailConfigPage::SwMailConfigPage(weld::Container* pPage, weld::DialogControlle : SfxTabPage(pPage, pController, "modules/swriter/ui/mailconfigpage.ui", "MailConfigPage", ) , m_pConfigItem(new SwMailMergeConfigItem) , m_xDisplayNameED(m_xBuilder->weld_entry("displayname")) +, m_xDisplayNameImg(m_xBuilder->weld_widget("lockdisplayname")) , m_xAddressED(m_xBuilder->weld_entry("address")) +, m_xAddressImg(m_xBuilder->weld_widget("lockaddress")) , m_xReplyToCB(m_xBuilder->weld_check_button("replytocb")) +, m_xReplyToCBImg(m_xBuilder->weld_widget("lockreplytocb")) , m_xReplyToFT(m_xBuilder->weld_label("replyto_label")) , m_xReplyToED(m_xBuilder->weld_entry("replyto")) +, m_xReplyToImg(m_xBuilder->weld_widget("lockreplyto")) , m_xServerED(m_xBuilder->weld_entry("server")) +, m_xServerImg(m_xBuilder->weld_widget("lockserver")) , m_xPortNF(m_xBuilder->weld_spin_button("port")) +, m_xPortImg(m_xBuilder->weld_widget("lockport")) , m_xSecureCB(m_xBuilder->weld_check_button("secure")) +, m_xSecureImg(m_xBuilder->weld_widget("locksecure")) , m_xServerAuthenticationPB(m_xBuilder->weld_button("serverauthentication")) , m_xTestPB(m_xBuilder->weld_button("test")) { @@ -184,16 +200,34 @@ bool SwMailConfigPage::FillItemSet( SfxItemSet* /*rSet*/ ) void SwMailConfigPage::Reset( const SfxItemSet* /*rSet*/ ) { m_xDisplayNameED->set_text(m_pConfigItem->GetMailDisplayName()); + m_xDisplayNameED->set_sensitive(!officecfg::Office::Writer::MailMergeWizard::MailDisplayName::isReadOnly()); + m_xDisplayNameImg->set_visible(officecfg::Office::Writer::MailMergeWizard::MailDisplayName::isReadOnly()); + m_xAddressED->set_text(m_pConfigItem->GetMailAddress()); + m_xAddressED->set_sensitive(!officecfg::Office::Writer::MailMergeWizard::MailAddress::isReadOnly()); + m_xAddressImg->set_visible(officecfg::Office::Writer::MailMergeWizard::MailAddress::isReadOnly()); + +m_xReplyToED->set_text(m_pConfigItem->GetMailReplyTo()); + m_xReplyToED->set_sensitive(!officecfg::Office::Writer::MailMergeWizard::MailReplyTo::isReadOnly()); + m_xReplyToImg->set_visible(officecfg::Office::Writer::MailMergeWizard::MailReplyTo::isReadOnly()); -m_xReplyToED->set_text(m_pConfigItem->GetMailReplyTo()) ; m_xReplyToCB->set_active(m_pConfigItem->IsMailReplyTo()); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx | 31 ++ sw/source/uibase/inc/optpage.hxx|5 + sw/uiconfig/swriter/ui/optcomparison.ui | 93 +--- 3 files changed, 121 insertions(+), 8 deletions(-) New commits: commit bfee998e71e2b7e8bcf4a366a00219a9b0f59035 Author: Balazs Varga AuthorDate: Tue Nov 14 14:32:20 2023 +0100 Commit: Balazs Varga CommitDate: Tue Nov 14 19:47:26 2023 +0100 tdf#158134 - UI: Part 29 - Unify lockdown behavior of Options dialog for Writer - Comparison Page. Change-Id: I33cfb499bf9026db1e2b8a359ad619c760e09abe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159420 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index add7bed5a079..294e25772da0 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -2457,10 +2457,15 @@ SwCompareOptionsTabPage::SwCompareOptionsTabPage(weld::Container* pPage, weld::D , m_xAutoRB(m_xBuilder->weld_radio_button("auto")) , m_xWordRB(m_xBuilder->weld_radio_button("byword")) , m_xCharRB(m_xBuilder->weld_radio_button("bycharacter")) +, m_xCompareModeImg(m_xBuilder->weld_widget("lockcomparemode")) , m_xRsidCB(m_xBuilder->weld_check_button("useRSID")) +, m_xRsidImg(m_xBuilder->weld_widget("lockuseRSID")) , m_xIgnoreCB(m_xBuilder->weld_check_button("ignore")) +, m_xIgnoreImg(m_xBuilder->weld_widget("lockignore")) , m_xLenNF(m_xBuilder->weld_spin_button("ignorelen")) +, m_xLenImg(m_xBuilder->weld_widget("lockignorelen")) , m_xStoreRsidCB(m_xBuilder->weld_check_button("storeRSID")) +, m_xStoreRsidImg(m_xBuilder->weld_widget("lockstoreRSID")) { Link aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) ); m_xAutoRB->connect_toggled( aLnk ); @@ -2581,22 +2586,48 @@ void SwCompareOptionsTabPage::Reset( const SfxItemSet* ) m_xIgnoreCB->set_sensitive(true); m_xLenNF->set_sensitive(true); } + +if (officecfg::Office::Writer::Comparison::Mode::isReadOnly()) +{ +m_xAutoRB->set_sensitive(false); +m_xWordRB->set_sensitive(false); +m_xCharRB->set_sensitive(false); +m_xCompareModeImg->set_visible(true); +} + m_xAutoRB->save_state(); m_xWordRB->save_state(); m_xCharRB->save_state(); m_xRsidCB->set_active( pOpt->IsUseRsid() ); +if (officecfg::Office::Writer::Comparison::UseRSID::isReadOnly()) +{ +m_xRsidCB->set_sensitive(false); +m_xRsidImg->set_visible(true); +} m_xRsidCB->save_state(); m_xIgnoreCB->set_active( pOpt->IsIgnorePieces() ); +if (officecfg::Office::Writer::Comparison::IgnorePieces::isReadOnly()) +{ +m_xIgnoreCB->set_sensitive(false); +m_xIgnoreImg->set_visible(true); +} m_xIgnoreCB->save_state(); m_xLenNF->set_sensitive( m_xIgnoreCB->get_active() && eCmpMode != SwCompareMode::Auto ); m_xLenNF->set_value( pOpt->GetPieceLen() ); +if (officecfg::Office::Writer::Comparison::IgnoreLength::isReadOnly()) +{ +m_xLenNF->set_sensitive(false); +m_xLenImg->set_visible(true); +} m_xLenNF->save_value(); m_xStoreRsidCB->set_active(pOpt->IsStoreRsid()); + m_xStoreRsidCB->set_sensitive(!officecfg::Office::Writer::Comparison::StoreRSID::isReadOnly()); + m_xStoreRsidImg->set_visible(officecfg::Office::Writer::Comparison::StoreRSID::isReadOnly()); m_xStoreRsidCB->save_state(); } diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 9027c74ab1bf..ba9c585d9d99 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -451,10 +451,15 @@ class SwCompareOptionsTabPage final : public SfxTabPage std::unique_ptr m_xAutoRB; std::unique_ptr m_xWordRB; std::unique_ptr m_xCharRB; +std::unique_ptr m_xCompareModeImg; std::unique_ptr m_xRsidCB; +std::unique_ptr m_xRsidImg; std::unique_ptr m_xIgnoreCB; +std::unique_ptr m_xIgnoreImg; std::unique_ptr m_xLenNF; +std::unique_ptr m_xLenImg; std::unique_ptr m_xStoreRsidCB; +std::unique_ptr m_xStoreRsidImg; DECL_LINK(ComparisonHdl, weld::Toggleable&, void); DECL_LINK(IgnoreHdl, weld::Toggleable&, void); diff --git a/sw/uiconfig/swriter/ui/optcomparison.ui b/sw/uiconfig/swriter/ui/optcomparison.ui index 8010cbc0a9a2..afaab6e4bbd1 100644 --- a/sw/uiconfig/swriter/ui/optcomparison.ui +++ b/sw/uiconfig/swriter/ui/optcomparison.ui @@ -22,7 +22,7 @@ 0 none - + True False @@ -40,7 +40,7 @@ True -0 +1 0 @@ -55,7 +55,7 @@ auto -0 +1
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx| 65 sw/source/uibase/inc/optpage.hxx | 14 + sw/uiconfig/swriter/ui/printoptionspage.ui | 389 + 3 files changed, 369 insertions(+), 99 deletions(-) New commits: commit d93d11529e7922fe391edcc839af8a3b4044b809 Author: Balazs Varga AuthorDate: Mon Nov 13 18:01:45 2023 +0100 Commit: Balazs Varga CommitDate: Tue Nov 14 08:22:10 2023 +0100 tdf#158130 - UI: Part 26 - Unify lockdown behavior of Options dialog for Writer - Print Page. Change-Id: Id6bc4da75cba3daf83a9709233eaafea372bb600 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159392 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 1abc9d46d334..8506d8773d55 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -399,25 +399,39 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(weld::Container* pPage, weld::DialogCon , m_bAttrModified(false) , m_bPreview(false) , m_xGrfCB(m_xBuilder->weld_check_button("graphics")) +, m_xGrfImg(m_xBuilder->weld_widget("lockgraphics")) , m_xCtrlFieldCB(m_xBuilder->weld_check_button("formcontrols")) +, m_xCtrlFieldImg(m_xBuilder->weld_widget("lockformcontrols")) , m_xBackgroundCB(m_xBuilder->weld_check_button("background")) +, m_xBackgroundImg(m_xBuilder->weld_widget("lockbackground")) , m_xBlackFontCB(m_xBuilder->weld_check_button("inblack")) +, m_xBlackFontImg(m_xBuilder->weld_widget("lockinblack")) , m_xPrintHiddenTextCB(m_xBuilder->weld_check_button("hiddentext")) +, m_xPrintHiddenTextImg(m_xBuilder->weld_widget("lockhiddentext")) , m_xPrintTextPlaceholderCB(m_xBuilder->weld_check_button("textplaceholder")) +, m_xPrintTextPlaceholderImg(m_xBuilder->weld_widget("locktextplaceholder")) , m_xPagesFrame(m_xBuilder->weld_widget("pagesframe")) , m_xLeftPageCB(m_xBuilder->weld_check_button("leftpages")) +, m_xLeftPageImg(m_xBuilder->weld_widget("lockleftpages")) , m_xRightPageCB(m_xBuilder->weld_check_button("rightpages")) +, m_xRightPageImg(m_xBuilder->weld_widget("lockrightpages")) , m_xProspectCB(m_xBuilder->weld_check_button("brochure")) +, m_xProspectImg(m_xBuilder->weld_widget("lockbrochure")) , m_xProspectCB_RTL(m_xBuilder->weld_check_button("rtl")) +, m_xProspectImg_RTL(m_xBuilder->weld_widget("lockrtl")) , m_xCommentsFrame(m_xBuilder->weld_widget("commentsframe")) , m_xNoRB(m_xBuilder->weld_radio_button("none")) , m_xOnlyRB(m_xBuilder->weld_radio_button("only")) , m_xEndRB(m_xBuilder->weld_radio_button("end")) , m_xEndPageRB(m_xBuilder->weld_radio_button("endpage")) , m_xInMarginsRB(m_xBuilder->weld_radio_button("inmargins")) +, m_xMarginsImg(m_xBuilder->weld_widget("lockcomments")) , m_xPrintEmptyPagesCB(m_xBuilder->weld_check_button("blankpages")) +, m_xPrintEmptyPagesImg(m_xBuilder->weld_widget("lockblankpages")) , m_xPaperFromSetupCB(m_xBuilder->weld_check_button("papertray")) +, m_xPaperFromSetupImg(m_xBuilder->weld_widget("lockpapertray")) , m_xFaxLB(m_xBuilder->weld_combo_box("fax")) +, m_xFaxImg(m_xBuilder->weld_widget("lockfax")) { Link aLk = LINK( this, SwAddPrinterTabPage, AutoClickHdl); m_xGrfCB->connect_toggled( aLk ); @@ -550,32 +564,79 @@ voidSwAddPrinterTabPage::Reset( const SfxItemSet* ) if( const SwAddPrinterItem* pAddPrinterAttr = rSet.GetItemIfSet( FN_PARAM_ADDPRINTER , false ) ) { m_xGrfCB->set_active(pAddPrinterAttr->m_bPrintGraphic || pAddPrinterAttr->m_bPrintDraw); + m_xGrfCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Graphic::isReadOnly()); + m_xGrfImg->set_visible(officecfg::Office::Writer::Print::Content::Graphic::isReadOnly()); + m_xCtrlFieldCB->set_active( pAddPrinterAttr->m_bPrintControl); + m_xCtrlFieldCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Control::isReadOnly()); + m_xCtrlFieldImg->set_visible(officecfg::Office::Writer::Print::Content::Control::isReadOnly()); + m_xBackgroundCB->set_active( pAddPrinterAttr->m_bPrintPageBackground); + m_xBackgroundCB->set_sensitive(!officecfg::Office::Writer::Print::Content::Background::isReadOnly()); + m_xBackgroundImg->set_visible(officecfg::Office::Writer::Print::Content::Background::isReadOnly()); + m_xBlackFontCB->set_active( pAddPrinterAttr->m_bPrintBlackFont); + m_xBlackFontCB->set_sensitive(!officecfg::Office::Writer::Print::Content::PrintBlack::isReadOnly()); + m_xBlackFontImg->set_visible(officecfg::Office::Writer::Print::Content::PrintBlack::isReadOnly()); + m_xPrintHiddenTextCB->set_active( pAddPrinterAttr->m_bPrintHiddenText); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx | 49 sw/source/uibase/inc/optpage.hxx | 10 + sw/uiconfig/swriter/ui/optfonttabpage.ui | 172 +++ 3 files changed, 213 insertions(+), 18 deletions(-) New commits: commit 4cf54aa70a73b000c6dbf604a2d69f287644756e Author: Balazs Varga AuthorDate: Mon Nov 13 14:39:42 2023 +0100 Commit: Balazs Varga CommitDate: Tue Nov 14 08:21:54 2023 +0100 tdf#158010 - UI: Part 25 - Unify lockdown behavior of Options dialog for Writer - Basic Fonts Page. Change-Id: I73276c0bf3dc190098781e427cf32c753aae23ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159377 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 5628f2b1570a..1abc9d46d334 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -653,15 +653,25 @@ SwStdFontTabPage::SwStdFontTabPage(weld::Container* pPage, weld::DialogControlle , m_sScriptComplex(SwResId(ST_SCRIPT_CTL)) , m_xLabelFT(m_xBuilder->weld_label("label1")) , m_xStandardBox(m_xBuilder->weld_combo_box("standardbox")) +, m_xStandardBoxImg(m_xBuilder->weld_widget("lockstandardbox")) , m_xStandardHeightLB(new FontSizeBox(m_xBuilder->weld_combo_box("standardheight"))) +, m_xStandardHeightImg(m_xBuilder->weld_widget("lockstandardheight")) , m_xTitleBox(m_xBuilder->weld_combo_box("titlebox")) +, m_xTitleBoxImg(m_xBuilder->weld_widget("locktitlebox")) , m_xTitleHeightLB(new FontSizeBox(m_xBuilder->weld_combo_box("titleheight"))) +, m_xTitleHeightImg(m_xBuilder->weld_widget("locktitleheight")) , m_xListBox(m_xBuilder->weld_combo_box("listbox")) +, m_xListBoxImg(m_xBuilder->weld_widget("locklistbox")) , m_xListHeightLB(new FontSizeBox(m_xBuilder->weld_combo_box("listheight"))) +, m_xListHeightImg(m_xBuilder->weld_widget("locklistheight")) , m_xLabelBox(m_xBuilder->weld_combo_box("labelbox")) +, m_xLabelBoxImg(m_xBuilder->weld_widget("locklabelbox")) , m_xLabelHeightLB(new FontSizeBox(m_xBuilder->weld_combo_box("labelheight"))) +, m_xLabelHeightImg(m_xBuilder->weld_widget("locklabelheight")) , m_xIdxBox(m_xBuilder->weld_combo_box("idxbox")) +, m_xIdxBoxImg(m_xBuilder->weld_widget("lockidxbox")) , m_xIndexHeightLB(new FontSizeBox(m_xBuilder->weld_combo_box("indexheight"))) +, m_xIndexHeightImg(m_xBuilder->weld_widget("lockindexheight")) , m_xStandardPB(m_xBuilder->weld_button("standard")) { m_xStandardBox->make_sorted(); @@ -1036,6 +1046,45 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) m_xLabelHeightLB->set_value( CalcToPoint( nLabelHeight , MapUnit::MapTwip, 10 )); m_xIndexHeightLB->set_value( CalcToPoint( nIndexHeight , MapUnit::MapTwip, 10 )); + +if (m_nFontGroup == FONT_GROUP_DEFAULT) +{ +bool bReadonly = officecfg::Office::Writer::DefaultFont::Standard::isReadOnly(); +m_xStandardBox->set_sensitive(!bReadonly); +m_xStandardBoxImg->set_visible(bReadonly); +bReadonly = officecfg::Office::Writer::DefaultFont::StandardHeight::isReadOnly(); +m_xStandardHeightLB->set_sensitive(!bReadonly); +m_xStandardHeightImg->set_visible(bReadonly); + +bReadonly = officecfg::Office::Writer::DefaultFont::Heading::isReadOnly(); +m_xTitleBox->set_sensitive(!bReadonly); +m_xTitleBoxImg->set_visible(bReadonly); +bReadonly = officecfg::Office::Writer::DefaultFont::HeadingHeight::isReadOnly(); +m_xTitleHeightLB->set_sensitive(!bReadonly); +m_xTitleHeightImg->set_visible(bReadonly); + +bReadonly = officecfg::Office::Writer::DefaultFont::List::isReadOnly(); +m_xListBox->set_sensitive(!bReadonly); +m_xListBoxImg->set_visible(bReadonly); +bReadonly = officecfg::Office::Writer::DefaultFont::ListHeight::isReadOnly(); +m_xListHeightLB->set_sensitive(!bReadonly); +m_xListHeightImg->set_visible(bReadonly); + +bReadonly = officecfg::Office::Writer::DefaultFont::Caption::isReadOnly(); +m_xLabelBox->set_sensitive(!bReadonly); +m_xLabelBoxImg->set_visible(bReadonly); +bReadonly = officecfg::Office::Writer::DefaultFont::CaptionHeight::isReadOnly(); +m_xLabelHeightLB->set_sensitive(!bReadonly); +m_xLabelHeightImg->set_visible(bReadonly); + +bReadonly = officecfg::Office::Writer::DefaultFont::Index::isReadOnly(); +m_xIdxBox->set_sensitive(!bReadonly); +m_xIdxBoxImg->set_visible(bReadonly); +bReadonly = officecfg::Office::Writer::DefaultFont::IndexHeight::isReadOnly(); +m_xIndexHeightLB->set_sensitive(!bReadonly); +m_xIndexHeightImg->set_visible(bReadonly); +} + m_xStandardBox->save_value(); m_xTitleBox->save_value(); m_xListBox->save_value(); diff --git a/sw/source/uibase/inc/optpage.hxx
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx | 57 + sw/source/uibase/inc/optpage.hxx| 13 + sw/uiconfig/swriter/ui/optformataidspage.ui | 267 +--- 3 files changed, 316 insertions(+), 21 deletions(-) New commits: commit a598de5b6ed6f161844e01f7be7164a65927caee Author: Balazs Varga AuthorDate: Fri Nov 10 15:57:57 2023 +0100 Commit: Balazs Varga CommitDate: Mon Nov 13 09:20:27 2023 +0100 tdf#158009 - UI: Part 24 - Unify lockdown behavior of Options dialog for Writer - Format Aids Page. Change-Id: Ia51094f86c47d154ec6e8b4d961a9db6a5005a03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159305 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 6fb499f455ad..5628f2b1570a 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1379,23 +1379,36 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w : SfxTabPage(pPage, pController, "modules/swriter/ui/optformataidspage.ui", "OptFormatAidsPage", ) , m_pWrtShell(nullptr) , m_xParaCB(m_xBuilder->weld_check_button("paragraph")) +, m_xParaImg(m_xBuilder->weld_widget("lockparagraph")) , m_xSHyphCB(m_xBuilder->weld_check_button("hyphens")) +, m_xSHyphImg(m_xBuilder->weld_widget("lockhyphens")) , m_xSpacesCB(m_xBuilder->weld_check_button("spaces")) +, m_xSpacesImg(m_xBuilder->weld_widget("lockspaces")) , m_xHSpacesCB(m_xBuilder->weld_check_button("nonbreak")) +, m_xHSpacesImg(m_xBuilder->weld_widget("locknonbreak")) , m_xTabCB(m_xBuilder->weld_check_button("tabs")) +, m_xTabImg(m_xBuilder->weld_widget("locktabs")) , m_xTabLabel(m_xBuilder->weld_label("tabs_label")) , m_xBreakCB(m_xBuilder->weld_check_button("break")) +, m_xBreakImg(m_xBuilder->weld_widget("lockbreak")) , m_xCharHiddenCB(m_xBuilder->weld_check_button("hiddentext")) +, m_xCharHiddenImg(m_xBuilder->weld_widget("lockhiddentext")) , m_xBookmarkCB(m_xBuilder->weld_check_button("bookmarks")) +, m_xBookmarkImg(m_xBuilder->weld_widget("lockbookmarks")) , m_xBookmarkLabel(m_xBuilder->weld_label("bookmarks_label")) , m_xDirectCursorFrame(m_xBuilder->weld_frame("directcrsrframe")) , m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff")) +, m_xOnOffImg(m_xBuilder->weld_widget("lockcursoronoff")) , m_xDirectCursorFillMode(m_xBuilder->weld_combo_box("cxDirectCursorFillMode")) +, m_xDirectCursorFillModeImg(m_xBuilder->weld_widget("lockfillmode")) , m_xCursorProtFrame(m_xBuilder->weld_frame("crsrprotframe")) , m_xImageFrame(m_xBuilder->weld_frame("frmImage")) , m_xCursorInProtCB(m_xBuilder->weld_check_button("cursorinprot")) +, m_xCursorInProtImg(m_xBuilder->weld_widget("lockcursorinprot")) , m_xDefaultAnchorType(m_xBuilder->weld_combo_box("cxDefaultAnchor")) +, m_xDefaultAnchorTypeImg(m_xBuilder->weld_widget("lockAnchor")) , m_xMathBaselineAlignmentCB(m_xBuilder->weld_check_button("mathbaseline")) +, m_xMathBaselineAlignmentImg(m_xBuilder->weld_widget("lockmathbaseline")) { SwFillMode eMode = SwFillMode::Tab; bool bIsOn = false; @@ -1527,10 +1540,17 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet ) bIsOn = pItem->IsOn(); } m_xOnOffCB->set_active( bIsOn ); + m_xOnOffCB->set_sensitive(!officecfg::Office::Writer::Cursor::DirectCursor::UseDirectCursor::isReadOnly()); + m_xOnOffImg->set_visible(officecfg::Office::Writer::Cursor::DirectCursor::UseDirectCursor::isReadOnly()); m_xDirectCursorFillMode->set_active( static_cast(eMode) ); + m_xDirectCursorFillMode->set_sensitive(!officecfg::Office::Writer::Cursor::DirectCursor::Insert::isReadOnly()); + m_xDirectCursorFillModeImg->set_visible(officecfg::Office::Writer::Cursor::DirectCursor::Insert::isReadOnly()); + if (m_pWrtShell) { m_xMathBaselineAlignmentCB->set_active( m_pWrtShell->GetDoc()->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT ) ); + m_xMathBaselineAlignmentCB->set_sensitive(!officecfg::Office::Writer::Layout::Other::IsAlignMathObjectsToBaseline::isReadOnly()); + m_xMathBaselineAlignmentImg->set_visible(officecfg::Office::Writer::Layout::Other::IsAlignMathObjectsToBaseline::isReadOnly()); m_xMathBaselineAlignmentCB->save_state(); } else { m_xMathBaselineAlignmentCB->hide(); @@ -1538,20 +1558,57 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet ) if( const SfxBoolItem* pItem = rSet->GetItemIfSet( FN_PARAM_CRSR_IN_PROTECTED, false ) ) m_xCursorInProtCB->set_active(pItem->GetValue()); + m_xCursorInProtCB->set_sensitive(!officecfg::Office::Writer::Cursor::Option::ProtectedArea::isReadOnly()); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx | 84 + sw/source/uibase/inc/optpage.hxx | 16 + sw/uiconfig/swriter/ui/viewoptionspage.ui | 254 +++--- 3 files changed, 328 insertions(+), 26 deletions(-) New commits: commit 51f4cadfdd50e757e593c3166d4e54c6b2634af9 Author: Balazs Varga AuthorDate: Wed Nov 8 12:33:56 2023 +0100 Commit: Balazs Varga CommitDate: Thu Nov 9 20:29:02 2023 +0100 tdf#158006 - UI: Part 21 - Unify lockdown behavior of Options dialog for Writer - View Page. Change-Id: Icbca23d3ec1dd95bbf703227b9479291a978a426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159126 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index b1f24d671a92..6fb499f455ad 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -86,25 +87,40 @@ void drawRect(vcl::RenderContext& rRenderContext, const tools::Rectangle , SwContentOptPage::SwContentOptPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet) : SfxTabPage(pPage, pController, "modules/swriter/ui/viewoptionspage.ui", "ViewOptionsPage", ) , m_xCrossCB(m_xBuilder->weld_check_button("helplines")) +, m_xCrossImg(m_xBuilder->weld_widget("lockhelplines")) , m_xHMetric(m_xBuilder->weld_combo_box("hrulercombobox")) +, m_xHMetricImg(m_xBuilder->weld_widget("lockhruler")) , m_xVRulerCBox(m_xBuilder->weld_check_button("vruler")) +, m_xVRulerImg(m_xBuilder->weld_widget("lockvruler")) , m_xVRulerRightCBox(m_xBuilder->weld_check_button("vrulerright")) +, m_xVRulerRightImg(m_xBuilder->weld_widget("lockvrulerright")) , m_xVMetric(m_xBuilder->weld_combo_box("vrulercombobox")) , m_xSmoothCBox(m_xBuilder->weld_check_button("smoothscroll")) +, m_xSmoothImg(m_xBuilder->weld_widget("locksmoothscroll")) , m_xGrfCB(m_xBuilder->weld_check_button("graphics")) +, m_xGrfImg(m_xBuilder->weld_widget("lockgraphics")) , m_xTableCB(m_xBuilder->weld_check_button("tables")) +, m_xTableImg(m_xBuilder->weld_widget("locktables")) , m_xDrwCB(m_xBuilder->weld_check_button("drawings")) +, m_xDrwImg(m_xBuilder->weld_widget("lockdrawings")) , m_xPostItCB(m_xBuilder->weld_check_button("comments")) +, m_xPostItImg(m_xBuilder->weld_widget("lockcomments")) , m_xSettingsFrame(m_xBuilder->weld_frame("settingsframe")) , m_xSettingsLabel(m_xBuilder->weld_label("settingslabel")) , m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel")) , m_xMetricLB(m_xBuilder->weld_combo_box("measureunit")) , m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip")) +, m_xShowInlineTooltipsImg(m_xBuilder->weld_widget("lockchangestooltip")) , m_xShowOutlineContentVisibilityButton(m_xBuilder->weld_check_button("outlinecontentvisibilitybutton")) +, m_xShowOutlineContentVImg(m_xBuilder->weld_widget("lockoutlinecontentvisibility")) , m_xTreatSubOutlineLevelsAsContent(m_xBuilder->weld_check_button("suboutlinelevelsascontent")) +, m_xTreatSubOutlineLevelsImg(m_xBuilder->weld_widget("locksuboutlinelevels")) , m_xShowChangesInMargin(m_xBuilder->weld_check_button("changesinmargin")) +, m_xShowChangesInMarginImg(m_xBuilder->weld_widget("lockchangesinmargin")) , m_xFieldHiddenCB(m_xBuilder->weld_check_button("hiddentextfield")) +, m_xFieldHiddenImg(m_xBuilder->weld_widget("lockhiddentextfield")) , m_xFieldHiddenParaCB(m_xBuilder->weld_check_button("hiddenparafield")) +, m_xFieldHiddenParaImg(m_xBuilder->weld_widget("lockhiddenparafield")) { m_xShowOutlineContentVisibilityButton->connect_toggled(LINK(this, SwContentOptPage, ShowOutlineContentVisibilityButtonHdl)); @@ -187,25 +203,88 @@ static void lcl_SelectMetricLB(weld::ComboBox& rMetric, TypedWhichIdGetItemIfSet( FN_PARAM_ELEM , false ); if(pElemAttr) { +bReadOnly = officecfg::Office::Writer::Content::Display::Table::isReadOnly(); m_xTableCB->set_active(pElemAttr->m_bTable); +m_xTableCB->set_sensitive(!bReadOnly); +m_xTableImg->set_visible(bReadOnly); + +bReadOnly = officecfg::Office::Writer::Content::Display::GraphicObject::isReadOnly(); m_xGrfCB->set_active(pElemAttr->m_bGraphic); +m_xGrfCB->set_sensitive(!bReadOnly); +m_xGrfImg->set_visible(bReadOnly); + +bReadOnly = officecfg::Office::Writer::Content::Display::DrawingControl::isReadOnly(); m_xDrwCB->set_active(pElemAttr->m_bDrawing); +m_xDrwCB->set_sensitive(!bReadOnly); +m_xDrwImg->set_visible(bReadOnly); + +bReadOnly = officecfg::Office::Writer::Content::Display::Note::isReadOnly(); m_xPostItCB->set_active(pElemAttr->m_bNotes); +m_xPostItCB->set_sensitive(!bReadOnly);
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/core/fields/reffld.cxx | 21 + sw/uiconfig/swriter/ui/fldrefpage.ui |2 +- 2 files changed, 6 insertions(+), 17 deletions(-) New commits: commit 3e6d4a563f390638b285254d2128466b56ce03ba Author: Skyler Grey AuthorDate: Tue Oct 24 10:19:52 2023 + Commit: Caolán McNamara CommitDate: Mon Oct 30 20:11:31 2023 +0100 Improve STYLE_FROM_BOTTOM compatability with Word From my testing in Word, it doesn't honor the "search from bottom" flag when it is in the body, only in marginals. Additionally, it doesn't continue searching in the opposite order if the referenced content is not found on the current page, instead it searches in the same order as it would normally (i.e. pages above then pages below). This commit changes the behavior and UI of our from bottom flag to match. Change-Id: Id991c92b9aeaa054b136f7a3d9c7c8ea0026e514 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158452 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index c92d4b6d37bb..f034b1b52b5b 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -1384,8 +1384,6 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, const OUString& rRefMark, case REF_STYLE: if (!pSelf) break; -bool bFlagFromBottom = (nFlags & REFFLDFLAG_STYLE_FROM_BOTTOM) == REFFLDFLAG_STYLE_FROM_BOTTOM; - const SwNodes& nodes = pDoc->GetNodes(); StyleRefElementType elementType = StyleRefElementType::Default; @@ -1434,6 +1432,8 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, const OUString& rRefMark, // For marginals, styleref tries to act on the current page first // 1. Get the page we're on, search it from top to bottom +bool bFlagFromBottom = (nFlags & REFFLDFLAG_STYLE_FROM_BOTTOM) == REFFLDFLAG_STYLE_FROM_BOTTOM; + Point aPt; std::pair const tmp(aPt, false); @@ -1499,10 +1499,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, const OUString& rRefMark, if (beforeStart) { -if (bFlagFromBottom) -pSearchThird.push_front(nodes[n]); -else -pSearchSecond.push_front(nodes[n]); +pSearchSecond.push_front(nodes[n]); } else if (beforeEnd) { @@ -1516,8 +1513,6 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, const OUString& rRefMark, beforeEnd = false; } } -else if (bFlagFromBottom) -pSearchSecond.push_back(nodes[n]); else pSearchThird.push_back(nodes[n]); } @@ -1579,20 +1574,14 @@ SwTextNode* SwGetRefFieldType::FindAnchor(SwDoc* pDoc, const OUString& rRefMark, { if (beforeElement) { -if (bFlagFromBottom) -pSearchSecond.push_front(nodes[n]); -else -pSearchFirst.push_front(nodes[n]); +pSearchFirst.push_front(nodes[n]); if (*pReference == *nodes[n]) { beforeElement = false; } } -else if (bFlagFromBottom) -pSearchFirst.push_back(nodes[n]); -else -pSearchSecond.push_back(nodes[n]); +pSearchSecond.push_back(nodes[n]); } // 1. Search up until we hit the top of the document diff --git a/sw/uiconfig/swriter/ui/fldrefpage.ui b/sw/uiconfig/swriter/ui/fldrefpage.ui index 549a7a6e6f9a..8398e0a2ccf8 100644 --- a/sw/uiconfig/swriter/ui/fldrefpage.ui +++ b/sw/uiconfig/swriter/ui/fldrefpage.ui @@ -202,7 +202,7 @@ top -Search from bottom to top +Search this page from bottom to top True True False
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/fldui/flddok.cxx | 11 +++ sw/source/ui/fldui/flddok.hxx |2 +- sw/uiconfig/swriter/ui/flddocumentpage.ui | 11 +-- 3 files changed, 9 insertions(+), 15 deletions(-) New commits: commit 27fde46937ecb71e7ce738cba430119a79cea77f Author: Baole Fang AuthorDate: Sat Oct 21 01:13:59 2023 -0400 Commit: Heiko Tietze CommitDate: Tue Oct 24 09:10:13 2023 +0200 tdf#154052: Change "Level" spinbox to combobox Change-Id: I58a50963f95a2c364557a7aa0992f9858ec5d9cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158301 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index a195ed026ec0..1a2857bedbdd 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -42,7 +42,7 @@ SwFieldDokPage::SwFieldDokPage(weld::Container* pPage, weld::DialogController* p , m_xValueFT(m_xBuilder->weld_label("valueft")) , m_xValueED(m_xBuilder->weld_entry("value")) , m_xLevelFT(m_xBuilder->weld_label("levelft")) -, m_xLevelED(m_xBuilder->weld_spin_button("level")) +, m_xLevelED(m_xBuilder->weld_combo_box("level")) , m_xDateFT(m_xBuilder->weld_label("daysft")) , m_xTimeFT(m_xBuilder->weld_label("minutesft")) , m_xDateOffsetED(m_xBuilder->weld_spin_button("offset")) @@ -65,7 +65,10 @@ SwFieldDokPage::SwFieldDokPage(weld::Container* pPage, weld::DialogController* p m_xFormatLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl)); m_xNumFormatLB->connect_row_activated(LINK(this, SwFieldDokPage, NumFormatHdl)); -m_xLevelED->set_max(MAXLEVEL); +for (sal_uInt16 i = 1; i <= MAXLEVEL; i++) +m_xLevelED->append_text(OUString::number(i)); + +m_xLevelED->set_active(0); m_xDateOffsetED->set_range(INT_MIN, INT_MAX); //enable 'active' language selection m_xNumFormatLB->SetShowLanguageControl(true); @@ -356,7 +359,7 @@ IMPL_LINK_NOARG(SwFieldDokPage, TypeHdl, weld::TreeView&, void) case SwFieldTypesEnum::Chapter: m_xValueFT->set_label(SwResId(STR_LEVEL)); if (IsFieldEdit()) - m_xLevelED->set_text(OUString::number(static_cast(GetCurField())->GetLevel(GetWrtShell()->GetLayout()) + 1)); + m_xLevelED->set_active(static_cast(GetCurField())->GetLevel(GetWrtShell()->GetLayout())); bLevel = true; break; @@ -598,7 +601,7 @@ bool SwFieldDokPage::FillItemSet(SfxItemSet* ) } case SwFieldTypesEnum::Chapter: -aVal = m_xLevelED->get_text(); +aVal = OUString::number(m_xLevelED->get_active()); break; default: diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx index b532b06f01f6..3192ecc0c6c2 100644 --- a/sw/source/ui/fldui/flddok.hxx +++ b/sw/source/ui/fldui/flddok.hxx @@ -35,7 +35,7 @@ class SwFieldDokPage : public SwFieldPage std::unique_ptr m_xValueFT; std::unique_ptr m_xValueED; std::unique_ptr m_xLevelFT; -std::unique_ptr m_xLevelED; +std::unique_ptr m_xLevelED; std::unique_ptr m_xDateFT; std::unique_ptr m_xTimeFT; std::unique_ptr m_xDateOffsetED; diff --git a/sw/uiconfig/swriter/ui/flddocumentpage.ui b/sw/uiconfig/swriter/ui/flddocumentpage.ui index 6849333aabd3..75fca470e644 100644 --- a/sw/uiconfig/swriter/ui/flddocumentpage.ui +++ b/sw/uiconfig/swriter/ui/flddocumentpage.ui @@ -2,13 +2,6 @@ - -1 -10 -1 -1 -10 - 100 1 @@ -356,11 +349,9 @@ - + True True -adjustment1 -True Select the first prior heading for display whose outline level is less than or equal to the specified value.
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/content.hxx |7 -- sw/source/uibase/utlui/content.cxx | 29 +++-- sw/uiconfig/swriter/ui/navigatorcontextmenu.ui |9 +++ 3 files changed, 37 insertions(+), 8 deletions(-) New commits: commit 6afffcee5fcf7c9719abe7176468d20602e750bf Author: Jim Raykowski AuthorDate: Tue Oct 10 19:06:21 2023 -0800 Commit: Jim Raykowski CommitDate: Thu Oct 12 19:13:59 2023 +0200 tdf#42787 SwNavigator: Add ability to delete Sections Change-Id: If259772d6b84cdae48b75083c569fcf862416baf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157802 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index f7666e97244b..c2a922189894 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -60,15 +60,18 @@ class SwRegionContent final : public SwContent { sal_uInt8 m_nRegionLevel; +const SwSectionFormat* m_pSectionFormat; public: SwRegionContent(const SwContentType* pCnt, const OUString& rName, sal_uInt8 nLevel, -tools::Long nYPos) : +tools::Long nYPos, +const SwSectionFormat* pSectionFormat) : SwContent(pCnt, rName, nYPos), -m_nRegionLevel(nLevel){} +m_nRegionLevel(nLevel), m_pSectionFormat(pSectionFormat){} sal_uInt8 GetRegionLevel() const {return m_nRegionLevel;} +const SwSectionFormat* GetSectionFormat() const {return m_pSectionFormat;} }; class SwURLFieldContent final : public SwContent diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index c9a30aaddfe4..7456d2a28e12 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -378,7 +378,7 @@ SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, sal_uInt8 case ContentTypeId::REGION: m_sTypeToken = "region"; m_bEdit = true; -m_bDelete = false; +m_bDelete = true; break; case ContentTypeId::INDEX: m_bEdit = true; @@ -796,8 +796,10 @@ void SwContentType::FillMemberList(bool* pbContentChanged) pParentFormat = pParentFormat->GetParent(); } -std::unique_ptr pCnt(new SwRegionContent(this, sSectionName, -nLevel, m_bAlphabeticSort ? 0 : getYPos(pNodeIndex->GetNode(; +auto pCnt(std::make_unique(this, sSectionName, nLevel, +m_bAlphabeticSort ? 0 : getYPos(pNodeIndex->GetNode()), +pFormat)); + if(!pFormat->IsVisible()) pCnt->SetInvisible(); m_pMember->insert(std::move(pCnt)); @@ -1661,6 +1663,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bRemoveDeleteImageEntry = true, bRemoveDeleteOLEObjectEntry = true, bRemoveDeleteBookmarkEntry = true, + bRemoveDeleteRegionEntry = true, bRemoveDeleteHyperlinkEntry = true, bRemoveDeleteReferenceEntry = true, bRemoveDeleteIndexEntry= true, @@ -1783,8 +1786,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) && m_pActiveShell->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS); const bool bEditable = pType->IsEditable() && ((bVisible && !bProtected) || ContentTypeId::REGION == nContentType); -const bool bDeletable = pType->IsDeletable() && -((bVisible && !bProtected && !bProtectBM) || ContentTypeId::REGION == nContentType); +const bool bDeletable = pType->IsDeletable() && bVisible && !bProtected && !bProtectBM; const bool bRenamable = bEditable && !bReadonly && (ContentTypeId::TABLE == nContentType || ContentTypeId::FRAME == nContentType || @@ -1817,6 +1819,9 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) case ContentTypeId::BOOKMARK: bRemoveDeleteBookmarkEntry = false; break; +case ContentTypeId::REGION: +bRemoveDeleteRegionEntry = false; +break; case ContentTypeId::URLFIELD: bRemoveDeleteHyperlinkEntry = false; break; @@ -1962,6 +1967,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) xPop->remove("deleteoleobject"); if (bRemoveDeleteBookmarkEntry)
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optcomp.cxx | 45 --- sw/source/uibase/inc/optcomp.hxx|4 - sw/uiconfig/swriter/ui/optcompatpage.ui | 124 3 files changed, 1 insertion(+), 172 deletions(-) New commits: commit 1d4cd39262fb71f72311e33ac2bdb7d925be5d98 Author: Heiko Tietze AuthorDate: Thu Sep 14 10:48:46 2023 +0200 Commit: Heiko Tietze CommitDate: Thu Sep 14 12:39:12 2023 +0200 Related tdf#157006 - Remove global compatibility options Clean-up the UI in favor of the advanced options Change-Id: I11ffa643fc577e7eee41f42bd3e16fb290202f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156911 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 7d6ecaf24e4d..8620ac451919 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -50,17 +50,12 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(weld::Container* pPage, weld::Dia , m_pWrtShell(nullptr) , m_pImpl(new SwCompatibilityOptPage_Impl) , m_nSavedOptions(0) -, m_bSavedMSFormsMenuOption(false) , m_xMain(m_xBuilder->weld_frame("compatframe")) -, m_xGlobalOptionsFrame(m_xBuilder->weld_frame("globalcompatframe")) , m_xFormattingLB(m_xBuilder->weld_combo_box("format")) -, m_xGlobalOptionsLB(m_xBuilder->weld_combo_box("globaloptions")) , m_xOptionsLB(m_xBuilder->weld_tree_view("options")) -, m_xGlobalOptionsCLB(m_xBuilder->weld_tree_view("globaloptioncheckbox")) , m_xDefaultPB(m_xBuilder->weld_button("default")) { m_xOptionsLB->enable_toggle_buttons(weld::ColumnToggleType::Check); -m_xGlobalOptionsCLB->enable_toggle_buttons(weld::ColumnToggleType::Check); int nPos = 0; for (int i = static_cast(SvtCompatibilityEntry::Index::Module) + 1; @@ -80,21 +75,6 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(weld::Container* pPage, weld::Dia m_xFormattingLB->clear(); -// Set MSOCompatibleFormsMenu entry attributes -const bool bReadOnly = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::isReadOnly(); -m_xGlobalOptionsCLB->set_sensitive(!bReadOnly); - -m_xGlobalOptionsCLB->append(); -const bool bChecked = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::get(); -m_xGlobalOptionsCLB->set_toggle(0, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE); -m_xGlobalOptionsCLB->set_text(0, m_xGlobalOptionsLB->get_text(0), 0); - -m_xGlobalOptionsLB->clear(); - -// tdf#125799, we let only the doc options grow/shrink but give this one more than its bare -// min request height because there's only one row in it and that looks somewhat abrupt -m_xGlobalOptionsCLB->set_size_request(-1, m_xGlobalOptionsCLB->get_preferred_size().Height() * 2); - InitControls( rSet ); // set handler @@ -196,7 +176,6 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) else { m_xMain->set_sensitive(false); -m_xGlobalOptionsFrame->set_sensitive(false); } const OUString& rText = m_xMain->get_label(); m_xMain->set_label(rText.replaceAll("%DOCNAME", sDocTitle)); @@ -472,27 +451,6 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* ) if ( bModified ) WriteOptions(); -bool bNewMSFormsMenuOption = m_xGlobalOptionsCLB->get_toggle(0); -if (m_bSavedMSFormsMenuOption != bNewMSFormsMenuOption) -{ -std::shared_ptr batch(comphelper::ConfigurationChanges::create()); - officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::set(bNewMSFormsMenuOption, batch); -batch->commit(); - -m_bSavedMSFormsMenuOption = bNewMSFormsMenuOption; -bModified = true; - -// Show a message about that the option needs a restart to be applied -{ -SolarMutexGuard aGuard; -if (svtools::executeRestartDialog(comphelper::getProcessComponentContext(), - GetFrameWeld(), svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU)) -{ -GetDialogController()->response(RET_OK); -} -} -} - return bModified; } @@ -503,9 +461,6 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet* ) sal_uInt32 nOptions = GetDocumentOptions(); SetCurrentOptions( nOptions ); m_nSavedOptions = nOptions; - -m_bSavedMSFormsMenuOption = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::get(); -m_xGlobalOptionsCLB->set_toggle(0, m_bSavedMSFormsMenuOption ? TRISTATE_TRUE : TRISTATE_FALSE); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx index c98f17f0a3cd..d4ebbcb6b58e 100644 --- a/sw/source/uibase/inc/optcomp.hxx +++ b/sw/source/uibase/inc/optcomp.hxx @@ -40,15 +40,11 @@ private: std::unique_ptr m_pImpl;
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/sidebar/PageMarginControl.cxx | 13 - sw/source/uibase/sidebar/PageMarginControl.hxx |2 ++ sw/uiconfig/swriter/ui/pagemargincontrol.ui| 17 + 3 files changed, 31 insertions(+), 1 deletion(-) New commits: commit f7f96175d37d87b266e85726ae01877a39251f16 Author: Justin Luth AuthorDate: Thu Jun 29 11:27:36 2023 -0400 Commit: Justin Luth CommitDate: Fri Jun 30 19:14:30 2023 +0200 tdf#141720 sw pagemargincontrol: add more options There are advanced gutter controls available, so lets just add more options to this one as well. It already exists for Page Size and Page Columns. Change-Id: I5a94044fd18b57962272d8099cf17fdb71e83d1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153775 Tested-by: Justin Luth Reviewed-by: Justin Luth diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index 217c6f7d7fa7..ffeebc15d140 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -91,6 +91,7 @@ namespace sw::sidebar { PageMarginControl::PageMarginControl(PageMarginPopup* pControl, weld::Widget* pParent) : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "modules/swriter/ui/pagemargincontrol.ui", "PageMarginControl") +, m_xMoreButton(m_xBuilder->weld_button("moreoptions")) , m_xLeft(m_xBuilder->weld_label("leftLabel")) , m_xRight(m_xBuilder->weld_label("rightLabel")) , m_xInner(m_xBuilder->weld_label("innerLabel")) @@ -170,12 +171,14 @@ PageMarginControl::PageMarginControl(PageMarginPopup* pControl, weld::Widget* pP m_xWide->show(); m_xMirrored->show(); m_xLast->show(); +m_xMoreButton->show(); m_xNarrow->connect_clicked( LINK( this, PageMarginControl, SelectMarginHdl ) ); m_xNormal->connect_clicked( LINK( this, PageMarginControl, SelectMarginHdl ) ); m_xWide->connect_clicked( LINK( this, PageMarginControl, SelectMarginHdl ) ); m_xMirrored->connect_clicked( LINK( this, PageMarginControl, SelectMarginHdl ) ); m_xLast->connect_clicked( LINK( this, PageMarginControl, SelectMarginHdl ) ); +m_xMoreButton->connect_clicked( LINK(this, PageMarginControl, MoreButtonClickHdl_Impl)); m_bUserCustomValuesAvailable = GetUserCustomValues(); @@ -223,7 +226,7 @@ PageMarginControl::PageMarginControl(PageMarginPopup* pControl, weld::Widget* pP void PageMarginControl::GrabFocus() { -m_xNarrow->grab_focus(); +m_xMoreButton->grab_focus(); } PageMarginControl::~PageMarginControl() @@ -470,6 +473,14 @@ IMPL_LINK_NOARG( PageMarginControl, ModifyULMarginHdl, weld::MetricSpinButton&, m_bCustomValuesUsed = true; } +IMPL_LINK_NOARG(PageMarginControl, MoreButtonClickHdl_Impl, weld::Button&, void) +{ +if (SfxViewFrame* pViewFrm = SfxViewFrame::Current()) + pViewFrm->GetBindings().GetDispatcher()->Execute(FN_FORMAT_PAGE_SETTING_DLG, + SfxCallMode::ASYNCHRON); +m_xControl->EndPopupMode(); +} + bool PageMarginControl::GetUserCustomValues() { bool bUserCustomValuesAvailable = false; diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx index aa199dd4adde..6cfb7b05bf7c 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.hxx +++ b/sw/source/uibase/sidebar/PageMarginControl.hxx @@ -50,6 +50,7 @@ private: std::unique_ptr m_xWide; std::unique_ptr m_xMirrored; std::unique_ptr m_xLast; +std::unique_ptr m_xMoreButton; std::unique_ptr m_xLeft; std::unique_ptr m_xRight; @@ -88,6 +89,7 @@ private: DECL_LINK( SelectMarginHdl, weld::Button&, void ); DECL_LINK( ModifyLRMarginHdl, weld::MetricSpinButton&, void ); DECL_LINK( ModifyULMarginHdl, weld::MetricSpinButton&, void ); +DECL_LINK(MoreButtonClickHdl_Impl, weld::Button&, void); static void ExecuteMarginLRChange( const tools::Long nPageLeftMargin, diff --git a/sw/uiconfig/swriter/ui/pagemargincontrol.ui b/sw/uiconfig/swriter/ui/pagemargincontrol.ui index 242eeb106acc..e83cd135a997 100644 --- a/sw/uiconfig/swriter/ui/pagemargincontrol.ui +++ b/sw/uiconfig/swriter/ui/pagemargincontrol.ui @@ -469,6 +469,23 @@ 11 + + +_More Options +True +True +True +More Options +none +True +True + + +False +True +12 + +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx |9 - sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx |1 sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui| 35 +- 3 files changed, 9 insertions(+), 36 deletions(-) New commits: commit 26df8770efecb6f98f05ceffa5c81905582d1d3b Author: Samuel Mehrbrodt AuthorDate: Mon May 15 15:40:02 2023 +0200 Commit: Samuel Mehrbrodt CommitDate: Mon May 15 22:51:03 2023 +0200 tdf#154782 Fix scrolling in a11y sidebar Doesn't need its own scroll handler anymore, Sidebar has a generic scroll handler. Change-Id: Ic56d1cfd7cde8ed81bf36f3302a128aa03ff6f27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151769 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx index cd5d76e23cb0..854f7f151230 100644 --- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx +++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx @@ -70,7 +70,6 @@ std::unique_ptr A11yCheckIssuesPanel::Create(weld::Widget* pParent, A11yCheckIssuesPanel::A11yCheckIssuesPanel(weld::Widget* pParent, SfxBindings* pBindings) : PanelLayout(pParent, "A11yCheckIssuesPanel", "modules/swriter/ui/a11ycheckissuespanel.ui") , m_xAccessibilityCheckBox(m_xBuilder->weld_box("accessibilityCheckBox")) -, m_xScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow")) , mpBindings(pBindings) , mpDoc(nullptr) , maA11yCheckController(FN_STAT_ACCESSIBILITY_CHECK, *pBindings, *this) @@ -131,14 +130,6 @@ void A11yCheckIssuesPanel::populateIssues() m_xAccessibilityCheckBox->reorder_child(xEntry->get_widget(), i++); m_aAccessibilityCheckEntries.push_back(std::move(xEntry)); } - -if (!m_aAccessibilityCheckEntries.empty()) -{ -auto nRowHeight -= m_aAccessibilityCheckEntries.back()->get_widget()->get_preferred_size().Height(); -// 6 is the spacing set in the .ui -m_xScrolledWindow->vadjustment_set_step_increment(nRowHeight + 6); -} } void A11yCheckIssuesPanel::NotifyItemUpdate(const sal_uInt16 nSid, const SfxItemState /* eState */, diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx index 46d74c97f5a1..b3e33c049528 100644 --- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx +++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx @@ -61,7 +61,6 @@ public: private: std::vector> m_aAccessibilityCheckEntries; std::unique_ptr m_xAccessibilityCheckBox; -std::unique_ptr m_xScrolledWindow; sfx::AccessibilityIssueCollection m_aIssueCollection; std::function m_getIssueCollection; void populateIssues(); diff --git a/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui b/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui index b8581dd350b4..5a55d382a3cd 100644 --- a/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui +++ b/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui @@ -10,40 +10,23 @@ True vertical - + True -True +False +start True True -in +vertical +6 +True - -True -False -True -True - - -True -False -start -True -True -vertical -6 -True - - - - - - + -True +False True -1 +0
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/docvw/SidebarTxtControl.cxx |7 +++ sw/source/uibase/docvw/SidebarTxtControl.hxx |1 + sw/uiconfig/swriter/ui/annotation.ui |2 +- 3 files changed, 9 insertions(+), 1 deletion(-) New commits: commit 6990fd3e4199c71fd1490b895ff30ef18d387e52 Author: Caolán McNamara AuthorDate: Thu May 4 12:38:36 2023 +0100 Commit: Caolán McNamara CommitDate: Thu May 4 17:09:06 2023 +0200 Resolves: tdf#155076 set annotation cursor to Text on mouse enter Change-Id: Ib3b1f90dd055ddd3b343f83d3118f090ea449b71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151362 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 62f65e2eba3b..d25fa9cc372b 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -400,6 +400,13 @@ bool SidebarTextControl::MouseButtonUp(const MouseEvent& rMEvt) return bRet; } +bool SidebarTextControl::MouseMove(const MouseEvent& rMEvt) +{ +if (rMEvt.IsEnterWindow()) +GetDrawingArea()->set_cursor(PointerStyle::Text); +return WeldEditView::MouseMove(rMEvt); +} + IMPL_LINK( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void ) { if ( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG ) diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx index e0652aa5b856..891d3200380e 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx @@ -66,6 +66,7 @@ class SidebarTextControl : public WeldEditView virtual bool KeyInput(const KeyEvent& rKeyEvt) override; virtual bool MouseButtonDown(const MouseEvent& rMEvt) override; virtual bool MouseButtonUp(const MouseEvent& rMEvt) override; +virtual bool MouseMove(const MouseEvent& rMEvt) override; void SetMapMode(const MapMode& rNewMapMode) { diff --git a/sw/uiconfig/swriter/ui/annotation.ui b/sw/uiconfig/swriter/ui/annotation.ui index d44c442d50a2..fc0e4c39a1a2 100644 --- a/sw/uiconfig/swriter/ui/annotation.ui +++ b/sw/uiconfig/swriter/ui/annotation.ui @@ -129,7 +129,7 @@ True True -GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK +GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK True True
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/swuiidxmrk.cxx|2 ++ sw/source/uibase/inc/swuiidxmrk.hxx |1 + sw/uiconfig/swriter/ui/indexentry.ui |2 +- 3 files changed, 4 insertions(+), 1 deletion(-) New commits: commit a2756bf71a304f2bb1bf49753dfd37a3402bc463 Author: Heiko Tietze AuthorDate: Fri Apr 28 13:18:25 2023 +0200 Commit: Heiko Tietze CommitDate: Fri Apr 28 15:13:12 2023 +0200 Resolves tdf#153499 - Hide newly introduced frame label Frame content is not shown for existing entries Follow-up to 4ec75d22eb916e3809e9e92f77fd25e33f6b21ee Change-Id: Ic2b40b19424245ede326a5ef5b53f684ca8a3f94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151166 Reviewed-by: Seth Chaiklin Reviewed-by: Heiko Tietze Tested-by: Heiko Tietze diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 7bab5d5728af..22c1bc7409c8 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -168,6 +168,7 @@ SwIndexMarkPane::SwIndexMarkPane(std::shared_ptr xDialog, weld::Bu , m_xNextSameBT(rBuilder.weld_button("last")) , m_xPrevBT(rBuilder.weld_button("previous")) , m_xNextBT(rBuilder.weld_button("next")) +, m_xForSelectedEntry(rBuilder.weld_label("selectedentrytitle")) { m_xSyncED->show(); @@ -345,6 +346,7 @@ void SwIndexMarkPane::InitControls() //to include all equal entries may only be allowed in the body and even there //only when a simple selection exists const FrameTypeFlags nFrameType = m_pSh->GetFrameType(nullptr,true); +m_xForSelectedEntry->show(); m_xApplyToAllCB->show(); m_xSearchCaseSensitiveCB->show(); m_xSearchCaseWordOnlyCB->show(); diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx index 2500548c1582..7f5460a8be45 100644 --- a/sw/source/uibase/inc/swuiidxmrk.hxx +++ b/sw/source/uibase/inc/swuiidxmrk.hxx @@ -87,6 +87,7 @@ class SwIndexMarkPane std::unique_ptr m_xNextSameBT; std::unique_ptr m_xPrevBT; std::unique_ptr m_xNextBT; +std::unique_ptr m_xForSelectedEntry; voidApply(); voidInitControls(); diff --git a/sw/uiconfig/swriter/ui/indexentry.ui b/sw/uiconfig/swriter/ui/indexentry.ui index ca3f1f5da8fc..5a70ad727db6 100644 --- a/sw/uiconfig/swriter/ui/indexentry.ui +++ b/sw/uiconfig/swriter/ui/indexentry.ui @@ -582,8 +582,8 @@ -True False +True For Selected Entry
[Libreoffice-commits] core.git: sw/source sw/uiconfig vcl/jsdialog
sw/source/ui/frmdlg/column.cxx |2 +- sw/uiconfig/swriter/ui/columndialog.ui | 20 +--- vcl/jsdialog/enabled.cxx |1 + 3 files changed, 19 insertions(+), 4 deletions(-) New commits: commit 6c4464a14ce324100df4cf3934c3ddeeac82ab08 Author: Pranam Lashkari AuthorDate: Mon Mar 20 18:35:31 2023 +0530 Commit: Pranam Lashkari CommitDate: Tue Mar 21 17:03:01 2023 + jsdialog: enable column dialog (writer) Change-Id: I4b91d271d766d8efeaddc3c3775513184036c5f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149167 Reviewed-by: Szymon Kłos Tested-by: Szymon Kłos (cherry picked from commit f50d009885c499e55db35571ace83f2ed7effbfe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149235 Tested-by: Jenkins Reviewed-by: Pranam Lashkari diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 8a82dd04d95c..338e8011ad20 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -89,7 +89,7 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& rSh) , m_bSectionChanged(false) , m_bSelSectionChanged(false) , m_bFrameChanged(false) -, m_xContentArea(m_xDialog->weld_content_area()) +, m_xContentArea(m_xBuilder->weld_container("content")) , m_xOkButton(m_xBuilder->weld_button("ok")) { SwRect aRect; diff --git a/sw/uiconfig/swriter/ui/columndialog.ui b/sw/uiconfig/swriter/ui/columndialog.ui index 5bf4d5d9d999..2162f1e5b2fd 100644 --- a/sw/uiconfig/swriter/ui/columndialog.ui +++ b/sw/uiconfig/swriter/ui/columndialog.ui @@ -17,6 +17,23 @@ False vertical 12 + + +True +False +vertical +12 + + + + + +False +True +begin +0 + + False @@ -74,9 +91,6 @@ 0 - - - diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 9a3699301de1..fdb587c8b1e1 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -102,6 +102,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"modules/swriter/ui/captionoptions.ui" || rUIFile == u"modules/swriter/ui/characterproperties.ui" || rUIFile == u"modules/swriter/ui/charurlpage.ui" +|| rUIFile == u"modules/swriter/ui/columndialog.ui" || rUIFile == u"modules/swriter/ui/columnpage.ui" || rUIFile == u"modules/swriter/ui/contentcontroldlg.ui" || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui"
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/chrdlg/numpara.cxx | 59 + sw/source/uibase/inc/numpara.hxx |3 + sw/uiconfig/swriter/ui/numparapage.ui | 68 +- 3 files changed, 127 insertions(+), 3 deletions(-) New commits: commit d6851533713850b311c5c8121d91dc96ab94286c Author: Justin Luth AuthorDate: Tue Feb 28 20:43:27 2023 -0500 Commit: Justin Luth CommitDate: Wed Mar 1 21:43:10 2023 + tdf#62032 sw: let paragraph UI set List Level In order for this to be at all useful, we need to be slightly confusing to the user by equating both of Outline Level's "Body Text" and "1" with List Level 1. So, while outline levels can be "turned off" with "Body Text", a user cannot "turn off" a list level, even though the listbox has the choice "same as outline level". The way to turn off the list is to pick "No List" in the other list box. That situation (Outline = Body Text, ListLevel = 1) is the default situation, and so if we don't make that connection, then the whole intention of STRONGLY advocating for keeping the two values in sync will be lost. Note that both selecting "No list" or changing list level in a style does not have immediate effect. It only applies when the style is assigned, not modified. (I assume this is because of internal auto-styles which are not being updated when the underlying style changes?) [Because of this "strangeness" a follow-up commit will make this an experimental feature.] Change-Id: Ib6a47b3265ccf71f45a43ce6f10b780b995c231d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148027 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index fbe38e773eaa..7392a3f06d21 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -45,6 +45,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(weld::Container* pPage, weld::Dialo , m_xNumberStyleBX(m_xBuilder->weld_widget("boxNUMBER_STYLE")) , m_xNumberStyleLB(m_xBuilder->weld_combo_box("comboLB_NUMBER_STYLE")) , m_xEditNumStyleBtn(m_xBuilder->weld_button("editnumstyle")) +, m_xListLvBX(m_xBuilder->weld_widget("boxLIST_LEVEL")) +, m_xListLvLB(m_xBuilder->weld_combo_box("comboLB_LIST_LEVEL")) , m_xNewStartCB(m_xBuilder->weld_check_button("checkCB_NEW_START")) , m_xNewStartBX(m_xBuilder->weld_widget("boxNEW_START")) , m_xNewStartNumberCB(m_xBuilder->weld_check_button("checkCB_NUMBER_NEW_START")) @@ -105,6 +107,32 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) pOutlineLv->SetValue( aOutlineLv ); rSet->Put(std::move(pOutlineLv)); m_bModified = true; + +// Does List Level need to be set to be the same as Outline Level? +if (!m_xListLvLB->get_active() && m_xListLvBX->get_visible() +&& !m_xListLvLB->get_value_changed_from_saved()) +{ +sal_Int16 nListLevel = std::max(1, aOutlineLv); +--nListLevel; // Outline Level is 1 based. List Level is zero based. +rSet->Put(SfxInt16Item(RES_PARATR_LIST_LEVEL, nListLevel)); +} +} +} + +if (m_xListLvLB->get_value_changed_from_saved()) +{ +if (m_xListLvBX->get_visible() && GetOldItem(*rSet, RES_PARATR_LIST_LEVEL)) +{ +sal_Int16 nListLevel = m_xListLvLB->get_active(); +// Does List Level need to be set to be the same as Outline Level? +if (!nListLevel) +{ +nListLevel = std::max(1, m_xOutlineLvLB->get_active()); +} +--nListLevel; // List Level is zero based, but both listboxes are 1-based. + +rSet->Put(SfxInt16Item(RES_PARATR_LIST_LEVEL, nListLevel)); +m_bModified = true; } } @@ -152,6 +180,7 @@ void SwParagraphNumTabPage::ChangesApplied() { m_xOutlineLvLB->save_value(); m_xNumberStyleLB->save_value(); +m_xListLvLB->save_value(); m_xNewStartCB->save_state(); m_xNewStartNumberCB->save_state(); m_xCountParaCB->save_state(); @@ -165,9 +194,10 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet) SfxItemState eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ); +sal_Int16 nOutlineLv = 1; // 0 is Text Body, 1 is level 1 if( eItemState >= SfxItemState::DEFAULT ) { -sal_Int16 nOutlineLv = rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ).GetValue(); +nOutlineLv = rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ).GetValue(); m_xOutlineLvLB->set_active(nOutlineLv) ; } else @@ -176,6 +206,26 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet) } m_xOutlineLvLB->save_value(); +eItemState = rSet->GetItemState(RES_PARATR_LIST_LEVEL); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/cnttab.cxx |2 -- sw/source/uibase/inc/swuicnttab.hxx|1 - sw/uiconfig/swriter/ui/tocindexpage.ui | 20 +++- 3 files changed, 3 insertions(+), 20 deletions(-) New commits: commit abb42c396d84df49b511b8f3c73783dc56982c14 Author: Samuel Mehrbrodt AuthorDate: Mon Feb 20 15:06:48 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 20 21:15:07 2023 + Related tdf#153090 Move dropdown next to checkbox Avoid extra row just for the dropdown Change-Id: Ic75fec82875576a644ab09e1d6a4af8bed48dba5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147332 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index c7ad5f036a2d..1b21652bcb0b 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -782,7 +782,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(weld::Container* pPage, weld::DialogContr , m_xDisplayTypeFT(m_xBuilder->weld_label("displayft")) , m_xDisplayTypeLB(m_xBuilder->weld_combo_box("display")) , m_xParaStyleCB(m_xBuilder->weld_check_button("useparastyle")) -, m_xParaStyleFT(m_xBuilder->weld_label("parastyleft")) , m_xParaStyleLB(m_xBuilder->weld_combo_box("parastyle")) , m_xTOXMarksCB(m_xBuilder->weld_check_button("indexmarks")) , m_xIdxOptionsFrame(m_xBuilder->weld_widget("optionsframe")) @@ -1325,7 +1324,6 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, weld::ComboBox&, rBox, void) m_xDisplayTypeFT->set_visible( 0 != (nType & (TO_ILLUSTRATION|TO_TABLE)) ); m_xDisplayTypeLB->set_visible( 0 != (nType & (TO_ILLUSTRATION|TO_TABLE)) ); m_xParaStyleCB->set_visible(0 != (nType & (TO_ILLUSTRATION|TO_TABLE|TO_OBJECT))); -m_xParaStyleFT->set_visible(0 != (nType & (TO_ILLUSTRATION|TO_TABLE|TO_OBJECT))); m_xParaStyleLB->set_visible(0 != (nType & (TO_ILLUSTRATION|TO_TABLE|TO_OBJECT))); m_xAuthorityFrame->set_visible( 0 != (nType & TO_AUTHORITIES) ); diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 455800e71307..644810b8c96d 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -162,7 +162,6 @@ class SwTOXSelectTabPage final : public SfxTabPage std::unique_ptr m_xDisplayTypeFT; std::unique_ptr m_xDisplayTypeLB; std::unique_ptr m_xParaStyleCB; -std::unique_ptr m_xParaStyleFT; std::unique_ptr m_xParaStyleLB; //all but illustration and table diff --git a/sw/uiconfig/swriter/ui/tocindexpage.ui b/sw/uiconfig/swriter/ui/tocindexpage.ui index bc06f72f22bb..5568deb0d6c6 100644 --- a/sw/uiconfig/swriter/ui/tocindexpage.ui +++ b/sw/uiconfig/swriter/ui/tocindexpage.ui @@ -1237,7 +1237,7 @@ - + True False @@ -1263,27 +1263,13 @@ 0 0 -2 - - - - -True -False -Paragraph style: -True -display -0 - - -0 -1 True False +True Select the paragraph style for which you want to create index entries. @@ -1292,7 +1278,7 @@ 1 -1 +0
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/cnttab.cxx |2 sw/source/uibase/inc/swuicnttab.hxx|1 sw/uiconfig/swriter/ui/tocindexpage.ui | 328 +++-- 3 files changed, 159 insertions(+), 172 deletions(-) New commits: commit 13047e72b7f074519f81e7542a0ed572376d4df2 Author: Samuel Mehrbrodt AuthorDate: Mon Feb 20 15:00:21 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 20 21:09:05 2023 + tdf#153090 Fix widget display in non-gtk backends Two problems: * Two GtkFrames at the same position -> reorder * LO expects GtkFrame to have a label -> Remove GtkFrame Change-Id: Ice16c51facedaf449507a338e821b92ff28e44ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147331 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 43ffeb3ba279..c7ad5f036a2d 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -784,7 +784,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(weld::Container* pPage, weld::DialogContr , m_xParaStyleCB(m_xBuilder->weld_check_button("useparastyle")) , m_xParaStyleFT(m_xBuilder->weld_label("parastyleft")) , m_xParaStyleLB(m_xBuilder->weld_combo_box("parastyle")) -, m_xParaStyleFrame(m_xBuilder->weld_widget("parastyleframe")) , m_xTOXMarksCB(m_xBuilder->weld_check_button("indexmarks")) , m_xIdxOptionsFrame(m_xBuilder->weld_widget("optionsframe")) , m_xCollectSameCB(m_xBuilder->weld_check_button("combinesame")) @@ -1328,7 +1327,6 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, weld::ComboBox&, rBox, void) m_xParaStyleCB->set_visible(0 != (nType & (TO_ILLUSTRATION|TO_TABLE|TO_OBJECT))); m_xParaStyleFT->set_visible(0 != (nType & (TO_ILLUSTRATION|TO_TABLE|TO_OBJECT))); m_xParaStyleLB->set_visible(0 != (nType & (TO_ILLUSTRATION|TO_TABLE|TO_OBJECT))); -m_xParaStyleFrame->set_visible(0 != (nType & (TO_ILLUSTRATION|TO_TABLE|TO_OBJECT))); m_xAuthorityFrame->set_visible( 0 != (nType & TO_AUTHORITIES) ); diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 906d26ceb9bc..455800e71307 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -164,7 +164,6 @@ class SwTOXSelectTabPage final : public SfxTabPage std::unique_ptr m_xParaStyleCB; std::unique_ptr m_xParaStyleFT; std::unique_ptr m_xParaStyleLB; -std::unique_ptr m_xParaStyleFrame; //all but illustration and table std::unique_ptr m_xTOXMarksCB; diff --git a/sw/uiconfig/swriter/ui/tocindexpage.ui b/sw/uiconfig/swriter/ui/tocindexpage.ui index 40c2716028b8..bc06f72f22bb 100644 --- a/sw/uiconfig/swriter/ui/tocindexpage.ui +++ b/sw/uiconfig/swriter/ui/tocindexpage.ui @@ -59,7 +59,7 @@ True 6 - + True False @@ -814,174 +814,6 @@ 3 - - -False -True -True -True -0 -none - - - -True -False -12 -True -6 -12 - - -Create from additional paragraph style -True -True -False -True -True -True - - -Include paragraphs that have the selected style applied in the index. - - - - -0 -0 -2 - - - - -True -False -Paragraph style: -True -display -0 - - -0 -1 - - - - -True -False - - -Select the paragraph style for which you want to create index entries. - - - - -1 -1 - - - - - - -0 -4 - - - - -False -True -True -0 -none - - - -True -False -12 -6 -True -True -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/cnttab.cxx | 76 - sw/source/uibase/inc/swuicnttab.hxx|4 + sw/source/uibase/index/toxmgr.cxx |6 ++ sw/uiconfig/swriter/ui/tocindexpage.ui | 75 4 files changed, 159 insertions(+), 2 deletions(-) New commits: commit 43744a9004e0fa59a525855c7e97ca153a839c42 Author: Michael Stahl AuthorDate: Wed Jan 25 13:24:01 2023 +0100 Commit: Michael Stahl CommitDate: Wed Jan 25 19:46:06 2023 + tdf#153090 sw: add UI to SwTOXSelectTabPage Add a checkbox, label and a combobox, for Table of Figures/Table of Tables/Table of Objects - annoyingly the latter is sort of disjoint in the .ui file. Another annoyance is that the tab page sometimes reads its own state while initialising itself, overwriting its source. This is perhaps not ideal, but it appears to work if you don't look at it too closely. Change-Id: I3d3d79f37a75bf6570149d794a2363a53de2f59f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146143 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 6879d4700c27..e821d7ca9c07 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -781,6 +781,10 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(weld::Container* pPage, weld::DialogContr , m_xCaptionSequenceLB(m_xBuilder->weld_combo_box("category")) , m_xDisplayTypeFT(m_xBuilder->weld_label("displayft")) , m_xDisplayTypeLB(m_xBuilder->weld_combo_box("display")) +, m_xParaStyleCB(m_xBuilder->weld_check_button("useparastyle")) +, m_xParaStyleFT(m_xBuilder->weld_label("parastyleft")) +, m_xParaStyleLB(m_xBuilder->weld_combo_box("parastyle")) +, m_xParaStyleFrame(m_xBuilder->weld_widget("parastyleframe")) , m_xTOXMarksCB(m_xBuilder->weld_check_button("indexmarks")) , m_xIdxOptionsFrame(m_xBuilder->weld_widget("optionsframe")) , m_xCollectSameCB(m_xBuilder->weld_check_button("combinesame")) @@ -845,10 +849,12 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(weld::Container* pPage, weld::DialogContr m_xUseDashCB->connect_toggled(aLk); m_xInitialCapsCB->connect_toggled(aLk); m_xKeyAsEntryCB->connect_toggled(aLk); +m_xParaStyleCB->connect_toggled(aLk); m_xTitleED->connect_changed(LINK(this, SwTOXSelectTabPage, ModifyEntryHdl)); m_xLevelNF->connect_value_changed(LINK(this, SwTOXSelectTabPage, ModifySpinHdl)); m_xSortAlgorithmLB->connect_changed(LINK(this, SwTOXSelectTabPage, ModifyListBoxHdl)); +m_xParaStyleLB->connect_changed(LINK(this, SwTOXSelectTabPage, ModifyListBoxHdl)); aLk = LINK(this, SwTOXSelectTabPage, RadioButtonHdl); m_xFromCaptionsRB->connect_toggled(aLk); @@ -953,6 +959,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription() SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType(); SwTOXDescription& rDesc = pTOXDlg->GetTOXDescription(aCurType); + m_xReadOnlyCB->set_active(rDesc.IsReadonly()); if (!m_xTitleED->get_value_changed_from_saved()) { @@ -991,6 +998,42 @@ void SwTOXSelectTabPage::ApplyTOXDescription() //all but illustration and table m_xTOXMarksCB->set_active( bool(nCreateType & SwTOXElement::Mark) ); +if (TOX_ILLUSTRATIONS == aCurType.eType || TOX_TABLES == aCurType.eType +|| TOX_OBJECTS== aCurType.eType) +{ +// load all para styles... +m_xParaStyleLB->clear(); +SwWrtShell const& rWrtSh(static_cast(GetDialogController())->GetWrtShell()); +const sal_uInt16 nSz = rWrtSh.GetTextFormatCollCount(); +for (sal_uInt16 j = 0; j < nSz; ++j) +{ +SwTextFormatColl const& rColl = rWrtSh.GetTextFormatColl(j); +if (rColl.IsDefault()) +continue; + +OUString const name(rColl.GetName()); +if (!name.isEmpty()) +{ +m_xParaStyleLB->append_text(name); +} +} +// first, init ParaStyle - because any later init (e.g. m_xFromCaptionsRB) +// ends up calling FillTOXDescription() resetting rDesc! +OUString const& rStyle(rDesc.GetStyleNames(0)); +assert(rStyle.indexOf(TOX_STYLE_DELIMITER) == -1); +if (rStyle.isEmpty()) +{ +m_xParaStyleCB->set_active(false); +m_xParaStyleLB->set_sensitive(false); +} +else +{ +m_xParaStyleCB->set_active(true); +m_xParaStyleLB->set_sensitive(true); +m_xParaStyleLB->set_active_text(rStyle); +} +} + //content if(TOX_CONTENT == aCurType.eType) { @@ -1026,7 +1069,6 @@ void SwTOXSelectTabPage::ApplyTOXDescription() if (m_xDisplayTypeLB->get_active() == -1) m_xDisplayTypeLB->set_active(0);
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/fldui/flddinf.cxx | 112 +++ sw/source/ui/fldui/flddinf.hxx |4 - sw/uiconfig/swriter/ui/flddocinfopage.ui | 110 -- 3 files changed, 160 insertions(+), 66 deletions(-) New commits: commit 5edb3c0b866a3c0169ed492e3807af5bad90b486 Author: Caolán McNamara AuthorDate: Sat Oct 22 22:03:44 2022 +0100 Commit: Caolán McNamara CommitDate: Sun Oct 23 17:09:05 2022 +0200 tdf#104278 have separate treeviews for expander and no-expander cases have two tree views, one with expander and one without, the one with is only used when there are custom properties which use the expander, so the common case of no custom properties doesn't have an 'unexplained' expander margin Change-Id: I6d0c97beeaf8a361ae264cdd1dacf4b06f251a08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141675 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index c96cfbc0c575..45f97bdaa1a7 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -54,19 +54,26 @@ SwFieldDokInfPage::SwFieldDokInfPage(weld::Container* pPage, weld::DialogControl : SwFieldPage(pPage, pController, "modules/swriter/ui/flddocinfopage.ui", "FieldDocInfoPage", pCoreSet) , nOldSel(0) , nOldFormat(0) -, m_xTypeTLB(m_xBuilder->weld_tree_view("type")) +, m_xTypeList(m_xBuilder->weld_tree_view("type-list")) +, m_xTypeTree(m_xBuilder->weld_tree_view("type-tree")) +// tdf#104278 have two tree views, one with expander and one without, the one with is only used +// when there are custom properties which use the expander, so the common case of no custom +// properties doesn't have an 'unexplained' expander margin +, m_pTypeView(m_xTypeTree.get()) , m_xSelection(m_xBuilder->weld_widget("selectframe")) , m_xSelectionLB(m_xBuilder->weld_tree_view("select")) , m_xFormat(m_xBuilder->weld_widget("formatframe")) , m_xFormatLB(new SwNumFormatTreeView(m_xBuilder->weld_tree_view("format"))) , m_xFixedCB(m_xBuilder->weld_check_button("fixed")) { -m_xTypeTLB->make_sorted(); +m_xTypeList->make_sorted(); +m_xTypeTree->make_sorted(); FillFieldSelect(*m_xSelectionLB); -auto nWidth = m_xTypeTLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeTLB->get_height_rows(10); -m_xTypeTLB->set_size_request(nWidth, nHeight); +auto nWidth = m_pTypeView->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; +auto nHeight = m_pTypeView->get_height_rows(10); +m_xTypeTree->set_size_request(nWidth, nHeight); +m_xTypeList->set_size_request(nWidth, nHeight); m_xFormatLB->get_widget().set_size_request(nWidth * 2, nHeight); m_xSelectionLB->set_size_request(nWidth, nHeight); @@ -80,7 +87,7 @@ SwFieldDokInfPage::SwFieldDokInfPage(weld::Container* pPage, weld::DialogControl pItem->GetValue() >>= xCustomPropertySet; // uitests -m_xTypeTLB->set_buildable_name(m_xTypeTLB->get_buildable_name() + "-docinf"); +m_pTypeView->set_buildable_name("type-docinf"); m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + "-docinf"); m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + "-docinf"); } @@ -93,9 +100,33 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) { Init(); // general initialisation +uno::Sequence aCustomProperties; +if (xCustomPropertySet.is()) +{ +uno::Reference xSetInfo = xCustomPropertySet->getPropertySetInfo(); +aCustomProperties = xSetInfo->getProperties(); +} + +if (aCustomProperties.hasElements()) +{ +m_xTypeList->hide(); +m_xTypeList->set_buildable_name("type-list"); +m_xTypeTree->show(); +m_pTypeView = m_xTypeTree.get(); +} +else +{ +m_xTypeTree->hide(); +m_xTypeTree->set_buildable_name("type-tree"); +m_xTypeList->show(); +m_pTypeView = m_xTypeList.get(); +} + +m_pTypeView->set_buildable_name("type-docinf"); + // initialise TypeListBox -m_xTypeTLB->freeze(); -m_xTypeTLB->clear(); +m_pTypeView->freeze(); +m_pTypeView->clear(); m_xSelEntry.reset(); // display SubTypes in TypeLB @@ -131,7 +162,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) std::vector aLst; GetFieldMgr().GetSubTypes(SwFieldTypesEnum::DocumentInfo, aLst); -std::unique_ptr xEntry(m_xTypeTLB->make_iterator()); +std::unique_ptr xEntry(m_pTypeView->make_iterator()); std::unique_ptr xExpandEntry; for(size_t i = 0; i < aLst.size(); ++i) { @@ -142,27 +173,24 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) { if(xCustomPropertySet.is() ) { -uno::Reference< beans::XPropertySetInfo > xSetInfo =
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/utlui/content.cxx | 140 ++--- sw/uiconfig/swriter/ui/navigatorcontextmenu.ui | 89 +++ 2 files changed, 190 insertions(+), 39 deletions(-) New commits: commit 506af0e65e8d0896e3e9f8e2d47aa65799276137 Author: Jim Raykowski AuthorDate: Wed Sep 7 22:18:13 2022 -0800 Commit: Jim Raykowski CommitDate: Fri Sep 9 03:08:02 2022 +0200 tdf#150604 related: Label Navigator context menu delete entry specific to the content entry type Change-Id: I44ff745d8e61bcf24fee351cfa4148ae3ad31dcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139628 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 4db128600edc..68691799573f 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1564,7 +1564,17 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bool bRemoveCopyEntry = true; bool bRemoveEditEntry = true; bool bRemoveUnprotectEntry = true; -bool bRemoveDeleteEntry = true; +bool bRemoveDeleteChapterEntry = true, + bRemoveDeleteTableEntry = true, + bRemoveDeleteFrameEntry = true, + bRemoveDeleteImageEntry = true, + bRemoveDeleteOLEObjectEntry = true, + bRemoveDeleteBookmarkEntry = true, + bRemoveDeleteHyperlinkEntry = true, + bRemoveDeleteIndexEntry= true, + bRemoveDeleteCommentEntry = true, + bRemoveDeleteDrawingObjectEntry = true, + bRemoveDeleteFieldEntry = true; bool bRemoveRenameEntry = true; bool bRemoveSelectEntry = true; bool bRemoveToggleExpandEntry = true; @@ -1692,7 +1702,47 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) ContentTypeId::REGION == nContentType || ContentTypeId::INDEX == nContentType || ContentTypeId::DRAWOBJECT == nContentType); - +// Choose which Delete entry to show. +if (bDeletable) +{ +switch (nContentType) +{ +case ContentTypeId::OUTLINE: +bRemoveDeleteChapterEntry = false; +break; +case ContentTypeId::TABLE: +bRemoveDeleteTableEntry = false; +break; +case ContentTypeId::FRAME: +bRemoveDeleteFrameEntry = false; +break; +case ContentTypeId::GRAPHIC: +bRemoveDeleteImageEntry = false; +break; +case ContentTypeId::OLE: +bRemoveDeleteOLEObjectEntry = false; +break; +case ContentTypeId::BOOKMARK: +bRemoveDeleteBookmarkEntry = false; +break; +case ContentTypeId::URLFIELD: +bRemoveDeleteHyperlinkEntry = false; +break; +case ContentTypeId::INDEX: +bRemoveDeleteIndexEntry = false; +break; +case ContentTypeId::POSTIT: +bRemoveDeleteCommentEntry = false; +break; +case ContentTypeId::DRAWOBJECT: +bRemoveDeleteDrawingObjectEntry = false; +break; +case ContentTypeId::TEXTFIELD: +bRemoveDeleteFieldEntry = false; +break; +default: break; +} +} if (ContentTypeId::FOOTNOTE == nContentType || ContentTypeId::ENDNOTE == nContentType) { void* pUserData = weld::fromId(m_xTreeView->get_id(*xEntry)); @@ -1713,7 +1763,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) } bRemoveCopyEntry = false; } -else if (!bReadonly && (bEditable || bDeletable)) +else if (!bReadonly && bEditable) { if(ContentTypeId::INDEX == nContentType) { @@ -1724,7 +1774,6 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bRemoveEditEntry = false; xPop->set_active(OString::number(405), SwEditShell::IsTOXBaseReadonly(*pBase)); -bRemoveDeleteEntry = false; } else if(ContentTypeId::TABLE == nContentType) { @@ -1736,31 +1785,14 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bool bProt = m_pActiveShell->HasTableAnyProtection( , ); xPop->set_sensitive(OString::number(403), !bFull);
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/misc/bookmark.cxx | 99 +++ sw/source/uibase/inc/bookmark.hxx| 11 +++ sw/uiconfig/swriter/ui/insertbookmark.ui | 20 +- 3 files changed, 102 insertions(+), 28 deletions(-) New commits: commit aa6ec3f79607478213272283b7eb17ec2116173c Author: Michael Stahl AuthorDate: Thu Jul 21 19:31:45 2022 +0200 Commit: Michael Stahl CommitDate: Tue Jul 26 20:15:37 2022 +0200 tdf#150017 sw: allow editing bookmark text in Insert->Bookmarks dialog Enable editing the text of the bookmark if it's "short" enough and doesn't span multiple paragraphs; Replace the text when finished. This will delete any footnotes or text fields in the bookmark text, which isn't ideal but there's Undo. Double-clicking the column via property "editable" only seems to work with native GTK widgets, so provide an additional "Edit Text" button to start the editing. The button requires commit fe38553aef2121f358fb58e450ec69314aad851e to edit the correct column with VCL widgets, and it doesn't work yet with GTK widgets (but with GTK double-clicking works). Change-Id: If9e8a148b039889924e4870b2e9bbe977c977ce9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137355 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 473c6a99b49f..fe63d4c133ca 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -88,6 +88,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void) // allow to delete only if all bookmarks are recognized m_xDeleteBtn->set_sensitive(nEntries > 0 && nSelectedEntries == nEntries && !m_bAreProtected); m_xGotoBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1); +m_xEditTextBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1); m_xRenameBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1 && !m_bAreProtected); } @@ -128,6 +129,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void) m_xDeleteBtn->set_sensitive(false); m_xGotoBtn->set_sensitive(false); +m_xEditTextBtn->set_sensitive(false); m_xRenameBtn->set_sensitive(false); m_xInsertBtn->set_sensitive(false); } @@ -166,6 +168,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, weld::TreeView&, void) { m_xInsertBtn->set_sensitive(false); m_xGotoBtn->set_sensitive(nSelectedRows == 1); +m_xEditTextBtn->set_sensitive(nSelectedRows == 1); m_xRenameBtn->set_sensitive(nSelectedRows == 1 && !m_bAreProtected); m_xDeleteBtn->set_sensitive(!m_bAreProtected); m_xEditBox->set_text(sEditBoxText.makeStringAndClear()); @@ -174,11 +177,23 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, weld::TreeView&, void) { m_xInsertBtn->set_sensitive(!m_bAreProtected); m_xGotoBtn->set_sensitive(false); +m_xEditTextBtn->set_sensitive(false); m_xRenameBtn->set_sensitive(false); m_xDeleteBtn->set_sensitive(false); } } +IMPL_LINK_NOARG(SwInsertBookmarkDlg, EditTextHdl, weld::Button&, void) +{ +if (!ValidateBookmarks()) +return; +auto pSelected = m_xBookmarksBox->get_selected(); +if (!pSelected) +return; + +m_xBookmarksBox->start_editing(*pSelected); +} + IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) { if (!ValidateBookmarks()) @@ -207,6 +222,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) ValidateBookmarks(); m_xDeleteBtn->set_sensitive(false); m_xGotoBtn->set_sensitive(false); +m_xEditTextBtn->set_sensitive(false); m_xRenameBtn->set_sensitive(false); m_xInsertBtn->set_sensitive(false); } @@ -229,6 +245,45 @@ IMPL_LINK(SwInsertBookmarkDlg, ChangeHideHdl, weld::Toggleable&, rBox, void) m_xConditionFT->set_sensitive(bHide); } +IMPL_LINK(SwInsertBookmarkDlg, EditingHdl, weld::TreeIter const&, rIter, bool) +{ +sw::mark::IMark const* const pBookmark( +weld::fromId(m_xBookmarksBox->get_id(rIter))); +assert(pBookmark); +return pBookmark->IsExpanded() + && pBookmark->GetMarkPos().nNode == pBookmark->GetOtherMarkPos().nNode + && !m_xBookmarksBox->get_text(rIter).endsWith(u"…"); +} + +IMPL_LINK(SwInsertBookmarkDlg, EditedHdl, weld::TreeView::iter_string const&, rIterString, bool) +{ +sw::mark::IMark const* const pBookmark( + weld::fromId(m_xBookmarksBox->get_id(rIterString.first))); +assert(pBookmark); +bool bRet(false); +if (pBookmark->GetMarkPos() != pBookmark->GetOtherMarkPos()) +{ +if (pBookmark->GetMarkPos().nNode != pBookmark->GetOtherMarkPos().nNode) +{ +return false; // don't allow editing if it spans multiple nodes +} +rSh.Push(); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/cnttab.cxx| 25 + sw/uiconfig/swriter/ui/assignstylesdialog.ui |3 +-- 2 files changed, 26 insertions(+), 2 deletions(-) New commits: commit 8525e8bd9bc90139c97251f5fb49cf37dc07dbdc Author: Caolán McNamara AuthorDate: Thu Jul 21 09:06:19 2022 +0100 Commit: Caolán McNamara CommitDate: Thu Jul 21 17:15:21 2022 +0200 Resolves: tdf#148743 TOC->Edit Index->Assign Styles; Styles aren't sorted Change-Id: I1ec804d315f487d7bd1138681ab8e8ae60f21a52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137303 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 759dccc46721..f4baaa48a463 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -487,6 +487,7 @@ class SwAddStylesDlg_Impl : public SfxDialogController DECL_LINK(KeyInput, const KeyEvent&, bool); DECL_LINK(TreeSizeAllocHdl, const Size&, void); DECL_LINK(RadioToggleOnHdl, const weld::TreeView::iter_col&, void); +DECL_LINK(HeaderBarClick, int, void); public: SwAddStylesDlg_Impl(weld::Window* pParent, SwWrtShell const & rWrtSh, OUString rStringArr[]); @@ -510,6 +511,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent, m_xHeaderTree->connect_size_allocate(LINK(this, SwAddStylesDlg_Impl, TreeSizeAllocHdl)); m_xHeaderTree->enable_toggle_buttons(weld::ColumnToggleType::Radio); m_xHeaderTree->connect_toggled(LINK(this, SwAddStylesDlg_Impl, RadioToggleOnHdl)); +m_xHeaderTree->connect_column_clicked(LINK(this, SwAddStylesDlg_Impl, HeaderBarClick)); std::vector aWidths { @@ -581,11 +583,34 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent, } } } + m_xHeaderTree->make_sorted(); +m_xHeaderTree->set_sort_column(0); +m_xHeaderTree->set_sort_order(true); +m_xHeaderTree->set_sort_indicator(TRISTATE_TRUE, 0); + m_xHeaderTree->select(0); m_xHeaderTree->connect_key_release(LINK(this, SwAddStylesDlg_Impl, KeyInput)); } +IMPL_LINK(SwAddStylesDlg_Impl, HeaderBarClick, int, nColumn, void) +{ +bool bSortAtoZ = m_xHeaderTree->get_sort_order(); + +//set new arrow positions in headerbar +if (nColumn == m_xHeaderTree->get_sort_column()) +{ +bSortAtoZ = !bSortAtoZ; +m_xHeaderTree->set_sort_order(bSortAtoZ); +} + +if (nColumn != -1) +{ +//sort lists +m_xHeaderTree->set_sort_indicator(bSortAtoZ ? TRISTATE_TRUE : TRISTATE_FALSE, nColumn); +} +} + IMPL_LINK(SwAddStylesDlg_Impl, TreeSizeAllocHdl, const Size&, rSize, void) { auto nWidth = rSize.Width() - Application::GetSettings().GetStyleSettings().GetScrollBarSize(); diff --git a/sw/uiconfig/swriter/ui/assignstylesdialog.ui b/sw/uiconfig/swriter/ui/assignstylesdialog.ui index c87d3f40c9a5..71e377bbd041 100644 --- a/sw/uiconfig/swriter/ui/assignstylesdialog.ui +++ b/sw/uiconfig/swriter/ui/assignstylesdialog.ui @@ -267,11 +267,10 @@ +True True 6 Style -True -0
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/envelp/label1.cxx| 15 +++ sw/uiconfig/swriter/ui/labeldialog.ui | 44 -- 2 files changed, 4 insertions(+), 55 deletions(-) New commits: commit 7a7afd3ae5d44677791924a1450d42b7fcf9b82b Author: Julien Nabet AuthorDate: Thu Jun 9 21:40:57 2022 +0200 Commit: Julien Nabet CommitDate: Fri Jun 10 18:32:31 2022 +0200 tdf#148978: Business Cards in Writer dont show database + remove "medium" tab since its goal is exactly what "label" tab does. So now "label" tab is common for "File - New - Business Cards" and "File - New - Labels" Change-Id: I9c7f4e74d7cbc0ffa8ee146a0ef39c87ff5261e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135566 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 6d34ea2132de..cee92d24cb28 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -76,12 +76,9 @@ void SwLabDlg::PageCreated(const OString , SfxTabPage ) { if (rId == "labels") { -if (m_bLabel) -{ -static_cast()->SetDBManager(pDBManager); -static_cast()->InitDatabaseBox(); -} -else +static_cast()->SetDBManager(pDBManager); +static_cast()->InitDatabaseBox(); +if (!m_bLabel) static_cast()->SetToBusinessCard(); } else if (rId == "options") @@ -137,19 +134,16 @@ SwLabDlg::SwLabDlg(weld::Window* pParent, const SfxItemSet& rSet, AddTabPage("format", SwLabFormatPage::Create, nullptr); AddTabPage("options", SwLabPrtPage::Create, nullptr); +AddTabPage("labels", SwLabPage::Create, nullptr); m_sBusinessCardDlg = SwResId(STR_BUSINESS_CARDS); if (m_bLabel) { RemoveTabPage("business"); RemoveTabPage("private"); -RemoveTabPage("medium"); -AddTabPage("labels", SwLabPage::Create, nullptr); } else { -RemoveTabPage("labels"); -AddTabPage("medium", SwLabPage::Create, nullptr); AddTabPage("business", SwBusinessDataPage::Create, nullptr ); AddTabPage("private", SwPrivateDataPage::Create, nullptr); m_xDialog->set_title(m_sBusinessCardDlg); @@ -275,7 +269,6 @@ void SwLabPage::SetToBusinessCard() m_xSheetButton->set_help_id(HID_BUSINESS_FMT_PAGE_SHEET); m_xMakeBox->set_help_id(HID_BUSINESS_FMT_PAGE_BRAND); m_xTypeBox->set_help_id(HID_BUSINESS_FMT_PAGE_TYPE); -m_xAddressFrame->hide(); }; IMPL_LINK_NOARG(SwLabPage, AddrHdl, weld::Toggleable&, void) diff --git a/sw/uiconfig/swriter/ui/labeldialog.ui b/sw/uiconfig/swriter/ui/labeldialog.ui index c29d3d2fb193..ad4f72944e62 100644 --- a/sw/uiconfig/swriter/ui/labeldialog.ui +++ b/sw/uiconfig/swriter/ui/labeldialog.ui @@ -100,50 +100,6 @@ True True True - - - -True -False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -True -False -Medium - - -False - -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/frmdlg/frmpage.cxx |2 sw/source/uibase/inc/frmpage.hxx |1 sw/uiconfig/swriter/ui/frmaddpage.ui | 422 ++- 3 files changed, 232 insertions(+), 193 deletions(-) New commits: commit 755e0cd60d4634111911469b752485da678988e1 Author: Heiko Tietze AuthorDate: Wed Jun 8 14:08:37 2022 +0200 Commit: Heiko Tietze CommitDate: Wed Jun 8 20:35:43 2022 +0200 Resolves tdf#149010 - MInor UI fixes * Next/Previous controls placed in an extra frame * This frame becomes hidden in case of picture and objects (next/prev is only possible for frames) Change-Id: Iab7042b72efa7857c5405a8c345ba03d6b975519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135494 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 35db7c25135a..83cf98f49195 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2793,6 +2793,7 @@ SwFrameAddPage::SwFrameAddPage(weld::Container* pPage, weld::DialogController* p , m_xAltNameED(m_xBuilder->weld_entry("altname")) , m_xDescriptionFT(m_xBuilder->weld_label("description_label")) , m_xDescriptionED(m_xBuilder->weld_text_view("description")) +, m_xSequenceFrame(m_xBuilder->weld_widget("frmSequence")) , m_xPrevFT(m_xBuilder->weld_label("prev_label")) , m_xPrevLB(m_xBuilder->weld_combo_box("prev")) , m_xNextFT(m_xBuilder->weld_label("next_label")) @@ -2840,6 +2841,7 @@ void SwFrameAddPage::Reset(const SfxItemSet *rSet ) } if (m_sDlgType == "PictureDialog" || m_sDlgType == "ObjectDialog") { +m_xSequenceFrame->hide(); m_xEditInReadonlyCB->hide(); if (m_bHtmlMode) { diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 8211dc7b350b..1e01a6fa100d 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -280,6 +280,7 @@ class SwFrameAddPage final : public SfxTabPage std::unique_ptr m_xAltNameED; std::unique_ptr m_xDescriptionFT; std::unique_ptr m_xDescriptionED; +std::unique_ptr m_xSequenceFrame; std::unique_ptr m_xPrevFT; std::unique_ptr m_xPrevLB; std::unique_ptr m_xNextFT; diff --git a/sw/uiconfig/swriter/ui/frmaddpage.ui b/sw/uiconfig/swriter/ui/frmaddpage.ui index f306f7d1c223..dd949a5b69cf 100644 --- a/sw/uiconfig/swriter/ui/frmaddpage.ui +++ b/sw/uiconfig/swriter/ui/frmaddpage.ui @@ -1,5 +1,5 @@ - + @@ -9,40 +9,40 @@ - + True -False +False True -6 -12 -24 +6 +12 +24 True -False +False True True -0 -none +0 +none - + True -False -True -True -6 -12 +False 12 6 +True +True +6 +12 True -True +True True -True -50 +True +50 True @@ -51,17 +51,17 @@ -1 -0 +1 +0 True -True +True True -True -50 +True +50 True @@ -70,28 +70,28 @@ -1 -1 +1 +1 True -False +False _Name: -True -name +True +name 0 -0 -0 +0 +0 True -False +False Text _Alternative: Give a short description for users who do not see this object. True @@ -99,82 +99,14 @@ 0 -0 -1 - - - - -True -False -True - - None - - - -Displays the frame that comes before the current frame in a linked
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/misc/contentcontroldlg.cxx | 62 +++ sw/source/uibase/inc/contentcontroldlg.hxx |3 sw/uiconfig/swriter/ui/contentcontroldlg.ui | 87 3 files changed, 152 insertions(+) New commits: commit b673b2b868d9d549d059db4c135d776b48977469 Author: Miklos Vajna AuthorDate: Fri Jun 3 08:12:42 2022 +0200 Commit: Miklos Vajna CommitDate: Fri Jun 3 09:10:23 2022 +0200 sw content controls, date: add properties dialog - add a dateframe to contentcontroldlg.ui, to be hidden for non-date content controls - use a SwNumFormatTreeView to present a list of number formats, with a special "additional formats..." at the end that triggers a popup where a custom date format and language can be set - set the format of that tree view in the SwContentControlDlg ctor - update the SwContentControl from the tree view in SwContentControlDlg::OkHdl() Change-Id: If245eee821fd7fe8b41a40f74b9011c1a6ec140a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135327 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/source/ui/misc/contentcontroldlg.cxx b/sw/source/ui/misc/contentcontroldlg.cxx index 2d713b0091f4..84f440a6fa8f 100644 --- a/sw/source/ui/misc/contentcontroldlg.cxx +++ b/sw/source/ui/misc/contentcontroldlg.cxx @@ -21,12 +21,15 @@ #include #include +#include +#include #include #include #include #include #include +#include using namespace com::sun::star; @@ -48,6 +51,8 @@ SwContentControlDlg::SwContentControlDlg(weld::Window* pParent, SwWrtShell& rWrt , m_xDeleteBtn(m_xBuilder->weld_button("remove")) , m_xMoveUpBtn(m_xBuilder->weld_button("moveup")) , m_xMoveDownBtn(m_xBuilder->weld_button("movedown")) +, m_xDateFrame(m_xBuilder->weld_frame("dateframe")) +, m_xDateFormat(new SwNumFormatTreeView(m_xBuilder->weld_tree_view("date_formats_treeview"))) , m_xOk(m_xBuilder->weld_button("ok")) { m_xCheckedStateBtn->connect_clicked(LINK(this, SwContentControlDlg, SelectCharHdl)); @@ -116,6 +121,42 @@ SwContentControlDlg::SwContentControlDlg(weld::Window* pParent, SwWrtShell& rWrt m_xListItemsFrame->set_visible(false); m_xListItemButtons->set_visible(false); } + +if (m_pContentControl->GetDate()) +{ +m_xDateFormat->SetFormatType(SvNumFormatType::DATE); +m_xDateFormat->SetShowLanguageControl(true); + +// Set height to double of the default. +weld::TreeView& rTreeView = dynamic_cast(m_xDateFormat->get_widget()); +rTreeView.set_size_request(rTreeView.get_preferred_size().Width(), + rTreeView.get_height_rows(10)); + +OUString sFormatString = m_pContentControl->GetDateFormat(); +OUString sLang = m_pContentControl->GetDateLanguage(); +if (!sFormatString.isEmpty() && !sLang.isEmpty()) +{ +SvNumberFormatter* pNumberFormatter = m_rWrtShell.GetNumberFormatter(); +LanguageType aLangType = LanguageTag(sLang).getLanguageType(); +sal_uInt32 nFormat = pNumberFormatter->GetEntryKey(sFormatString, aLangType); +if (nFormat == NUMBERFORMAT_ENTRY_NOT_FOUND) +{ +sal_Int32 nCheckPos = 0; +SvNumFormatType nType; +pNumberFormatter->PutEntry(sFormatString, nCheckPos, nType, nFormat, + LanguageTag(sLang).getLanguageType()); +} + +if (aLangType != LANGUAGE_DONTKNOW && nFormat != NUMBERFORMAT_ENTRY_NOT_FOUND) +{ +m_xDateFormat->SetDefFormat(nFormat); +} +} +} +else +{ +m_xDateFrame->set_visible(false); +} } SwContentControlDlg::~SwContentControlDlg() {} @@ -159,6 +200,27 @@ IMPL_LINK_NOARG(SwContentControlDlg, OkHdl, weld::Button&, void) bChanged = true; } +if (m_pContentControl->GetDate()) +{ +SvNumberFormatter* pNumberFormatter = m_rWrtShell.GetNumberFormatter(); +const SvNumberformat* pFormat = pNumberFormatter->GetEntry(m_xDateFormat->GetFormat()); +if (pFormat) +{ +if (pFormat->GetFormatstring() != m_pContentControl->GetDateFormat()) +{ +m_pContentControl->SetDateFormat(pFormat->GetFormatstring()); +bChanged = true; +} + +OUString aLanguage = LanguageTag(pFormat->GetLanguage()).getBcp47(); +if (aLanguage != m_pContentControl->GetDateLanguage()) +{ +m_pContentControl->SetDateLanguage(aLanguage); +bChanged = true; +} +} +} + if (bChanged) { m_rWrtShell.GetDoc()->getIDocumentState().SetModified(); diff --git a/sw/source/uibase/inc/contentcontroldlg.hxx b/sw/source/uibase/inc/contentcontroldlg.hxx index
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/cnttab.cxx| 71 +++ sw/source/uibase/inc/swuicnttab.hxx |3 + sw/uiconfig/swriter/ui/tocentriespage.ui |5 -- 3 files changed, 49 insertions(+), 30 deletions(-) New commits: commit ec062c472ad58eafbb4392241119d5b53760120c Author: Caolán McNamara AuthorDate: Tue May 24 10:33:55 2022 +0100 Commit: Caolán McNamara CommitDate: Tue May 24 13:56:23 2022 +0200 tdf#149186: Table of contents editor not showing buttons in Dutch UI an alternative approach that doesn't leave things too wide for the English UI Change-Id: I17d87702fcf49e593e87710bde44c1a2cba14a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134861 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 3d1becdd5871..1aac737639b9 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1789,6 +1789,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(weld::Container* pPage, weld::DialogControl , m_xChapterInfoPB(m_xBuilder->weld_button("chapterinfo")) , m_xPageNoPB(m_xBuilder->weld_button("pageno")) , m_xHyperLinkPB(m_xBuilder->weld_button("hyperlink")) +, m_xFieldBox(m_xBuilder->weld_widget("fieldbox")) , m_xAuthFieldsLB(m_xBuilder->weld_combo_box("authfield")) , m_xAuthInsertPB(m_xBuilder->weld_button("insert")) , m_xAuthRemovePB(m_xBuilder->weld_button("remove")) @@ -1916,8 +1917,17 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(weld::Container* pPage, weld::DialogControl m_xSecondKeyLB->set_active(0); m_xThirdKeyLB->set_active(0); -//lock size +// lock size of dialog. Determine the field box's widest possible +// configuration (tdf#149186) before doing so. +int nFieldBoxWidth = 0; +for (int eType = TOX_CITATION; eType >= TOX_INDEX; --eType) +{ +ShowHideControls(eType); +nFieldBoxWidth = std::max(m_xFieldBox->get_preferred_size().Width(), nFieldBoxWidth); +} +m_xFieldBox->set_size_request(nFieldBoxWidth, -1); Size aPrefSize(m_xContainer->get_preferred_size()); +m_xFieldBox->set_size_request(-1, -1); m_xContainer->set_size_request(aPrefSize.Width(), aPrefSize.Height()); } @@ -1997,6 +2007,39 @@ void SwTOXEntryTabPage::Reset( const SfxItemSet* ) m_xCommaSeparatedCB->set_active(m_pCurrentForm->IsCommaSeparated()); } +void SwTOXEntryTabPage::ShowHideControls(int eType) +{ +bool bToxIsAuthorities = TOX_AUTHORITIES == eType; +bool bToxIsIndex = TOX_INDEX == eType; +bool bToxIsContent = TOX_CONTENT == eType; +bool bToxSupportsLinks = TOX_CONTENT == eType || + TOX_ILLUSTRATIONS == eType || + TOX_TABLES == eType || + TOX_OBJECTS == eType || + TOX_USER == eType; + +//show or hide controls +m_xEntryNoPB->set_visible(bToxIsContent); +m_xHyperLinkPB->set_visible(bToxSupportsLinks); +m_xRelToStyleCB->set_visible(!bToxIsAuthorities); +m_xChapterInfoPB->set_visible(!bToxIsContent && !bToxIsAuthorities); +m_xEntryPB->set_visible(!bToxIsAuthorities); +m_xPageNoPB->set_visible(!bToxIsAuthorities); +m_xAuthFieldsLB->set_visible(bToxIsAuthorities); +m_xAuthInsertPB->set_visible(bToxIsAuthorities); +m_xAuthRemovePB->set_visible(bToxIsAuthorities); + +m_xFormatFrame->set_visible(!bToxIsAuthorities); + +m_xSortingFrame->set_visible(bToxIsAuthorities); +m_xSortKeyFrame->set_visible(bToxIsAuthorities); + +m_xMainEntryStyleFT->set_visible(bToxIsIndex); +m_xMainEntryStyleLB->set_visible(bToxIsIndex); +m_xAlphaDelimCB->set_visible(bToxIsIndex); +m_xCommaSeparatedCB->set_visible(bToxIsIndex); +} + void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) { SwMultiTOXTabDialog* pTOXDlg = static_cast(GetDialogController()); @@ -2007,12 +2050,6 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) { bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType; bool bToxIsIndex = TOX_INDEX == aCurType.eType; -bool bToxIsContent = TOX_CONTENT == aCurType.eType; -bool bToxSupportsLinks = TOX_CONTENT == aCurType.eType || - TOX_ILLUSTRATIONS == aCurType.eType || - TOX_TABLES == aCurType.eType || - TOX_OBJECTS == aCurType.eType || - TOX_USER == aCurType.eType; m_xLevelLB->clear(); for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++) @@ -2075,25 +2112,7 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) m_xLevelLB->select(bToxIsIndex ? 1 : 0); //show or hide controls -m_xEntryNoPB->set_visible(bToxIsContent); -m_xHyperLinkPB->set_visible(bToxSupportsLinks); -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/misc/contentcontroldlg.cxx | 40 sw/source/uibase/inc/contentcontroldlg.hxx |1 sw/uiconfig/swriter/ui/contentcontroldlg.ui |4 ++ 3 files changed, 45 insertions(+) New commits: commit e9bee595fdff989b78abb3ebf27efbe9af543eca Author: Miklos Vajna AuthorDate: Wed May 18 17:00:36 2022 +0200 Commit: Miklos Vajna CommitDate: Thu May 19 17:07:28 2022 +0200 sw content controls, dropdown: disable NOP buttons in the property dialog Rename, delete, move up & move down does nothing initially, disable the buttons when their event handler would just do an early return to make this less confusing. Change-Id: I4cfb9750d07b4686440c05901ef72e8ce4de961e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134538 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/ui/misc/contentcontroldlg.cxx b/sw/source/ui/misc/contentcontroldlg.cxx index 9e5902149720..49157fdec606 100644 --- a/sw/source/ui/misc/contentcontroldlg.cxx +++ b/sw/source/ui/misc/contentcontroldlg.cxx @@ -44,6 +44,7 @@ SwContentControlDlg::SwContentControlDlg(weld::Window* pParent, SwWrtShell& rWrt , m_xMoveDownBtn(m_xBuilder->weld_button("movedown")) , m_xOk(m_xBuilder->weld_button("ok")) { +m_xListItems->connect_changed(LINK(this, SwContentControlDlg, SelectionChangedHdl)); m_xOk->connect_clicked(LINK(this, SwContentControlDlg, OkHdl)); // Only 2 items would be visible by default. @@ -245,4 +246,43 @@ IMPL_LINK_NOARG(SwContentControlDlg, MoveDownHdl, weld::Button&, void) m_xListItems->select(nRow); } +IMPL_LINK_NOARG(SwContentControlDlg, SelectionChangedHdl, weld::TreeView&, void) +{ +if (!m_xListItems->has_focus()) +{ +return; +} + +int nRow = m_xListItems->get_selected_index(); +if (nRow < 0) +{ +m_xRenameBtn->set_sensitive(false); +m_xDeleteBtn->set_sensitive(false); +} +else +{ +m_xRenameBtn->set_sensitive(true); +m_xDeleteBtn->set_sensitive(true); +} + +if (nRow <= 0) +{ +m_xMoveUpBtn->set_sensitive(false); +} +else +{ +m_xMoveUpBtn->set_sensitive(true); +} + +int nEndPos = m_xListItems->n_children() - 1; +if (nRow < 0 || nRow >= nEndPos) +{ +m_xMoveDownBtn->set_sensitive(false); +} +else +{ +m_xMoveDownBtn->set_sensitive(true); +} +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/contentcontroldlg.hxx b/sw/source/uibase/inc/contentcontroldlg.hxx index 642c7d078fe5..b6a42860e073 100644 --- a/sw/source/uibase/inc/contentcontroldlg.hxx +++ b/sw/source/uibase/inc/contentcontroldlg.hxx @@ -52,6 +52,7 @@ class SwContentControlDlg final : public SfxDialogController DECL_LINK(DeleteHdl, weld::Button&, void); DECL_LINK(MoveUpHdl, weld::Button&, void); DECL_LINK(MoveDownHdl, weld::Button&, void); +DECL_LINK(SelectionChangedHdl, weld::TreeView&, void); DECL_LINK(OkHdl, weld::Button&, void); public: diff --git a/sw/uiconfig/swriter/ui/contentcontroldlg.ui b/sw/uiconfig/swriter/ui/contentcontroldlg.ui index 815d0f14ef35..8190317048ca 100644 --- a/sw/uiconfig/swriter/ui/contentcontroldlg.ui +++ b/sw/uiconfig/swriter/ui/contentcontroldlg.ui @@ -214,6 +214,7 @@ Modify True +False True True @@ -228,6 +229,7 @@ Remove True +False True True @@ -242,6 +244,7 @@ Move Up True +False True True @@ -256,6 +259,7 @@ Move Down True +False True True
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/conttree.hxx |1 sw/source/uibase/utlui/content.cxx | 39 + sw/uiconfig/swriter/ui/navigatorcontextmenu.ui |9 + 3 files changed, 49 insertions(+) New commits: commit b000d964fcc8849d10576bf3539bde7729db2eb1 Author: Jim Raykowski AuthorDate: Sat Feb 5 21:27:33 2022 -0900 Commit: Jim Raykowski CommitDate: Fri Mar 25 23:18:18 2022 +0100 tdf#142447 related: SwNavigator: Copy outlines Change-Id: Ibfc173ab6db3d9cbb1e8c59b515c40f1846f1e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129542 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 2de7dc54f1e2..9f595def2825 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -158,6 +158,7 @@ class SwContentTree final : public SfxListener voidExecuteContextMenuAction(const OString& rSelectedPopupEntry); void DeleteOutlineSelections(); +void CopyOutlineSelections(); size_t GetEntryCount() const; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index c793f63740bc..619424701fb6 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1426,6 +1426,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bool bRemovePostItEntries = true; bool bRemoveIndexEntries = true; +bool bRemoveCopyEntry = true; bool bRemoveEditEntry = true; bool bRemoveUnprotectEntry = true; bool bRemoveDeleteEntry = true; @@ -1569,6 +1570,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bRemoveSelectEntry = false; bRemoveChapterEntries = false; } +bRemoveCopyEntry = false; } else if (!bReadonly && (bEditable || bDeletable)) { @@ -1704,7 +1706,11 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bRemoveSendOutlineEntry) xPop->remove("separator1"); +if (bRemoveCopyEntry) +xPop->remove("copy"); + if (bRemoveGotoEntry && +bRemoveCopyEntry && bRemoveSelectEntry && bRemoveDeleteEntry && bRemoveChapterEntries && @@ -4053,6 +4059,8 @@ IMPL_LINK(SwContentTree, KeyInputHdl, const KeyEvent&, rEvent, bool) ExecCommand("chapterup", !aCode.IsShift()); else if (aCode.GetCode() == KEY_DOWN) ExecCommand("chapterdown", !aCode.IsShift()); +else if (aCode.GetCode() == KEY_C) +CopyOutlineSelections(); else bConsumed = false; } @@ -4168,6 +4176,11 @@ IMPL_LINK(SwContentTree, QueryTooltipHdl, const weld::TreeIter&, rEntry, OUStrin void SwContentTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry) { +if (rSelectedPopupEntry == "copy") +{ +CopyOutlineSelections(); +return; +} if (rSelectedPopupEntry == "collapseallcategories") { std::unique_ptr xEntry = m_xTreeView->make_iterator(); @@ -4870,6 +4883,32 @@ static void lcl_AssureStdModeAtShell(SwWrtShell* pWrtShell) pWrtShell->EnterStdMode(); } +void SwContentTree::CopyOutlineSelections() +{ +m_pActiveShell->LockView(true); +{ +MakeAllOutlineContentTemporarilyVisible a(m_pActiveShell->GetDoc()); +lcl_AssureStdModeAtShell(m_pActiveShell); +m_pActiveShell->EnterAddMode(); +size_t nCount = m_xTreeView->get_selected_rows().size(); +m_xTreeView->selected_foreach([this, ](weld::TreeIter& rEntry){ +SwOutlineNodes::size_type nOutlinePos = reinterpret_cast( + m_xTreeView->get_id(rEntry).toInt64())->GetOutlinePos(); +m_pActiveShell->SttSelect(); +m_pActiveShell->MakeOutlineSel(nOutlinePos, nOutlinePos, + !m_xTreeView->get_row_expanded(rEntry), false); +// don't move if this is the last selected outline or the cursor is at start of para +if (--nCount && !m_pActiveShell->IsSttPara()) +m_pActiveShell->Right(CRSR_SKIP_CHARS, true, 1, false); +m_pActiveShell->EndSelect(); +return false; +}); +m_pActiveShell->LeaveAddMode(); + m_pActiveShell->GetView().GetViewFrame()->GetBindings().Execute(SID_COPY); +} +m_pActiveShell->LockView(false); +} + void SwContentTree::GotoContent(const SwContent* pCnt) { m_nLastGotoContentWasOutlinePos = SwOutlineNodes::npos; diff --git a/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui b/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui index e39368556fed..d7619e643fd0 100644 ---
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/content.hxx |5 + sw/source/uibase/utlui/content.cxx | 76 +++-- sw/uiconfig/swriter/ui/navigatorcontextmenu.ui | 36 +++ 3 files changed, 87 insertions(+), 30 deletions(-) New commits: commit b802cecbc0f57d0ba0d70434cf619a7e91c7393f Author: Jim Raykowski AuthorDate: Sat Mar 12 02:07:46 2022 -0900 Commit: Jim Raykowski CommitDate: Wed Mar 16 08:42:34 2022 +0100 tdf#86395 tdf#104253 tdf#147658 tdf#135043 SwNavigator sort enhancement Provides for sorting content members by order in document or alphabetically. The option to sort comment and footnote content types members alphabetically is not done by this patch. Change-Id: If68c08bb0f1035b32cd1dad1d5bd08a340834b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131448 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index 0a4e18013be4..2d6ac1a7d925 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -183,6 +183,8 @@ class SwContentType final : public SwTypeNumber boolm_bEdit: 1; // can this type be edited? boolm_bDelete:1; // can this type be deleted? +bool m_bAlphabeticSort = false; + static OUString RemoveNewline(const OUString&); public: SwContentType(SwWrtShell* pParent, ContentTypeId nType, sal_uInt8 nLevel ); @@ -206,6 +208,9 @@ public: Invalidate(); } +bool GetSortType() const {return m_bAlphabeticSort;} +void SetSortType(bool bAlphabetic) {m_bAlphabeticSort = bAlphabetic;} + voidInvalidate(); // only nMemberCount is read again boolIsEditable() const {return m_bEdit;} diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 6a4bf1d9456d..7e186232512b 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -438,7 +438,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged) if (nLevel >= m_nOutlineLevel || !m_pWrtShell->getIDocumentOutlineNodesAccess()-> isOutlineInLayout(i, *m_pWrtShell->GetLayout())) continue; -tools::Long nYPos = getYPos( +tools::Long nYPos = m_bAlphabeticSort ? 0 : getYPos( *m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNode(i)); OUString aEntry(comphelper::string::stripStart( m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineText( @@ -486,8 +486,11 @@ void SwContentType::FillMemberList(bool* pbContentChanged) continue; } tools::Long nYPos = 0; -if (SwTable* pTable = SwTable::FindTable()) -nYPos = getYPos(*pTable->GetTableNode()); +if (!m_bAlphabeticSort) +{ +if (SwTable* pTable = SwTable::FindTable()) +nYPos = getYPos(*pTable->GetTableNode()); +} auto pCnt = make_unique(this, rTableFormat.GetName(), nYPos); if( !rTableFormat.GetInfo( aAskItem ) && !aAskItem.pObject ) // not visible @@ -527,19 +530,18 @@ void SwContentType::FillMemberList(bool* pbContentChanged) const OUString sFrameName = pFrameFormat->GetName(); SwContent* pCnt; +tools::Long nYPos = +m_bAlphabeticSort ? 0 : pFrameFormat->FindLayoutRect(false, ).Top(); if(ContentTypeId::GRAPHIC == m_nContentType) { OUString sLink; m_pWrtShell->GetGrfNms( , nullptr, static_cast( pFrameFormat)); -pCnt = new SwGraphicContent(this, sFrameName, -INetURLObject::decode( sLink, - INetURLObject::DecodeMechanism::Unambiguous ), -pFrameFormat->FindLayoutRect(false, ).Top()); +pCnt = new SwGraphicContent(this, sFrameName, INetURLObject::decode(sLink, + INetURLObject::DecodeMechanism::Unambiguous), nYPos); } else { -pCnt = new SwContent(this, sFrameName, -pFrameFormat->FindLayoutRect(false, ).Top() ); +pCnt = new SwContent(this, sFrameName, nYPos); } if( !pFrameFormat->GetInfo( aAskItem ) && !aAskItem.pObject ) // not visible @@ -562,6 +564,7 @@ void SwContentType::FillMemberList(bool*
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/misc/bookmark.cxx | 20 ++-- sw/uiconfig/swriter/ui/insertbookmark.ui | 74 --- 2 files changed, 56 insertions(+), 38 deletions(-) New commits: commit ad1da9345b75dbe3ed9c503916c83c38d8a2e22f Author: Heiko Tietze AuthorDate: Fri Dec 17 09:02:54 2021 +0100 Commit: Caolán McNamara CommitDate: Mon Jan 31 12:22:49 2022 +0100 Resolves tdf#146261 - Remember size of bookmark dialog Change-Id: I0c6f20692af88c603106d76c45c722cdb7deb118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126993 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 77ff0b3bbd49..90c905d7a408 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -349,6 +350,20 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS) // disabled until "Hide" flag is not checked m_xConditionED->set_sensitive(false); m_xConditionFT->set_sensitive(false); + +// restore dialog size +SvtViewOptions aDlgOpt(EViewType::Dialog, "BookmarkDialog"); +if (aDlgOpt.Exists()) +m_xDialog->set_window_state(aDlgOpt.GetWindowState().toUtf8()); +} + +SwInsertBookmarkDlg::~SwInsertBookmarkDlg() +{ +// tdf#146261 - Remember size of bookmark dialog +SvtViewOptions aDlgOpt(EViewType::Dialog, "BookmarkDialog"); +OString sWindowState += m_xDialog->get_window_state(WindowStateMask::Pos | WindowStateMask::Size); +aDlgOpt.SetWindowState(OUString::fromUtf8(sWindowState)); } IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void) @@ -382,13 +397,10 @@ IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void) } } -SwInsertBookmarkDlg::~SwInsertBookmarkDlg() {} - BookmarkTable::BookmarkTable(std::unique_ptr xControl) : m_xControl(std::move(xControl)) { -m_xControl->set_size_request(450, 250); -m_xControl->set_column_fixed_widths({ 40, 110, 150, 160 }); +m_xControl->set_size_request(-1, m_xControl->get_height_rows(8)); m_xControl->set_selection_mode(SelectionMode::Multiple); } diff --git a/sw/uiconfig/swriter/ui/insertbookmark.ui b/sw/uiconfig/swriter/ui/insertbookmark.ui index e8e4aebacd7e..0cd5225733f0 100644 --- a/sw/uiconfig/swriter/ui/insertbookmark.ui +++ b/sw/uiconfig/swriter/ui/insertbookmark.ui @@ -74,11 +74,10 @@ - + True False -True 6 6 @@ -122,6 +121,7 @@ True True True +end 2 @@ -186,25 +186,36 @@ - -True -False -start -start -True -_Bookmarks: -True -bookmarks - - -0 -4 - + + + + + + + + + + + + +False +False +0 + + + + +True +False +0 +none True True +12 +6 True True in @@ -219,7 +230,7 @@ 0 False - + @@ -294,27 +305,22 @@ - -1 -4 -2 - - - - - - - - - - - - + + +True +False +_Bookmarks: +True +bookmarks + + + + -False +True True 1
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/cnttab.cxx| 39 ++- sw/source/uibase/inc/swuicnttab.hxx | 13 +- sw/uiconfig/swriter/ui/tocentriespage.ui | 27 + 3 files changed, 52 insertions(+), 27 deletions(-) New commits: commit 4d5cefb561535d968654c114b0ea9671e4e7771c Author: Caolán McNamara AuthorDate: Sun Jan 30 20:19:20 2022 + Commit: Caolán McNamara CommitDate: Mon Jan 31 09:51:24 2022 +0100 gtk4: use ToggleButtons if we want to show an image SAL_USE_VCLPLUGIN=gtk4 make screenshot now finally passes, so that's the end of this phase Change-Id: Iddb1e7d13a3218497419ae434b8bc4e2e80e74fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129185 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 1f7393fe3fa8..44b13a9c8db4 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1812,14 +1812,14 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(weld::Container* pPage, weld::DialogControl , m_xSortContentRB(m_xBuilder->weld_radio_button("sortcontents")) , m_xSortKeyFrame(m_xBuilder->weld_widget("sortkeyframe")) , m_xFirstKeyLB(m_xBuilder->weld_combo_box("key1lb")) -, m_xFirstSortUpRB(m_xBuilder->weld_radio_button("up1cb")) -, m_xFirstSortDownRB(m_xBuilder->weld_radio_button("down1cb")) +, m_xFirstSortUpRB(m_xBuilder->weld_toggle_button("up1cb")) +, m_xFirstSortDownRB(m_xBuilder->weld_toggle_button("down1cb")) , m_xSecondKeyLB(m_xBuilder->weld_combo_box("key2lb")) -, m_xSecondSortUpRB(m_xBuilder->weld_radio_button("up2cb")) -, m_xSecondSortDownRB(m_xBuilder->weld_radio_button("down2cb")) +, m_xSecondSortUpRB(m_xBuilder->weld_toggle_button("up2cb")) +, m_xSecondSortDownRB(m_xBuilder->weld_toggle_button("down2cb")) , m_xThirdKeyLB(m_xBuilder->weld_combo_box("key3lb")) -, m_xThirdSortUpRB(m_xBuilder->weld_radio_button("up3cb")) -, m_xThirdSortDownRB(m_xBuilder->weld_radio_button("down3cb")) +, m_xThirdSortUpRB(m_xBuilder->weld_toggle_button("up3cb")) +, m_xThirdSortDownRB(m_xBuilder->weld_toggle_button("down3cb")) , m_xTokenWIN(new SwTokenWindow(m_xBuilder->weld_container("token"))) { const OUString sNoCharSortKey(SwResId(STR_NOSORTKEY)); @@ -1862,6 +1862,17 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(weld::Container* pPage, weld::DialogControl m_xCommaSeparatedCB->connect_toggled(LINK(this, SwTOXEntryTabPage, ModifyClickHdl)); m_xRelToStyleCB->connect_toggled(LINK(this, SwTOXEntryTabPage, ModifyClickHdl)); +m_xFirstSortUpRB->set_active(true); +m_xSecondSortUpRB->set_active(true); +m_xThirdSortUpRB->set_active(true); + +m_xFirstSortUpRB->connect_toggled(LINK(this, SwTOXEntryTabPage, ToggleHdl)); +m_xFirstSortDownRB->connect_toggled(LINK(this, SwTOXEntryTabPage, ToggleHdl)); +m_xSecondSortUpRB->connect_toggled(LINK(this, SwTOXEntryTabPage, ToggleHdl)); +m_xSecondSortDownRB->connect_toggled(LINK(this, SwTOXEntryTabPage, ToggleHdl)); +m_xThirdSortUpRB->connect_toggled(LINK(this, SwTOXEntryTabPage, ToggleHdl)); +m_xThirdSortDownRB->connect_toggled(LINK(this, SwTOXEntryTabPage, ToggleHdl)); + FieldUnit aMetric = ::GetDfltMetric(false); ::SetFieldUnit(*m_xTabPosMF, aMetric); @@ -1921,6 +1932,22 @@ IMPL_LINK_NOARG(SwTOXEntryTabPage, ModifyHdl, LinkParamNone*, void) OnModify(false); } +IMPL_LINK(SwTOXEntryTabPage, ToggleHdl, weld::Toggleable&, rToggle, void) +{ +if ( == m_xFirstSortUpRB.get()) +m_xFirstSortDownRB->set_active(!m_xFirstSortUpRB->get_active()); +else if ( == m_xFirstSortDownRB.get()) +m_xFirstSortUpRB->set_active(!m_xFirstSortDownRB->get_active()); +else if ( == m_xSecondSortUpRB.get()) +m_xSecondSortDownRB->set_active(!m_xSecondSortUpRB->get_active()); +else if ( == m_xSecondSortDownRB.get()) +m_xSecondSortUpRB->set_active(!m_xSecondSortDownRB->get_active()); +else if ( == m_xThirdSortUpRB.get()) +m_xThirdSortDownRB->set_active(!m_xThirdSortUpRB->get_active()); +else if ( == m_xThirdSortDownRB.get()) +m_xThirdSortUpRB->set_active(!m_xThirdSortDownRB->get_active()); +} + // bAllLevels is used as signal to change all levels of the example void SwTOXEntryTabPage::OnModify(bool bAllLevels) { diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 8d3fc168da2f..ddf6769fe353 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -350,14 +350,14 @@ class SwTOXEntryTabPage final : public SfxTabPage std::unique_ptr m_xSortContentRB; std::unique_ptr m_xSortKeyFrame; std::unique_ptr m_xFirstKeyLB; -std::unique_ptr m_xFirstSortUpRB; -std::unique_ptr m_xFirstSortDownRB; +std::unique_ptr m_xFirstSortUpRB; +std::unique_ptr m_xFirstSortDownRB; std::unique_ptr
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/utlui/content.cxx | 29 sw/uiconfig/swriter/ui/navigatorcontextmenu.ui | 168 + 2 files changed, 123 insertions(+), 74 deletions(-) New commits: commit 58a3e2a6fad68d8d5e6091e063c0b26e3608f998 Author: Jim Raykowski AuthorDate: Tue Oct 19 02:10:41 2021 -0800 Commit: Jim Raykowski CommitDate: Fri Oct 22 04:19:10 2021 +0200 tdf#144999 SwNavigator: Add way to collapse all categories This patch adds a context menu item that can be used to collapse the content tree to the root categories all at once. Change-Id: I15274e6db838e9e8503a79384bed4ffcf983041c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123811 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index a7aea176df5d..56ce7d9b5e87 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1529,6 +1529,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) if (rCEvt.GetCommand() != CommandEventId::ContextMenu) return false; +grab_focus(); + if (std::unique_ptr xEntry(m_xTreeView->make_iterator()); rCEvt.IsMouseEvent() && m_xTreeView->get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xEntry.get(), false)) @@ -1849,6 +1851,22 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) if (bRemoveSectionTracking) xPop->remove("sectiontracking"); +bool bSetSensitiveCollapseAllCategories = false; +if (!m_bIsRoot) +{ +bool bEntry = m_xTreeView->get_iter_first(*xEntry); +while (bEntry) +{ +if (m_xTreeView->get_row_expanded(*xEntry)) +{ +bSetSensitiveCollapseAllCategories = true; +break; +} +bEntry = m_xTreeView->iter_next_sibling(*xEntry); +} +} +xPop->set_sensitive("collapseallcategories", bSetSensitiveCollapseAllCategories); + OString sCommand = xPop->popup_at_rect(m_xTreeView.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1))); if (!sCommand.isEmpty()) ExecuteContextMenuAction(sCommand); @@ -4216,6 +4234,17 @@ IMPL_LINK(SwContentTree, QueryTooltipHdl, const weld::TreeIter&, rEntry, OUStrin void SwContentTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry) { +if (rSelectedPopupEntry == "collapseallcategories") +{ +std::unique_ptr xEntry = m_xTreeView->make_iterator(); +bool bEntry = m_xTreeView->get_iter_first(*xEntry); +while (bEntry) +{ +m_xTreeView->collapse_row(*xEntry); +bEntry = m_xTreeView->iter_next_sibling(*xEntry); +} +return; +} if (rSelectedPopupEntry == "tabletracking") { m_bTableTracking = !m_bTableTracking; diff --git a/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui b/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui index db918b084bb0..49b6b03d3c48 100644 --- a/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui +++ b/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui @@ -1,197 +1,197 @@ - + True -False +False True -False -True +False +True True -False +False True -False +False Send Outline to Clipboard -True +True True -False +False Go to -True +True True -False +False True -False +False Select -True +True True -False +False Delete -True +True True -False +False Promote Chapter -True +True True -False +False Demote Chapter -True +True True -False +False Promote Level -True +True True -False +False Demote Level -True +True True -False +False _Remove Index -True +True True -False +False _Update -True +True True -False +False Edit... -True +True True -False +False _Unprotect -True
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/conttree.hxx |1 sw/source/uibase/utlui/content.cxx | 27 - sw/uiconfig/swriter/ui/navigatorcontextmenu.ui |8 +++ 3 files changed, 31 insertions(+), 5 deletions(-) New commits: commit c8aa07cae1821560a5bc6f15168f11e2407556c1 Author: Jim Raykowski AuthorDate: Wed Sep 29 20:56:57 2021 -0800 Commit: Jim Raykowski CommitDate: Mon Oct 4 08:57:43 2021 +0200 tdf#144817 SwNavigator: Section tracking option Add a check button to the section context menu in the content tree to turn section tracking on or off. Change-Id: Ib8c49626f31f41cf85818630d126dee98e1db809 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122844 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 9364e36c6181..2e321c9c23ba 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -113,6 +113,7 @@ class SwContentTree final : public SfxListener sal_uInt32 m_nOutlineTracking = 1; bool m_bTableTracking = true; +bool m_bSectionTracking = true; enum class State { ACTIVE, CONSTANT, HIDDEN } m_eState; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index dfb49bc7f6b3..da92775a4ba0 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1598,6 +1598,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bool bRemoveChapterEntries = true; bool bRemoveSendOutlineEntry = true; bool bRemoveTableTracking = true; +bool bRemoveSectionTracking = true; // Edit only if the shown content is coming from the current view. if (State::HIDDEN != m_eState && @@ -1670,8 +1671,10 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) } else if(ContentTypeId::REGION == nContentType) { +xPop->set_active("sectiontracking", m_bSectionTracking); bRemoveSelectEntry = false; bRemoveEditEntry = false; +bRemoveSectionTracking = false; } else { @@ -1702,7 +1705,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) m_xTreeView->get_id(*xEntry).toInt64())->GetParent(); if (pType) { -if (ContentTypeId::OUTLINE == pType->GetType()) +const ContentTypeId nContentType = pType->GetType(); +if (ContentTypeId::OUTLINE == nContentType) { bOutline = true; if (State::HIDDEN != m_eState) @@ -1715,15 +1719,20 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) *xPop); } else if (State::HIDDEN != m_eState && -pType->GetType() == ContentTypeId::POSTIT && +nContentType == ContentTypeId::POSTIT && !m_pActiveShell->GetView().GetDocShell()->IsReadOnly() && pType->GetMemberCount() > 0) bRemovePostItEntries = false; -else if (ContentTypeId::TABLE == pType->GetType()) +else if (ContentTypeId::TABLE == nContentType) { xPop->set_active("tabletracking", m_bTableTracking); bRemoveTableTracking = false; } +else if (ContentTypeId::REGION == nContentType) +{ +xPop->set_active("sectiontracking", m_bSectionTracking); +bRemoveSectionTracking = false; +} } } @@ -1811,6 +1820,9 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) if (bRemoveTableTracking) xPop->remove("tabletracking"); +if (bRemoveSectionTracking) +xPop->remove("sectiontracking"); + OString sCommand = xPop->popup_at_rect(m_xTreeView.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1))); if (!sCommand.isEmpty()) ExecuteContextMenuAction(sCommand); @@ -3663,8 +3675,8 @@ void SwContentTree::UpdateTracking() return; } // section -if (const SwSection* pSection = m_pActiveShell->GetCurrSection(); pSection && -!(m_bIsRoot && m_nRootType != ContentTypeId::REGION)) +if (const SwSection* pSection = m_pActiveShell->GetCurrSection(); m_bSectionTracking && +pSection && !(m_bIsRoot && m_nRootType != ContentTypeId::REGION)) { lcl_SelectByContentTypeAndName(this, *m_xTreeView, SwResId(STR_CONTENT_TYPE_REGION), pSection->GetSectionName()); @@ -4164,6 +4176,11 @@ void SwContentTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry) m_bTableTracking =
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/conttree.hxx |1 + sw/source/uibase/utlui/content.cxx | 21 +++-- sw/uiconfig/swriter/ui/navigatorcontextmenu.ui |8 3 files changed, 28 insertions(+), 2 deletions(-) New commits: commit 38eb9a0594393e263f57701702974a030d3327de Author: Jim Raykowski AuthorDate: Thu Sep 16 21:02:44 2021 -0800 Commit: Jim Raykowski CommitDate: Wed Sep 29 08:57:00 2021 +0200 tdf#144335 SwNavigator: Table tracking option Adds a check button to the table context menu in the content tree to turn table tracking on or off. Change-Id: I787dc2f3e3b465d7f25a9e16b5f5491dc2d933d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122218 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 78e078cc78f3..9364e36c6181 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -112,6 +112,7 @@ class SwContentTree final : public SfxListener sal_uInt8 m_nOutlineLevel; sal_uInt32 m_nOutlineTracking = 1; +bool m_bTableTracking = true; enum class State { ACTIVE, CONSTANT, HIDDEN } m_eState; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 5933b3cf26f8..ae46fe4272c6 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1570,6 +1570,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bool bRemoveToggleExpandEntry = true; bool bRemoveChapterEntries = true; bool bRemoveSendOutlineEntry = true; +bool bRemoveTableTracking = true; // Edit only if the shown content is coming from the current view. if (State::HIDDEN != m_eState && @@ -1632,6 +1633,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bool bProt = m_pActiveShell->HasTableAnyProtection( , ); xPop->set_sensitive(OString::number(403), !bFull); xPop->set_sensitive(OString::number(404), bProt); +xPop->set_active("tabletracking", m_bTableTracking); +bRemoveTableTracking = false; bRemoveDeleteEntry = false; } else if(ContentTypeId::DRAWOBJECT == nContentType) @@ -1684,11 +1687,16 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) bRemoveToggleExpandEntry = lcl_InsertExpandCollapseAllItem(*m_xTreeView, *xEntry, *xPop); } -if (State::HIDDEN != m_eState && +else if (State::HIDDEN != m_eState && pType->GetType() == ContentTypeId::POSTIT && !m_pActiveShell->GetView().GetDocShell()->IsReadOnly() && pType->GetMemberCount() > 0) bRemovePostItEntries = false; +else if (ContentTypeId::TABLE == pType->GetType()) +{ +xPop->set_active("tabletracking", m_bTableTracking); +bRemoveTableTracking = false; +} } } @@ -1773,6 +1781,9 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool) xPop->remove("separator1511"); } +if (bRemoveTableTracking) +xPop->remove("tabletracking"); + OString sCommand = xPop->popup_at_rect(m_xTreeView.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1))); if (!sCommand.isEmpty()) ExecuteContextMenuAction(sCommand); @@ -3552,7 +3563,7 @@ void SwContentTree::UpdateTracking() return; } // table -if (m_pActiveShell->IsCursorInTable() && +if (m_bTableTracking && m_pActiveShell->IsCursorInTable() && !(m_bIsRoot && m_nRootType != ContentTypeId::TABLE)) { if(m_pActiveShell->GetTableFormat()) @@ -4062,6 +4073,12 @@ IMPL_LINK(SwContentTree, QueryTooltipHdl, const weld::TreeIter&, rEntry, OUStrin void SwContentTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry) { +if (rSelectedPopupEntry == "tabletracking") +{ +m_bTableTracking = !m_bTableTracking; +return; +} + std::unique_ptr xFirst(m_xTreeView->make_iterator()); if (!m_xTreeView->get_selected(xFirst.get())) xFirst.reset(); diff --git a/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui b/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui index 8c27c7e07c28..c3a5b64bde47 100644 --- a/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui +++ b/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui @@ -230,6 +230,14 @@ + + +True +False +Table Tracking +True + + True
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mmresultdialogs.cxx|2 +- sw/source/ui/inc/mmresultdialogs.hxx |2 +- sw/uiconfig/swriter/ui/mmresultsavedialog.ui |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 45c4caff685b15a0f1b87ef05436a7e6aca96851 Author: Balazs Varga AuthorDate: Tue Sep 14 09:33:05 2021 +0200 Commit: Balazs Varga CommitDate: Tue Sep 14 15:39:44 2021 +0200 tdf#144483 sw mail merge: save ranges in a single document In the Save mail merged document dialog, it wasn't possible to save mail ranges in a single document, because of the bad UI of the dialog window: grouping range selector as a radio button with the single document/individual documents radio buttons. Moreover, commit f3993912ec4b526aa57cb4bfb4745d7298a4da82 "tdf#144427 sw mailmerge: fix merge all document" removed the hidden workaround: setting range at the third radio button, and selecting the first radio button. Using checkbox for the third option solved the problem as proposed. Change-Id: I43798fb036de07d1001bcb8d72c20de2d9c577b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122078 Tested-by: Heiko Tietze Reviewed-by: Heiko Tietze diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 38bd28376d77..c18196571f6f 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -251,7 +251,7 @@ SwMMResultSaveDialog::SwMMResultSaveDialog(weld::Window* pParent) , m_bCancelSaving(false) , m_xSaveAsOneRB(m_xBuilder->weld_radio_button("singlerb")) , m_xSaveIndividualRB(m_xBuilder->weld_radio_button("individualrb")) -, m_xFromRB(m_xBuilder->weld_radio_button("fromrb")) +, m_xFromRB(m_xBuilder->weld_check_button("fromrb")) , m_xFromNF(m_xBuilder->weld_spin_button("from")) , m_xToFT(m_xBuilder->weld_label("toft")) , m_xToNF(m_xBuilder->weld_spin_button("to")) diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx index a2cd01f85a7a..445fb1ee546b 100644 --- a/sw/source/ui/inc/mmresultdialogs.hxx +++ b/sw/source/ui/inc/mmresultdialogs.hxx @@ -37,7 +37,7 @@ class SwMMResultSaveDialog final : public SfxDialogController std::unique_ptr m_xSaveAsOneRB; std::unique_ptr m_xSaveIndividualRB; -std::unique_ptr m_xFromRB; +std::unique_ptr m_xFromRB; std::unique_ptr m_xFromNF; std::unique_ptr m_xToFT; std::unique_ptr m_xToNF; diff --git a/sw/uiconfig/swriter/ui/mmresultsavedialog.ui b/sw/uiconfig/swriter/ui/mmresultsavedialog.ui index 19e678f5ac10..ffd9d6df3ce1 100644 --- a/sw/uiconfig/swriter/ui/mmresultsavedialog.ui +++ b/sw/uiconfig/swriter/ui/mmresultsavedialog.ui @@ -155,7 +155,7 @@ False 12 - + _From True True
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/cnttab.cxx|5 +++-- sw/uiconfig/swriter/ui/assignstylesdialog.ui |1 + 2 files changed, 4 insertions(+), 2 deletions(-) New commits: commit 4e7212c4a341eef0521c4c6300c65bf42d756fd1 Author: Caolán McNamara AuthorDate: Thu Aug 5 11:18:45 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Aug 5 13:43:43 2021 +0200 Resolves: tdf#143720 treeview not resizing to fill available space Change-Id: I041c3a743b8624f49bfe57e8a4469535e334e5dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120067 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 397e062d7da5..ffddc80892db 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -513,7 +513,8 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent, aWidths.push_back(m_xHeaderTree->get_pixel_size(sTitle).Width() + nPadding); } m_xHeaderTree->set_column_fixed_widths(aWidths); -auto nWidth = std::accumulate(aWidths.begin(), aWidths.end(), 0); +auto nWidth = std::accumulate(aWidths.begin(), aWidths.end(), + Application::GetSettings().GetStyleSettings().GetScrollBarSize()); m_xHeaderTree->set_size_request(nWidth, m_xHeaderTree->get_height_rows(15)); int nRow(0); @@ -576,7 +577,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent, IMPL_LINK(SwAddStylesDlg_Impl, TreeSizeAllocHdl, const Size&, rSize, void) { -auto nWidth = rSize.Width(); +auto nWidth = rSize.Width() - Application::GetSettings().GetStyleSettings().GetScrollBarSize(); std::vector aWidths; aWidths.push_back(0); diff --git a/sw/uiconfig/swriter/ui/assignstylesdialog.ui b/sw/uiconfig/swriter/ui/assignstylesdialog.ui index 81f8444b56da..83d150e5bd09 100644 --- a/sw/uiconfig/swriter/ui/assignstylesdialog.ui +++ b/sw/uiconfig/swriter/ui/assignstylesdialog.ui @@ -180,6 +180,7 @@ True False start +True 12
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mmdocselectpage.cxx |1 + sw/uiconfig/swriter/ui/mmselectpage.ui |3 --- 2 files changed, 1 insertion(+), 3 deletions(-) New commits: commit d7e948938367048a4e408c30f2efb927e76a604e Author: Caolán McNamara AuthorDate: Fri Apr 2 20:12:54 2021 +0100 Commit: Caolán McNamara CommitDate: Thu May 6 12:51:23 2021 +0200 use Label::set_label_type to designate a label as a warning/error To be consistent with other cases. weld::LabelType::Error is another option. What colors, if any, it results in isn't cast in stone, but be consistent in that all warnings (or errors) use the same ones. Change-Id: I6943aa6370cf6cead60cd404987e8211532143eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113529 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 26e3a34d3a84..5ef0ee737f3a 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -52,6 +52,7 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(weld::Container* pPage, SwMai , m_xDataSourceWarningFT(m_xBuilder->weld_label("datasourcewarning")) , m_xExchangeDatabasePB(m_xBuilder->weld_button("exchangedatabase")) { +m_xDataSourceWarningFT->set_label_type(weld::LabelType::Warning); m_xCurrentDocRB->set_active(true); DocSelectHdl(*m_xNewDocRB); diff --git a/sw/uiconfig/swriter/ui/mmselectpage.ui b/sw/uiconfig/swriter/ui/mmselectpage.ui index 672b1ef9927b..126e3d0a284c 100644 --- a/sw/uiconfig/swriter/ui/mmselectpage.ui +++ b/sw/uiconfig/swriter/ui/mmselectpage.ui @@ -188,9 +188,6 @@ start 18 Data source of the current document is not registered. Please exchange database. - - - 0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/swuiidxmrk.cxx| 76 +--- sw/uiconfig/swriter/ui/bibliofragment.ui | 83 ++- 2 files changed, 140 insertions(+), 19 deletions(-) New commits: commit e920406994dd2b880d4b752e3ea4e09e4a8f97cc Author: Miklos Vajna AuthorDate: Wed Apr 21 16:54:00 2021 +0200 Commit: Miklos Vajna CommitDate: Wed Apr 21 18:45:39 2021 +0200 sw bibliography, refer to a page: add dedicate widget to show the page number This way the user doesn't have to interpret the URL manually, we can show the fragment-less URL and the page number separately. So far only the doc model -> UI is done, not yet the other way around. Change-Id: I16116dc0ac55d459f86c54cab32172137377548d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114443 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index c16eacf36fab..483fe01cf3aa 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -70,6 +71,36 @@ using namespace com::sun::star::lang; using namespace com::sun::star::util; using namespace ::comphelper; +namespace +{ +bool SplitUrlAndPage(const OUString& rText, OUString& rUrl, int& nPageNumber) +{ +uno::Reference xUriReferenceFactory += uri::UriReferenceFactory::create(comphelper::getProcessComponentContext()); +uno::Reference xUriRef; +try +{ +xUriRef = xUriReferenceFactory->parse(rText); +} +catch (const uno::Exception& rException) +{ +SAL_WARN("sw.ui", "SplitUrlAndPage: failed to parse url: " << rException.Message); +return false; +} + +OUString aPagePrefix("page="); +if (!xUriRef->getFragment().startsWith(aPagePrefix)) +{ +return false; +} + +nPageNumber = xUriRef->getFragment().copy(aPagePrefix.getLength()).toInt32(); +xUriRef->clearFragment(); +rUrl = xUriRef->getUriReference(); +return true; +} +} + // dialog to insert a directory selection SwIndexMarkPane::SwIndexMarkPane(const std::shared_ptr& rDialog, weld::Builder& rBuilder, bool bNewDlg, SwWrtShell* pWrtShell) @@ -1028,6 +1059,8 @@ class SwCreateAuthEntryDlg_Impl : public weld::GenericDialogController std::unique_ptr m_xTypeListBox; std::unique_ptr m_xIdentifierBox; std::unique_ptr m_xBrowseButton; +std::unique_ptr m_xPageCB; +std::unique_ptr m_xPageSB; DECL_LINK(IdentifierHdl, weld::ComboBox&, void); DECL_LINK(ShortNameHdl, weld::Entry&, void); @@ -1600,7 +1633,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, } else { -m_pBoxes[nIndex] = m_aBuilders.back()->weld_box("hbox"); +m_pBoxes[nIndex] = m_aBuilders.back()->weld_box("vbox"); pEdits[nIndex] = m_aBuilders.back()->weld_entry("entry"); if (bLeft) m_aOrigContainers.back()->move(m_pBoxes[nIndex].get(), m_xLeft.get()); @@ -1610,14 +1643,39 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, m_pBoxes[nIndex]->set_grid_left_attach(1); m_pBoxes[nIndex]->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); m_pBoxes[nIndex]->set_hexpand(true); -pEdits[nIndex]->set_text(pFields[aCurInfo.nToxField]); -pEdits[nIndex]->show(); -pEdits[nIndex]->set_help_id(aCurInfo.pHelpId); if (aCurInfo.nToxField == AUTH_FIELD_URL) { m_xBrowseButton = m_aBuilders.back()->weld_button("browse"); m_xBrowseButton->connect_clicked(LINK(this, SwCreateAuthEntryDlg_Impl, BrowseHdl)); +m_xPageCB = m_aBuilders.back()->weld_check_button("pagecb"); +m_xPageSB = m_aBuilders.back()->weld_spin_button("pagesb"); } + +// Now that both pEdits[nIndex] and m_xPageSB is initialized, set their values. +OUString aText = pFields[aCurInfo.nToxField]; +if (aCurInfo.nToxField != AUTH_FIELD_URL) +{ +pEdits[nIndex]->set_text(aText); +} +else +{ +OUString aUrl; +int nPageNumber; +if (SplitUrlAndPage(aText, aUrl, nPageNumber)) +{ +pEdits[nIndex]->set_text(aUrl); +m_xPageCB->set_active(true); +m_xPageSB->set_sensitive(true); +m_xPageSB->set_value(nPageNumber); +} +else +{ +pEdits[nIndex]->set_text(aText); +} +} +pEdits[nIndex]->show(); +pEdits[nIndex]->set_help_id(aCurInfo.pHelpId); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mmdocselectpage.cxx | 29 +++- sw/source/ui/dbui/mmdocselectpage.hxx |2 + sw/uiconfig/swriter/ui/mmselectpage.ui | 34 - 3 files changed, 55 insertions(+), 10 deletions(-) New commits: commit a809b2ab2553e946431699d9d7ac3f6209cbdd6b Author: Gülşah Köse AuthorDate: Tue Apr 13 08:48:32 2021 +0300 Commit: Gülşah Köse CommitDate: Fri Apr 16 00:00:53 2021 +0200 tdf#139906 Add an option to change data source from mail merge wizard dialog. Change-Id: I52dfd9be82813a1b01c725eab97a7534ae9a05d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114079 Tested-by: Jenkins Reviewed-by: Gülşah Köse diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index a83a7e727f7b..26e3a34d3a84 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -29,7 +29,7 @@ #include #include #include - +#include #include #include @@ -50,6 +50,7 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(weld::Container* pPage, SwMai , m_xBrowseTemplatePB(m_xBuilder->weld_button("browsetemplate")) , m_xRecentDocLB(m_xBuilder->weld_combo_box("recentdoclb")) , m_xDataSourceWarningFT(m_xBuilder->weld_label("datasourcewarning")) +, m_xExchangeDatabasePB(m_xBuilder->weld_button("exchangedatabase")) { m_xCurrentDocRB->set_active(true); DocSelectHdl(*m_xNewDocRB); @@ -65,6 +66,9 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(weld::Container* pPage, SwMai m_xBrowseDocPB->connect_clicked(aFileSelectHdl); m_xBrowseTemplatePB->connect_clicked(aFileSelectHdl); +Link aExchangeDatabaseHdl = LINK(this, SwMailMergeDocSelectPage, ExchangeDatabaseHdl); +m_xExchangeDatabasePB->connect_clicked(aExchangeDatabaseHdl); + const uno::Sequence< OUString >& rDocs = m_pWizard->GetConfigItem().GetSavedDocuments(); for(const auto& rDoc : rDocs) @@ -100,6 +104,11 @@ IMPL_LINK_NOARG(SwMailMergeDocSelectPage, DocSelectHdl, weld::ToggleButton&, voi m_xDataSourceWarningFT->hide(); m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); } + +if(m_xCurrentDocRB->get_active()) +m_xExchangeDatabasePB->set_sensitive(true); +else +m_xExchangeDatabasePB->set_sensitive(false); } IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, weld::Button&, rButton, void) @@ -155,6 +164,24 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, weld::Button&, rButton, void) m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); } +IMPL_LINK_NOARG(SwMailMergeDocSelectPage, ExchangeDatabaseHdl, weld::Button&, void) +{ + +SwAbstractDialogFactory& rFact = ::swui::GetFactory(); +ScopedVclPtr pDlg(rFact.CreateSwChangeDBDlg(*m_pWizard->GetSwView())); +pDlg->Execute(); + +OUString sDataSourceName = m_pWizard->GetSwView()->GetDataSourceName(); + +if(m_xCurrentDocRB->get_active() && + !sDataSourceName.isEmpty() && + SwView::IsDataSourceAvailable(sDataSourceName)) +{ +m_xDataSourceWarningFT->hide(); +m_pWizard->enableButtons(WizardButtonFlags::NEXT, true); +} +} + bool SwMailMergeDocSelectPage::commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) { bool bReturn = false; diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index 67cea59b6450..5220c3fd7fe2 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -40,9 +40,11 @@ class SwMailMergeDocSelectPage : public vcl::OWizardPage std::unique_ptr m_xBrowseTemplatePB; std::unique_ptr m_xRecentDocLB; std::unique_ptr m_xDataSourceWarningFT; +std::unique_ptr m_xExchangeDatabasePB; DECL_LINK(DocSelectHdl, weld::ToggleButton&, void); DECL_LINK(FileSelectHdl, weld::Button&, void); +DECL_LINK(ExchangeDatabaseHdl, weld::Button&, void); virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override; diff --git a/sw/uiconfig/swriter/ui/mmselectpage.ui b/sw/uiconfig/swriter/ui/mmselectpage.ui index ee125d0e4af6..cb8b5dae430c 100644 --- a/sw/uiconfig/swriter/ui/mmselectpage.ui +++ b/sw/uiconfig/swriter/ui/mmselectpage.ui @@ -23,6 +23,7 @@ 6 12 6 + Use the current _document @@ -60,7 +61,7 @@ 0 -1 +3 @@ -81,7 +82,7 @@ 0 -2 +4 @@ -102,7 +103,7 @@ 0 -4 +6
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/index/swuiidxmrk.cxx| 50 +++ sw/uiconfig/swriter/ui/bibliofragment.ui | 37 ++ 2 files changed, 75 insertions(+), 12 deletions(-) New commits: commit c63b8d55bdb0a6a236cef856cbfc5d9fe45ac103 Author: Miklos Vajna AuthorDate: Mon Apr 12 17:54:35 2021 +0200 Commit: Miklos Vajna CommitDate: Mon Apr 12 19:17:50 2021 +0200 sw define bibliography entry dialog: add browse button for file:// URLs - wrap "entry" in the biblio fragment into a "hbox" - audit uses of "entry" and work with "hbox" instead, depending on if the context is a child widget (want hbox) or indeed an entry (want entry) - add a hidden-by-default browse button to that box - add a handler which can edit the AUTH_FIELD_URL entry Change-Id: Ifecc6f1a86be1f609d470535f103c630e45d04cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114013 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 13bc59d038e8..ee5ea01bd037 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include @@ -1015,6 +1017,7 @@ class SwCreateAuthEntryDlg_Impl : public weld::GenericDialogController std::vector> m_aOrigContainers; std::vector> m_aFixedTexts; +std::unique_ptr m_pBoxes[AUTH_FIELD_END]; std::unique_ptr pEdits[AUTH_FIELD_END]; std::unique_ptr m_xOKBT; std::unique_ptr m_xBox; @@ -1022,10 +1025,12 @@ class SwCreateAuthEntryDlg_Impl : public weld::GenericDialogController std::unique_ptr m_xRight; std::unique_ptr m_xTypeListBox; std::unique_ptr m_xIdentifierBox; +std::unique_ptr m_xBrowseButton; DECL_LINK(IdentifierHdl, weld::ComboBox&, void); DECL_LINK(ShortNameHdl, weld::Entry&, void); DECL_LINK(EnableHdl, weld::ComboBox&, void); +DECL_LINK(BrowseHdl, weld::Button&, void); public: SwCreateAuthEntryDlg_Impl(weld::Window* pParent, @@ -1593,15 +1598,16 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, } else { +m_pBoxes[nIndex] = m_aBuilders.back()->weld_box("hbox"); pEdits[nIndex] = m_aBuilders.back()->weld_entry("entry"); if (bLeft) -m_aOrigContainers.back()->move(pEdits[nIndex].get(), m_xLeft.get()); +m_aOrigContainers.back()->move(m_pBoxes[nIndex].get(), m_xLeft.get()); else -m_aOrigContainers.back()->move(pEdits[nIndex].get(), m_xRight.get()); +m_aOrigContainers.back()->move(m_pBoxes[nIndex].get(), m_xRight.get()); -pEdits[nIndex]->set_grid_left_attach(1); -pEdits[nIndex]->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); -pEdits[nIndex]->set_hexpand(true); +m_pBoxes[nIndex]->set_grid_left_attach(1); +m_pBoxes[nIndex]->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); +m_pBoxes[nIndex]->set_hexpand(true); pEdits[nIndex]->set_text(pFields[aCurInfo.nToxField]); pEdits[nIndex]->show(); pEdits[nIndex]->set_help_id(aCurInfo.pHelpId); @@ -1615,6 +1621,14 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, pEdits[nIndex]->set_sensitive(false); } } +else if (aCurInfo.nToxField == AUTH_FIELD_URL + && comphelper::isFileUrl(pFields[aCurInfo.nToxField])) +{ +m_xBrowseButton = m_aBuilders.back()->weld_button("browse"); +m_xBrowseButton->connect_clicked(LINK(this, SwCreateAuthEntryDlg_Impl, BrowseHdl)); +m_xBrowseButton->show(); +} + m_aFixedTexts.back()->set_mnemonic_widget(pEdits[nIndex].get()); } if(bLeft) @@ -1699,6 +1713,32 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, EnableHdl, weld::ComboBox&, rBox, void) m_xOKBT->set_sensitive(m_bNameAllowed && rBox.get_active() != -1); }; +IMPL_LINK_NOARG(SwCreateAuthEntryDlg_Impl, BrowseHdl, weld::Button&, void) +{ +sfx2::FileDialogHelper aFileDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, +FileDialogFlags::NONE, getDialog()); +OUString aPath = GetEntryText(AUTH_FIELD_URL); +if (!aPath.isEmpty()) +{ +aFileDlg.SetDisplayDirectory(aPath); +} + +if (aFileDlg.Execute() != ERRCODE_NONE) +{ +return; +} + +for (int nIndex = 0; nIndex < AUTH_FIELD_END; nIndex++) +{ +const TextInfo& rCurInfo = aTextInfoArr[nIndex]; +if (rCurInfo.nToxField == AUTH_FIELD_URL) +{ +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mailmergewizard.cxx |9 + sw/source/ui/dbui/mmdocselectpage.cxx | 17 +++-- sw/source/ui/dbui/mmdocselectpage.hxx |1 + sw/uiconfig/swriter/ui/mmselectpage.ui | 17 - 4 files changed, 41 insertions(+), 3 deletions(-) New commits: commit d7d487875246ba00d5be7e4fb0fd82b78fea5205 Author: Gülşah Köse AuthorDate: Wed Mar 31 22:48:03 2021 +0300 Commit: Gülşah Köse CommitDate: Fri Apr 2 14:10:39 2021 +0200 tdf#139906 Prevent to use the Mail Merge wizard without data source. When the file has a data source but that data source is not available in LibreOffice we shouldn't let user continue mail merging. Change-Id: Ic28101a12b2e33e78fd9b478fc41707786344e52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113432 Tested-by: Jenkins Reviewed-by: Gülşah Köse diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index bb10a2a9a0da..87116262facf 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -142,7 +142,16 @@ void SwMailMergeWizard::enterState( WizardState _nState ) switch(_nState) { case MM_DOCUMENTSELECTPAGE: +{ bEnablePrev = false; // the first page + +OUString sDataSourceName = GetSwView()->GetDataSourceName(); +if(!sDataSourceName.isEmpty() && + !SwView::IsDataSourceAvailable(sDataSourceName)) +{ +bEnableNext = false; +} +} break; case MM_ADDRESSBLOCKPAGE : bEnableNext = m_xConfigItem->GetResultSet().is(); diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index f19089126a03..a83a7e727f7b 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -49,6 +49,7 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(weld::Container* pPage, SwMai , m_xBrowseDocPB(m_xBuilder->weld_button("browsedoc")) , m_xBrowseTemplatePB(m_xBuilder->weld_button("browsetemplate")) , m_xRecentDocLB(m_xBuilder->weld_combo_box("recentdoclb")) +, m_xDataSourceWarningFT(m_xBuilder->weld_label("datasourcewarning")) { m_xCurrentDocRB->set_active(true); DocSelectHdl(*m_xNewDocRB); @@ -84,9 +85,21 @@ SwMailMergeDocSelectPage::~SwMailMergeDocSelectPage() IMPL_LINK_NOARG(SwMailMergeDocSelectPage, DocSelectHdl, weld::ToggleButton&, void) { m_xRecentDocLB->set_sensitive(m_xRecentDocRB->get_active()); - m_pWizard->UpdateRoadmap(); -m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); +OUString sDataSourceName = m_pWizard->GetSwView()->GetDataSourceName(); + +if(m_xCurrentDocRB->get_active() && + !sDataSourceName.isEmpty() && + !SwView::IsDataSourceAvailable(sDataSourceName)) +{ +m_xDataSourceWarningFT->show(); +m_pWizard->enableButtons(WizardButtonFlags::NEXT, false); +} +else +{ +m_xDataSourceWarningFT->hide(); +m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); +} } IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, weld::Button&, rButton, void) diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index 88ac9e40dc8d..67cea59b6450 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -39,6 +39,7 @@ class SwMailMergeDocSelectPage : public vcl::OWizardPage std::unique_ptr m_xBrowseDocPB; std::unique_ptr m_xBrowseTemplatePB; std::unique_ptr m_xRecentDocLB; +std::unique_ptr m_xDataSourceWarningFT; DECL_LINK(DocSelectHdl, weld::ToggleButton&, void); DECL_LINK(FileSelectHdl, weld::Button&, void); diff --git a/sw/uiconfig/swriter/ui/mmselectpage.ui b/sw/uiconfig/swriter/ui/mmselectpage.ui index eba9c227e7c3..ee125d0e4af6 100644 --- a/sw/uiconfig/swriter/ui/mmselectpage.ui +++ b/sw/uiconfig/swriter/ui/mmselectpage.ui @@ -1,5 +1,5 @@ - + @@ -181,6 +181,21 @@ 5 + + +True +False +start +Data source of the current document is not registered. + + + + + +0 +8 + + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/UIConfig_swriter.mk |1 sw/source/uibase/utlui/tmplctrl.cxx | 46 +++- sw/uiconfig/swriter/ui/pagestylemenu.ui |9 ++ 3 files changed, 21 insertions(+), 35 deletions(-) New commits: commit fbac6127c7d2200afa0c476aa36785cb407fb6bd Author: Caolán McNamara AuthorDate: Mon Feb 22 20:20:10 2021 + Commit: Caolán McNamara CommitDate: Tue Feb 23 10:16:42 2021 +0100 replace SwTemplatePopup_Impl Change-Id: I82afec995488d388cb39c324f8f9a6684441fbe9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111361 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 16aaf178b3e3..167fa92548e8 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -239,6 +239,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/pagemargincontrol \ sw/uiconfig/swriter/ui/pageorientationcontrol \ sw/uiconfig/swriter/ui/pagesizecontrol \ + sw/uiconfig/swriter/ui/pagestylemenu \ sw/uiconfig/swriter/ui/paradialog \ sw/uiconfig/swriter/ui/picturedialog \ sw/uiconfig/swriter/ui/picturepage \ diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index d398dadee0b8..88a750be4d88 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -18,12 +18,12 @@ */ #include -#include #include #include #include #include #include +#include #include #include @@ -37,34 +37,6 @@ SFX_IMPL_STATUSBAR_CONTROL( SwTemplateControl, SfxStringItem ); -namespace { - -class SwTemplatePopup_Impl : public PopupMenu -{ -public: -SwTemplatePopup_Impl(); - -sal_uInt16 GetCurId() const { return nCurId; } - -private: -sal_uInt16 nCurId; - -virtual voidSelect() override; -}; - -} - -SwTemplatePopup_Impl::SwTemplatePopup_Impl() : -PopupMenu(), -nCurId(USHRT_MAX) -{ -} - -void SwTemplatePopup_Impl::Select() -{ -nCurId = GetCurItemId(); -} - SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStb ) : @@ -100,7 +72,6 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) GetStatusBar().GetItemText( GetId() ).isEmpty()) return; -ScopedVclPtrInstance aPop; { SwView* pView = ::GetActiveView(); SwWrtShell *const pWrtShell(pView ? pView->GetWrtShellPtr() : nullptr); @@ -114,18 +85,23 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) auto xIter = pPool->CreateIterator(SfxStyleFamily::Page); if (xIter->Count() > 1) { -sal_uInt16 nCount = 0; +std::unique_ptr xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/pagestylemenu.ui")); +std::unique_ptr xPopup(xBuilder->weld_menu("menu")); + +sal_uInt32 nCount = 0; SfxStyleSheetBase* pStyle = xIter->First(); while( pStyle ) { -aPop->InsertItem( ++nCount, pStyle->GetName() ); +xPopup->append(OUString::number(++nCount), pStyle->GetName()); pStyle = xIter->Next(); } -aPop->Execute( (), rCEvt.GetMousePosPixel()); -const sal_uInt16 nCurrId = aPop->GetCurId(); -if( nCurrId != USHRT_MAX) +::tools::Rectangle aRect(rCEvt.GetMousePosPixel(), Size(1, 1)); +weld::Window* pParent = weld::GetPopupParent(GetStatusBar(), aRect); +OString sResult = xPopup->popup_at_rect(pParent, aRect); +if (!sResult.isEmpty()) { +sal_uInt32 nCurrId = sResult.toUInt32(); // looks a bit awkward, but another way is not possible pStyle = xIter->operator[]( nCurrId - 1 ); SfxStringItem aStyle( FN_SET_PAGE_STYLE, pStyle->GetName() ); diff --git a/sw/uiconfig/swriter/ui/pagestylemenu.ui b/sw/uiconfig/swriter/ui/pagestylemenu.ui new file mode 100644 index ..53f81216379e --- /dev/null +++ b/sw/uiconfig/swriter/ui/pagestylemenu.ui @@ -0,0 +1,9 @@ + + + + + +True +False + + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/UIConfig_swriter.mk |1 sw/source/uibase/utlui/bookctrl.cxx| 47 +++-- sw/uiconfig/swriter/ui/bookmarkmenu.ui |9 ++ 3 files changed, 21 insertions(+), 36 deletions(-) New commits: commit 2e7fe9f0048f5afb957278e87106a81ba818dd8a Author: Caolán McNamara AuthorDate: Mon Feb 22 20:14:58 2021 + Commit: Caolán McNamara CommitDate: Tue Feb 23 10:16:01 2021 +0100 replace BookmarkPopup_Impl Change-Id: I87dda264ec61bbbfd6cf4eb0cbbe636724579537 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111360 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 655341ff28b1..16aaf178b3e3 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -103,6 +103,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/autotext \ sw/uiconfig/swriter/ui/bibliographyentry \ sw/uiconfig/swriter/ui/bibliofragment \ + sw/uiconfig/swriter/ui/bookmarkmenu \ sw/uiconfig/swriter/ui/bulletsandnumbering \ sw/uiconfig/swriter/ui/businessdatapage \ sw/uiconfig/swriter/ui/calendar \ diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx index d07744290151..f47bfe735ec9 100644 --- a/sw/source/uibase/utlui/bookctrl.cxx +++ b/sw/source/uibase/utlui/bookctrl.cxx @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -38,34 +38,6 @@ SFX_IMPL_STATUSBAR_CONTROL(SwBookmarkControl, SfxStringListItem); -namespace { - -class BookmarkPopup_Impl : public PopupMenu -{ -public: -BookmarkPopup_Impl(); - -sal_uInt16 GetCurId() const { return nCurId; } - -private: -sal_uInt16 nCurId; - -virtual voidSelect() override; -}; - -} - -BookmarkPopup_Impl::BookmarkPopup_Impl() : -PopupMenu(), -nCurId(USHRT_MAX) -{ -} - -void BookmarkPopup_Impl::Select() -{ -nCurId = GetCurItemId(); -} - SwBookmarkControl::SwBookmarkControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStb ) : @@ -103,14 +75,16 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt ) GetStatusBar().GetItemText( GetId() ).isEmpty()) return; -ScopedVclPtrInstance aPop; SwWrtShell* pWrtShell = ::GetActiveWrtShell(); if( !(pWrtShell && pWrtShell->getIDocumentMarkAccess()->getAllMarksCount() > 0) ) return; +std::unique_ptr xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/bookmarkmenu.ui")); +std::unique_ptr xPopup(xBuilder->weld_menu("menu")); + IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess(); IDocumentMarkAccess::const_iterator_t ppBookmarkStart = pMarkAccess->getBookmarksBegin(); -sal_uInt16 nPopupId = 1; +sal_uInt32 nPopupId = 1; std::map aBookmarkIdx; for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBookmarkStart; ppBookmark != pMarkAccess->getBookmarksEnd(); @@ -118,16 +92,17 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt ) { if(IDocumentMarkAccess::MarkType::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark)) { -aPop->InsertItem( nPopupId, (*ppBookmark)->GetName() ); +xPopup->append(OUString::number(nPopupId), (*ppBookmark)->GetName()); aBookmarkIdx[nPopupId] = static_cast(ppBookmark - ppBookmarkStart); nPopupId++; } } -aPop->Execute( (), rCEvt.GetMousePosPixel()); -sal_uInt16 nCurrId = aPop->GetCurId(); -if( nCurrId != USHRT_MAX) +::tools::Rectangle aRect(rCEvt.GetMousePosPixel(), Size(1, 1)); +weld::Window* pParent = weld::GetPopupParent(GetStatusBar(), aRect); +OString sResult = xPopup->popup_at_rect(pParent, aRect); +if (!sResult.isEmpty()) { -SfxUInt16Item aBookmark( FN_STAT_BOOKMARK, aBookmarkIdx[nCurrId] ); +SfxUInt16Item aBookmark( FN_STAT_BOOKMARK, aBookmarkIdx[sResult.toUInt32()] ); SfxViewFrame::Current()->GetDispatcher()->ExecuteList(FN_STAT_BOOKMARK, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, { }); diff --git a/sw/uiconfig/swriter/ui/bookmarkmenu.ui b/sw/uiconfig/swriter/ui/bookmarkmenu.ui new file mode 100644 index ..53f81216379e --- /dev/null +++ b/sw/uiconfig/swriter/ui/bookmarkmenu.ui @@ -0,0 +1,9 @@ + + + + + +True +False + + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/fldui/flddb.cxx |2 +- sw/source/ui/fldui/flddinf.cxx|4 ++-- sw/source/ui/fldui/flddok.cxx |4 ++-- sw/source/ui/fldui/fldfunc.cxx|2 +- sw/source/ui/fldui/fldref.cxx |6 +++--- sw/source/ui/fldui/fldvar.cxx |2 +- sw/uiconfig/swriter/ui/flddocinfopage.ui |2 +- sw/uiconfig/swriter/ui/flddocumentpage.ui |2 +- 8 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 8be0be8066f50e0ce660d40f121c7d7891f1bc49 Author: Kevin Suo AuthorDate: Fri Dec 18 19:42:29 2020 +0800 Commit: Heiko Tietze CommitDate: Wed Dec 23 11:37:39 2020 +0100 tdf#130275: Fields dialog is too tall ...which makes the OK/Cancel buttons invisible under small displays. This commit changed the height of these widgets. Also I did some tweats to the UI file and the width so that the edit dialog of these fields looks nicer (at least on my display). Change-Id: I9f39727afd566d75db525c5a5cafe2eabb66d7ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107965 Tested-by: Jenkins Tested-by: Heiko Tietze Reviewed-by: Heiko Tietze diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 267d318d8559..963e1834533e 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -52,7 +52,7 @@ SwFieldDBPage::SwFieldDBPage(weld::Container* pPage, weld::DialogController* pCo m_xFormatLB->make_sorted(); auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeLB->get_height_rows(14); +auto nHeight = m_xTypeLB->get_height_rows(10); m_xTypeLB->set_size_request(nWidth, nHeight); m_xDatabaseTLB->set_size_request(nWidth*2, nHeight); diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 9bb8e08cf737..35d4b5a00ae4 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -63,9 +63,9 @@ SwFieldDokInfPage::SwFieldDokInfPage(weld::Container* pPage, weld::DialogControl FillFieldSelect(*m_xSelectionLB); auto nWidth = m_xTypeTLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeTLB->get_height_rows(20); +auto nHeight = m_xTypeTLB->get_height_rows(10); m_xTypeTLB->set_size_request(nWidth, nHeight); -m_xFormatLB->get_widget().set_size_request(nWidth, nHeight); +m_xFormatLB->get_widget().set_size_request(nWidth * 2, nHeight); m_xSelectionLB->set_size_request(nWidth, nHeight); //enable 'active' language selection diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 5c6bc57e70aa..7164c4ff2692 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -53,11 +53,11 @@ SwFieldDokPage::SwFieldDokPage(weld::Container* pPage, weld::DialogController* p m_xFormatLB->make_sorted(); auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeLB->get_height_rows(20); +auto nHeight = m_xTypeLB->get_height_rows(10); m_xTypeLB->set_size_request(nWidth, nHeight); m_xSelectionLB->set_size_request(nWidth, nHeight); -m_xFormatLB->set_size_request(nWidth, nHeight); +m_xFormatLB->set_size_request(nWidth * 2, nHeight); m_xSelectionLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl)); m_xFormatLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl)); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index c2e6cbef2572..9e61530b172a 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -68,7 +68,7 @@ SwFieldFuncPage::SwFieldFuncPage(weld::Container* pPage, weld::DialogController* m_xListItemsLB->get_height_rows(5)); auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeLB->get_height_rows(20); +auto nHeight = m_xTypeLB->get_height_rows(10); m_xTypeLB->set_size_request(nWidth, nHeight); m_xFormatLB->set_size_request(nWidth, nHeight); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 6c92d6f4d07a..6cd7cc6e6720 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -82,10 +82,10 @@ SwFieldRefPage::SwFieldRefPage(weld::Container* pPage, weld::DialogController* p auto nHeight = m_xTypeLB->get_height_rows(8); auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -m_xTypeLB->set_size_request(nWidth, nHeight); -m_xFormatLB->set_size_request(nWidth, nHeight); +m_xTypeLB->set_size_request(nWidth * 1.33, nHeight); +m_xFormatLB->set_size_request(nWidth * 1.33, nHeight); m_xSelection->set_size_request(nWidth * 2, nHeight); -nHeight = m_xTypeLB->get_height_rows(20); +nHeight = m_xTypeLB->get_height_rows(8);
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/chrdlg/swuiccoll.cxx | 24 -- sw/source/uibase/inc/swuiccoll.hxx |1 sw/uiconfig/swriter/ui/conditionpage.ui | 120 3 files changed, 48 insertions(+), 97 deletions(-) New commits: commit 1f066313218449cac494a887eb209311efbaa405 Author: Justin Luth AuthorDate: Thu Dec 3 15:32:46 2020 +0300 Commit: Heiko Tietze CommitDate: Mon Dec 14 10:31:11 2020 +0100 tdf#82802 sw page-style UI: remove pointless makeConditional CB There is no point in having a tick-box to enable the bottom panel. If anyone assigns anything, then the style automatically becomes a conditional style, and reverts back when all are removed, regardless of the status of that checkbox. So it was just a UI element - probably a remnant of a long-ago design that was phased out. Change-Id: I318f7d8061a938c24c97d5b718f3d328e66f8ff1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107162 Tested-by: Jenkins Tested-by: Justin Luth Reviewed-by: Justin Luth Reviewed-by: Heiko Tietze diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index b4b722f6374b..4265daae8c31 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -43,7 +43,6 @@ SwCondCollPage::SwCondCollPage(weld::Container* pPage, weld::DialogController* p , m_pCmds(SwCondCollItem::GetCmds()) , m_pFormat(nullptr) , m_bNewTemplate(false) -, m_xConditionCB(m_xBuilder->weld_check_button("condstyle")) , m_xTbLinks(m_xBuilder->weld_tree_view("links")) , m_xStyleLB(m_xBuilder->weld_tree_view("styles")) , m_xFilterLB(m_xBuilder->weld_combo_box("filter")) @@ -66,7 +65,6 @@ SwCondCollPage::SwCondCollPage(weld::Container* pPage, weld::DialogController* p SetExchangeSupport(); // Install handlers -m_xConditionCB->connect_toggled(LINK(this, SwCondCollPage, OnOffHdl)); m_xTbLinks->connect_row_activated(LINK(this, SwCondCollPage, AssignRemoveTreeListBoxHdl)); m_xStyleLB->connect_row_activated(LINK(this, SwCondCollPage, AssignRemoveTreeListBoxHdl)); m_xRemovePB->connect_clicked(LINK(this, SwCondCollPage, AssignRemoveClickHdl)); @@ -124,12 +122,6 @@ bool SwCondCollPage::FillItemSet(SfxItemSet *rSet) void SwCondCollPage::Reset(const SfxItemSet *) { -if (m_bNewTemplate) -m_xConditionCB->set_sensitive(true); -if (RES_CONDTXTFMTCOLL == m_pFormat->Which()) -m_xConditionCB->set_active(true); -OnOffHdl(*m_xConditionCB); - m_xTbLinks->clear(); SfxStyleSheetBasePool* pPool = m_rSh.GetView().GetDocShell()->GetStyleSheetPool(); @@ -164,18 +156,6 @@ void SwCondCollPage::Reset(const SfxItemSet *) } } -IMPL_LINK(SwCondCollPage, OnOffHdl, weld::ToggleButton&, rBox, void) -{ -const bool bEnable = rBox.get_active(); -m_xTbLinks->set_sensitive(bEnable); -m_xStyleLB->set_sensitive(bEnable); -m_xFilterLB->set_sensitive(bEnable); -m_xRemovePB->set_sensitive(bEnable); -m_xAssignPB->set_sensitive(bEnable); -if (bEnable) -SelectHdl(nullptr); -} - IMPL_LINK(SwCondCollPage, AssignRemoveClickHdl, weld::Button&, rBtn, void) { AssignRemove(); @@ -245,10 +225,10 @@ void SwCondCollPage::SelectHdl(const weld::Widget* pBox) : OUString(); const OUString sStyle = m_xStyleLB->get_selected_text(); -m_xAssignPB->set_sensitive(sStyle != sTbEntry && m_xConditionCB->get_active()); +m_xAssignPB->set_sensitive(sStyle != sTbEntry); if (pBox != m_xStyleLB.get()) -m_xRemovePB->set_sensitive(m_xConditionCB->get_active() && !sTbEntry.isEmpty()); +m_xRemovePB->set_sensitive(!sTbEntry.isEmpty()); } } diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx index 4e0f5c2b2e3d..4e1c00dd10bd 100644 --- a/sw/source/uibase/inc/swuiccoll.hxx +++ b/sw/source/uibase/inc/swuiccoll.hxx @@ -36,7 +36,6 @@ class SwCondCollPage : public SfxTabPage boolm_bNewTemplate; -std::unique_ptr m_xConditionCB; std::unique_ptr m_xTbLinks; std::unique_ptr m_xStyleLB; std::unique_ptr m_xFilterLB; diff --git a/sw/uiconfig/swriter/ui/conditionpage.ui b/sw/uiconfig/swriter/ui/conditionpage.ui index 5bc7f190cfed..8b298c5d8f0c 100644 --- a/sw/uiconfig/swriter/ui/conditionpage.ui +++ b/sw/uiconfig/swriter/ui/conditionpage.ui @@ -1,5 +1,5 @@ - + @@ -23,79 +23,54 @@ True -False +False True True -6 -18 +6 +18 True -False +False True True -0 -none +0 +none True -False +False True True -6 -12 +6 +12 - + True -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/table/instable.cxx | 59 +++--- sw/source/uibase/inc/instable.hxx |7 ++-- sw/uiconfig/swriter/ui/inserttable.ui | 17 - 3 files changed, 58 insertions(+), 25 deletions(-) New commits: commit 3f8d9566cdf278d3412207aa15ac5a8c6a3757b4 Author: Anshu AuthorDate: Tue Nov 10 03:46:47 2020 +0530 Commit: Mike Kaganski CommitDate: Thu Nov 19 20:10:53 2020 +0100 tdf#134779 Warning generated if the table size exceeds a particular limit Change-Id: I2ee23c7b3f5638b48323a76535e7a3b5141d1ad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105501 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 3ca34f37b313..b700b85d53fc 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -25,7 +25,6 @@ #include #include -#define ROW_COL_PROD 16384 void SwInsTableDlg::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, SwInsertTableOptions& rInsTableOpts, OUString& rAutoName, @@ -33,8 +32,8 @@ void SwInsTableDlg::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rC { SwInsertTableFlags nInsMode = SwInsertTableFlags::NONE; rName = m_xNameEdit->get_text(); -rRow = m_xRowNF->get_value(); -rCol = m_xColNF->get_value(); +rRow = m_xRowSpinButton->get_value(); +rCol = m_xColSpinButton->get_value(); if (m_xHeaderCB->get_active()) nInsMode |= SwInsertTableFlags::Headline; @@ -66,8 +65,9 @@ SwInsTableDlg::SwInsTableDlg(SwView& rView) , pTAutoFormat(nullptr) , nEnteredValRepeatHeaderNF(-1) , m_xNameEdit(m_xBuilder->weld_entry("nameedit")) -, m_xColNF(m_xBuilder->weld_spin_button("colspin")) -, m_xRowNF(m_xBuilder->weld_spin_button("rowspin")) +, m_xWarning(m_xBuilder->weld_label("lbwarning")) +, m_xColSpinButton(m_xBuilder->weld_spin_button("colspin")) +, m_xRowSpinButton(m_xBuilder->weld_spin_button("rowspin")) , m_xHeaderCB(m_xBuilder->weld_check_button("headercb")) , m_xRepeatHeaderCB(m_xBuilder->weld_check_button("repeatcb")) , m_xRepeatHeaderNF(m_xBuilder->weld_spin_button("repeatheaderspin")) @@ -89,11 +89,8 @@ SwInsTableDlg::SwInsTableDlg(SwView& rView) m_xNameEdit->connect_insert_text(LINK(this, SwInsTableDlg, TextFilterHdl)); m_xNameEdit->set_text(pShell->GetUniqueTableName()); m_xNameEdit->connect_changed(LINK(this, SwInsTableDlg, ModifyName)); -m_xColNF->connect_value_changed(LINK(this, SwInsTableDlg, ModifyRowCol)); -m_xRowNF->connect_value_changed(LINK(this, SwInsTableDlg, ModifyRowCol)); - -m_xRowNF->set_max(ROW_COL_PROD/m_xColNF->get_value()); -m_xColNF->set_max(ROW_COL_PROD/m_xRowNF->get_value()); +m_xRowSpinButton->connect_changed(LINK(this, SwInsTableDlg, ModifyRowCol)); +m_xColSpinButton->connect_changed(LINK(this, SwInsTableDlg, ModifyRowCol)); m_xInsertBtn->connect_clicked(LINK(this, SwInsTableDlg, OKHdl)); @@ -116,7 +113,7 @@ SwInsTableDlg::SwInsTableDlg(SwView& rView) RepeatHeaderCheckBoxHdl(*m_xRepeatHeaderCB); CheckBoxHdl(*m_xHeaderCB); -sal_Int64 nMax = m_xRowNF->get_value(); +sal_Int64 nMax = m_xRowSpinButton->get_value(); if( nMax <= 1 ) nMax = 1; else @@ -124,6 +121,7 @@ SwInsTableDlg::SwInsTableDlg(SwView& rView) m_xRepeatHeaderNF->set_max( nMax ); InitAutoTableFormat(); +m_xWarning->set_label_type(weld::LabelType::Warning); } void SwInsTableDlg::InitAutoTableFormat() @@ -227,21 +225,44 @@ IMPL_LINK( SwInsTableDlg, ModifyName, weld::Entry&, rEdit, void ) m_xInsertBtn->set_sensitive(pShell->GetTableStyle(sTableName) == nullptr); } -IMPL_LINK( SwInsTableDlg, ModifyRowCol, weld::SpinButton&, rEdit, void ) +// We use weld::Entry's "changed" notification here, not weld::SpinButton's "value_changed", because +// the latter only fires after the control looses focus; so the notification would not fire during +// typing a big number, so that user typing it and immediately clicking "Insert" would not see the +// warning. +// Since the notification is called in weld::Entry context, we can only rely on what's available for +// used weld::Entry's notification; specifically, we have to call spin buttons' get_text() instead +// of get_value(), because the latter is not guaranteed to return an up-to-date value at this point +// (depends on vcl plugin used). +IMPL_LINK( SwInsTableDlg, ModifyRowCol, weld::Entry&, rEdit, void ) { -if( == m_xColNF.get()) +sal_Int64 nRow = m_xRowSpinButton->get_text().toInt64(); +sal_Int64 nCol = m_xColSpinButton->get_text().toInt64(); +if (nRow > 255) +{ +m_xRowSpinButton->set_message_type(weld::EntryMessageType::Warning); +m_xWarning->set_visible(true); +} +else +{ +m_xRowSpinButton->set_message_type(weld::EntryMessageType::Normal); +} +if
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/navipi.hxx | 10 + sw/source/uibase/ribbar/workctrl.cxx | 17 +-- sw/source/uibase/utlui/content.cxx | 20 +-- sw/source/uibase/utlui/navipi.cxx| 79 +- sw/uiconfig/swriter/ui/navigatorpanel.ui | 173 ++- 5 files changed, 179 insertions(+), 120 deletions(-) New commits: commit b80c2745c50d064ad9e673cf8a5b73aaf0aa1778 Author: Jim Raykowski AuthorDate: Tue Nov 10 16:24:06 2020 -0900 Commit: Jim Raykowski CommitDate: Tue Nov 17 03:22:02 2020 +0100 tdf#13 Writer: fix keyboard navigation of Navigator This patch: -Splits the first row of the Navigator panel into four toolbar controls to make keyboard navigation possible. -Makes an Escape key press, when focus is in the sidebar Navigator 'Navigate By' control, result in keyboard focus on the content panel title, which in the Navigator deck/panel case is the deck title bar. -Fixes spacing issues of first row controls. -Fixes 'Navigate By' listbox/combobox keyboard use. -Keeps focus on previous/next scroll button when enter key is used to activate the button. Gtk3 has problems with focusing to title bar and wrapping keyboard focus. This has been left to be fixed by a separate patch. Change-Id: Ic9d3a35f2b8c31a209947a1fe61094ddafee4f42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105574 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index af232add07a3..498a8d3da7c5 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -58,7 +58,11 @@ class SwNavigationPI : public PanelLayout std::unique_ptr m_xContent1ToolBox; std::unique_ptr m_xContent2ToolBox; std::unique_ptr m_xContent3ToolBox; -std::unique_ptr m_xContent1Dispatch; +std::unique_ptr m_xContent4ToolBox; +std::unique_ptr m_xContent5ToolBox; +std::unique_ptr m_xContent6ToolBox; +std::unique_ptr m_xContent2Dispatch; +std::unique_ptr m_xContent3Dispatch; std::unique_ptr m_xHeadingsMenu; std::unique_ptr m_xDragModeMenu; std::unique_ptr m_xUpdateMenu; @@ -98,8 +102,8 @@ class SwNavigationPI : public PanelLayout DECL_LINK( DocListBoxSelectHdl, weld::ComboBox&, void ); DECL_LINK( ToolBoxSelectHdl, const OString&, void ); DECL_LINK( ToolBoxClickHdl, const OString&, void ); -DECL_LINK( ToolBox2DropdownClickHdl, const OString&, void ); -DECL_LINK( ToolBox3DropdownClickHdl, const OString&, void ); +DECL_LINK( ToolBox5DropdownClickHdl, const OString&, void ); +DECL_LINK( ToolBox6DropdownClickHdl, const OString&, void ); DECL_LINK( DoneLink, SfxPoolItem const *, void ); DECL_LINK( DropModeMenuSelectHdl, const OString&, void ); DECL_LINK( HeadingsMenuSelectHdl, const OString&, void ); diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 6a73899d52f9..44dd2f6c1040 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -721,12 +721,6 @@ IMPL_LINK(NavElementBox_Base, SelectHdl, weld::ComboBox&, rComboBox, void) SwView::SetMoveType( nMoveType ); css::uno::Sequence< css::beans::PropertyValue > aArgs; - -/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call. -This instance may be deleted in the meantime (i.e. when a dialog is opened -while in Dispatch()), accessing members will crash in this case. */ -ReleaseFocus_Impl(); - m_pCtrl->dispatchCommand( aArgs ); } @@ -767,14 +761,10 @@ bool NavElementBox_Base::DoKeyInput(const KeyEvent& rKEvt) } case KEY_RETURN: { -bHandled = true; +m_bRelease = false; SelectHdl(*m_xWidget); break; } -case KEY_ESCAPE: -ReleaseFocus_Impl(); -bHandled = true; -break; } return bHandled; @@ -782,6 +772,11 @@ bool NavElementBox_Base::DoKeyInput(const KeyEvent& rKEvt) bool NavElementBox_Impl::DoKeyInput(const KeyEvent& rKEvt) { +if (KEY_ESCAPE == rKEvt.GetKeyCode().GetCode()) +{ +ReleaseFocus_Impl(); +return true; +} return NavElementBox_Base::DoKeyInput(rKEvt) || ChildKeyInput(rKEvt); } diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index fad3aa2a4a2c..2ac47cd7efb7 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2028,11 +2028,11 @@ void SwContentTree::Display( bool bActive ) m_bIsLastReadOnly = bReadOnly; bool bDisable = pShell == nullptr || bReadOnly; SwNavigationPI* pNavi = GetParentWindow(); -pNavi->m_xContent3ToolBox->set_item_sensitive("chapterup", !bDisable); -
[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/UIConfig_swriter.mk |1 sw/source/core/crsr/DateFormFieldButton.cxx | 63 +++- sw/uiconfig/swriter/ui/calendar.ui | 25 +++ 3 files changed, 70 insertions(+), 19 deletions(-) New commits: commit 1b96a96d4a3236fe4b2dcef08b85330a328060ec Author: Caolán McNamara AuthorDate: Sun Jun 21 17:44:08 2020 +0100 Commit: Caolán McNamara CommitDate: Sun Jun 21 21:14:55 2020 +0200 weld date selection widget Change-Id: If7ea24d85c20f1bda972688e97c7f74b26e533e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96817 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index f8727a015b82..366c1ed19854 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -104,6 +104,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/bibliofragment \ sw/uiconfig/swriter/ui/bulletsandnumbering \ sw/uiconfig/swriter/ui/businessdatapage \ + sw/uiconfig/swriter/ui/calendar \ sw/uiconfig/swriter/ui/cannotsavelabeldialog \ sw/uiconfig/swriter/ui/captiondialog \ sw/uiconfig/swriter/ui/captionoptions \ diff --git a/sw/source/core/crsr/DateFormFieldButton.cxx b/sw/source/core/crsr/DateFormFieldButton.cxx index d5c44f121f42..2d4b66815daf 100644 --- a/sw/source/core/crsr/DateFormFieldButton.cxx +++ b/sw/source/core/crsr/DateFormFieldButton.cxx @@ -11,20 +11,40 @@ #include #include #include -#include +#include #include #include namespace { +class SwCalendarBox final : public InterimItemWindow +{ +private: +std::unique_ptr m_xCalendar; + +public: +SwCalendarBox(vcl::Window* pParent) +: InterimItemWindow(pParent, "modules/swriter/ui/calendar.ui", "Calendar") +, m_xCalendar(m_xBuilder->weld_calendar("date")) +{ +} +weld::Calendar& get_widget() { return *m_xCalendar; } +virtual ~SwCalendarBox() override { disposeOnce(); } +virtual void dispose() override +{ +m_xCalendar.reset(); +InterimItemWindow::dispose(); +} +}; + class SwDatePickerDialog : public FloatingWindow { private: -VclPtr m_pCalendar; +VclPtr m_xCalendar; sw::mark::DateFieldmark* m_pFieldmark; SvNumberFormatter* m_pNumberFormatter; -DECL_LINK(ImplSelectHdl, Calendar*, void); +DECL_LINK(ImplSelectHdl, weld::Calendar&, void); public: SwDatePickerDialog(SwEditWin* parent, sw::mark::DateFieldmark* pFieldmark, @@ -37,45 +57,50 @@ public: SwDatePickerDialog::SwDatePickerDialog(SwEditWin* parent, sw::mark::DateFieldmark* pFieldmark, SvNumberFormatter* pNumberFormatter) : FloatingWindow(parent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW) -, m_pCalendar(VclPtr::Create(this, WB_TABSTOP)) +, m_xCalendar(VclPtr::Create(this)) , m_pFieldmark(pFieldmark) , m_pNumberFormatter(pNumberFormatter) { +weld::Calendar& rCalendar = m_xCalendar->get_widget(); + if (m_pFieldmark != nullptr) { std::pair aResult = m_pFieldmark->GetCurrentDate(); if (aResult.first) { const Date& rNullDate = m_pNumberFormatter->GetNullDate(); -m_pCalendar->SetCurDate(rNullDate + sal_Int32(aResult.second)); +rCalendar.set_date(rNullDate + sal_Int32(aResult.second)); } } -m_pCalendar->SetSelectHdl(LINK(this, SwDatePickerDialog, ImplSelectHdl)); -m_pCalendar->SetOutputSizePixel(m_pCalendar->CalcWindowSizePixel()); -m_pCalendar->Show(); -SetOutputSizePixel(m_pCalendar->GetSizePixel()); + +Size lbSize(rCalendar.get_preferred_size()); + +m_xCalendar->SetSizePixel(lbSize); +rCalendar.connect_activated(LINK(this, SwDatePickerDialog, ImplSelectHdl)); +m_xCalendar->Show(); + +rCalendar.grab_focus(); + +SetSizePixel(lbSize); } SwDatePickerDialog::~SwDatePickerDialog() { disposeOnce(); } void SwDatePickerDialog::dispose() { -m_pCalendar.clear(); +m_xCalendar.disposeAndClear(); FloatingWindow::dispose(); } -IMPL_LINK(SwDatePickerDialog, ImplSelectHdl, Calendar*, pCalendar, void) +IMPL_LINK(SwDatePickerDialog, ImplSelectHdl, weld::Calendar&, rCalendar, void) { -if (!pCalendar->IsTravelSelect()) +if (m_pFieldmark != nullptr) { -if (m_pFieldmark != nullptr) -{ -const Date& rNullDate = m_pNumberFormatter->GetNullDate(); -double dDate = pCalendar->GetFirstSelectedDate() - rNullDate; -m_pFieldmark->SetCurrentDate(dDate); -} -EndPopupMode(); +const Date& rNullDate = m_pNumberFormatter->GetNullDate(); +double dDate = rCalendar.get_date() - rNullDate; +m_pFieldmark->SetCurrentDate(dDate); } +EndPopupMode(); } DateFormFieldButton::DateFormFieldButton(SwEditWin* pEditWin, sw::mark::DateFieldmark& rFieldmark, diff --git
[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/UIConfig_swriter.mk |1 sw/source/core/crsr/DropDownFormFieldButton.cxx | 96 +++- sw/uiconfig/swriter/ui/formdropdown.ui | 61 +++ 3 files changed, 125 insertions(+), 33 deletions(-) New commits: commit d5bae5b7954a9e6b3cdaccc318080be8d9ae6672 Author: Caolán McNamara AuthorDate: Mon May 25 21:35:10 2020 +0100 Commit: Caolán McNamara CommitDate: Tue May 26 16:39:58 2020 +0200 weld SwFieldListBox Change-Id: I205ce5b300d869d6424c3552a2799c3b02282ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94810 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index ea417c9bfb65..f8727a015b82 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -150,6 +150,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/floatingsync \ sw/uiconfig/swriter/ui/formatsectiondialog \ sw/uiconfig/swriter/ui/formattablepage \ + sw/uiconfig/swriter/ui/formdropdown \ sw/uiconfig/swriter/ui/footendnotedialog \ sw/uiconfig/swriter/ui/footnotepage \ sw/uiconfig/swriter/ui/footnoteareapage \ diff --git a/sw/source/core/crsr/DropDownFormFieldButton.cxx b/sw/source/core/crsr/DropDownFormFieldButton.cxx index 249bd22100ed..a110ac3f064b 100644 --- a/sw/source/core/crsr/DropDownFormFieldButton.cxx +++ b/sw/source/core/crsr/DropDownFormFieldButton.cxx @@ -11,7 +11,9 @@ #include #include #include -#include +#include +#include +#include #include #include #include @@ -20,6 +22,26 @@ namespace { +class SwFieldListBox final : public InterimItemWindow +{ +private: +std::unique_ptr m_xTreeView; + +public: +SwFieldListBox(vcl::Window* pParent) +: InterimItemWindow(pParent, "modules/swriter/ui/formdropdown.ui", "FormDropDown") +, m_xTreeView(m_xBuilder->weld_tree_view("list")) +{ +} +weld::TreeView& get_widget() { return *m_xTreeView; } +virtual ~SwFieldListBox() override { disposeOnce(); } +virtual void dispose() override +{ +m_xTreeView.reset(); +InterimItemWindow::dispose(); +} +}; + /** * Popup dialog for drop-down form field showing the list items of the field. * The user can select the item using this popup while filling in a form. @@ -27,10 +49,10 @@ namespace class SwFieldDialog : public FloatingWindow { private: -VclPtr m_aListBox; +VclPtr m_xListBox; sw::mark::IFieldmark* m_pFieldmark; -DECL_LINK(MyListBoxHandler, ListBox&, void); +DECL_LINK(MyListBoxHandler, weld::TreeView&, bool); public: SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, long nMinListWidth); @@ -41,9 +63,11 @@ public: SwFieldDialog::SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, long nMinListWidth) : FloatingWindow(parent, WB_BORDER | WB_SYSTEMWINDOW) -, m_aListBox(VclPtr::Create(this)) +, m_xListBox(VclPtr::Create(this)) , m_pFieldmark(fieldBM) { +weld::TreeView& rTreeView = m_xListBox->get_widget(); + if (fieldBM != nullptr) { const sw::mark::IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters(); @@ -56,12 +80,12 @@ SwFieldDialog::SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, l { pListEntries->second >>= vListEntries; for (OUString const& i : std::as_const(vListEntries)) -m_aListBox->InsertEntry(i); +rTreeView.append_text(i); } if (!vListEntries.hasElements()) { -m_aListBox->InsertEntry(SwResId(STR_DROP_DOWN_EMPTY_LIST)); +rTreeView.append_text(SwResId(STR_DROP_DOWN_EMPTY_LIST)); } // Select the current one @@ -72,17 +96,24 @@ SwFieldDialog::SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, l { sal_Int32 nSelection = -1; pResult->second >>= nSelection; -m_aListBox->SelectEntryPos(nSelection); +rTreeView.set_cursor(nSelection); +rTreeView.select(nSelection); } } -Size lbSize(m_aListBox->GetOptimalSize()); -lbSize.AdjustWidth(50); -lbSize.AdjustHeight(20); +auto nHeight = rTreeView.get_height_rows( + std::min(Application::GetSettings().GetStyleSettings().GetListBoxMaximumLineCount(), + rTreeView.n_children())); +rTreeView.set_size_request(-1, nHeight); +Size lbSize(rTreeView.get_preferred_size()); +lbSize.AdjustWidth(4); +lbSize.AdjustHeight(4); lbSize.setWidth(std::max(lbSize.Width(), nMinListWidth)); -m_aListBox->SetSizePixel(lbSize); -m_aListBox->SetSelectHdl(LINK(this, SwFieldDialog, MyListBoxHandler)); -m_aListBox->Show(); +m_xListBox->SetSizePixel(lbSize); +rTreeView.connect_row_activated(LINK(this, SwFieldDialog,
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/table/instable.cxx |5 + sw/source/uibase/inc/instable.hxx |1 + sw/uiconfig/swriter/ui/inserttable.ui |2 +- 3 files changed, 7 insertions(+), 1 deletion(-) New commits: commit d87d43c70861fc6c017b434b296f5177c2c86026 Author: Szymon Kłos AuthorDate: Thu May 21 16:33:32 2020 +0200 Commit: Szymon Kłos CommitDate: Fri May 22 10:29:02 2020 +0200 Don't show styles frame in insert table in online Change-Id: I2ee2daef028b49a409920c0fe83190575e7a82c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94639 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94657 Tested-by: Jenkins diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index d83c78641e46..3ca34f37b313 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #define ROW_COL_PROD 16384 @@ -75,7 +76,11 @@ SwInsTableDlg::SwInsTableDlg(SwView& rView) , m_xInsertBtn(m_xBuilder->weld_button("ok")) , m_xLbFormat(m_xBuilder->weld_tree_view("formatlbinstable")) , m_xWndPreview(new weld::CustomWeld(*m_xBuilder, "previewinstable", m_aWndPreview)) +, m_xStyleFrame(m_xBuilder->weld_frame("stylesframe")) { +if (comphelper::LibreOfficeKit::isActive()) +m_xStyleFrame->hide(); + const int nWidth = m_xLbFormat->get_approximate_digit_width() * 32; const int nHeight = m_xLbFormat->get_height_rows(8); m_xLbFormat->set_size_request(nWidth, nHeight); diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx index 3145227e84a1..aa36dc655c00 100644 --- a/sw/source/uibase/inc/instable.hxx +++ b/sw/source/uibase/inc/instable.hxx @@ -58,6 +58,7 @@ class SwInsTableDlg : public SfxDialogController std::unique_ptr m_xInsertBtn; std::unique_ptr m_xLbFormat; std::unique_ptr m_xWndPreview; +std::unique_ptr m_xStyleFrame; // Returns 255 if mapping is not possible. // This means there cannot be more than 255 autotable style. diff --git a/sw/uiconfig/swriter/ui/inserttable.ui b/sw/uiconfig/swriter/ui/inserttable.ui index 03a2eb096a91..64cfab916932 100644 --- a/sw/uiconfig/swriter/ui/inserttable.ui +++ b/sw/uiconfig/swriter/ui/inserttable.ui @@ -366,7 +366,7 @@ - + True False True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/UIConfig_swriter.mk |1 sw/source/ui/dialog/wordcountdialog.cxx| 12 sw/source/uibase/inc/wordcountdialog.hxx |2 sw/uiconfig/swriter/ui/wordcount-mobile.ui | 661 + 4 files changed, 675 insertions(+), 1 deletion(-) New commits: commit 6f579657fb2f2430f4f2a1072f7256d061610a64 Author: Szymon Kłos AuthorDate: Mon Feb 24 19:10:52 2020 +0100 Commit: Szymon Kłos CommitDate: Fri Feb 28 08:59:26 2020 +0100 Add mobile version of WordCountDialog Change-Id: Icf8d8b0993d8d307925a28cae4a178c0c4bde48a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89376 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 14d8eba7c615..872de3c9912e 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -296,6 +296,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/warnemaildialog \ sw/uiconfig/swriter/ui/watermarkdialog \ sw/uiconfig/swriter/ui/wordcount \ + sw/uiconfig/swriter/ui/wordcount-mobile \ sw/uiconfig/swriter/ui/wrapdialog \ sw/uiconfig/swriter/ui/wrappage \ sw/uiconfig/swriter/ui/zoombox \ diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index 7dc7370f4b82..77e5e0d851af 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -28,6 +28,10 @@ #include #include #include +#include +#include + +#define IS_MOBILE (comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) SwWordCountFloatDlg::~SwWordCountFloatDlg() { @@ -82,6 +86,8 @@ void SwWordCountFloatDlg::showCJK(bool bShowCJK) { m_xCurrentCjkcharsFT->set_visible(bShowCJK); m_xDocCjkcharsFT->set_visible(bShowCJK); +if (m_xCjkcharsLabelFT2) +m_xCjkcharsLabelFT2->set_visible(bShowCJK); m_xCjkcharsLabelFT->set_visible(bShowCJK); } @@ -89,6 +95,8 @@ void SwWordCountFloatDlg::showStandardizedPages(bool bShowStandardizedPages) { m_xCurrentStandardizedPagesFT->set_visible(bShowStandardizedPages); m_xDocStandardizedPagesFT->set_visible(bShowStandardizedPages); +if (m_xStandardizedPagesLabelFT2) +m_xStandardizedPagesLabelFT2->set_visible(bShowStandardizedPages); m_xStandardizedPagesLabelFT->set_visible(bShowStandardizedPages); } @@ -96,7 +104,7 @@ SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings, SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo const * pInfo) -: SfxModelessDialogController(_pBindings, pChild, pParent, "modules/swriter/ui/wordcount.ui", "WordCountDialog") +: SfxModelessDialogController(_pBindings, pChild, pParent, IS_MOBILE ? OUString("modules/swriter/ui/wordcount-mobile.ui") : OUString("modules/swriter/ui/wordcount.ui"), "WordCountDialog") , m_xCurrentWordFT(m_xBuilder->weld_label("selectwords")) , m_xCurrentCharacterFT(m_xBuilder->weld_label("selectchars")) , m_xCurrentCharacterExcludingSpacesFT(m_xBuilder->weld_label("selectcharsnospaces")) @@ -108,7 +116,9 @@ SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings, , m_xDocCjkcharsFT(m_xBuilder->weld_label("doccjkchars")) , m_xDocStandardizedPagesFT(m_xBuilder->weld_label("docstandardizedpages")) , m_xCjkcharsLabelFT(m_xBuilder->weld_label("cjkcharsft")) +, m_xCjkcharsLabelFT2(m_xBuilder->weld_label("cjkcharsft2")) , m_xStandardizedPagesLabelFT(m_xBuilder->weld_label("standardizedpages")) +, m_xStandardizedPagesLabelFT2(m_xBuilder->weld_label("standardizedpages2")) { showCJK(SvtCJKOptions().IsAnyEnabled()); showStandardizedPages(officecfg::Office::Writer::WordCount::ShowStandardizedPageCount::get()); diff --git a/sw/source/uibase/inc/wordcountdialog.hxx b/sw/source/uibase/inc/wordcountdialog.hxx index 5a8ae3d522d2..dafc87ea0913 100644 --- a/sw/source/uibase/inc/wordcountdialog.hxx +++ b/sw/source/uibase/inc/wordcountdialog.hxx @@ -40,7 +40,9 @@ class SwWordCountFloatDlg : public SfxModelessDialogController std::unique_ptr m_xDocCjkcharsFT; std::unique_ptr m_xDocStandardizedPagesFT; std::unique_ptr m_xCjkcharsLabelFT; +std::unique_ptr m_xCjkcharsLabelFT2; std::unique_ptr m_xStandardizedPagesLabelFT; +std::unique_ptr m_xStandardizedPagesLabelFT2; public: SwWordCountFloatDlg(SfxBindings* pBindings, diff --git a/sw/uiconfig/swriter/ui/wordcount-mobile.ui b/sw/uiconfig/swriter/ui/wordcount-mobile.ui new file mode 100644 index ..37129797d11d --- /dev/null +++ b/sw/uiconfig/swriter/ui/wordcount-mobile.ui @@ -0,0 +1,661 @@ + + + + + +False +6 +Word Count +0 +0 +True +dialog + + +False +vertical +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 12 sw/source/uibase/sidebar/WrapPropertyPanel.hxx |7 ++- sw/uiconfig/swriter/ui/sidebarwrap.ui | 18 ++ 3 files changed, 8 insertions(+), 29 deletions(-) New commits: commit f8e3f728e87b30fadd8b392b002f1cab5967fe10 Author: Caolán McNamara AuthorDate: Wed Feb 26 20:11:05 2020 + Commit: Caolán McNamara CommitDate: Thu Feb 27 09:50:59 2020 +0100 tdf#130933 wraptools are berserk probably a regression from... commit a22de0aacc9fb4197e9051f572b1a9298b2472e2 Date: Thu Jan 23 23:34:59 2020 +0100 tdf#130096 Wrap Sidebar update use common .uno commands and layout because there were two toolbars with radiobuttons each toolbar has to have one active radiobutton so they fight it out toggling on and off when attempting to make one toolbar with all inactive radiobuttons Change-Id: Iafe70dc1328ad80744cb4569365e25bf5eba6b53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89596 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 78f81372841f..e0770cba03d4 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -71,10 +71,8 @@ WrapPropertyPanel::WrapPropertyPanel( // controller items , maSwLRSpacingControl(SID_ATTR_LRSPACE, *pBindings, *this) , maSwULSpacingControl(SID_ATTR_ULSPACE, *pBindings, *this) -, mxWrapOptions1(m_xBuilder->weld_toolbar("wrapoptions1")) -, mxWrapOptions1Dispatch(new ToolbarUnoDispatcher(*mxWrapOptions1, rxFrame)) -, mxWrapOptions2(m_xBuilder->weld_toolbar("wrapoptions2")) -, mxWrapOptions2Dispatch(new ToolbarUnoDispatcher(*mxWrapOptions2, rxFrame)) +, mxWrapOptions(m_xBuilder->weld_toolbar("wrapoptions")) +, mxWrapOptionsDispatch(new ToolbarUnoDispatcher(*mxWrapOptions, rxFrame)) , mxSpacingLB(m_xBuilder->weld_combo_box("spacingLB")) { FieldUnit eMetric = ::GetDfltMetric(false); @@ -92,10 +90,8 @@ void WrapPropertyPanel::dispose() { mxSpacingLB.reset(); -mxWrapOptions2Dispatch.reset(); -mxWrapOptions2.reset(); -mxWrapOptions1Dispatch.reset(); -mxWrapOptions1.reset(); +mxWrapOptionsDispatch.reset(); +mxWrapOptions.reset(); maSwLRSpacingControl.dispose(); maSwULSpacingControl.dispose(); diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx index befe9dd181f2..d0934743c4fe 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx @@ -66,11 +66,8 @@ namespace sw { namespace sidebar { ::sfx2::sidebar::ControllerItem maSwLRSpacingControl; ::sfx2::sidebar::ControllerItem maSwULSpacingControl; -std::unique_ptr mxWrapOptions1; -std::unique_ptr mxWrapOptions1Dispatch; - -std::unique_ptr mxWrapOptions2; -std::unique_ptr mxWrapOptions2Dispatch; +std::unique_ptr mxWrapOptions; +std::unique_ptr mxWrapOptionsDispatch; std::unique_ptr mxSpacingLB; diff --git a/sw/uiconfig/swriter/ui/sidebarwrap.ui b/sw/uiconfig/swriter/ui/sidebarwrap.ui index 1cf1609acb95..b48338b6bb6b 100644 --- a/sw/uiconfig/swriter/ui/sidebarwrap.ui +++ b/sw/uiconfig/swriter/ui/sidebarwrap.ui @@ -60,7 +60,7 @@ False end - + True False icons @@ -105,20 +105,6 @@ False - - -False -True -0 - - - - -True -False -icons -False -2 True @@ -162,7 +148,7 @@ False True -1 +0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dialog/wordcountdialog.cxx | 41 - sw/source/uibase/inc/wordcountdialog.hxx |8 sw/uiconfig/swriter/ui/wordcount.ui | 720 +-- 3 files changed, 129 insertions(+), 640 deletions(-) New commits: commit 189c8a7caba5f7bf31c8bab96f6ca0a6aa8a8066 Author: Szymon Kłos AuthorDate: Mon Feb 24 19:08:09 2020 +0100 Commit: Szymon Kłos CommitDate: Tue Feb 25 13:16:37 2020 +0100 Revert "WordCountDIalog in vertical mobile version" This reverts commit 4ab0993f2537fade3c02b788508519070f44ebb8. This reverts commit 542f509a41cf0cae7fca0660ba3858c6b0e9bf52. Change-Id: I25a96f672ab83c14b806c24fb2f9397679775f3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89375 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index 5e4b3aa0208d..7dc7370f4b82 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -28,10 +28,6 @@ #include #include #include -#include -#include - -#define IS_MOBILE (comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) SwWordCountFloatDlg::~SwWordCountFloatDlg() { @@ -87,8 +83,6 @@ void SwWordCountFloatDlg::showCJK(bool bShowCJK) m_xCurrentCjkcharsFT->set_visible(bShowCJK); m_xDocCjkcharsFT->set_visible(bShowCJK); m_xCjkcharsLabelFT->set_visible(bShowCJK); -if (m_xCjkcharsLabel2FT.get()) -m_xCjkcharsLabel2FT->set_visible(bShowCJK); } void SwWordCountFloatDlg::showStandardizedPages(bool bShowStandardizedPages) @@ -96,8 +90,6 @@ void SwWordCountFloatDlg::showStandardizedPages(bool bShowStandardizedPages) m_xCurrentStandardizedPagesFT->set_visible(bShowStandardizedPages); m_xDocStandardizedPagesFT->set_visible(bShowStandardizedPages); m_xStandardizedPagesLabelFT->set_visible(bShowStandardizedPages); -if (m_xStandardizedPagesLabel2FT.get()) -m_xStandardizedPagesLabel2FT->set_visible(bShowStandardizedPages); } SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings, @@ -105,42 +97,19 @@ SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings, weld::Window *pParent, SfxChildWinInfo const * pInfo) : SfxModelessDialogController(_pBindings, pChild, pParent, "modules/swriter/ui/wordcount.ui", "WordCountDialog") -, m_xCloseButton(m_xBuilder->weld_button("close")) -, m_xHelpButton(m_xBuilder->weld_button("help")) -, m_xDocumentLabelFT(m_xBuilder->weld_label(IS_MOBILE ? "documentlabel-mobile" : "documentlabel")) -, m_xWordsLabelFT(m_xBuilder->weld_label(IS_MOBILE ? "wordslabel-mobile" : "wordslabel")) -, m_xIncludingSpacesLabelFT(m_xBuilder->weld_label(IS_MOBILE ? "inclspaceslabel-mobile" : "inclspaceslabel")) -, m_xExcludingSpacesLabelFT(m_xBuilder->weld_label(IS_MOBILE ? "exclspaceslabel-mobile" : "exclspaceslabel")) , m_xCurrentWordFT(m_xBuilder->weld_label("selectwords")) , m_xCurrentCharacterFT(m_xBuilder->weld_label("selectchars")) , m_xCurrentCharacterExcludingSpacesFT(m_xBuilder->weld_label("selectcharsnospaces")) , m_xCurrentCjkcharsFT(m_xBuilder->weld_label("selectcjkchars")) , m_xCurrentStandardizedPagesFT(m_xBuilder->weld_label("selectstandardizedpages")) -, m_xDocWordFT(m_xBuilder->weld_label(IS_MOBILE ? "docwords-mobile" : "docwords")) -, m_xDocCharacterFT(m_xBuilder->weld_label(IS_MOBILE ? "docchars-mobile" : "docchars")) -, m_xDocCharacterExcludingSpacesFT(m_xBuilder->weld_label(IS_MOBILE ? "doccharsnospaces-mobile" : "doccharsnospaces")) -, m_xDocCjkcharsFT(m_xBuilder->weld_label(IS_MOBILE ? "doccjkchars-mobile" : "doccjkchars")) -, m_xDocStandardizedPagesFT(m_xBuilder->weld_label(IS_MOBILE ? "docstandardizedpages-mobile" : "docstandardizedpages")) +, m_xDocWordFT(m_xBuilder->weld_label("docwords")) +, m_xDocCharacterFT(m_xBuilder->weld_label("docchars")) +, m_xDocCharacterExcludingSpacesFT(m_xBuilder->weld_label("doccharsnospaces")) +, m_xDocCjkcharsFT(m_xBuilder->weld_label("doccjkchars")) +, m_xDocStandardizedPagesFT(m_xBuilder->weld_label("docstandardizedpages")) , m_xCjkcharsLabelFT(m_xBuilder->weld_label("cjkcharsft")) -, m_xCjkcharsLabel2FT(IS_MOBILE ? m_xBuilder->weld_label("cjkcharsft2") : nullptr) , m_xStandardizedPagesLabelFT(m_xBuilder->weld_label("standardizedpages")) -, m_xStandardizedPagesLabel2FT(IS_MOBILE ? m_xBuilder->weld_label("standardizedpages2") : nullptr) { -if (IS_MOBILE) -{ -m_xCloseButton->set_visible(false); -m_xHelpButton->set_visible(false); -} - -m_xDocumentLabelFT->show(); -m_xDocWordFT->show(); -m_xDocCharacterFT->show(); -m_xDocCharacterExcludingSpacesFT->show(); - -m_xWordsLabelFT->show(); -m_xIncludingSpacesLabelFT->show();
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dialog/wordcountdialog.cxx | 41 ++ sw/source/uibase/inc/wordcountdialog.hxx |8 + sw/uiconfig/swriter/ui/wordcount.ui | 184 --- 3 files changed, 216 insertions(+), 17 deletions(-) New commits: commit 4ab0993f2537fade3c02b788508519070f44ebb8 Author: Szymon Kłos AuthorDate: Thu Feb 20 11:24:05 2020 +0100 Commit: Szymon Kłos CommitDate: Sun Feb 23 22:05:01 2020 +0100 WordCountDIalog in vertical mobile version Change-Id: I335bee6fd03c202cb7e82b3205a92b48f5e861a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89204 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index 7dc7370f4b82..5e4b3aa0208d 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -28,6 +28,10 @@ #include #include #include +#include +#include + +#define IS_MOBILE (comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) SwWordCountFloatDlg::~SwWordCountFloatDlg() { @@ -83,6 +87,8 @@ void SwWordCountFloatDlg::showCJK(bool bShowCJK) m_xCurrentCjkcharsFT->set_visible(bShowCJK); m_xDocCjkcharsFT->set_visible(bShowCJK); m_xCjkcharsLabelFT->set_visible(bShowCJK); +if (m_xCjkcharsLabel2FT.get()) +m_xCjkcharsLabel2FT->set_visible(bShowCJK); } void SwWordCountFloatDlg::showStandardizedPages(bool bShowStandardizedPages) @@ -90,6 +96,8 @@ void SwWordCountFloatDlg::showStandardizedPages(bool bShowStandardizedPages) m_xCurrentStandardizedPagesFT->set_visible(bShowStandardizedPages); m_xDocStandardizedPagesFT->set_visible(bShowStandardizedPages); m_xStandardizedPagesLabelFT->set_visible(bShowStandardizedPages); +if (m_xStandardizedPagesLabel2FT.get()) +m_xStandardizedPagesLabel2FT->set_visible(bShowStandardizedPages); } SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings, @@ -97,19 +105,42 @@ SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings, weld::Window *pParent, SfxChildWinInfo const * pInfo) : SfxModelessDialogController(_pBindings, pChild, pParent, "modules/swriter/ui/wordcount.ui", "WordCountDialog") +, m_xCloseButton(m_xBuilder->weld_button("close")) +, m_xHelpButton(m_xBuilder->weld_button("help")) +, m_xDocumentLabelFT(m_xBuilder->weld_label(IS_MOBILE ? "documentlabel-mobile" : "documentlabel")) +, m_xWordsLabelFT(m_xBuilder->weld_label(IS_MOBILE ? "wordslabel-mobile" : "wordslabel")) +, m_xIncludingSpacesLabelFT(m_xBuilder->weld_label(IS_MOBILE ? "inclspaceslabel-mobile" : "inclspaceslabel")) +, m_xExcludingSpacesLabelFT(m_xBuilder->weld_label(IS_MOBILE ? "exclspaceslabel-mobile" : "exclspaceslabel")) , m_xCurrentWordFT(m_xBuilder->weld_label("selectwords")) , m_xCurrentCharacterFT(m_xBuilder->weld_label("selectchars")) , m_xCurrentCharacterExcludingSpacesFT(m_xBuilder->weld_label("selectcharsnospaces")) , m_xCurrentCjkcharsFT(m_xBuilder->weld_label("selectcjkchars")) , m_xCurrentStandardizedPagesFT(m_xBuilder->weld_label("selectstandardizedpages")) -, m_xDocWordFT(m_xBuilder->weld_label("docwords")) -, m_xDocCharacterFT(m_xBuilder->weld_label("docchars")) -, m_xDocCharacterExcludingSpacesFT(m_xBuilder->weld_label("doccharsnospaces")) -, m_xDocCjkcharsFT(m_xBuilder->weld_label("doccjkchars")) -, m_xDocStandardizedPagesFT(m_xBuilder->weld_label("docstandardizedpages")) +, m_xDocWordFT(m_xBuilder->weld_label(IS_MOBILE ? "docwords-mobile" : "docwords")) +, m_xDocCharacterFT(m_xBuilder->weld_label(IS_MOBILE ? "docchars-mobile" : "docchars")) +, m_xDocCharacterExcludingSpacesFT(m_xBuilder->weld_label(IS_MOBILE ? "doccharsnospaces-mobile" : "doccharsnospaces")) +, m_xDocCjkcharsFT(m_xBuilder->weld_label(IS_MOBILE ? "doccjkchars-mobile" : "doccjkchars")) +, m_xDocStandardizedPagesFT(m_xBuilder->weld_label(IS_MOBILE ? "docstandardizedpages-mobile" : "docstandardizedpages")) , m_xCjkcharsLabelFT(m_xBuilder->weld_label("cjkcharsft")) +, m_xCjkcharsLabel2FT(IS_MOBILE ? m_xBuilder->weld_label("cjkcharsft2") : nullptr) , m_xStandardizedPagesLabelFT(m_xBuilder->weld_label("standardizedpages")) +, m_xStandardizedPagesLabel2FT(IS_MOBILE ? m_xBuilder->weld_label("standardizedpages2") : nullptr) { +if (IS_MOBILE) +{ +m_xCloseButton->set_visible(false); +m_xHelpButton->set_visible(false); +} + +m_xDocumentLabelFT->show(); +m_xDocWordFT->show(); +m_xDocCharacterFT->show(); +m_xDocCharacterExcludingSpacesFT->show(); + +m_xWordsLabelFT->show(); +m_xIncludingSpacesLabelFT->show(); +m_xExcludingSpacesLabelFT->show(); + showCJK(SvtCJKOptions().IsAnyEnabled());
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/navipi.hxx | 29 -- sw/source/uibase/inc/workctrl.hxx | 67 + sw/source/uibase/ribbar/workctrl.cxx| 330 +--- sw/source/uibase/sidebar/SwPanelFactory.cxx |2 sw/source/uibase/uiview/view2.cxx |1 sw/source/uibase/utlui/navipi.cxx | 93 ++- sw/uiconfig/swriter/ui/navigatorpanel.ui| 120 -- 7 files changed, 127 insertions(+), 515 deletions(-) New commits: commit 350bf42540ff810a142538c5fd8ec2a78d430091 Author: Jim Raykowski AuthorDate: Fri Jan 17 21:19:08 2020 -0900 Commit: Jim Raykowski CommitDate: Fri Feb 14 05:37:00 2020 +0100 tdf#89566 Replace navigation toolbox in Writer navigator Replaces the navigation toolbox with the navigate by elements control. Change-Id: Idba18e63ac29f37d8e614b6459ea67b71b65c885 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87005 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 2c14d9aea412..103dd6ac6255 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "conttree.hxx" #include @@ -39,25 +40,12 @@ class SwNavigationChild; class SfxBindings; class NumEditAction; class SwNavigationConfig; -class SwScrollNaviPopup; class SwView; class SfxObjectShellLock; class SfxChildWindowContext; enum class RegionMode; class SpinField; -class NaviStateListener final : public SfxControllerItem -{ -private: -VclPtr m_xNavigation; -public: -NaviStateListener(SfxBindings& rBindings, SwNavigationPI* pNavigation); -virtual ~NaviStateListener() override; - -virtual voidStateChanged(sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState) override; -}; - class SwNavigationPI : public PanelLayout, public SfxControllerItem, public SfxListener { @@ -66,8 +54,7 @@ class SwNavigationPI : public PanelLayout, friend class SwGlobalTree; friend class SwNavigationPIUIObject; -VclPtrm_aContentToolBox; -std::unique_ptr m_xNaviListener; +VclPtr m_aContentToolBox; VclPtr m_aGlobalToolBox; VclPtr m_xEdit; VclPtrm_aContentBox; @@ -85,7 +72,6 @@ class SwNavigationPI : public PanelLayout, SwWrtShell *m_pContentWrtShell; SwView *m_pActContView; SwView *m_pCreateView; -VclPtr m_xPopupWindow; SwNavigationConfig *m_pConfig; SfxBindings _rBindings; @@ -114,8 +100,6 @@ class SwNavigationPI : public PanelLayout, DECL_LINK( PageEditModifyHdl, SpinField&, void ); void UsePage(); -void SetPopupWindow( SwScrollNaviPopup* ); - protected: // release ObjectShellLock early enough for app end @@ -127,7 +111,12 @@ protected: public: -SwNavigationPI(SfxBindings*, vcl::Window*); +static VclPtr Create(vcl::Window* pParent, +const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame, +SfxBindings* pBindings); +SwNavigationPI(vcl::Window* pParent, +const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame, +SfxBindings* _pBindings); virtual ~SwNavigationPI() override; virtual voiddispose() override; @@ -154,8 +143,6 @@ public: SwView* GetCreateView() const; voidCreateNavigationTool(); -voidNaviStateChanged(); - FactoryFunction GetUITestFactory() const override; }; diff --git a/sw/source/uibase/inc/workctrl.hxx b/sw/source/uibase/inc/workctrl.hxx index 64b0d3c6a756..dd359b63a30a 100644 --- a/sw/source/uibase/inc/workctrl.hxx +++ b/sw/source/uibase/inc/workctrl.hxx @@ -28,29 +28,25 @@ class SwView; // double entry! hrc and hxx // these Ids say what the buttons below the scrollbar are doing #define NID_START 2 -#define NID_NEXT2 -#define NID_PREV20001 -#define NID_TBL 20002 -#define NID_FRM 20003 -#define NID_PGE 20004 -#define NID_DRW 20005 -#define NID_CTRL20006 -#define NID_REG 20007 -#define NID_BKM 20008 -#define NID_GRF 20009 -#define NID_OLE 20010 -#define NID_OUTL20011 -#define NID_SEL 20012 -#define NID_FTN 20013 -#define NID_MARK20014 -#define NID_POSTIT 20015 -#define NID_SRCH_REP 20016 -#define NID_INDEX_ENTRY 20017 -#define NID_TABLE_FORMULA 20018 -#define NID_TABLE_FORMULA_ERROR 20019 -#define NID_COUNT 20 - -#define NID_LINE_COUNT 10 +#define NID_TBL 2 +#define NID_FRM 20001 +#define NID_PGE 20002 +#define NID_DRW 20003 +#define NID_CTRL20004 +#define NID_REG 20005 +#define NID_BKM 20006 +#define NID_GRF 20007 +#define NID_OLE 20008 +#define NID_OUTL20009 +#define NID_SEL
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx |4 sw/source/uibase/inc/optpage.hxx|2 ++ sw/uiconfig/swriter/ui/optformataidspage.ui |4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) New commits: commit 8daffb60dd2863878bb04317ca2849d76df01f4b Author: Michael Stahl AuthorDate: Wed Feb 12 14:22:18 2020 +0100 Commit: Michael Stahl CommitDate: Thu Feb 13 10:25:21 2020 +0100 tdf#45589 sw: fix Formatting Aids options page for Writer/Web The pre-existing problem of the lone "tab" label was compounded by the new bookmark label. There is no Insert->Bookmark in Writer/Web so i guess the Bookmark checkbox shouldn't be shown. Change-Id: I5a2348599562bb20d7a8de916d0268a133771a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88535 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 637c583db442..91692bb99b01 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1189,9 +1189,11 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w , m_xSpacesCB(m_xBuilder->weld_check_button("spaces")) , m_xHSpacesCB(m_xBuilder->weld_check_button("nonbreak")) , m_xTabCB(m_xBuilder->weld_check_button("tabs")) +, m_xTabLabel(m_xBuilder->weld_label("tabs_label")) , m_xBreakCB(m_xBuilder->weld_check_button("break")) , m_xCharHiddenCB(m_xBuilder->weld_check_button("hiddentext")) , m_xBookmarkCB(m_xBuilder->weld_check_button("bookmarks")) +, m_xBookmarkLabel(m_xBuilder->weld_label("bookmarks_label")) , m_xDirectCursorFrame(m_xBuilder->weld_frame("directcrsrframe")) , m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff")) , m_xDirectCursorFillMode(m_xBuilder->weld_combo_box("cxDirectCursorFillMode")) @@ -1217,8 +1219,10 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w return; m_xTabCB->hide(); +m_xTabLabel->hide(); m_xCharHiddenCB->hide(); m_xBookmarkCB->hide(); +m_xBookmarkLabel->hide(); m_xDirectCursorFrame->hide(); m_xOnOffCB->hide(); diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 8ba45508a06c..afb2a78d4236 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -225,9 +225,11 @@ class SwShdwCursorOptionsTabPage : public SfxTabPage std::unique_ptr m_xSpacesCB; std::unique_ptr m_xHSpacesCB; std::unique_ptr m_xTabCB; +std::unique_ptr m_xTabLabel; std::unique_ptr m_xBreakCB; std::unique_ptr m_xCharHiddenCB; std::unique_ptr m_xBookmarkCB; +std::unique_ptr m_xBookmarkLabel; std::unique_ptr m_xDirectCursorFrame; std::unique_ptr m_xOnOffCB; diff --git a/sw/uiconfig/swriter/ui/optformataidspage.ui b/sw/uiconfig/swriter/ui/optformataidspage.ui index bba4dae11076..13434e4fee43 100644 --- a/sw/uiconfig/swriter/ui/optformataidspage.ui +++ b/sw/uiconfig/swriter/ui/optformataidspage.ui @@ -185,7 +185,7 @@ - + True False → @@ -207,7 +207,7 @@ - + True False | [ ] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/UIConfig_swriter.mk |1 sw/source/uibase/ribbar/workctrl.cxx | 151 ++- sw/uiconfig/swriter/ui/zoombox.ui| 29 ++ 3 files changed, 128 insertions(+), 53 deletions(-) New commits: commit d74487ec716378e2160ad3538a5fcc787ad9fd2f Author: Caolán McNamara AuthorDate: Thu Feb 6 20:57:19 2020 + Commit: Caolán McNamara CommitDate: Fri Feb 7 13:13:15 2020 +0100 weld SwZoomBox_Impl Change-Id: I3cf7046eeb5bf58afc8d1db06fd50d42c6131d40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88145 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 6431d1063cb3..a1f97fcd7c00 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -292,6 +292,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/wordcount \ sw/uiconfig/swriter/ui/wrapdialog \ sw/uiconfig/swriter/ui/wrappage \ + sw/uiconfig/swriter/ui/zoombox \ )) # vim: set noet sw=4 ts=4: diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 0f16edc98394..4a466ea722b5 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -535,34 +534,61 @@ void SwScrollNaviPopup::CheckItem(sal_uInt16 nNaviId, bool bOn) namespace { -class SwZoomBox_Impl : public ComboBox +class SwZoomBox_Impl final : public InterimItemWindow { +std::unique_ptr m_xWidget; sal_uInt16 const nSlotId; bool bRelease; -public: -SwZoomBox_Impl( -vcl::Window* pParent, -sal_uInt16 nSlot ); +DECL_LINK(SelectHdl, weld::ComboBox&, void); +DECL_LINK(KeyInputHdl, const KeyEvent&, bool); +DECL_LINK(ActivateHdl, weld::ComboBox&, bool); +DECL_LINK(FocusOutHdl, weld::Widget&, void); -protected: -virtual voidSelect() override; -virtual boolEventNotify( NotifyEvent& rNEvt ) override; +void Select(); void ReleaseFocus(); +public: +SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot); + +virtual void dispose() override +{ +m_xWidget.reset(); +InterimItemWindow::dispose(); +} + +void save_value() +{ +m_xWidget->save_value(); +} + +void set_entry_text(const OUString& rText) +{ +m_xWidget->set_entry_text(rText); +} + +virtual ~SwZoomBox_Impl() override +{ +disposeOnce(); +} }; } SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot) -: ComboBox(pParent, WB_HIDE | WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL) +: InterimItemWindow(pParent, "modules/swriter/ui/zoombox.ui", "ZoomBox") +, m_xWidget(m_xBuilder->weld_combo_box("zoom")) , nSlotId(nSlot) , bRelease(true) { -SetHelpId(HID_PVIEW_ZOOM_LB); -SetSizePixel(LogicToPixel(Size(30, 86), MapMode(MapUnit::MapAppFont))); -EnableAutocomplete( false ); +m_xWidget->set_help_id(HID_PVIEW_ZOOM_LB); +m_xWidget->set_entry_completion(false); +m_xWidget->connect_changed(LINK(this, SwZoomBox_Impl, SelectHdl)); +m_xWidget->connect_key_press(LINK(this, SwZoomBox_Impl, KeyInputHdl)); +m_xWidget->connect_entry_activate(LINK(this, SwZoomBox_Impl, ActivateHdl)); +m_xWidget->connect_focus_out(LINK(this, SwZoomBox_Impl, FocusOutHdl)); + const char* const aZoomValues[] = { RID_SVXSTR_ZOOM_25 , RID_SVXSTR_ZOOM_50 , RID_SVXSTR_ZOOM_75 , RID_SVXSTR_ZOOM_100 , @@ -572,15 +598,34 @@ SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot) for(const char* pZoomValue : aZoomValues) { OUString sEntry = SvxResId(pZoomValue); -InsertEntry(sEntry); +m_xWidget->append_text(sEntry); } + +int nWidth = m_xWidget->get_pixel_size(SvxResId(RID_SVXSTR_ZOOM_200)).Width(); +m_xWidget->set_entry_width_chars(std::ceil(nWidth / m_xWidget->get_approximate_digit_width())); + +SetSizePixel(m_xWidget->get_preferred_size()); } -voidSwZoomBox_Impl::Select() +IMPL_LINK(SwZoomBox_Impl, SelectHdl, weld::ComboBox&, rComboBox, void) { -if ( !IsTravelSelect() ) +if (rComboBox.changed_by_menu()) // only when picked from the list +Select(); +} + +IMPL_LINK_NOARG(SwZoomBox_Impl, ActivateHdl, weld::ComboBox&, bool) +{ +Select(); +return true; +} + +void SwZoomBox_Impl::Select() +{ +if( FN_PREVIEW_ZOOM == nSlotId ) { -OUString sEntry = GetText().replaceAll("%", ""); +bool bNonNumeric = true; + +OUString sEntry = m_xWidget->get_active_text().replaceAll("%", ""); SvxZoomItem aZoom(SvxZoomType::PERCENT,100); if(sEntry == SvxResId( RID_SVXSTR_ZOOM_PAGE_WIDTH ) ) aZoom.SetType(SvxZoomType::PAGEWIDTH); @@ -590,6 +635,8 @@ voidSwZoomBox_Impl::Select()
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/inc/navipi.hxx | 13 - sw/source/uibase/inc/workctrl.hxx| 37 +- sw/source/uibase/ribbar/workctrl.cxx | 245 +-- sw/source/uibase/utlui/navipi.cxx| 74 + sw/uiconfig/swriter/ui/floatingnavigation.ui | 341 +-- 5 files changed, 521 insertions(+), 189 deletions(-) New commits: commit 33baa14a1130aed90c232231a1b5fd9120737b96 Author: Caolán McNamara AuthorDate: Wed Jan 15 14:26:24 2020 + Commit: Caolán McNamara CommitDate: Wed Jan 15 20:43:10 2020 +0100 rework SwScrollNaviPopup to be a simple popdown this has never worked right for me, it appears and disappears immediately under gtk3, automatically turns into a floating window under gen rework it to be a simpler non-floating popdown Change-Id: I3d13ddf81c22e0fb9616defd7d0435e9116c0ac7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86874 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 967bdc805161..7bee0d2e0197 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -38,8 +38,9 @@ class SwNavigationPI; class SwNavigationChild; class SfxBindings; class NumEditAction; -class SwView; class SwNavigationConfig; +class SwScrollNaviPopup; +class SwView; class SfxObjectShellLock; class SfxChildWindowContext; enum class RegionMode; @@ -48,7 +49,6 @@ class SpinField; class SwNavHelpToolBox : public ToolBox { VclPtr m_xDialog; -virtual voidMouseButtonDown(const MouseEvent ) override; virtual voidRequestHelp( const HelpEvent& rHEvt ) override; virtual voiddispose() override; public: @@ -86,8 +86,7 @@ class SwNavigationPI : public PanelLayout, SwWrtShell *m_pContentWrtShell; SwView *m_pActContView; SwView *m_pCreateView; -VclPtr m_pPopupWindow; -VclPtr m_pFloatingWindow; +VclPtr m_xPopupWindow; SwNavigationConfig *m_pConfig; SfxBindings _rBindings; @@ -114,11 +113,9 @@ class SwNavigationPI : public PanelLayout, DECL_LINK( MenuSelectHdl, Menu *, bool ); DECL_LINK( ChangePageHdl, Timer*, void ); DECL_LINK( PageEditModifyHdl, SpinField&, void ); -DECL_LINK( PopupModeEndHdl, FloatingWindow*, void ); -DECL_LINK( ClosePopupWindow, SfxPopupWindow *, void ); void UsePage(); -void SetPopupWindow( SfxPopupWindow* ); +void SetPopupWindow( SwScrollNaviPopup* ); protected: @@ -156,7 +153,7 @@ public: boolIsGlobalMode() const {returnm_bGlobalMode;} SwView* GetCreateView() const; -voidCreateNavigationTool(const tools::Rectangle& rRect, bool bSetFocus, vcl::Window *pParent); +voidCreateNavigationTool(); FactoryFunction GetUITestFactory() const override; }; diff --git a/sw/source/uibase/inc/workctrl.hxx b/sw/source/uibase/inc/workctrl.hxx index 6aa03352bd94..80c9fa157592 100644 --- a/sw/source/uibase/inc/workctrl.hxx +++ b/sw/source/uibase/inc/workctrl.hxx @@ -50,6 +50,8 @@ class SwView; #define NID_TABLE_FORMULA_ERROR 20019 #define NID_COUNT 20 +#define NID_LINE_COUNT 10 + class SwTbxAutoTextCtrl : public SfxToolBoxControl { public: @@ -66,29 +68,16 @@ public: DECL_STATIC_LINK(SwTbxAutoTextCtrl, PopupHdl, Menu*, bool); }; -class SwScrollNaviPopup; - -class SwScrollNaviToolBox : public ToolBox +class SwScrollNaviPopup : public DockingWindow { -VclPtr m_pNaviPopup; - -virtual voidMouseButtonUp( const MouseEvent& rMEvt ) override; -virtual voidRequestHelp( const HelpEvent& rHEvt ) override; - -public: -SwScrollNaviToolBox(vcl::Window* pParent, SwScrollNaviPopup* pNaviPopup, WinBits nWinStyle) -: ToolBox(pParent, nWinStyle) -, m_pNaviPopup(pNaviPopup) -{ -} -virtual ~SwScrollNaviToolBox() override; -virtual void dispose() override; -}; +VclPtr m_xToolBox1; +VclPtr m_xToolBox2; +VclPtr m_xInfoField; -class SwScrollNaviPopup : public SfxPopupWindow -{ -VclPtr m_pToolBox; -VclPtr m_pInfoField; +sal_uInt16 GetCurItemId() const; +OUString GetItemText(sal_uInt16 nItemId) const; +void SetItemText(sal_uInt16 nItemId, const OUString& rText); +void CheckItem(sal_uInt16 nItemId, bool bOn); OUStringsQuickHelp[2 * NID_COUNT]; @@ -96,15 +85,15 @@ protected: DECL_LINK(SelectHdl, ToolBox*, void); public: -SwScrollNaviPopup( sal_uInt16 nId, const css::uno::Reference< css::frame::XFrame >& rFrame, vcl::Window *pParent ); +SwScrollNaviPopup(vcl::Window *pParent); virtual ~SwScrollNaviPopup() override; virtual void dispose() override; static OUString GetToolTip(bool bNext); -voidGrabFocus() { m_pToolBox->GrabFocus(); } +voidGrabFocus() {
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx |3 --- sw/source/uibase/config/cfgitems.cxx |4 sw/source/uibase/inc/cfgitems.hxx |1 - sw/source/uibase/inc/optpage.hxx |1 - sw/uiconfig/swriter/ui/viewoptionspage.ui | 21 +++-- 5 files changed, 3 insertions(+), 27 deletions(-) New commits: commit 468a740f0fe09f8939368eca3067b4101c84c057 Author: Heiko Tietze AuthorDate: Tue Jan 7 14:55:14 2020 +0100 Commit: Heiko Tietze CommitDate: Wed Jan 8 10:06:58 2020 +0100 Resolves tdf#129793 - Remove "Field codes" option var m_xFieldNameCB, elem m_bFieldName, ui fieldcode removed Change-Id: I6711f9b8c4f84d6ef19bc295243df0341f8c4f3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86350 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 7f601ceabc8f..4f1a0c3bbf9c 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -105,7 +105,6 @@ SwContentOptPage::SwContentOptPage(weld::Container* pPage, weld::DialogControlle , m_xGrfCB(m_xBuilder->weld_check_button("graphics")) , m_xTableCB(m_xBuilder->weld_check_button("tables")) , m_xDrwCB(m_xBuilder->weld_check_button("drawings")) -, m_xFieldNameCB(m_xBuilder->weld_check_button("fieldcodes")) , m_xPostItCB(m_xBuilder->weld_check_button("comments")) , m_xSettingsFrame(m_xBuilder->weld_frame("settingsframe")) , m_xSettingsLabel(m_xBuilder->weld_label("settingslabel")) @@ -205,7 +204,6 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet) m_xTableCB->set_active(pElemAttr->m_bTable); m_xGrfCB->set_active(pElemAttr->m_bGraphic); m_xDrwCB->set_active(pElemAttr->m_bDrawing); -m_xFieldNameCB->set_active(pElemAttr->m_bFieldName); m_xPostItCB->set_active(pElemAttr->m_bNotes); m_xCrossCB->set_active(pElemAttr->m_bCrosshair); m_xVRulerCBox->set_active(pElemAttr->m_bVertRuler); @@ -230,7 +228,6 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) aElem.m_bTable= m_xTableCB->get_active(); aElem.m_bGraphic = m_xGrfCB->get_active(); aElem.m_bDrawing = m_xDrwCB->get_active(); -aElem.m_bFieldName= m_xFieldNameCB->get_active(); aElem.m_bNotes= m_xPostItCB->get_active(); aElem.m_bCrosshair= m_xCrossCB->get_active(); aElem.m_bVertRuler= m_xVRulerCBox->get_active(); diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index 688216d4130e..5f283f520d44 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -89,7 +89,6 @@ SwElemItem::SwElemItem() : m_bTable = m_bGraphic= m_bDrawing= -m_bFieldName = m_bNotes = false; m_bShowInlineTooltips = true; m_bFieldHiddenText = @@ -106,7 +105,6 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt) : m_bTable = rVOpt.IsTable(); m_bGraphic= rVOpt.IsGraphic(); m_bDrawing= rVOpt.IsDraw() && rVOpt.IsControl(); -m_bFieldName = rVOpt.IsFieldName(); m_bNotes = rVOpt.IsPostIts(); m_bShowInlineTooltips = rVOpt.IsShowInlineTooltips(); m_bFieldHiddenText = rVOpt.IsShowHiddenField(); @@ -131,7 +129,6 @@ bool SwElemItem::operator==( const SfxPoolItem& rAttr ) const m_bTable== rItem.m_bTable && m_bGraphic == rItem.m_bGraphic&& m_bDrawing == rItem.m_bDrawing&& -m_bFieldName== rItem.m_bFieldName && m_bNotes== rItem.m_bNotes && m_bShowInlineTooltips == rItem.m_bShowInlineTooltips && m_bFieldHiddenText == rItem.m_bFieldHiddenText && @@ -148,7 +145,6 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetGraphic(m_bGraphic ); rVOpt.SetDraw (m_bDrawing ); rVOpt.SetControl(m_bDrawing ); -rVOpt.SetFieldName (m_bFieldName ); rVOpt.SetPostIts(m_bNotes ); rVOpt.SetShowInlineTooltips( m_bShowInlineTooltips ); rVOpt.SetShowHiddenField(m_bFieldHiddenText ); diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index 40f21ff6e98d..a800704e679f 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -74,7 +74,6 @@ class SW_DLLPUBLIC SwElemItem : public SfxPoolItem bool m_bTable :1; bool m_bGraphic :1; bool m_bDrawing :1; -bool m_bFieldName :1; bool m_bNotes :1; bool m_bShowInlineTooltips
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/sidebar/TableEditPanel.cxx | 96 +--- sw/source/uibase/sidebar/TableEditPanel.hxx | 26 +- sw/uiconfig/swriter/ui/sidebartableedit.ui | 110 3 files changed, 138 insertions(+), 94 deletions(-) New commits: commit 76be71b2afa00ab66a543771c2c1a0894fa3a1ae Author: Caolán McNamara AuthorDate: Sat Dec 21 14:50:10 2019 + Commit: Caolán McNamara CommitDate: Mon Dec 30 13:16:54 2019 +0100 weld TableEditPanel Change-Id: I380ed08e43e10a5d78e73436b6668abbce1ea23d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85696 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx index a657feb8718c..c8c0bf0cec55 100644 --- a/sw/source/uibase/sidebar/TableEditPanel.cxx +++ b/sw/source/uibase/sidebar/TableEditPanel.cxx @@ -53,17 +53,17 @@ void TableEditPanel::NotifyItemUpdate(const sal_uInt16 nSID, const SfxItemState if (pItem) { long nNewHeight = pItem->GetValue(); -nNewHeight = m_pRowHeightEdit->Normalize(nNewHeight); -m_pRowHeightEdit->SetValue(nNewHeight, FieldUnit::TWIP); +nNewHeight = m_xRowHeightEdit->normalize(nNewHeight); +m_xRowHeightEdit->set_value(nNewHeight, FieldUnit::TWIP); } } else if (eState == SfxItemState::DISABLED) { -m_pRowHeightEdit->Disable(); +m_xRowHeightEdit->set_sensitive(false); } else { -m_pRowHeightEdit->SetEmptyFieldValue(); +m_xRowHeightEdit->set_text(""); } break; } @@ -75,17 +75,17 @@ void TableEditPanel::NotifyItemUpdate(const sal_uInt16 nSID, const SfxItemState if (pItem) { long nNewWidth = pItem->GetValue(); -nNewWidth = m_pColumnWidthEdit->Normalize(nNewWidth); -m_pColumnWidthEdit->SetValue(nNewWidth, FieldUnit::TWIP); +nNewWidth = m_xColumnWidthEdit->normalize(nNewWidth); +m_xColumnWidthEdit->set_value(nNewWidth, FieldUnit::TWIP); } } else if (eState == SfxItemState::DISABLED) { -m_pColumnWidthEdit->Disable(); +m_xColumnWidthEdit->set_sensitive(false); } else { -m_pColumnWidthEdit->SetEmptyFieldValue(); +m_xColumnWidthEdit->set_text(""); } break; } @@ -95,8 +95,27 @@ void TableEditPanel::NotifyItemUpdate(const sal_uInt16 nSID, const SfxItemState TableEditPanel::TableEditPanel(vcl::Window* pParent, const css::uno::Reference& rxFrame, SfxBindings* pBindings) -: PanelLayout(pParent, "TableEditPanel", "modules/swriter/ui/sidebartableedit.ui", rxFrame) +: PanelLayout(pParent, "TableEditPanel", "modules/swriter/ui/sidebartableedit.ui", rxFrame, + true) , m_pBindings(pBindings) +, m_xRowHeightEdit( + new RelativeField(m_xBuilder->weld_metric_spin_button("rowheight", FieldUnit::CM))) +, m_xColumnWidthEdit( + new RelativeField(m_xBuilder->weld_metric_spin_button("columnwidth", FieldUnit::CM))) +, m_xInsert(m_xBuilder->weld_toolbar("insert")) +, m_xInsertDispatch(new ToolbarUnoDispatcher(*m_xInsert, rxFrame)) +, m_xSelect(m_xBuilder->weld_toolbar("select")) +, m_xSelectDispatch(new ToolbarUnoDispatcher(*m_xSelect, rxFrame)) +, m_xRowSizing(m_xBuilder->weld_toolbar("rowsizing")) +, m_xRowSizingDispatch(new ToolbarUnoDispatcher(*m_xRowSizing, rxFrame)) +, m_xColumnSizing(m_xBuilder->weld_toolbar("columnsizing")) +, m_xColumnSizingDispatch(new ToolbarUnoDispatcher(*m_xColumnSizing, rxFrame)) +, m_xDelete(m_xBuilder->weld_toolbar("delete")) +, m_xDeleteDispatch(new ToolbarUnoDispatcher(*m_xDelete, rxFrame)) +, m_xSplitMerge(m_xBuilder->weld_toolbar("split_merge")) +, m_xSplitMergeDispatch(new ToolbarUnoDispatcher(*m_xSplitMerge, rxFrame)) +, m_xMisc(m_xBuilder->weld_toolbar("misc")) +, m_xMiscDispatch(new ToolbarUnoDispatcher(*m_xMisc, rxFrame)) , m_aRowHeightController(SID_ATTR_TABLE_ROW_HEIGHT, *pBindings, *this) , m_aColumnWidthController(SID_ATTR_TABLE_COLUMN_WIDTH, *pBindings, *this) , m_aInsertRowsBeforeController(FN_TABLE_INSERT_ROW_BEFORE, *pBindings, *this) @@ -114,9 +133,6 @@ TableEditPanel::TableEditPanel(vcl::Window* pParent, , m_aDistributeColumnsController(FN_TABLE_BALANCE_CELLS, *pBindings, *this) , m_aMergeCellsController(FN_TABLE_MERGE_CELLS, *pBindings, *this) { -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/sidebar/StylePresetsPanel.cxx | 25 + sw/source/uibase/sidebar/StylePresetsPanel.hxx |5 ++- sw/uiconfig/swriter/ui/sidebarstylepresets.ui | 36 + 3 files changed, 37 insertions(+), 29 deletions(-) New commits: commit 1bae6297723af8e5a601a6ddf6134ca5b62a558e Author: Caolán McNamara AuthorDate: Fri Dec 20 09:18:17 2019 + Commit: Caolán McNamara CommitDate: Fri Dec 20 15:50:42 2019 +0100 weld StylePresetsPanel Change-Id: I827819c8891de828013ce8a38d5acf9e7fec3985 Reviewed-on: https://gerrit.libreoffice.org/85584 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx index 0ab90e10d08b..2e83338d6f1a 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx @@ -156,13 +156,13 @@ VclPtr StylePresetsPanel::Create (vcl::Window* pParent, StylePresetsPanel::StylePresetsPanel(vcl::Window* pParent, const css::uno::Reference& rxFrame) -: PanelLayout(pParent, "StylePresetsPanel", "modules/swriter/ui/sidebarstylepresets.ui", rxFrame) +: PanelLayout(pParent, "StylePresetsPanel", "modules/swriter/ui/sidebarstylepresets.ui", rxFrame, true) +, mxValueSet(new SvtValueSet(nullptr)) +, mxValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxValueSet)) { -get(mpValueSet, "valueset"); +mxValueSet->SetColCount(2); -mpValueSet->SetColCount(2); - -mpValueSet->SetDoubleClickHdl(LINK(this, StylePresetsPanel, DoubleClickHdl)); +mxValueSet->SetDoubleClickHdl(LINK(this, StylePresetsPanel, DoubleClickHdl)); RefreshList(); } @@ -181,10 +181,12 @@ void StylePresetsPanel::RefreshList() OUString aName = aTemplates.GetName(i,j); OUString aURL = aTemplates.GetPath(i,j); BitmapEx aPreview = CreatePreview(aURL, aName); -mpValueSet->InsertItem(j, Image(aPreview), aName); +sal_uInt16 nId = j + 1; +mxValueSet->InsertItem(nId, Image(aPreview), aName); maTemplateEntries.push_back(std::make_unique(aURL)); -mpValueSet->SetItemData(j, maTemplateEntries.back().get()); +mxValueSet->SetItemData(nId, maTemplateEntries.back().get()); } +mxValueSet->SetOptimalSize(); } } } @@ -196,15 +198,16 @@ StylePresetsPanel::~StylePresetsPanel() void StylePresetsPanel::dispose() { -mpValueSet.disposeAndClear(); +mxValueSetWin.reset(); +mxValueSet.reset(); PanelLayout::dispose(); } -IMPL_LINK_NOARG(StylePresetsPanel, DoubleClickHdl, ValueSet*, void) +IMPL_LINK_NOARG(StylePresetsPanel, DoubleClickHdl, SvtValueSet*, void) { -sal_Int32 nItemId = mpValueSet->GetSelectedItemId(); -TemplateEntry* pEntry = static_cast(mpValueSet->GetItemData(nItemId)); +sal_Int32 nItemId = mxValueSet->GetSelectedItemId(); +TemplateEntry* pEntry = static_cast(mxValueSet->GetItemData(nItemId)); SwDocShell* pDocSh = static_cast(SfxObjectShell::Current()); if (pDocSh) diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.hxx b/sw/source/uibase/sidebar/StylePresetsPanel.hxx index b392f9cb077e..abb3fae568e5 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.hxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.hxx @@ -52,11 +52,12 @@ private: virtual ~StylePresetsPanel() override; virtual void dispose() override; -VclPtr mpValueSet; +std::unique_ptr mxValueSet; +std::unique_ptr mxValueSetWin; std::vector> maTemplateEntries; -DECL_LINK(DoubleClickHdl, ValueSet*, void); +DECL_LINK(DoubleClickHdl, SvtValueSet*, void); }; }} // end of namespace sw::sidebar diff --git a/sw/uiconfig/swriter/ui/sidebarstylepresets.ui b/sw/uiconfig/swriter/ui/sidebarstylepresets.ui index 170df5515cea..3258fe2ba7f5 100644 --- a/sw/uiconfig/swriter/ui/sidebarstylepresets.ui +++ b/sw/uiconfig/swriter/ui/sidebarstylepresets.ui @@ -1,8 +1,7 @@ - + - True False @@ -19,13 +18,28 @@ 6 6 - + True True True -False - - +True +never +never +in + + +True +False + + +True +True +GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK +True +True + + +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/sidebar/PageHeaderPanel.cxx | 107 ++- sw/source/uibase/sidebar/PageHeaderPanel.hxx | 19 ++-- sw/uiconfig/swriter/ui/pageheaderpanel.ui|6 - 3 files changed, 69 insertions(+), 63 deletions(-) New commits: commit 3f0b93eb922d865ba11c4a228a0cb3377a228c89 Author: Caolán McNamara AuthorDate: Thu Dec 19 14:18:45 2019 + Commit: Caolán McNamara CommitDate: Thu Dec 19 22:11:04 2019 +0100 weld PageHeaderPanel Change-Id: I261f277b54938fa04f26bcd7f8e482517695b5e5 Reviewed-on: https://gerrit.libreoffice.org/85528 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/uibase/sidebar/PageHeaderPanel.cxx b/sw/source/uibase/sidebar/PageHeaderPanel.cxx index 557c27ff7428..f0c06d5511f4 100644 --- a/sw/source/uibase/sidebar/PageHeaderPanel.cxx +++ b/sw/source/uibase/sidebar/PageHeaderPanel.cxx @@ -56,8 +56,8 @@ VclPtr PageHeaderPanel::Create( void PageHeaderPanel::SetMarginsAndSpacingFieldUnit() { -mpHeaderSpacingLB->Init(IsInch(meFUnit) ? SpacingType::SPACING_INCH : SpacingType::SPACING_CM); -mpHeaderMarginPresetLB->Init(IsInch(meFUnit) ? SpacingType::MARGINS_INCH : SpacingType::MARGINS_CM); +SpacingListBox::Fill(IsInch(meFUnit) ? SpacingType::SPACING_INCH : SpacingType::SPACING_CM, *mxHeaderSpacingLB); +SpacingListBox::Fill(IsInch(meFUnit) ? SpacingType::MARGINS_INCH : SpacingType::MARGINS_CM, *mxHeaderMarginPresetLB); } PageHeaderPanel::PageHeaderPanel( @@ -65,7 +65,7 @@ PageHeaderPanel::PageHeaderPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame, SfxBindings* pBindings ) : -PanelLayout(pParent, "PageHeaderPanel", "modules/swriter/ui/pageheaderpanel.ui", rxFrame), +PanelLayout(pParent, "PageHeaderPanel", "modules/swriter/ui/pageheaderpanel.ui", rxFrame, true), mpBindings( pBindings ), maHFToggleController(SID_ATTR_PAGE_HEADER, *pBindings, *this), maMetricController(SID_ATTR_METRIC, *pBindings,*this), @@ -77,14 +77,13 @@ PageHeaderPanel::PageHeaderPanel( mpHeaderItem( new SfxBoolItem(SID_ATTR_PAGE_HEADER) ), mpHeaderLRMarginItem( new SvxLongLRSpaceItem(0, 0, SID_ATTR_PAGE_HEADER_LRMARGIN)), mpHeaderSpacingItem( new SvxLongULSpaceItem(0, 0, SID_ATTR_PAGE_HEADER_SPACING)), -mpHeaderLayoutItem( new SfxInt16Item(SID_ATTR_PAGE_HEADER_LAYOUT)) +mpHeaderLayoutItem( new SfxInt16Item(SID_ATTR_PAGE_HEADER_LAYOUT)), +mxHeaderToggle(m_xBuilder->weld_check_button("headertoggle")), +mxHeaderSpacingLB(m_xBuilder->weld_combo_box("spacingpreset")), +mxHeaderMarginPresetLB(m_xBuilder->weld_combo_box("headermarginpreset")), +mxHeaderLayoutLB(m_xBuilder->weld_combo_box("samecontentLB")), +mxCustomEntry(m_xBuilder->weld_label("customlabel")) { -get(mpHeaderToggle, "headertoggle"); -get(mpHeaderSpacingLB, "spacingpreset"); -get(mpHeaderLayoutLB, "samecontentLB"); -get(mpHeaderMarginPresetLB, "headermarginpreset"); -get(mpCustomEntry, "customlabel"); - Initialize(); } @@ -95,11 +94,11 @@ PageHeaderPanel::~PageHeaderPanel() void PageHeaderPanel::dispose() { -mpHeaderToggle.disposeAndClear(); -mpHeaderSpacingLB.disposeAndClear(); -mpHeaderLayoutLB.disposeAndClear(); -mpHeaderMarginPresetLB.disposeAndClear(); -mpCustomEntry.clear(); +mxHeaderToggle.reset(); +mxHeaderSpacingLB.reset(); +mxHeaderLayoutLB.reset(); +mxHeaderMarginPresetLB.reset(); +mxCustomEntry.reset(); PanelLayout::dispose(); } @@ -118,13 +117,15 @@ FieldUnit PageHeaderPanel::GetCurrentUnit(SfxItemState eState, const SfxPoolItem void PageHeaderPanel::Initialize() { +SameContentListBox::Fill(*mxHeaderLayoutLB); + SetMarginsAndSpacingFieldUnit(); -aCustomEntry = mpCustomEntry->GetText(); -mpHeaderToggle->SetClickHdl( LINK(this, PageHeaderPanel, HeaderToggleHdl) ); -mpHeaderMarginPresetLB->SetSelectHdl( LINK(this, PageHeaderPanel, HeaderLRMarginHdl)); -mpHeaderSpacingLB->SetSelectHdl( LINK(this, PageHeaderPanel, HeaderSpacingHdl)); -mpHeaderLayoutLB->SetSelectHdl( LINK(this, PageHeaderPanel, HeaderLayoutHdl)); +aCustomEntry = mxCustomEntry->get_label(); +mxHeaderToggle->connect_toggled( LINK(this, PageHeaderPanel, HeaderToggleHdl) ); +mxHeaderMarginPresetLB->connect_changed( LINK(this, PageHeaderPanel, HeaderLRMarginHdl)); +mxHeaderSpacingLB->connect_changed( LINK(this, PageHeaderPanel, HeaderSpacingHdl)); +mxHeaderLayoutLB->connect_changed( LINK(this, PageHeaderPanel, HeaderLayoutHdl)); mpBindings->Invalidate(SID_ATTR_METRIC); mpBindings->Invalidate(SID_ATTR_PAGE_HEADER); @@ -135,17 +136,17 @@ void PageHeaderPanel::Initialize() void PageHeaderPanel::UpdateHeaderCheck() { -if(mpHeaderToggle->IsChecked()) +if (mxHeaderToggle->get_active()) { -mpHeaderSpacingLB->Enable(); -mpHeaderLayoutLB->Enable(); -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/sidebar/PageFormatPanel.cxx | 143 ++- sw/source/uibase/sidebar/PageFormatPanel.hxx | 18 +-- sw/uiconfig/swriter/ui/pageformatpanel.ui| 19 +-- 3 files changed, 93 insertions(+), 87 deletions(-) New commits: commit cbca3beb990df9e75218e27ff0f1b563cf3a67da Author: Caolán McNamara AuthorDate: Thu Dec 19 12:36:12 2019 + Commit: Caolán McNamara CommitDate: Thu Dec 19 22:08:28 2019 +0100 weld PageFormatPanel Change-Id: I98b40be22d11bee055ae321e8a93430bc69fe023 Reviewed-on: https://gerrit.libreoffice.org/85525 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx index ad2fbc21c26a..269e03cead25 100644 --- a/sw/source/uibase/sidebar/PageFormatPanel.cxx +++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx @@ -63,8 +63,8 @@ VclPtr PageFormatPanel::Create( void PageFormatPanel::SetMarginFieldUnit() { -auto nSelected = mpMarginSelectBox->GetSelectedEntryPos(); -mpMarginSelectBox->Clear(); +auto nSelected = mxMarginSelectBox->get_active(); +mxMarginSelectBox->clear(); const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper(); if (IsInch(meFUnit)) @@ -73,7 +73,7 @@ void PageFormatPanel::SetMarginFieldUnit() for (size_t i = 0; i < SAL_N_ELEMENTS(RID_PAGEFORMATPANEL_MARGINS_INCH); ++i) { OUString sStr = rLocaleData.getNum(RID_PAGEFORMATPANEL_MARGINS_INCH[i].second, 2, true, false) + sSuffix; - mpMarginSelectBox->InsertEntry(SwResId(RID_PAGEFORMATPANEL_MARGINS_INCH[i].first).replaceFirst("%1", sStr)); + mxMarginSelectBox->append_text(SwResId(RID_PAGEFORMATPANEL_MARGINS_INCH[i].first).replaceFirst("%1", sStr)); } } else @@ -82,18 +82,24 @@ void PageFormatPanel::SetMarginFieldUnit() for (size_t i = 0; i < SAL_N_ELEMENTS(RID_PAGEFORMATPANEL_MARGINS_CM); ++i) { OUString sStr = rLocaleData.getNum(RID_PAGEFORMATPANEL_MARGINS_CM[i].second, 2, true, false) + " " + sSuffix; - mpMarginSelectBox->InsertEntry(SwResId(RID_PAGEFORMATPANEL_MARGINS_CM[i].first).replaceFirst("%1", sStr)); + mxMarginSelectBox->append_text(SwResId(RID_PAGEFORMATPANEL_MARGINS_CM[i].first).replaceFirst("%1", sStr)); } } -mpMarginSelectBox->SelectEntryPos(nSelected); +mxMarginSelectBox->set_active(nSelected); } PageFormatPanel::PageFormatPanel( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame, SfxBindings* pBindings) : -PanelLayout(pParent, "PageFormatPanel", "modules/swriter/ui/pageformatpanel.ui", rxFrame), +PanelLayout(pParent, "PageFormatPanel", "modules/swriter/ui/pageformatpanel.ui", rxFrame, true), mpBindings( pBindings ), +mxPaperSizeBox(new SvxPaperSizeListBox(m_xBuilder->weld_combo_box("papersize"))), +mxPaperWidth(new RelativeField(m_xBuilder->weld_metric_spin_button("paperwidth", FieldUnit::CM))), +mxPaperHeight(new RelativeField(m_xBuilder->weld_metric_spin_button("paperheight", FieldUnit::CM))), +mxPaperOrientation(m_xBuilder->weld_combo_box("paperorientation")), +mxMarginSelectBox(m_xBuilder->weld_combo_box("marginLB")), +mxCustomEntry(m_xBuilder->weld_label("customlabel")), maPaperSizeController(SID_ATTR_PAGE_SIZE, *pBindings, *this), maPaperOrientationController(SID_ATTR_PAGE, *pBindings, *this), maMetricController(SID_ATTR_METRIC, *pBindings,*this), @@ -106,12 +112,6 @@ PageFormatPanel::PageFormatPanel( meUnit(), aCustomEntry() { -get(mpPaperSizeBox, "papersize"); -get(mpPaperWidth, "paperwidth"); -get(mpPaperHeight, "paperheight"); -get(mpPaperOrientation, "paperorientation"); -get(mpMarginSelectBox, "marginLB"); -get(mpCustomEntry, "customlabel"); Initialize(); } @@ -122,12 +122,12 @@ PageFormatPanel::~PageFormatPanel() void PageFormatPanel::dispose() { -mpPaperSizeBox.disposeAndClear(); -mpPaperWidth.disposeAndClear(); -mpPaperHeight.disposeAndClear(); -mpPaperOrientation.disposeAndClear(); -mpMarginSelectBox.disposeAndClear(); -mpCustomEntry.clear(); +mxPaperSizeBox.reset(); +mxPaperWidth.reset(); +mxPaperHeight.reset(); +mxPaperOrientation.reset(); +mxMarginSelectBox.reset(); +mxCustomEntry.reset(); maMetricController.dispose(); maPaperOrientationController.dispose(); @@ -143,25 +143,22 @@ void PageFormatPanel::dispose() void PageFormatPanel::Initialize() { -mpPaperSizeBox->FillPaperSizeEntries( PaperSizeApp::Std ); -mpPaperSizeBox->SetDropDownLineCount(6); +mxPaperSizeBox->FillPaperSizeEntries( PaperSizeApp::Std ); meUnit = maPaperSizeController.GetCoreMetric(); -SetFieldUnit( *mpPaperWidth, meFUnit ); -SetFieldUnit(
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx | 38 +--- sw/source/uibase/inc/optpage.hxx|7 - sw/uiconfig/swriter/ui/optformataidspage.ui | 132 +++- 3 files changed, 39 insertions(+), 138 deletions(-) New commits: commit c1a0911b99b6c2a4e260c86eab1aa1ee1e173c0a Author: Heiko Tietze AuthorDate: Tue Dec 10 15:50:36 2019 +0100 Commit: Heiko Tietze CommitDate: Wed Dec 11 10:08:46 2019 +0100 Direct cursor fillmode as combobox UI only update of many radio buttons into one combo box to comply with HIG Change-Id: If96ee339159def4c3dfa5d3b2f9adb218d1faee3 Reviewed-on: https://gerrit.libreoffice.org/84864 Reviewed-by: Heiko Tietze Tested-by: Heiko Tietze diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index ebc5ed7ae9de..800fbb887fc4 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1208,11 +1208,7 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w , m_xCharHiddenCB(m_xBuilder->weld_check_button("hiddentext")) , m_xDirectCursorFrame(m_xBuilder->weld_frame("directcrsrframe")) , m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff")) -, m_xFillMarginRB(m_xBuilder->weld_radio_button("fillmargin")) -, m_xFillIndentRB(m_xBuilder->weld_radio_button("fillindent")) -, m_xFillTabRB(m_xBuilder->weld_radio_button("filltab")) -, m_xFillTabAndSpaceRB(m_xBuilder->weld_radio_button("filltabandspace")) -, m_xFillSpaceRB(m_xBuilder->weld_radio_button("fillspace")) +, m_xDirectCursorFillMode(m_xBuilder->weld_combo_box("cxDirectCursorFillMode")) , m_xCursorProtFrame(m_xBuilder->weld_frame("crsrprotframe")) , m_xCursorInProtCB(m_xBuilder->weld_check_button("cursorinprot")) , m_xMathBaselineAlignmentCB(m_xBuilder->weld_check_button("mathbaseline")) @@ -1229,12 +1225,7 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w } m_xOnOffCB->set_active( bIsOn ); -m_xFillIndentRB->set_active( FILL_INDENT == eMode ); -m_xFillMarginRB->set_active( FILL_MARGIN == eMode ); -m_xFillTabRB->set_active( FILL_TAB == eMode ); -m_xFillSpaceRB->set_active( FILL_SPACE == eMode ); -m_xFillTabAndSpaceRB->set_active( FILL_TAB_SPACE == eMode ); - +m_xDirectCursorFillMode->set_active( eMode ); if(SfxItemState::SET != rSet.GetItemState(SID_HTML_MODE, false, ) || !(static_cast(pItem)->GetValue() & HTMLMODE_ON)) return; @@ -1244,12 +1235,7 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w m_xDirectCursorFrame->hide(); m_xOnOffCB->hide(); -m_xFillMarginRB->hide(); -m_xFillIndentRB->hide(); -m_xFillTabRB->hide(); -m_xFillSpaceRB->hide(); -m_xFillTabAndSpaceRB->hide(); - +m_xDirectCursorFillMode->hide(); m_xCursorProtFrame->hide(); m_xCursorInProtCB->hide(); } @@ -1276,16 +1262,7 @@ bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* rSet ) aOpt.SetOn( m_xOnOffCB->get_active() ); sal_uInt8 eMode; -if( m_xFillIndentRB->get_active() ) -eMode= FILL_INDENT; -else if( m_xFillMarginRB->get_active() ) -eMode = FILL_MARGIN; -else if( m_xFillTabRB->get_active() ) -eMode = FILL_TAB; -else if ( m_xFillTabAndSpaceRB->get_active() ) -eMode = FILL_TAB_SPACE; -else -eMode = FILL_SPACE; +eMode = m_xDirectCursorFillMode->get_active(); aOpt.SetMode( eMode ); bool bRet = false; @@ -1343,12 +1320,7 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet ) } m_xOnOffCB->set_active( bIsOn ); -m_xFillIndentRB->set_active( FILL_INDENT == eMode ); -m_xFillMarginRB->set_active( FILL_MARGIN == eMode ); -m_xFillTabRB->set_active( FILL_TAB == eMode ); -m_xFillSpaceRB->set_active( FILL_SPACE == eMode ); -m_xFillTabAndSpaceRB->set_active( FILL_TAB_SPACE == eMode ); - +m_xDirectCursorFillMode->set_active( eMode ); if (m_pWrtShell) { m_xMathBaselineAlignmentCB->set_active( m_pWrtShell->GetDoc()->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT ) ); m_xMathBaselineAlignmentCB->save_state(); diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 13c5d6194aef..0fb643768eeb 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -232,12 +232,7 @@ class SwShdwCursorOptionsTabPage : public SfxTabPage std::unique_ptr m_xDirectCursorFrame; std::unique_ptr m_xOnOffCB; -std::unique_ptr m_xFillMarginRB; -std::unique_ptr m_xFillIndentRB; -std::unique_ptr m_xFillTabRB; -std::unique_ptr m_xFillTabAndSpaceRB; -std::unique_ptr m_xFillSpaceRB; - +std::unique_ptr m_xDirectCursorFillMode; std::unique_ptr m_xCursorProtFrame; std::unique_ptr m_xCursorInProtCB; diff --git
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/envelp/syncbtn.cxx| 61 - sw/source/uibase/inc/syncbtn.hxx | 20 -- sw/uiconfig/swriter/ui/floatingsync.ui | 34 -- 3 files changed, 64 insertions(+), 51 deletions(-) New commits: commit 71003b6641a8cd49bacc104d906e2e2cfb4b98ab Author: Caolán McNamara AuthorDate: Wed Oct 30 09:08:43 2019 + Commit: Caolán McNamara CommitDate: Tue Nov 5 21:04:12 2019 +0100 weld SwSyncChildWin Change-Id: I23eef815ba05e07f50f86ec375c5dff3ef759d55 Reviewed-on: https://gerrit.libreoffice.org/81746 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx index 2ebcc26a255c..3f8a8d633fff 100644 --- a/sw/source/uibase/envelp/syncbtn.cxx +++ b/sw/source/uibase/envelp/syncbtn.cxx @@ -28,57 +28,58 @@ #include #include -SFX_IMPL_FLOATINGWINDOW( SwSyncChildWin, FN_SYNC_LABELS ) +SFX_IMPL_MODELESSDIALOGCONTOLLER(SwSyncChildWin, FN_SYNC_LABELS) -SwSyncChildWin::SwSyncChildWin( vcl::Window* _pParent, -sal_uInt16 nId, -SfxBindings* pBindings, -SfxChildWinInfo* pInfo ) : -SfxChildWindow( _pParent, nId ) +SwSyncChildWin::SwSyncChildWin(vcl::Window* _pParent, + sal_uInt16 nId, + SfxBindings* pBindings, + SfxChildWinInfo* pInfo) +: SfxChildWindow(_pParent, nId) { -SetWindow(VclPtr::Create( pBindings, this, _pParent)); +SetController(std::make_shared(pBindings, this, _pParent->GetFrameWeld())); +SwSyncBtnDlg* pBtnDlg = static_cast(GetController().get()); if (!pInfo->aSize.Width() || !pInfo->aSize.Height()) { +weld::Dialog* pDlg = pBtnDlg->getDialog(); +Point aPos; + SwView* pActiveView = ::GetActiveView(); -if(pActiveView) +if (pActiveView) { const SwEditWin = pActiveView->GetEditWin(); -GetWindow()->SetPosPixel(rEditWin.OutputToScreenPixel(Point(0, 0))); +aPos = rEditWin.OutputToScreenPixel(Point(0, 0)); } else -GetWindow()->SetPosPixel(_pParent->OutputToScreenPixel(Point(0, 0))); -pInfo->aPos = GetWindow()->GetPosPixel(); -pInfo->aSize = GetWindow()->GetSizePixel(); -} +aPos = _pParent->OutputToScreenPixel(Point(0, 0)); -static_cast(GetWindow())->Initialize(pInfo); +WindowStateData aState; +aState.SetMask(WindowStateMask::Pos); +aState.SetX(aPos.X()); +aState.SetY(aPos.Y()); +pDlg->set_window_state(aState.ToStr()); -GetWindow()->Show(); -} +pInfo->aPos = pDlg->get_position(); +pInfo->aSize = pDlg->get_size(); +} -SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings, -SfxChildWindow* pChild, -vcl::Window *pParent) -: SfxFloatingWindow(_pBindings, pChild, pParent, "FloatingSync", "modules/swriter/ui/floatingsync.ui") -{ -get(m_pSyncBtn, "sync"); -m_pSyncBtn->SetClickHdl(LINK(this, SwSyncBtnDlg, BtnHdl)); -Show(); +pBtnDlg->Initialize(pInfo); } -SwSyncBtnDlg::~SwSyncBtnDlg() +SwSyncBtnDlg::SwSyncBtnDlg(SfxBindings* pBindings, + SfxChildWindow* pChild, + weld::Window *pParent) +: SfxModelessDialogController(pBindings, pChild, pParent, "modules/swriter/ui/floatingsync.ui", "FloatingSync") +, m_xSyncBtn(m_xBuilder->weld_button("sync")) { -disposeOnce(); +m_xSyncBtn->connect_clicked(LINK(this, SwSyncBtnDlg, BtnHdl)); } -void SwSyncBtnDlg::dispose() +SwSyncBtnDlg::~SwSyncBtnDlg() { -m_pSyncBtn.clear(); -SfxFloatingWindow::dispose(); } -IMPL_STATIC_LINK_NOARG(SwSyncBtnDlg, BtnHdl, Button*, void) +IMPL_STATIC_LINK_NOARG(SwSyncBtnDlg, BtnHdl, weld::Button&, void) { SfxViewFrame::Current()->GetDispatcher()->Execute(FN_UPDATE_ALL_LINKS, SfxCallMode::ASYNCHRON); } diff --git a/sw/source/uibase/inc/syncbtn.hxx b/sw/source/uibase/inc/syncbtn.hxx index 4934b41f9b9a..43ae7ac43f34 100644 --- a/sw/source/uibase/inc/syncbtn.hxx +++ b/sw/source/uibase/inc/syncbtn.hxx @@ -21,29 +21,27 @@ #include #include -#include -class SwSyncBtnDlg : public SfxFloatingWindow +class SwSyncBtnDlg : public SfxModelessDialogController { -VclPtr m_pSyncBtn; +std::unique_ptr m_xSyncBtn; -DECL_STATIC_LINK( SwSyncBtnDlg, BtnHdl, Button*, void ); +DECL_STATIC_LINK( SwSyncBtnDlg, BtnHdl, weld::Button&, void ); public: -SwSyncBtnDlg(SfxBindings*, SfxChildWindow*, vcl::Window *pParent); +SwSyncBtnDlg(SfxBindings*, SfxChildWindow*, weld::Window *pParent); virtual ~SwSyncBtnDlg() override; -virtual void dispose() override; }; class SwSyncChildWin : public
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/frmdlg/wrap.cxx | 18 ++ sw/source/uibase/inc/wrap.hxx|1 + sw/source/uibase/shells/drwbassh.cxx |1 + sw/uiconfig/swriter/ui/wrappage.ui | 15 +++ 4 files changed, 35 insertions(+) New commits: commit 472535a4f8aa95a17d996e96a67df60e72df7b32 Author: Miklos Vajna AuthorDate: Wed Sep 25 09:36:24 2019 +0200 Commit: Miklos Vajna CommitDate: Wed Sep 25 13:25:03 2019 +0200 Related: tdf#124600 sw anchored object allow overlap: add UI Determine is-modified state by always constructing our pool item, and then compare to the old one, rather than depending on save_state(). It seems both are equally good, but this is simpler to implement. Change-Id: I8d7a07eb06904f9f11d8c10bc854f7e42531cefa Reviewed-on: https://gerrit.libreoffice.org/79501 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index 14dbad2cc19f..99d9ad75e1b4 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -43,6 +43,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -88,6 +89,7 @@ SwWrapTabPage::SwWrapTabPage(TabPageParent pParent, const SfxItemSet ) , m_xWrapTransparentCB(m_xBuilder->weld_check_button("transparent")) , m_xWrapOutlineCB(m_xBuilder->weld_check_button("outline")) , m_xWrapOutsideCB(m_xBuilder->weld_check_button("outside")) +, m_xAllowOverlapCB(m_xBuilder->weld_check_button("allowoverlap")) { SetExchangeSupport(); @@ -248,6 +250,10 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet) m_xBottomMarginED->save_value(); ContourHdl(*m_xWrapOutlineCB); + +const SwFormatWrapInfluenceOnObjPos& rInfluence = rSet->Get(RES_WRAP_INFLUENCE_ON_OBJPOS); +m_xAllowOverlapCB->set_active(rInfluence.GetAllowOverlap()); + ActivatePage( *rSet ); } @@ -349,6 +355,18 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet) bModified |= nullptr != rSet->Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1)); } +const SwFormatWrapInfluenceOnObjPos& rOldInfluence += GetItemSet().Get(RES_WRAP_INFLUENCE_ON_OBJPOS); +SwFormatWrapInfluenceOnObjPos aInfluence(rOldInfluence); +aInfluence.SetAllowOverlap(m_xAllowOverlapCB->get_active()); + +pOldItem = GetOldItem(*rSet, RES_WRAP_INFLUENCE_ON_OBJPOS); +if (!pOldItem || aInfluence != *pOldItem) +{ +rSet->Put(aInfluence); +bModified = true; +} + return bModified; } diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx index acb9bc3c2791..bffc69bb1c28 100644 --- a/sw/source/uibase/inc/wrap.hxx +++ b/sw/source/uibase/inc/wrap.hxx @@ -66,6 +66,7 @@ class SwWrapTabPage: public SfxTabPage std::unique_ptr m_xWrapTransparentCB; std::unique_ptr m_xWrapOutlineCB; std::unique_ptr m_xWrapOutsideCB; +std::unique_ptr m_xAllowOverlapCB; virtual ~SwWrapTabPage() override; diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 409bcd94ac26..12d87bab691b 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -129,6 +129,7 @@ void SwDrawBaseShell::Execute(SfxRequest const ) RES_LR_SPACE, RES_UL_SPACE, RES_SURROUND, RES_SURROUND, RES_ANCHOR, RES_ANCHOR, +RES_WRAP_INFLUENCE_ON_OBJPOS, RES_WRAP_INFLUENCE_ON_OBJPOS, SID_HTML_MODE, SID_HTML_MODE, FN_DRAW_WRAP_DLG, FN_DRAW_WRAP_DLG>{}); diff --git a/sw/uiconfig/swriter/ui/wrappage.ui b/sw/uiconfig/swriter/ui/wrappage.ui index cf409da7999e..64a362d5e62e 100644 --- a/sw/uiconfig/swriter/ui/wrappage.ui +++ b/sw/uiconfig/swriter/ui/wrappage.ui @@ -446,6 +446,21 @@ 3 + + +Allow overlap +True +True +False +True +0 +True + + +0 +4 + + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mmaddressblockpage.cxx | 13 + sw/uiconfig/swriter/ui/mmaddressblockpage.ui |8 +--- 2 files changed, 18 insertions(+), 3 deletions(-) New commits: commit 5e01eb45862a59e1d68efabd725b69219fd3bee1 Author: Caolán McNamara AuthorDate: Fri Aug 23 13:15:36 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Aug 23 21:14:17 2019 +0200 give address page an initial size req of its max size so it won't jump around in size on activation Change-Id: If7c1ce0db0817ee552450a7776f98b7b9cc8a0a7 Reviewed-on: https://gerrit.libreoffice.org/78009 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 51d00b0b53da..9f20fac6a0b6 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -97,6 +97,19 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage(SwMailMergeWizard* pWiz Link aLink = LINK(this, SwMailMergeAddressBlockPage, InsertDataHdl_Impl); m_xPrevSetIB->connect_clicked(aLink); m_xNextSetIB->connect_clicked(aLink); + +// lock in preferred size including current address line +Size aSize1(m_xContainer->get_preferred_size()); + +OUString sOrigLabel = m_xAddressListPB->get_label(); +m_xAddressListPB->set_label(m_sChangeAddress); +Size aSize2(m_xContainer->get_preferred_size()); +m_xAddressListPB->set_label(sOrigLabel); + +m_xCurrentAddressFI->hide(); + +m_xContainer->set_size_request(std::max(aSize1.Width(), aSize2.Width()), + std::max(aSize1.Height(), aSize2.Height())); } SwMailMergeAddressBlockPage::~SwMailMergeAddressBlockPage() diff --git a/sw/uiconfig/swriter/ui/mmaddressblockpage.ui b/sw/uiconfig/swriter/ui/mmaddressblockpage.ui index a79532185440..b5008b95b9b2 100644 --- a/sw/uiconfig/swriter/ui/mmaddressblockpage.ui +++ b/sw/uiconfig/swriter/ui/mmaddressblockpage.ui @@ -90,8 +90,8 @@ +True False -True Current address list: %1 1 @@ -114,7 +114,8 @@ True Select the address list containing the address data you want to use. This data is needed to create the address block. True -56 +40 +40 0 0 @@ -181,7 +182,8 @@ True Match the field name used in the mail merge to the column headers in your data source. True -56 +40 +40 0 0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx | 193 +++--- sw/source/uibase/inc/optpage.hxx | 51 +++ sw/uiconfig/swriter/ui/viewoptionspage.ui |8 - 3 files changed, 107 insertions(+), 145 deletions(-) New commits: commit 4288fa0856f28813c76c30b5ff6a0c946a4db5f3 Author: Caolán McNamara AuthorDate: Sat Jul 27 16:41:05 2019 +0100 Commit: Caolán McNamara CommitDate: Sat Jul 27 21:08:38 2019 +0200 weld SwContentOptPage Change-Id: Ib7ccc4fc1a611f0f8e57e85008c2a96861762442 Reviewed-on: https://gerrit.libreoffice.org/76479 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 0dbd6a86a8e3..f2ece9023500 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -94,50 +94,42 @@ void drawRect(vcl::RenderContext& rRenderContext, const tools::Rectangle , // Tools->Options->Writer->View // Tools->Options->Writer/Web->View -SwContentOptPage::SwContentOptPage( vcl::Window* pParent, - const SfxItemSet& rCoreSet ) : -SfxTabPage(pParent, "ViewOptionsPage", - "modules/swriter/ui/viewoptionspage.ui", ) +SwContentOptPage::SwContentOptPage(TabPageParent pParent, const SfxItemSet& rCoreSet) +: SfxTabPage(pParent, "modules/swriter/ui/viewoptionspage.ui", "ViewOptionsPage", ) +, m_xCrossCB(m_xBuilder->weld_check_button("helplines")) +, m_xHMetric(m_xBuilder->weld_combo_box("hrulercombobox")) +, m_xVRulerCBox(m_xBuilder->weld_check_button("vruler")) +, m_xVRulerRightCBox(m_xBuilder->weld_check_button("vrulerright")) +, m_xVMetric(m_xBuilder->weld_combo_box("vrulercombobox")) +, m_xSmoothCBox(m_xBuilder->weld_check_button("smoothscroll")) +, m_xGrfCB(m_xBuilder->weld_check_button("graphics")) +, m_xTableCB(m_xBuilder->weld_check_button("tables")) +, m_xDrwCB(m_xBuilder->weld_check_button("drawings")) +, m_xFieldNameCB(m_xBuilder->weld_check_button("fieldcodes")) +, m_xPostItCB(m_xBuilder->weld_check_button("comments")) +, m_xSettingsFrame(m_xBuilder->weld_frame("settingsframe")) +, m_xSettingsLabel(m_xBuilder->weld_label("settingslabel")) +, m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel")) +, m_xMetricLB(m_xBuilder->weld_combo_box("measureunit")) +, m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip")) +, m_xFieldHiddenCB(m_xBuilder->weld_check_button("hiddentextfield")) +, m_xFieldHiddenParaCB(m_xBuilder->weld_check_button("hiddenparafield")) { -get (m_pCrossCB, "helplines"); - -get (m_pHMetric, "hrulercombobox"); -get (m_pVRulerCBox, "vruler"); -get (m_pVRulerRightCBox, "vrulerright"); -get (m_pVMetric, "vrulercombobox"); -get (m_pSmoothCBox, "smoothscroll"); - -get (m_pGrfCB, "graphics"); -get (m_pTableCB, "tables"); -get (m_pDrwCB, "drawings"); -get (m_pFieldNameCB, "fieldcodes"); -get (m_pPostItCB, "comments"); - -get(m_pFieldHiddenCB, "hiddentextfield"); -get(m_pFieldHiddenParaCB, "hiddenparafield"); - -get (m_pSettingsFrame, "settingsframe"); -get (m_pSettingsLabel, "settingslabel"); -get (m_pMetricLabel, "measureunitlabel"); -get (m_pMetricLB, "measureunit"); - -get (m_pShowInlineTooltips,"changestooltip"); - /* This part is visible only with Writer/Web->View dialogue. */ const SfxPoolItem* pItem; if (! (SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, ) && static_cast(pItem)->GetValue() & HTMLMODE_ON)) { -m_pSettingsFrame->Hide(); -m_pSettingsLabel->Hide(); -m_pMetricLabel->Hide(); -m_pMetricLB->Hide(); +m_xSettingsFrame->hide(); +m_xSettingsLabel->hide(); +m_xMetricLabel->hide(); +m_xMetricLB->hide(); } SvtCJKOptions aCJKOptions; if(!aCJKOptions.IsVerticalTextEnabled() ) -m_pVRulerRightCBox->Hide(); -m_pVRulerCBox->SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl )); +m_xVRulerRightCBox->hide(); +m_xVRulerCBox->connect_toggled(LINK(this, SwContentOptPage, VertRulerHdl )); for (size_t i = 0; i < SwFieldUnitTable::Count(); ++i) { @@ -157,18 +149,15 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, // only use these metrics // a horizontal ruler has not the 'line' unit // there isn't 'line' unit in HTML format -if ( eFUnit != FieldUnit::LINE ) +if (eFUnit != FieldUnit::LINE) { - sal_Int32 nPos = m_pMetricLB->InsertEntry( sMetric ); - m_pMetricLB->SetEntryData( nPos, reinterpret_cast(static_cast(eFUnit)) ); - m_pHMetric->InsertEntry( sMetric ); - m_pHMetric->SetEntryData( nPos, reinterpret_cast(static_cast(eFUnit)) ); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx| 189 +++-- sw/source/uibase/inc/optpage.hxx | 37 +++--- sw/uiconfig/swriter/ui/opttablepage.ui | 72 3 files changed, 150 insertions(+), 148 deletions(-) New commits: commit cc1c0f25046a6e3c6bd09122407970cd5aa602b4 Author: Caolán McNamara AuthorDate: Sat Jul 27 16:14:10 2019 +0100 Commit: Caolán McNamara CommitDate: Sat Jul 27 18:45:02 2019 +0200 weld SwTableOptionsTabPage Change-Id: I84af37e1dddf4c246b13311d31843d06bf473ac4 Reviewed-on: https://gerrit.libreoffice.org/76477 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 1fe20a7f38dc..0dbd6a86a8e3 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1043,60 +1043,39 @@ void SwStdFontTabPage::PageCreated( const SfxAllItemSet& aSet) m_nFontGroup = sal::static_int_cast< sal_uInt8, sal_uInt16>( pFlagItem->GetValue() ); } -SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) : -SfxTabPage(pParent, "OptTablePage", "modules/swriter/ui/opttablepage.ui", ), -m_pWrtShell(nullptr), -m_bHTMLMode(false) -{ -get(m_pHeaderCB,"header"); -get(m_pRepeatHeaderCB,"repeatheader"); -get(m_pDontSplitCB,"dontsplit"); -get(m_pBorderCB,"border"); -get(m_pNumFormattingCB,"numformatting"); -get(m_pNumFormatFormattingCB,"numfmtformatting"); -get(m_pNumAlignmentCB,"numalignment"); -get(m_pRowMoveMF,"rowmove"); -get(m_pColMoveMF,"colmove"); -get(m_pRowInsertMF,"rowinsert"); -get(m_pColInsertMF,"colinsert"); -get(m_pFixRB,"fix"); -get(m_pFixPropRB,"fixprop"); -get(m_pVarRB,"var"); - -Link aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl)); -m_pNumFormattingCB->SetClickHdl(aLnk); -m_pNumFormatFormattingCB->SetClickHdl(aLnk); -m_pHeaderCB->SetClickHdl(aLnk); +SwTableOptionsTabPage::SwTableOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet) +: SfxTabPage(pParent, "modules/swriter/ui/opttablepage.ui", "OptTablePage", ) +, m_pWrtShell(nullptr) +, m_bHTMLMode(false) +, m_xHeaderCB(m_xBuilder->weld_check_button("header")) +, m_xRepeatHeaderCB(m_xBuilder->weld_check_button("repeatheader")) +, m_xDontSplitCB(m_xBuilder->weld_check_button("dontsplit")) +, m_xBorderCB(m_xBuilder->weld_check_button("border")) +, m_xNumFormattingCB(m_xBuilder->weld_check_button("numformatting")) +, m_xNumFormatFormattingCB(m_xBuilder->weld_check_button("numfmtformatting")) +, m_xNumAlignmentCB(m_xBuilder->weld_check_button("numalignment")) +, m_xRowMoveMF(m_xBuilder->weld_metric_spin_button("rowmove", FieldUnit::CM)) +, m_xColMoveMF(m_xBuilder->weld_metric_spin_button("colmove", FieldUnit::CM)) +, m_xRowInsertMF(m_xBuilder->weld_metric_spin_button("rowinsert", FieldUnit::CM)) +, m_xColInsertMF(m_xBuilder->weld_metric_spin_button("colinsert", FieldUnit::CM)) +, m_xFixRB(m_xBuilder->weld_radio_button("fix")) +, m_xFixPropRB(m_xBuilder->weld_radio_button("fixprop")) +, m_xVarRB(m_xBuilder->weld_radio_button("var")) +{ +Link aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl)); +m_xNumFormattingCB->connect_clicked(aLnk); +m_xNumFormatFormattingCB->connect_clicked(aLnk); +m_xHeaderCB->connect_clicked(aLnk); } SwTableOptionsTabPage::~SwTableOptionsTabPage() { -disposeOnce(); -} - -void SwTableOptionsTabPage::dispose() -{ -m_pHeaderCB.clear(); -m_pRepeatHeaderCB.clear(); -m_pDontSplitCB.clear(); -m_pBorderCB.clear(); -m_pNumFormattingCB.clear(); -m_pNumFormatFormattingCB.clear(); -m_pNumAlignmentCB.clear(); -m_pRowMoveMF.clear(); -m_pColMoveMF.clear(); -m_pRowInsertMF.clear(); -m_pColInsertMF.clear(); -m_pFixRB.clear(); -m_pFixPropRB.clear(); -m_pVarRB.clear(); -SfxTabPage::dispose(); } VclPtr SwTableOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet ) { -return VclPtr::Create(pParent.pParent, *rAttrSet); +return VclPtr::Create(pParent, *rAttrSet); } bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* ) @@ -1104,22 +1083,22 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* ) bool bRet = false; SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); -if(m_pRowMoveMF->IsModified()) -pModOpt->SetTableHMove( static_cast(m_pRowMoveMF->Denormalize( m_pRowMoveMF->GetValue(FieldUnit::TWIP; +if (m_xRowMoveMF->get_value_changed_from_saved()) +pModOpt->SetTableHMove( static_cast(m_xRowMoveMF->denormalize( m_xRowMoveMF->get_value(FieldUnit::TWIP; -if(m_pColMoveMF->IsModified()) -pModOpt->SetTableVMove( static_cast(m_pColMoveMF->Denormalize( m_pColMoveMF->GetValue(FieldUnit::TWIP; +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/shells/textsh1.cxx |2 +- sw/uiconfig/swriter/ui/queryredlinedialog.ui |7 ++- 2 files changed, 3 insertions(+), 6 deletions(-) New commits: commit d96a490aa51fe6894a03e28a58e25e412c313f9e Author: Caolán McNamara AuthorDate: Tue Jul 16 10:52:54 2019 +0100 Commit: Caolán McNamara CommitDate: Tue Jul 16 16:55:15 2019 +0200 Related: tdf#126236 keep user defined responses out of ambiguous range Change-Id: I6481f40ba5f50c3d76978b0f4a477f1d0b9adc99 Reviewed-on: https://gerrit.libreoffice.org/75699 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 1d0668390253..3cc3be15ed9e 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -739,7 +739,7 @@ void SwTextShell::Execute(SfxRequest ) rReq.Ignore(); break; -case 2: +case 102: xDlg->Execute(); rReq.Done(); break; diff --git a/sw/uiconfig/swriter/ui/queryredlinedialog.ui b/sw/uiconfig/swriter/ui/queryredlinedialog.ui index 490d09a7ebbc..8a9780720af6 100644 --- a/sw/uiconfig/swriter/ui/queryredlinedialog.ui +++ b/sw/uiconfig/swriter/ui/queryredlinedialog.ui @@ -1,5 +1,5 @@ - + @@ -75,10 +75,7 @@ or accept or reject particular changes. cancel ok - edit + edit - - - ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optcomp.cxx |3 +++ sw/uiconfig/swriter/ui/optcompatpage.ui |6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 5580974cea55fc4aceb139cc128d4e9a030fed5b Author: Caolán McNamara AuthorDate: Tue Jun 11 17:20:16 2019 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 12 14:12:35 2019 +0200 Resolves: tdf#125799 only let doc options grow/shrink and give the global list of just 1 entry space for 2 to take the bare look off it, if there end up with more entries here, then let it take its natural size at that point Change-Id: Ic1834dc90cdcc061636ad49d69c301c7b570db3e Reviewed-on: https://gerrit.libreoffice.org/73832 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index b00d6ed073cb..fff81e5e82a5 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -115,6 +115,9 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(vcl::Window* pParent, const SfxIt m_pGlobalOptionsCLB->SetStyle( m_pGlobalOptionsCLB->GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_pGlobalOptionsCLB->SetHighlightRange(); +// tdf#125799, we let only the doc options grow/shrink but give this one more than its bare +// min request height because there's only one row in it and that looks somewhat abrupt + m_pGlobalOptionsCLB->set_height_request(m_pGlobalOptionsCLB->get_preferred_size().Height() * 2); InitControls( rSet ); diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui index 1e2942b79c21..abb693a99a02 100644 --- a/sw/uiconfig/swriter/ui/optcompatpage.ui +++ b/sw/uiconfig/swriter/ui/optcompatpage.ui @@ -123,7 +123,7 @@ True False True -True +False 0 none @@ -131,7 +131,7 @@ True False True -True +False 6 12 @@ -144,7 +144,7 @@ True True True -True +False ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mailmergewizard.cxx |2 sw/source/ui/dbui/mmlayoutpage.cxx | 167 ++--- sw/source/ui/dbui/mmlayoutpage.hxx | 51 -- sw/uiconfig/swriter/ui/mmlayoutpage.ui | 99 --- 4 files changed, 140 insertions(+), 179 deletions(-) New commits: commit c026ca2ac69f41887ec6f4c7df395b42cb48b6d7 Author: Caolán McNamara AuthorDate: Fri May 31 12:52:01 2019 +0100 Commit: Caolán McNamara CommitDate: Sat Jun 1 16:29:12 2019 +0200 weld SwMailMergeLayoutPage Change-Id: Iae43bcc3c0a94e9eca6d15384afd50d7a9a94c74 Reviewed-on: https://gerrit.libreoffice.org/73263 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 77535bf54f39..9e5b9ad2fc06 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -114,7 +114,7 @@ VclPtr SwMailMergeWizard::createPage(WizardState _nState) SetRoadmapHelpId("modules/swriter/ui/mmsalutationpage/MMSalutationPage"); break; case MM_LAYOUTPAGE : -pRet = VclPtr::Create(this); +pRet = VclPtr::Create(this, TabPageParent(this)); SetRoadmapHelpId("modules/swriter/ui/mmlayoutpage/MMLayoutPage"); break; } diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index cf2fcd450ae1..01cdb6b1576c 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -75,28 +75,22 @@ using namespace ::com::sun::star::view; #define DEFAULT_ADDRESS_WIDTH (MM50*15)// 7,5 cm #define DEFAULT_ADDRESS_HEIGHT (MM50*7) // 3,5cm -SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : -svt::OWizardPage(_pParent, "MMLayoutPage", -"modules/swriter/ui/mmlayoutpage.ui") +SwMailMergeLayoutPage::SwMailMergeLayoutPage(SwMailMergeWizard* pWizard, TabPageParent pParent) +: svt::OWizardPage(pParent, "modules/swriter/ui/mmlayoutpage.ui", "MMLayoutPage") , m_pExampleWrtShell(nullptr) , m_pAddressBlockFormat(nullptr) , m_bIsGreetingInserted(false) -, m_pWizard(_pParent) +, m_pWizard(pWizard) +, m_xPosition(m_xBuilder->weld_container("addresspos")) +, m_xAlignToBodyCB(m_xBuilder->weld_check_button("align")) +, m_xLeftFT(m_xBuilder->weld_label("leftft")) +, m_xLeftMF(m_xBuilder->weld_metric_spin_button("left", FieldUnit::CM)) +, m_xTopMF(m_xBuilder->weld_metric_spin_button("top", FieldUnit::CM)) +, m_xGreetingLine(m_xBuilder->weld_container("greetingspos")) +, m_xUpPB(m_xBuilder->weld_button("up")) +, m_xDownPB(m_xBuilder->weld_button("down")) +, m_xZoomLB(m_xBuilder->weld_combo_box("zoom")) { -get(m_pPosition, "addresspos"); -get(m_pGreetingLine, "greetingspos"); -get(m_pAlignToBodyCB, "align"); -get(m_pLeftFT, "leftft"); -get(m_pLeftMF, "left"); -get(m_pTopMF, "top"); -get(m_pUpPB, "up"); -get(m_pDownPB, "down"); -get(m_pExampleContainerWIN, "example"); -Size aSize(LogicToPixel(Size(124, 159), MapMode(MapUnit::MapAppFont))); -m_pExampleContainerWIN->set_width_request(aSize.Width()); -m_pExampleContainerWIN->set_height_request(aSize.Height()); -get(m_pZoomLB, "zoom"); - std::shared_ptr pSfxFlt = SwIoSystem::GetFilterOfFormat( FILTER_XML, SwDocShell::Factory().GetFilterContainer() ); @@ -122,40 +116,39 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : uno::Reference< frame::XStorable > xStore( pView->GetDocShell()->GetModel(), uno::UNO_QUERY); xStore->storeToURL( m_sExampleURL, aValues ); -Link aLink(LINK(this, SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)); -m_pExampleFrame.reset( new SwOneExampleFrame( *m_pExampleContainerWIN, -EX_SHOW_DEFAULT_PAGE, , _sExampleURL ) ); +Link aLink(LINK(this, SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)); +m_xExampleFrame.reset(new OneExampleFrame(EX_SHOW_DEFAULT_PAGE, , _sExampleURL)); +m_xExampleContainerWIN.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame)); + +Size aSize = m_xExampleFrame->GetDrawingArea()->get_ref_device().LogicToPixel( +Size(124, 159), MapMode(MapUnit::MapAppFont)); +m_xExampleFrame->set_size_request(aSize.Width(), aSize.Height()); -m_pExampleContainerWIN->Show(false); +m_xExampleContainerWIN->hide(); -m_pLeftMF->SetValue(m_pLeftMF->Normalize(DEFAULT_LEFT_DISTANCE), FieldUnit::TWIP); -m_pTopMF->SetValue(m_pTopMF->Normalize(DEFAULT_TOP_DISTANCE), FieldUnit::TWIP); +m_xLeftMF->set_value(m_xLeftMF->normalize(DEFAULT_LEFT_DISTANCE), FieldUnit::TWIP); +m_xTopMF->set_value(m_xTopMF->normalize(DEFAULT_TOP_DISTANCE), FieldUnit::TWIP); const LanguageTag& rLang =
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/fldui/fldpage.cxx |4 sw/source/ui/fldui/fldpage.hxx |2 sw/source/ui/fldui/fldvar.cxx| 28 +++--- sw/source/ui/fldui/fldvar.hxx|4 sw/uiconfig/swriter/ui/fldvarpage.ui | 159 +++ 5 files changed, 163 insertions(+), 34 deletions(-) New commits: commit 63f67b0b62e68728a554c5a76c531ad8542c4212 Author: Caolán McNamara AuthorDate: Tue Mar 19 21:46:25 2019 + Commit: Caolán McNamara CommitDate: Wed Mar 20 09:50:16 2019 +0100 fix some SwFieldVarPage problems Change-Id: Ib26efb7bf872b14ff4947ee3880fc316550ed226 Reviewed-on: https://gerrit.libreoffice.org/69449 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 787c33f29728..76155a46fba0 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -305,7 +305,7 @@ IMPL_LINK( SwFieldPage, TreeViewInsertHdl, weld::TreeView&, rBox, void ) InsertHdl(); } -void SwFieldPage::InsertHdl(void* pBtn) +void SwFieldPage::InsertHdl(weld::Widget* pBtn) { SwFieldDlg *pDlg = static_cast(GetTabDialog()); if (pDlg) @@ -313,7 +313,7 @@ void SwFieldPage::InsertHdl(void* pBtn) pDlg->InsertHdl(); if (pBtn) -static_cast(pBtn)->GrabFocus(); // because of InputField-Dlg +pBtn->grab_focus(); // because of InputField-Dlg } else { diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx index 3ac09fc7cc46..f09d368ba4f5 100644 --- a/sw/source/ui/fldui/fldpage.hxx +++ b/sw/source/ui/fldui/fldpage.hxx @@ -53,7 +53,7 @@ protected: DECL_LINK( TreeViewInsertHdl, weld::TreeView&, void ); DECL_LINK( NumFormatHdl, weld::TreeView&, void ); -voidInsertHdl(void *); +voidInsertHdl(weld::Widget*); voidInit(); voidSavePos( const weld::TreeView& rLst1); diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 05599ab2fd55..49c7f5f6584f 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -53,7 +53,7 @@ SwFieldVarPage::SwFieldVarPage(TabPageParent pParent, const SfxItemSet *const pC , m_xNumFormatLB(new SwNumFormatTreeView(m_xBuilder->weld_tree_view("numformat"))) , m_xFormatLB(m_xBuilder->weld_tree_view("format")) , m_xChapterFrame(m_xBuilder->weld_widget("chapterframe")) -, m_xChapterLevelLB(m_xBuilder->weld_tree_view("level")) +, m_xChapterLevelLB(m_xBuilder->weld_combo_box("level")) , m_xInvisibleCB(m_xBuilder->weld_check_button("invisible")) , m_xSeparatorFT(m_xBuilder->weld_label("separatorft")) , m_xSeparatorED(m_xBuilder->weld_entry("separator")) @@ -78,7 +78,7 @@ SwFieldVarPage::SwFieldVarPage(TabPageParent pParent, const SfxItemSet *const pC for (sal_uInt16 i = 1; i <= MAXLEVEL; i++) m_xChapterLevelLB->append_text(OUString::number(i)); -m_xChapterLevelLB->select(0); +m_xChapterLevelLB->set_active(0); //enable 'active' language selection m_xNumFormatLB->SetShowLanguageControl(true); } @@ -241,7 +241,6 @@ void SwFieldVarPage::SubTypeHdl(const weld::TreeView* pBox) if (m_xValueFT->get_label() != sOldValueFT) m_xValueFT->set_label(sOldValueFT); -m_xFormatLB->freeze(); FillFormatLB(nTypeId); sal_Int32 nSize = m_xFormatLB->n_children(); @@ -485,9 +484,9 @@ void SwFieldVarPage::SubTypeHdl(const weld::TreeView* pBox) { sal_uInt8 nLevel = static_cast(pFieldTyp)->GetOutlineLvl(); if( 0x7f == nLevel ) -m_xChapterLevelLB->select( 0 ); +m_xChapterLevelLB->set_active(0); else -m_xChapterLevelLB->select( nLevel + 1 ); +m_xChapterLevelLB->set_active(nLevel + 1); OUString sDelim = static_cast(pFieldTyp)->GetDelimiter(); m_xSeparatorED->set_text( sDelim ); ChapterHdl(*m_xChapterLevelLB); @@ -535,8 +534,6 @@ void SwFieldVarPage::SubTypeHdl(const weld::TreeView* pBox) m_xInvisibleCB->set_sensitive(bInvisible); ModifyHdl(*m_xNameED);// apply/insert/delete status update - -m_xFormatLB->thaw(); } IMPL_LINK(SwFieldVarPage, SubTypeInsertHdl, weld::TreeView&, rBox, void) @@ -684,6 +681,7 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) } // fill Format-Listbox +m_xFormatLB->freeze(); m_xFormatLB->clear(); rWidget.clear(); bool bSpecialFormat = false; @@ -764,15 +762,21 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) const sal_uInt16 nSize = GetFieldMgr().GetFormatCount(nTypeId, IsFieldDlgHtmlMode()); +OUString sSelectId; + for (sal_uInt16 i = 0; i < nSize; i++) {
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dialog/uiregionsw.cxx| 40 +- sw/source/uibase/inc/regionsw.hxx | 11 -- sw/uiconfig/swriter/ui/formatsectiondialog.ui | 104 +- 3 files changed, 126 insertions(+), 29 deletions(-) New commits: commit 9bfdd19de3a2bc12bc6331b3357763e47a4bed5c Author: Caolán McNamara AuthorDate: Fri Mar 15 09:40:52 2019 + Commit: Caolán McNamara CommitDate: Sat Mar 16 01:02:40 2019 +0100 weld SwSectionPropertyTabDialog Change-Id: I1958c4bcbd4e4acc1af1b81abd4dd6955a1a3de6 Reviewed-on: https://gerrit.libreoffice.org/69298 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index b0e896c4a022..26acfcffae92 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1143,10 +1143,10 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl, Button*, void) aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); -ScopedVclPtrInstance< SwSectionPropertyTabDialog > aTabDlg(this, aSet, rSh); -if(RET_OK == aTabDlg->Execute()) +SwSectionPropertyTabDialog aTabDlg(GetFrameWeld(), aSet, rSh); +if (RET_OK == aTabDlg.run()) { -const SfxItemSet* pOutSet = aTabDlg->GetOutputItemSet(); +const SfxItemSet* pOutSet = aTabDlg.GetOutputItemSet(); if( pOutSet && pOutSet->Count() ) { const SfxPoolItem *pColItem, *pBrushItem, @@ -2123,26 +2123,26 @@ IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, weld::ToggleButton&, rBox, v } SwSectionPropertyTabDialog::SwSectionPropertyTabDialog( -vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) -: SfxTabDialog(pParent, "FormatSectionDialog", -"modules/swriter/ui/formatsectiondialog.ui", ) +weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) +: SfxTabDialogController(pParent, "modules/swriter/ui/formatsectiondialog.ui", + "FormatSectionDialog", ) , rWrtSh(rSh) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); -m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create); -m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ) ); -m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create); -m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create); +AddTabPage("columns", SwColumnPage::Create, nullptr); +AddTabPage("background", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BKG), nullptr); +AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, nullptr); +AddTabPage("indents", SwSectionIndentTabPage::Create, nullptr); SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); long nHtmlMode = rHtmlOpt.GetExportMode(); bool bWeb = dynamic_cast( rSh.GetView().GetDocShell() ) != nullptr ; if(bWeb) { -RemoveTabPage(m_nNotePageId); -RemoveTabPage(m_nIndentPage); +RemoveTabPage("notes"); +RemoveTabPage("indents"); if( HTML_CFG_NS40 != nHtmlMode && HTML_CFG_WRITER != nHtmlMode) -RemoveTabPage(m_nColumnPageId); +RemoveTabPage("columns"); } } @@ -2150,20 +2150,20 @@ SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog() { } -void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage ) +void SwSectionPropertyTabDialog::PageCreated(const OString& rId, SfxTabPage ) { -if (nId == m_nBackPageId) +if (rId == "background") { -SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); -aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast(SvxBackgroundTabFlags::SHOW_SELECTOR))); -rPage.PageCreated(aSet); +SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); +aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast(SvxBackgroundTabFlags::SHOW_SELECTOR))); +rPage.PageCreated(aSet); } -else if (nId == m_nColumnPageId) +else if (rId == "columns") { static_cast(rPage).ShowBalance(true); static_cast(rPage).SetInSection(true); } -else if (nId == m_nIndentPage) +else if (rId == "indents") static_cast(rPage).SetWrtShell(rWrtSh); } diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx index fe44a70da0ca..4a54a0d72062 100644 --- a/sw/source/uibase/inc/regionsw.hxx +++ b/sw/source/uibase/inc/regionsw.hxx @@ -257,19 +257,14 @@ public: SwSectionData * GetSectionData() { return m_pSectionData.get(); } }; -class SwSectionPropertyTabDialog : public SfxTabDialog +class SwSectionPropertyTabDialog : public SfxTabDialogController { SwWrtShell& rWrtSh; -sal_uInt16 m_nColumnPageId; -sal_uInt16 m_nBackPageId; -sal_uInt16 m_nNotePageId; -sal_uInt16
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/fldui/fldvar.cxx| 24 +- sw/source/ui/fldui/fldvar.hxx|7 sw/uiconfig/swriter/ui/fldvarpage.ui | 316 +-- 3 files changed, 138 insertions(+), 209 deletions(-) New commits: commit 0a9094007cb9ad3e37866730c8a66c3ed92eeeb9 Author: Caolán McNamara AuthorDate: Wed Mar 13 17:36:44 2019 + Commit: Caolán McNamara CommitDate: Thu Mar 14 09:59:27 2019 +0100 Resolves: tdf#90863 replace toolbar with apply/remove buttons which is consistent with the calc format->cells->numbering page and solves the keyboard traversal problem here Change-Id: I90c0f4a380693af871bbd20912eafcf5ea259fc7 Reviewed-on: https://gerrit.libreoffice.org/69229 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index d156a13204cf..ce303e37dab6 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -64,7 +64,8 @@ SwFieldVarPage::SwFieldVarPage(vcl::Window* pParent, const SfxItemSet *const pCo get(m_pInvisibleCB, "invisible"); get(m_pSeparatorFT, "separatorft"); get(m_pSeparatorED, "separator"); -get(m_pNewDelTBX, "toolbar"); +get(m_pNewPB, "apply"); +get(m_pDelPB, "delete"); long nHeight = m_pTypeLB->GetTextHeight() * 20; m_pTypeLB->set_height_request(nHeight); @@ -76,9 +77,6 @@ SwFieldVarPage::SwFieldVarPage(vcl::Window* pParent, const SfxItemSet *const pCo m_pSelectionLB->set_width_request(nWidth); m_pFormatLB->set_width_request(nWidth); -m_nApplyId = m_pNewDelTBX->GetItemId("apply"); -m_nDeleteId = m_pNewDelTBX->GetItemId("delete"); - sOldValueFT = m_pValueFT->GetText(); sOldNameFT = m_pNameFT->GetText(); @@ -112,7 +110,8 @@ void SwFieldVarPage::dispose() m_pInvisibleCB.clear(); m_pSeparatorFT.clear(); m_pSeparatorED.clear(); -m_pNewDelTBX.clear(); +m_pNewPB.clear(); +m_pDelPB.clear(); SwFieldPage::dispose(); } @@ -172,7 +171,8 @@ void SwFieldVarPage::Reset(const SfxItemSet* ) m_pNumFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl)); m_pNameED->SetModifyHdl(LINK(this, SwFieldVarPage, ModifyHdl)); m_pValueED->SetModifyHdl (LINK(this, SwFieldVarPage, ModifyHdl)); -m_pNewDelTBX->SetClickHdl (LINK(this, SwFieldVarPage, TBClickHdl)); +m_pNewPB->SetClickHdl (LINK(this, SwFieldVarPage, TBClickHdl)); +m_pDelPB->SetClickHdl (LINK(this, SwFieldVarPage, TBClickHdl)); m_pChapterLevelLB->SetSelectHdl(LINK(this, SwFieldVarPage, ChapterHdl)); m_pSeparatorED->SetModifyHdl (LINK(this, SwFieldVarPage, SeparatorHdl)); @@ -952,18 +952,16 @@ IMPL_LINK_NOARG(SwFieldVarPage, ModifyHdl, Edit&, void) break; } -m_pNewDelTBX->EnableItem(m_nApplyId, bApply); -m_pNewDelTBX->EnableItem(m_nDeleteId, bDelete); +m_pNewPB->Enable(bApply); +m_pDelPB->Enable(bDelete); EnableInsert(bInsert); } -IMPL_LINK( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, void ) +IMPL_LINK( SwFieldVarPage, TBClickHdl, Button*, pBox, void ) { const sal_uInt16 nTypeId = static_cast(reinterpret_cast(m_pTypeLB->GetEntryData(GetTypeSel(; -const sal_uInt16 nCurId = pBox->GetCurItemId(); - -if (nCurId == m_nDeleteId) +if (pBox == m_pDelPB) { if( nTypeId == TYP_USERFLD ) GetFieldMgr().RemoveFieldType(SwFieldIds::User, m_pSelectionLB->GetSelectedEntry()); @@ -994,7 +992,7 @@ IMPL_LINK( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, void ) pSh->SetModified(); } } -else if (nCurId == m_nApplyId) +else if (pBox == m_pNewPB) { OUString sName(m_pNameED->GetText()), sValue(m_pValueED->GetText()); SwFieldType* pType = nullptr; diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index 1ed556b1fcc2..b7afe73f0497 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -65,9 +65,8 @@ class SwFieldVarPage : public SwFieldPage VclPtr m_pInvisibleCB; VclPtr m_pSeparatorFT; VclPtr m_pSeparatorED; -VclPtrm_pNewDelTBX; -sal_uInt16 m_nApplyId; -sal_uInt16 m_nDeleteId; +VclPtr m_pNewPB; +VclPtr m_pDelPB; OUStringsOldValueFT; OUStringsOldNameFT; @@ -78,7 +77,7 @@ class SwFieldVarPage : public SwFieldPage DECL_LINK( TypeHdl, ListBox&, void ); DECL_LINK( SubTypeListBoxHdl, ListBox&, void ); DECL_LINK( ModifyHdl, Edit&, void ); -DECL_LINK( TBClickHdl, ToolBox *, void ); +DECL_LINK( TBClickHdl, Button*, void ); DECL_LINK( ChapterHdl, ListBox&, void ); DECL_LINK( SeparatorHdl, Edit&, void ); void SubTypeHdl(ListBox const *); diff --git a/sw/uiconfig/swriter/ui/fldvarpage.ui
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optcomp.cxx |2 +- sw/uiconfig/swriter/ui/optcompatpage.ui |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit ba296f8e413f0cb1cd4095a342495b511df2aea4 Author: Tamás Zolnai AuthorDate: Thu Feb 21 13:40:14 2019 +0100 Commit: Tamás Zolnai CommitDate: Sat Mar 9 13:14:00 2019 +0100 Fix typo Change-Id: I2b09bf30c3769f6b987409cabf24735647d3c31d Reviewed-on: https://gerrit.libreoffice.org/68958 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index fa5d55497f8d..0eebed82220d 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -60,7 +60,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(vcl::Window* pParent, const SfxIt get(m_pFormattingLB, "format"); get(m_pGlobalOptionsLB, "globaloptions"); get(m_pOptionsLB, "options"); -get(m_pGlobalOptionsCLB, "globaloptioncheckboxs"); +get(m_pGlobalOptionsCLB, "globaloptioncheckbox"); get(m_pDefaultPB, "default"); for ( int i = static_cast(SvtCompatibilityEntry::Index::Module) + 1; i < static_cast(SvtCompatibilityEntry::Index::INVALID); ++i ) diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui index 8f4a5342c75d..3965324f43bb 100644 --- a/sw/uiconfig/swriter/ui/optcompatpage.ui +++ b/sw/uiconfig/swriter/ui/optcompatpage.ui @@ -140,7 +140,7 @@ False 5 - + True True True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/addresslistdialog.cxx | 345 ++ sw/source/ui/dbui/addresslistdialog.hxx | 54 ++-- sw/source/ui/dbui/mmaddressblockpage.cxx | 14 - sw/uiconfig/swriter/ui/selectaddressdialog.ui | 109 4 files changed, 236 insertions(+), 286 deletions(-) New commits: commit 3963bab7c1cd31b946646131cdc5576894675293 Author: Caolán McNamara AuthorDate: Thu Feb 28 14:52:50 2019 + Commit: Caolán McNamara CommitDate: Fri Mar 1 11:04:25 2019 +0100 weld SwCreateAddressListDialog Change-Id: I3ae15af8a2c7475394dfc5f6e54b89950d2238c0 Reviewed-on: https://gerrit.libreoffice.org/68511 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 9d62691d751c..20633a13e692 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -71,9 +71,6 @@ using namespace ::com::sun::star::task; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::ui::dialogs; -#define ITEMID_NAME 1 -#define ITEMID_TABLE2 - struct AddressUserData_Impl { uno::Reference xSource; @@ -125,90 +122,52 @@ static OUString lcl_getFlatURL( uno::Reference const & xSou return OUString(); } -class SwAddrSourceLB : public SvSimpleTable -{ -public: -explicit SwAddrSourceLB(SvSimpleTableContainer& rParent) -: SvSimpleTable(rParent, 0) -{ -} -virtual void Resize() override; -void setColSizes(); -}; - -void SwAddrSourceLB::Resize() -{ -SvSimpleTable::Resize(); -setColSizes(); -} - -void SwAddrSourceLB::setColSizes() +SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) +: SfxDialogController(pParent->GetFrameWeld(), "modules/swriter/ui/selectaddressdialog.ui", "SelectAddressDialog") +, m_bInSelectHdl(false) +, m_xAddressPage(pParent) +, m_xDescriptionFI(m_xBuilder->weld_label("desc")) +, m_xConnecting(m_xBuilder->weld_label("connecting")) +, m_xListLB(m_xBuilder->weld_tree_view("sources")) +, m_xLoadListPB(m_xBuilder->weld_button("add")) +, m_xCreateListPB(m_xBuilder->weld_button("create")) +, m_xFilterPB(m_xBuilder->weld_button("filter")) +, m_xEditPB(m_xBuilder->weld_button("edit")) +, m_xTablePB(m_xBuilder->weld_button("changetable")) +, m_xOK(m_xBuilder->weld_button("ok")) +, m_xIter(m_xListLB->make_iterator()) { -HeaderBar = GetTheHeaderBar(); -if (rHB.GetItemCount() < 2) -return; +m_sConnecting = m_xConnecting->get_label(); -long nWidth = rHB.GetSizePixel().Width(); +const OUString sTemp(m_xDescriptionFI->get_label() +.replaceFirst("%1", m_xLoadListPB->get_label()) +.replaceFirst("%2", m_xCreateListPB->get_label())); +m_xDescriptionFI->set_label(sTemp); +m_xFilterPB->connect_clicked( LINK( this, SwAddressListDialog, FilterHdl_Impl )); +m_xLoadListPB->connect_clicked( LINK( this, SwAddressListDialog, LoadHdl_Impl )); +m_xCreateListPB->connect_clicked( LINK( this, SwAddressListDialog,CreateHdl_Impl )); +m_xEditPB->connect_clicked(LINK( this, SwAddressListDialog, EditHdl_Impl)); +m_xTablePB->connect_clicked(LINK( this, SwAddressListDialog, TableSelectHdl_Impl)); -long nTabs[] = { 0, nWidth/2 }; +m_xListLB->set_size_request(m_xListLB->get_approximate_digit_width() * 52, +m_xListLB->get_height_rows(9)); -SvSimpleTable::SetTabs(SAL_N_ELEMENTS(nTabs), nTabs, MapUnit::MapPixel); -} - -SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) -: SfxModalDialog(pParent, "SelectAddressDialog", -"modules/swriter/ui/selectaddressdialog.ui") +std::vector aWidths; +aWidths.push_back(m_xListLB->get_approximate_digit_width() * 26); +m_xListLB->set_column_fixed_widths(aWidths); -, - -m_pCreatedDataSource(nullptr), -m_bInSelectHdl(false), -m_pAddressPage(pParent) -{ -get(m_pDescriptionFI, "desc"); -get(m_pLoadListPB, "add"); -get(m_pCreateListPB, "create"); -get(m_pFilterPB, "filter"); -get(m_pEditPB, "edit"); -get(m_pTablePB, "changetable"); -get(m_pOK, "ok"); - -OUString sName = get("name")->GetText(); -OUString sTable = get("table")->GetText(); -m_sConnecting = get("connecting")->GetText(); - -const OUString sTemp(m_pDescriptionFI->GetText() -.replaceFirst("%1", m_pLoadListPB->GetText()) -.replaceFirst("%2", m_pCreateListPB->GetText())); -m_pDescriptionFI->SetText(sTemp); -m_pFilterPB->SetClickHdl( LINK( this, SwAddressListDialog, FilterHdl_Impl )); -m_pLoadListPB->SetClickHdl( LINK( this, SwAddressListDialog, LoadHdl_Impl )); -m_pCreateListPB->SetClickHdl( LINK( this, SwAddressListDialog,CreateHdl_Impl )); -m_pEditPB->SetClickHdl(LINK( this,
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optpage.cxx | 21 sw/source/uibase/config/cfgitems.cxx| 24 - sw/source/uibase/inc/cfgitems.hxx |4 - sw/source/uibase/inc/optpage.hxx|5 -- sw/uiconfig/swriter/ui/optformataidspage.ui | 69 sw/uiconfig/swriter/ui/viewoptionspage.ui | 67 +++ 6 files changed, 93 insertions(+), 97 deletions(-) New commits: commit 7dcd1651e8cd89f07bbe618393bea32fc73d3549 Author: heiko tietze AuthorDate: Thu Feb 14 11:33:54 2019 +0100 Commit: Heiko Tietze CommitDate: Mon Feb 18 09:49:50 2019 +0100 Resolves tdf#123091 - Move Display Fields section from Formatting Aids to View Change-Id: Ie302ff30328bd23c280369db0bb84c6103335ae3 Reviewed-on: https://gerrit.libreoffice.org/67812 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 7f717160d4fc..d497d3e3dcd0 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -110,6 +110,9 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, get (m_pFieldNameCB, "fieldcodes"); get (m_pPostItCB, "comments"); +get(m_pFieldHiddenCB, "hiddentextfield"); +get(m_pFieldHiddenParaCB, "hiddenparafield"); + get (m_pSettingsFrame, "settingsframe"); get (m_pSettingsLabel, "settingslabel"); get (m_pMetricLabel, "measureunitlabel"); @@ -189,6 +192,8 @@ void SwContentOptPage::dispose() m_pDrwCB.clear(); m_pFieldNameCB.clear(); m_pPostItCB.clear(); +m_pFieldHiddenCB.clear(); +m_pFieldHiddenParaCB.clear(); m_pSettingsFrame.clear(); m_pSettingsLabel.clear(); m_pMetricLabel.clear(); @@ -240,6 +245,8 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet) m_pVRulerRightCBox->Check (pElemAttr->bVertRulerRight); m_pSmoothCBox->Check (pElemAttr->bSmoothScroll); m_pShowInlineTooltips->Check (pElemAttr->bShowInlineTooltips); +m_pFieldHiddenCB->Check ( pElemAttr->bFieldHiddenText ); +m_pFieldHiddenParaCB->Check ( pElemAttr->bShowHiddenPara ); } m_pMetricLB->SetNoSelection(); lcl_SelectMetricLB(m_pMetricLB, SID_ATTR_METRIC, *rSet); @@ -263,6 +270,8 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) aElem.bVertRulerRight = m_pVRulerRightCBox->IsChecked(); aElem.bSmoothScroll = m_pSmoothCBox->IsChecked(); aElem.bShowInlineTooltips = m_pShowInlineTooltips->IsChecked(); +aElem.bFieldHiddenText = m_pFieldHiddenCB->IsChecked(); +aElem.bShowHiddenPara = m_pFieldHiddenParaCB->IsChecked(); bool bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) @@ -1261,8 +1270,6 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage( vcl::Window* pParent, get(m_pTabCB, "tabs"); get(m_pBreakCB, "break"); get(m_pCharHiddenCB, "hiddentext"); -get(m_pFieldHiddenCB, "hiddentextfield"); -get(m_pFieldHiddenParaCB, "hiddenparafield"); get(m_pDirectCursorFrame, "directcrsrframe"); get(m_pOnOffCB, "cursoronoff"); @@ -1302,8 +1309,8 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage( vcl::Window* pParent, m_pTabCB->Hide(); m_pCharHiddenCB->Hide(); -m_pFieldHiddenCB->Hide(); -m_pFieldHiddenParaCB->Hide(); +//m_pFieldHiddenCB->Hide(); +//m_pFieldHiddenParaCB->Hide(); m_pDirectCursorFrame->Hide(); m_pOnOffCB->Hide(); @@ -1332,8 +1339,6 @@ void SwShdwCursorOptionsTabPage::dispose() m_pTabCB.clear(); m_pBreakCB.clear(); m_pCharHiddenCB.clear(); -m_pFieldHiddenCB.clear(); -m_pFieldHiddenParaCB.clear(); m_pDirectCursorFrame.clear(); m_pOnOffCB.clear(); m_pFillMarginRB.clear(); @@ -1408,9 +1413,7 @@ bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* rSet ) aDisp.bSpace= m_pSpacesCB->IsChecked(); aDisp.bNonbreakingSpace = m_pHSpacesCB->IsChecked(); aDisp.bSoftHyphen = m_pSHyphCB->IsChecked(); -aDisp.bFieldHiddenText= m_pFieldHiddenCB->IsChecked(); aDisp.bCharHiddenText = m_pCharHiddenCB->IsChecked(); -aDisp.bShowHiddenPara = m_pFieldHiddenParaCB->IsChecked(); aDisp.bManualBreak = m_pBreakCB->IsChecked(); bRet |= (!pOldAttr || aDisp != *pOldAttr); @@ -1463,8 +1466,6 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet ) m_pHSpacesCB->Check ( pDocDisplayAttr->bNonbreakingSpace ); m_pSHyphCB->Check ( pDocDisplayAttr->bSoftHyphen ); m_pCharHiddenCB->Check ( pDocDisplayAttr->bCharHiddenText ); -m_pFieldHiddenCB->Check ( pDocDisplayAttr->bFieldHiddenText ); -m_pFieldHiddenParaCB->Check ( pDocDisplayAttr->bShowHiddenPara ); m_pBreakCB->Check ( pDocDisplayAttr->bManualBreak ); } } diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/config/optload.cxx | 15 +++ sw/source/ui/frmdlg/cption.cxx |4 ++-- sw/source/uibase/inc/optload.hxx |4 ++-- sw/uiconfig/swriter/ui/captiondialog.ui |8 +++- sw/uiconfig/swriter/ui/optcaptionpage.ui |1 - 5 files changed, 18 insertions(+), 14 deletions(-) New commits: commit 320e8d38b7d0c5a47fdae13a657af9d9b896f279 Author: Caolán McNamara AuthorDate: Wed Dec 12 11:02:57 2018 + Commit: Caolán McNamara CommitDate: Wed Dec 12 21:09:39 2018 +0100 weld SwCaptionOptDlg Change-Id: Iac2cb2ab3239e23a64dbc528f0d07d4071c4815c Reviewed-on: https://gerrit.libreoffice.org/65011 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 6c2c3755a21a..cbba58516fdd 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -393,12 +393,13 @@ IMPL_LINK_NOARG(SwLoadOptPage, MetricHdl, ListBox&, void) } } -SwCaptionOptDlg::SwCaptionOptDlg(vcl::Window* pParent, const SfxItemSet& rSet) -: SfxSingleTabDialog(pParent, rSet, "CaptionDialog", -"modules/swriter/ui/captiondialog.ui") +SwCaptionOptDlg::SwCaptionOptDlg(weld::Window* pParent, const SfxItemSet& rSet) +: SfxSingleTabDialogController(pParent, rSet, "modules/swriter/ui/captiondialog.ui", + "CaptionDialog") { // create TabPage -SetTabPage(SwCaptionOptPage::Create(get_content_area(), )); +TabPageParent aParent(get_content_area(), this); +SetTabPage(SwCaptionOptPage::Create(aParent, )); } SwCaptionPreview::SwCaptionPreview(vcl::Window* pParent, WinBits nStyle) @@ -889,10 +890,8 @@ void SwCaptionOptPage::ModifyHdl() { const OUString sFieldTypeName = m_xCategoryBox->get_active_text(); -SfxSingleTabDialog *pDlg = dynamic_cast(GetTabDialog()); -PushButton *pBtn = pDlg ? pDlg->GetOKButton() : nullptr; -if (pBtn) -pBtn->Enable(!sFieldTypeName.isEmpty()); +if (SfxSingleTabDialogController* pDlg = dynamic_cast(GetDialogController())) +pDlg->GetOKButton().set_sensitive(!sFieldTypeName.isEmpty()); bool bEnable = m_xCategoryBox->get_sensitive() && sFieldTypeName != m_sNone; m_xFormatText->set_sensitive(bEnable); diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 3f650c189003..cf1668f42c2f 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -352,8 +352,8 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl, Edit&, void) IMPL_LINK_NOARG(SwCaptionDialog, CaptionHdl, Button*, void) { SfxItemSet aSet( rView.GetDocShell()->GetDoc()->GetAttrPool() ); -ScopedVclPtrInstance< SwCaptionOptDlg > aDlg( this, aSet ); -aDlg->Execute(); +SwCaptionOptDlg aDlg(GetFrameWeld(), aSet); +aDlg.run(); } void SwCaptionDialog::DrawSample() diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index c027a9925a0e..6f23242811b6 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -95,10 +95,10 @@ public: virtual voidReset( const SfxItemSet* rSet ) override; }; -class SwCaptionOptDlg : public SfxSingleTabDialog +class SwCaptionOptDlg : public SfxSingleTabDialogController { public: -SwCaptionOptDlg(vcl::Window* pParent, const SfxItemSet& rSet); +SwCaptionOptDlg(weld::Window* pParent, const SfxItemSet& rSet); }; class SwCaptionPreview : public vcl::Window diff --git a/sw/uiconfig/swriter/ui/captiondialog.ui b/sw/uiconfig/swriter/ui/captiondialog.ui index 8ed3590ebcda..776b1cce44bf 100644 --- a/sw/uiconfig/swriter/ui/captiondialog.ui +++ b/sw/uiconfig/swriter/ui/captiondialog.ui @@ -1,5 +1,5 @@ - + @@ -7,7 +7,13 @@ 6 Caption False +True +0 +0 dialog + + + False diff --git a/sw/uiconfig/swriter/ui/optcaptionpage.ui b/sw/uiconfig/swriter/ui/optcaptionpage.ui index 133505ec6d23..9abdce1ff1ce 100644 --- a/sw/uiconfig/swriter/ui/optcaptionpage.ui +++ b/sw/uiconfig/swriter/ui/optcaptionpage.ui @@ -441,7 +441,6 @@ 0.5 -True 0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/frmdlg/frmpage.cxx | 81 ++- sw/source/uibase/inc/frmpage.hxx | 17 +++ sw/uiconfig/swriter/ui/frmurlpage.ui | 30 +++- 3 files changed, 49 insertions(+), 79 deletions(-) New commits: commit e796f0b499e1eb2eede7e5e1524d2ebb85601b47 Author: Caolán McNamara AuthorDate: Thu Nov 22 16:31:04 2018 + Commit: Caolán McNamara CommitDate: Thu Nov 22 21:58:02 2018 +0100 weld SwFrameURLPage Change-Id: If189c6bbc11f85a47e3908e4ffcef36344ff8f9d Reviewed-on: https://gerrit.libreoffice.org/63819 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index edee604b9759..e0658c14ade9 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2743,18 +2743,16 @@ void BmpWindow::SetBitmapEx(const BitmapEx& rBmp) } // set URL and ImageMap at frames -SwFrameURLPage::SwFrameURLPage( vcl::Window *pParent, const SfxItemSet ) : -SfxTabPage(pParent, "FrameURLPage" , "modules/swriter/ui/frmurlpage.ui", ) +SwFrameURLPage::SwFrameURLPage(TabPageParent pParent, const SfxItemSet ) +: SfxTabPage(pParent, "modules/swriter/ui/frmurlpage.ui", "FrameURLPage", ) +, m_xURLED(m_xBuilder->weld_entry("url")) +, m_xSearchPB(m_xBuilder->weld_button("search")) +, m_xNameED(m_xBuilder->weld_entry("name")) +, m_xFrameCB(m_xBuilder->weld_combo_box("frame")) +, m_xServerCB(m_xBuilder->weld_check_button("server")) +, m_xClientCB(m_xBuilder->weld_check_button("client")) { -get(pURLED,"url"); -get(pSearchPB,"search"); -get(pNameED,"name"); -get(pFrameCB,"frame"); - -get(pServerCB,"server"); -get(pClientCB,"client"); - -pSearchPB->SetClickHdl(LINK(this, SwFrameURLPage, InsertFileHdl)); +m_xSearchPB->connect_clicked(LINK(this, SwFrameURLPage, InsertFileHdl)); } SwFrameURLPage::~SwFrameURLPage() @@ -2762,17 +2760,6 @@ SwFrameURLPage::~SwFrameURLPage() disposeOnce(); } -void SwFrameURLPage::dispose() -{ -pURLED.clear(); -pSearchPB.clear(); -pNameED.clear(); -pFrameCB.clear(); -pServerCB.clear(); -pClientCB.clear(); -SfxTabPage::dispose(); -} - void SwFrameURLPage::Reset( const SfxItemSet *rSet ) { const SfxPoolItem* pItem; @@ -2783,9 +2770,9 @@ void SwFrameURLPage::Reset( const SfxItemSet *rSet ) if( !pList->empty() ) { size_t nCount = pList->size(); -for ( size_t i = 0; i < nCount; i++ ) +for (size_t i = 0; i < nCount; ++i) { -pFrameCB->InsertEntry( pList->at( i ) ); +m_xFrameCB->append_text(pList->at(i)); } } } @@ -2793,22 +2780,22 @@ void SwFrameURLPage::Reset( const SfxItemSet *rSet ) if ( SfxItemState::SET == rSet->GetItemState( RES_URL, true, ) ) { const SwFormatURL* pFormatURL = static_cast(pItem); -pURLED->SetText( INetURLObject::decode( pFormatURL->GetURL(), - INetURLObject::DecodeMechanism::Unambiguous )); -pNameED->SetText( pFormatURL->GetName()); +m_xURLED->set_text(INetURLObject::decode(pFormatURL->GetURL(), + INetURLObject::DecodeMechanism::Unambiguous)); +m_xNameED->set_text(pFormatURL->GetName()); -pClientCB->Enable( pFormatURL->GetMap() != nullptr ); -pClientCB->Check ( pFormatURL->GetMap() != nullptr ); -pServerCB->Check ( pFormatURL->IsServerMap() ); +m_xClientCB->set_sensitive(pFormatURL->GetMap() != nullptr); +m_xClientCB->set_active(pFormatURL->GetMap() != nullptr); +m_xServerCB->set_active(pFormatURL->IsServerMap()); -pFrameCB->SetText(pFormatURL->GetTargetFrameName()); -pFrameCB->SaveValue(); +m_xFrameCB->set_entry_text(pFormatURL->GetTargetFrameName()); +m_xFrameCB->save_value(); } else -pClientCB->Enable( false ); +m_xClientCB->set_sensitive(false); -pServerCB->SaveValue(); -pClientCB->SaveValue(); +m_xServerCB->save_state(); +m_xClientCB->save_state(); } bool SwFrameURLPage::FillItemSet(SfxItemSet *rSet) @@ -2822,27 +2809,27 @@ bool SwFrameURLPage::FillItemSet(SfxItemSet *rSet) pFormatURL.reset(new SwFormatURL()); { -const OUString sText = pURLED->GetText(); +const OUString sText = m_xURLED->get_text(); if( pFormatURL->GetURL() != sText || -pFormatURL->GetName() != pNameED->GetText() || -pServerCB->IsChecked() != pFormatURL->IsServerMap() ) +pFormatURL->GetName() != m_xNameED->get_text() || +m_xServerCB->get_active() != pFormatURL->IsServerMap() ) { -pFormatURL->SetURL( sText, pServerCB->IsChecked() ); -pFormatURL->SetName( pNameED->GetText() ); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/UIConfig_swriter.mk |1 sw/source/ui/dialog/swdlgfact.cxx |2 sw/source/ui/fmtui/tmpdlg.cxx | 152 +++-- sw/source/uibase/inc/tmpdlg.hxx|4 sw/uiconfig/swriter/ui/comboboxfragment.ui |8 + 5 files changed, 69 insertions(+), 98 deletions(-) New commits: commit 35d548e414903c9f513c0899a2bab475ff56d0f0 Author: Caolán McNamara AuthorDate: Sat Nov 17 15:33:54 2018 + Commit: Caolán McNamara CommitDate: Sat Nov 17 17:49:45 2018 +0100 weld writer numbering styles dialog Change-Id: I697fa74a21acec550fcacd2a8d8468dfb21afcac Reviewed-on: https://gerrit.libreoffice.org/63495 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 0ab905433e7d..37dffed460ed 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -112,6 +112,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/columndialog \ sw/uiconfig/swriter/ui/columnpage \ sw/uiconfig/swriter/ui/columnwidth \ + sw/uiconfig/swriter/ui/comboboxfragment \ sw/uiconfig/swriter/ui/conditionpage \ sw/uiconfig/swriter/ui/converttexttable \ sw/uiconfig/swriter/ui/createaddresslist \ diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index c773d98038ac..83ae9b85ba41 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -1008,7 +1008,7 @@ VclPtr SwAbstractDialogFactory_Impl::CreateTemplateDi SwWrtShell* pActShell, boolbNew ) { -if (nRegion == SfxStyleFamily::Page) +if (nRegion == SfxStyleFamily::Page || nRegion == SfxStyleFamily::Pseudo) { return VclPtr::Create(o3tl::make_unique(pParent ? pParent->GetFrameWeld() : nullptr, rBase, nRegion, sPage, pActShell, bNew)); } diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 43a520866966..20344ea0ed9b 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -100,10 +100,6 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent, , m_nHeaderId(0) , m_nFooterId(0) , m_nPageId(0) -, m_nBulletId(0) -, m_nNumId(0) -, m_nNumOptId(0) -, m_nNumPosId(0) { nHtmlMode = ::GetHtmlMode(pWrtShell->GetView().GetDocShell()); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -250,54 +246,6 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent, break; } -// page styles -case SfxStyleFamily::Page: -{ -// add Area and Transparence TabPages -m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA )); -m_nTransparenceId = AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) ); - -m_nHeaderId = AddTabPage("header", SvxHeaderPage::Create, SvxHeaderPage::GetRanges); -m_nFooterId = AddTabPage("footer", SvxFooterPage::Create, SvxFooterPage::GetRanges); - -OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), "GetTabPageCreatorFunc fail!"); -OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ), "GetTabPageRangesFunc fail!"); -m_nPageId = AddTabPage("page", -pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), -pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ) ); -if (0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell())) -{ -OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!"); -OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!"); -m_nBorderId = AddTabPage("borders", -pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) ); -m_nColumnId = AddTabPage("columns", SwColumnPage::Create, SwColumnPage::GetRanges ); -AddTabPage("footnotes", SwFootNotePage::Create, SwFootNotePage::GetRanges ); -AddTabPage("textgrid", SwTextGridPage::Create, SwTextGridPage::GetRanges ); -SvtCJKOptions aCJKOptions; -if(!aCJKOptions.IsAsianTypographyEnabled()) -RemoveTabPage("textgrid"); -} -else -{ -RemoveTabPage("borders"); -RemoveTabPage("columns"); -RemoveTabPage("footnotes"); -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mailmergewizard.cxx |2 sw/source/ui/dbui/mmdocselectpage.cxx | 90 ++--- sw/source/ui/dbui/mmdocselectpage.hxx | 29 -- sw/uiconfig/swriter/ui/mmselectpage.ui |9 +-- 4 files changed, 58 insertions(+), 72 deletions(-) New commits: commit bfd6233cc83aa368d4869ae5901219238fb02e13 Author: Caolán McNamara AuthorDate: Thu Oct 18 09:24:58 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 18 14:18:56 2018 +0200 weld SwMailMergeDocSelectPage Change-Id: I0a319624656eb1305522ebd4ae3ff63d5106db3b Reviewed-on: https://gerrit.libreoffice.org/61910 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index ed43ce86e430..43234669beef 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -93,7 +93,7 @@ VclPtr SwMailMergeWizard::createPage(WizardState _nState) switch(_nState) { case MM_DOCUMENTSELECTPAGE : -pRet = VclPtr::Create(this); +pRet = VclPtr::Create(this, TabPageParent(this)); /* tdf#52986 Set help ID using SetRoadmapHelpId for all pages so that when by default the focus is on the left side pane of diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 2ea8679dd9e4..af68496086d0 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -42,45 +42,43 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace svt; -SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(SwMailMergeWizard* pParent) -: svt::OWizardPage(pParent, "MMSelectPage", -"modules/swriter/ui/mmselectpage.ui") -, m_pWizard(pParent) +SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(SwMailMergeWizard* pWizard, TabPageParent pParent) +: svt::OWizardPage(pParent, "modules/swriter/ui/mmselectpage.ui", "MMSelectPage") +, m_pWizard(pWizard) +, m_xCurrentDocRB(m_xBuilder->weld_radio_button("currentdoc")) +, m_xNewDocRB(m_xBuilder->weld_radio_button("newdoc")) +, m_xLoadDocRB(m_xBuilder->weld_radio_button("loaddoc")) +, m_xLoadTemplateRB(m_xBuilder->weld_radio_button("template")) +, m_xRecentDocRB(m_xBuilder->weld_radio_button("recentdoc")) +, m_xBrowseDocPB(m_xBuilder->weld_button("browsedoc")) +, m_xBrowseTemplatePB(m_xBuilder->weld_button("browsetemplate")) +, m_xRecentDocLB(m_xBuilder->weld_combo_box("recentdoclb")) { -get(m_pCurrentDocRB, "currentdoc"); -get(m_pNewDocRB, "newdoc"); -get(m_pLoadDocRB, "loaddoc"); -get(m_pLoadTemplateRB, "template"); -get(m_pRecentDocRB, "recentdoc"); -get(m_pBrowseDocPB, "browsedoc"); -get(m_pBrowseTemplatePB, "browsetemplate"); -get(m_pRecentDocLB, "recentdoclb"); - -m_pCurrentDocRB->Check(); -DocSelectHdl(m_pNewDocRB); - -Link aDocSelectLink = LINK(this, SwMailMergeDocSelectPage, DocSelectHdl); -m_pCurrentDocRB->SetClickHdl(aDocSelectLink); -m_pNewDocRB->SetClickHdl(aDocSelectLink); -m_pLoadDocRB->SetClickHdl(aDocSelectLink); -m_pLoadTemplateRB->SetClickHdl(aDocSelectLink); -m_pRecentDocRB->SetClickHdl(aDocSelectLink); - -Link aFileSelectHdl = LINK(this, SwMailMergeDocSelectPage, FileSelectHdl); -m_pBrowseDocPB->SetClickHdl(aFileSelectHdl); -m_pBrowseTemplatePB->SetClickHdl(aFileSelectHdl); +m_xCurrentDocRB->set_active(true); +DocSelectHdl(*m_xNewDocRB); + +Link aDocSelectLink = LINK(this, SwMailMergeDocSelectPage, DocSelectHdl); +m_xCurrentDocRB->connect_toggled(aDocSelectLink); +m_xNewDocRB->connect_toggled(aDocSelectLink); +m_xLoadDocRB->connect_toggled(aDocSelectLink); +m_xLoadTemplateRB->connect_toggled(aDocSelectLink); +m_xRecentDocRB->connect_toggled(aDocSelectLink); + +Link aFileSelectHdl = LINK(this, SwMailMergeDocSelectPage, FileSelectHdl); +m_xBrowseDocPB->connect_clicked(aFileSelectHdl); +m_xBrowseTemplatePB->connect_clicked(aFileSelectHdl); const uno::Sequence< OUString >& rDocs = m_pWizard->GetConfigItem().GetSavedDocuments(); for(sal_Int32 nDoc = 0; nDoc < rDocs.getLength(); ++nDoc) { //insert in reverse order -m_pRecentDocLB->InsertEntry(rDocs[nDoc], 0); +m_xRecentDocLB->insert_text(0, rDocs[nDoc]); } -m_pRecentDocLB->SelectEntryPos(0); +m_xRecentDocLB->set_active(0); if(!rDocs.getLength()) { -m_pRecentDocRB->Enable(false); +m_xRecentDocRB->set_sensitive(false); } //Temp hack until all pages are converted to .ui and wizard @@ -95,33 +93,25 @@ SwMailMergeDocSelectPage::~SwMailMergeDocSelectPage() void SwMailMergeDocSelectPage::dispose() { -m_pCurrentDocRB.clear(); -m_pNewDocRB.clear(); -m_pLoadDocRB.clear(); -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mmaddressblockpage.cxx| 137 sw/source/ui/dbui/mmaddressblockpage.hxx| 33 +++--- sw/uiconfig/swriter/ui/selectblockdialog.ui | 37 +-- 3 files changed, 103 insertions(+), 104 deletions(-) New commits: commit e060b66fc4568f58562d85191aacd9fd9b6d86bf Author: Caolán McNamara AuthorDate: Wed Oct 17 17:37:26 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 18 10:24:10 2018 +0200 weld SwMailMergeAddressBlockPage Change-Id: I0344e3c408f07f97caa34a87ce9e1559b6a76892 Reviewed-on: https://gerrit.libreoffice.org/61889 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index c3bee8213512..57b30c60c56b 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -190,28 +190,25 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, void) } } -IMPL_LINK(SwMailMergeAddressBlockPage, SettingsHdl_Impl, Button*, pButton, void) +IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, SettingsHdl_Impl, Button*, void) { -ScopedVclPtr pDlg( -VclPtr::Create(pButton, m_pWizard->GetConfigItem())); +SwSelectAddressBlockDialog aDlg(GetFrameWeld(), m_pWizard->GetConfigItem()); SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); -pDlg->SetAddressBlocks(rConfig.GetAddressBlocks(), m_pSettingsWIN->GetSelectedAddress()); -pDlg->SetSettings(rConfig.IsIncludeCountry(), rConfig.GetExcludeCountry()); -if(RET_OK == pDlg->Execute()) +aDlg.SetAddressBlocks(rConfig.GetAddressBlocks(), m_pSettingsWIN->GetSelectedAddress()); +aDlg.SetSettings(rConfig.IsIncludeCountry(), rConfig.GetExcludeCountry()); +if (aDlg.run() == RET_OK) { //the dialog provides the selected address at the first position! -const uno::Sequence< OUString> aBlocks = -pDlg->GetAddressBlocks(); +const uno::Sequence< OUString> aBlocks = aDlg.GetAddressBlocks(); rConfig.SetAddressBlocks(aBlocks); m_pSettingsWIN->Clear(); for(sal_Int32 nAddress = 0; nAddress < aBlocks.getLength(); ++nAddress) m_pSettingsWIN->AddAddress(aBlocks[nAddress]); m_pSettingsWIN->SelectAddress(0); m_pSettingsWIN->Invalidate();// #i40408 -rConfig.SetCountrySettings(pDlg->IsIncludeCountry(), pDlg->GetCountry()); +rConfig.SetCountrySettings(aDlg.IsIncludeCountry(), aDlg.GetCountry()); InsertDataHdl_Impl(nullptr); } -pDlg.disposeAndClear(); GetWizard()->UpdateRoadmap(); GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); } @@ -321,70 +318,54 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, Button*, pButton, voi EnableAddressBlock(bHasResultSet, m_pAddressCB->IsChecked()); } -SwSelectAddressBlockDialog::SwSelectAddressBlockDialog( -vcl::Window* pParent, SwMailMergeConfigItem& rConfig) -: SfxModalDialog(pParent, "SelectBlockDialog", -"modules/swriter/ui/selectblockdialog.ui") +SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(weld::Window* pParent, SwMailMergeConfigItem& rConfig) +: SfxDialogController(pParent, "modules/swriter/ui/selectblockdialog.ui", "SelectBlockDialog") , m_rConfig(rConfig) +, m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin"))) +, m_xNewPB(m_xBuilder->weld_button("new")) +, m_xCustomizePB(m_xBuilder->weld_button("edit")) +, m_xDeletePB(m_xBuilder->weld_button("delete")) +, m_xNeverRB(m_xBuilder->weld_radio_button("never")) +, m_xAlwaysRB(m_xBuilder->weld_radio_button("always")) +, m_xDependentRB(m_xBuilder->weld_radio_button("dependent")) +, m_xCountryED(m_xBuilder->weld_entry("country")) +, m_xPreviewWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xPreview)) { -get(m_pPreview, "preview"); -Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MapMode(MapUnit::MapAppFont))); -m_pPreview->set_width_request(aSize.Width()); -m_pPreview->set_height_request(aSize.Height()); -get(m_pNewPB, "new"); -get(m_pCustomizePB, "edit"); -get(m_pDeletePB, "delete"); -get(m_pNeverRB, "never"); -get(m_pAlwaysRB, "always"); -get(m_pDependentRB, "dependent"); -get(m_pCountryED, "country"); + m_xPreviewWin->set_size_request(m_xCountryED->get_approximate_digit_width() * 45, +m_xCountryED->get_text_height() * 12); -Link aCustomizeHdl = LINK(this, SwSelectAddressBlockDialog, NewCustomizeHdl_Impl); -m_pNewPB->SetClickHdl(aCustomizeHdl); -m_pCustomizePB->SetClickHdl(aCustomizeHdl); +Link aCustomizeHdl = LINK(this, SwSelectAddressBlockDialog, NewCustomizeHdl_Impl); +m_xNewPB->connect_clicked(aCustomizeHdl); +
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/mailmergewizard.cxx |2 sw/source/ui/dbui/mmgreetingspage.cxx | 445 +++-- sw/source/ui/dbui/mmgreetingspage.hxx | 120 --- sw/source/ui/dbui/mmresultdialogs.cxx | 10 sw/source/uibase/dbui/mailmergehelper.cxx | 331 + sw/source/uibase/inc/mailmergehelper.hxx | 53 +++ sw/uiconfig/swriter/ui/mmmailbody.ui | 82 + sw/uiconfig/swriter/ui/mmsalutationpage.ui | 117 ++- 8 files changed, 697 insertions(+), 463 deletions(-) New commits: commit a4b8df27b956610f6a481f0c25ba8ccc5ee21460 Author: Caolán McNamara AuthorDate: Wed Oct 17 11:59:14 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 18 10:23:45 2018 +0200 weld SwMailMergeGreetingsPage and SwMailBodyDialog Change-Id: I7ac171654ec0a5095c05d1b54bec423b8eb9247b Reviewed-on: https://gerrit.libreoffice.org/61888 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index a862e377ce1b..ed43ce86e430 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -110,7 +110,7 @@ VclPtr SwMailMergeWizard::createPage(WizardState _nState) SetRoadmapHelpId("modules/swriter/ui/mmaddressblockpage/MMAddressBlockPage"); break; case MM_GREETINGSPAGE : -pRet = VclPtr::Create(this); +pRet = VclPtr::Create(this, TabPageParent(this)); SetRoadmapHelpId("modules/swriter/ui/mmsalutationpage/MMSalutationPage"); break; case MM_LAYOUTPAGE : diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 85a395f0671a..2723fb04849e 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -34,64 +34,42 @@ using namespace svt; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -static void lcl_FillGreetingsBox(ListBox& rBox, +static void lcl_FillGreetingsBox(weld::ComboBox& rBox, SwMailMergeConfigItem const & rConfig, SwMailMergeConfigItem::Gender eType) { const Sequence< OUString> rEntries = rConfig.GetGreetings(eType); for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry) -rBox.InsertEntry(rEntries[nEntry]); -rBox.SelectEntryPos(rConfig.GetCurrentGreeting(eType)); +rBox.append_text(rEntries[nEntry]); +rBox.set_active(rConfig.GetCurrentGreeting(eType)); } -static void lcl_FillGreetingsBox(ComboBox& rBox, -SwMailMergeConfigItem const & rConfig, -SwMailMergeConfigItem::Gender eType) -{ -const Sequence< OUString> rEntries = rConfig.GetGreetings(eType); -for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry) -rBox.InsertEntry(rEntries[nEntry]); -rBox.SelectEntryPos(rConfig.GetCurrentGreeting(eType)); -} - -static void lcl_StoreGreetingsBox(ListBox const & rBox, -SwMailMergeConfigItem& rConfig, -SwMailMergeConfigItem::Gender eType) -{ -Sequence< OUString> aEntries(rBox.GetEntryCount()); -OUString* pEntries = aEntries.getArray(); -for(sal_Int32 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry) -pEntries[nEntry] = rBox.GetEntry(nEntry); -rConfig.SetGreetings(eType, aEntries); -rConfig.SetCurrentGreeting(eType, rBox.GetSelectedEntryPos()); -} - -static void lcl_StoreGreetingsBox(ComboBox const & rBox, +static void lcl_StoreGreetingsBox(const weld::ComboBox& rBox, SwMailMergeConfigItem& rConfig, SwMailMergeConfigItem::Gender eType) { -Sequence< OUString> aEntries(rBox.GetEntryCount()); +Sequence< OUString> aEntries(rBox.get_count()); OUString* pEntries = aEntries.getArray(); -for(sal_Int32 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry) -pEntries[nEntry] = rBox.GetEntry(nEntry); +for(sal_Int32 nEntry = 0; nEntry < rBox.get_count(); ++nEntry) +pEntries[nEntry] = rBox.get_text(nEntry); rConfig.SetGreetings(eType, aEntries); -rConfig.SetCurrentGreeting(eType, rBox.GetSelectedEntryPos()); +rConfig.SetCurrentGreeting(eType, rBox.get_active()); } -IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl, Button*, void) +IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl, weld::ToggleButton&, void) { -bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked(); -m_pFemaleFT->Enable(bIndividual); -m_pFemaleLB->Enable(bIndividual); -m_pFemalePB->Enable(bIndividual); -m_pMaleFT->Enable(bIndividual); -m_pMaleLB->Enable(bIndividual); -m_pMalePB->Enable(bIndividual); -m_pFemaleFI->Enable(bIndividual); -m_pFemaleColumnFT->Enable(bIndividual); -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/createaddresslistdialog.cxx |9 - sw/source/ui/dbui/customizeaddresslistdialog.cxx | 142 +- sw/source/ui/dbui/customizeaddresslistdialog.hxx | 34 ++--- sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui | 49 ++- 4 files changed, 126 insertions(+), 108 deletions(-) New commits: commit be7ab624c1d56fc4f169e4c7d379e376653165ab Author: Caolán McNamara AuthorDate: Thu Oct 4 11:02:57 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 4 16:40:06 2018 +0200 weld SwCreateAddressListDialog Change-Id: I9b8fa8ff001f82904db2478a6c88419294df2855 Reviewed-on: https://gerrit.libreoffice.org/61364 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 6c227ea5273c..736c9adc0321 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -564,16 +564,15 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, FindHdl_Impl, Button*, void) m_xFindDlg->show(!m_xFindDlg->get_visible()); } -IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, Button*, pButton, void) +IMPL_LINK_NOARG(SwCreateAddressListDialog, CustomizeHdl_Impl, Button*, void) { -VclPtrInstance< SwCustomizeAddressListDialog > pDlg(pButton, *m_pCSVData); -if(RET_OK == pDlg->Execute()) +SwCustomizeAddressListDialog aDlg(GetFrameWeld(), *m_pCSVData); +if (aDlg.run() == RET_OK) { -m_pCSVData = pDlg->ReleaseNewData(); +m_pCSVData = aDlg.ReleaseNewData(); m_pAddressControl->SetData(*m_pCSVData); m_pAddressControl->SetCurrentDataSet(m_pAddressControl->GetCurrentDataSet()); } -pDlg.reset(); //update find dialog if (m_xFindDlg) diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx index 3c466a415487..ee0ad8e15c0e 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx @@ -24,75 +24,62 @@ #include SwCustomizeAddressListDialog::SwCustomizeAddressListDialog( -vcl::Window* pParent, const SwCSVData& rOldData) -: SfxModalDialog(pParent, "CustomizeAddrListDialog", -"modules/swriter/ui/customizeaddrlistdialog.ui") -, m_pNewData( new SwCSVData(rOldData)) +weld::Window* pParent, const SwCSVData& rOldData) +: SfxDialogController(pParent, "modules/swriter/ui/customizeaddrlistdialog.ui", + "CustomizeAddrListDialog") +, m_xNewData(new SwCSVData(rOldData)) +, m_xFieldsLB(m_xBuilder->weld_tree_view("treeview")) +, m_xAddPB(m_xBuilder->weld_button("add")) +, m_xDeletePB(m_xBuilder->weld_button("delete")) +, m_xRenamePB(m_xBuilder->weld_button("rename")) +, m_xUpPB(m_xBuilder->weld_button("up")) +, m_xDownPB(m_xBuilder->weld_button("down")) { -get(m_pFieldsLB, "treeview"); -m_pFieldsLB->SetDropDownLineCount(14); -get(m_pAddPB, "add"); -get(m_pDeletePB, "delete"); -get(m_pRenamePB, "rename"); -get(m_pUpPB, "up"); -get(m_pDownPB, "down"); - -m_pFieldsLB->SetSelectHdl(LINK(this, SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl)); -Link aAddRenameLk = LINK(this, SwCustomizeAddressListDialog, AddRenameHdl_Impl ); -m_pAddPB->SetClickHdl(aAddRenameLk); -m_pRenamePB->SetClickHdl(aAddRenameLk); -m_pDeletePB->SetClickHdl(LINK(this, SwCustomizeAddressListDialog, DeleteHdl_Impl )); -Link aUpDownLk = LINK(this, SwCustomizeAddressListDialog, UpDownHdl_Impl); -m_pUpPB->SetClickHdl(aUpDownLk); -m_pDownPB->SetClickHdl(aUpDownLk); +m_xFieldsLB->set_size_request(-1, m_xFieldsLB->get_height_rows(14)); + +m_xFieldsLB->connect_changed(LINK(this, SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl)); +Link aAddRenameLk = LINK(this, SwCustomizeAddressListDialog, AddRenameHdl_Impl ); +m_xAddPB->connect_clicked(aAddRenameLk); +m_xRenamePB->connect_clicked(aAddRenameLk); +m_xDeletePB->connect_clicked(LINK(this, SwCustomizeAddressListDialog, DeleteHdl_Impl )); +Link aUpDownLk = LINK(this, SwCustomizeAddressListDialog, UpDownHdl_Impl); +m_xUpPB->connect_clicked(aUpDownLk); +m_xDownPB->connect_clicked(aUpDownLk); std::vector< OUString >::iterator aHeaderIter; -for(aHeaderIter = m_pNewData->aDBColumnHeaders.begin(); -aHeaderIter != m_pNewData->aDBColumnHeaders.end(); ++aHeaderIter) -m_pFieldsLB->InsertEntry(*aHeaderIter); +for(aHeaderIter = m_xNewData->aDBColumnHeaders.begin(); +aHeaderIter != m_xNewData->aDBColumnHeaders.end(); ++aHeaderIter) +m_xFieldsLB->append_text(*aHeaderIter); -m_pFieldsLB->SelectEntryPos(0); +m_xFieldsLB->select(0); UpdateButtons(); } SwCustomizeAddressListDialog::~SwCustomizeAddressListDialog() { -disposeOnce(); -}
[Libreoffice-commits] core.git: sw/source sw/uiconfig vcl/unx
sw/source/ui/dbui/createaddresslistdialog.cxx | 76 ++ sw/source/ui/dbui/createaddresslistdialog.hxx | 32 +- sw/uiconfig/swriter/ui/findentrydialog.ui | 29 +++-- vcl/unx/gtk3/gtk3gtkinst.cxx |6 ++ 4 files changed, 63 insertions(+), 80 deletions(-) New commits: commit 1346d0c125c35094d241bbc1e0e0316433a292aa Author: Caolán McNamara AuthorDate: Thu Oct 4 11:49:52 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 4 15:43:32 2018 +0200 weld SwFindEntryDialog Change-Id: Ia45e4ce13b92fd73fcc8ad52233aa5eccc3cfb6d Reviewed-on: https://gerrit.libreoffice.org/61365 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index b024cd71c264..6c227ea5273c 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -394,8 +394,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( SfxModalDialog(pParent, "CreateAddressList", "modules/swriter/ui/createaddresslist.ui"), m_sAddressListFilterName( SwResId(ST_FILTERNAME)), m_sURL(rURL), -m_pCSVData( new SwCSVData ), -m_pFindDlg(nullptr) +m_pCSVData( new SwCSVData ) { get(m_pNewPB, "NEW"); get(m_pDeletePB, "DELETE"); @@ -509,7 +508,7 @@ void SwCreateAddressListDialog::dispose() m_pNextPB.clear(); m_pEndPB.clear(); m_pOK.clear(); -m_pFindDlg.disposeAndClear(); +m_xFindDlg.reset(); SfxModalDialog::dispose(); } @@ -549,20 +548,20 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, DeleteHdl_Impl, Button*, void) IMPL_LINK_NOARG(SwCreateAddressListDialog, FindHdl_Impl, Button*, void) { -if(!m_pFindDlg) +if (!m_xFindDlg) { -m_pFindDlg = VclPtr::Create(this); -ListBox& rColumnBox = m_pFindDlg->GetFieldsListBox(); +m_xFindDlg.reset(new SwFindEntryDialog(this)); +weld::ComboBox& rColumnBox = m_xFindDlg->GetFieldsListBox(); std::vector< OUString >::iteratoraHeaderIter; for(aHeaderIter = m_pCSVData->aDBColumnHeaders.begin(); aHeaderIter != m_pCSVData->aDBColumnHeaders.end(); ++aHeaderIter) -rColumnBox.InsertEntry(*aHeaderIter); -rColumnBox.SelectEntryPos( 0 ); -m_pFindDlg->Show(); +rColumnBox.append_text(*aHeaderIter); +rColumnBox.set_active(0); +m_xFindDlg->show(); } else -m_pFindDlg->Show(!m_pFindDlg->IsVisible()); +m_xFindDlg->show(!m_xFindDlg->get_visible()); } IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, Button*, pButton, void) @@ -577,15 +576,15 @@ IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, Button*, pButton, void) pDlg.reset(); //update find dialog -if(m_pFindDlg) +if (m_xFindDlg) { -ListBox& rColumnBox = m_pFindDlg->GetFieldsListBox(); -rColumnBox.Clear(); +weld::ComboBox& rColumnBox = m_xFindDlg->GetFieldsListBox(); +rColumnBox.clear(); std::vector< OUString >::iteratoraHeaderIter; for(aHeaderIter = m_pCSVData->aDBColumnHeaders.begin(); aHeaderIter != m_pCSVData->aDBColumnHeaders.end(); ++aHeaderIter) -rColumnBox.InsertEntry(*aHeaderIter); +rColumnBox.append_text(*aHeaderIter); } } @@ -741,54 +740,39 @@ void SwCreateAddressListDialog::Find(const OUString& rSearch, sal_Int32 nColumn) } SwFindEntryDialog::SwFindEntryDialog(SwCreateAddressListDialog* pParent) -: ModelessDialog(pParent, "FindEntryDialog", -"modules/swriter/ui/findentrydialog.ui") +: GenericDialogController(pParent->GetFrameWeld(), "modules/swriter/ui/findentrydialog.ui", "FindEntryDialog") , m_pParent(pParent) +, m_xFindED(m_xBuilder->weld_entry("entry")) +, m_xFindOnlyCB(m_xBuilder->weld_check_button("findin")) +, m_xFindOnlyLB(m_xBuilder->weld_combo_box("area")) +, m_xFindPB(m_xBuilder->weld_button("find")) +, m_xCancel(m_xBuilder->weld_button("cancel")) { -get(m_pCancel, "cancel"); -get(m_pFindPB, "find"); -get(m_pFindOnlyLB, "area"); -get(m_pFindOnlyCB, "findin"); -get(m_pFindED, "entry"); -m_pFindPB->SetClickHdl(LINK(this, SwFindEntryDialog, FindHdl_Impl)); -m_pFindED->SetModifyHdl(LINK(this, SwFindEntryDialog, FindEnableHdl_Impl)); -m_pCancel->SetClickHdl(LINK(this, SwFindEntryDialog, CloseHdl_Impl)); +m_xFindPB->connect_clicked(LINK(this, SwFindEntryDialog, FindHdl_Impl)); +m_xFindED->connect_changed(LINK(this, SwFindEntryDialog, FindEnableHdl_Impl)); +m_xCancel->connect_clicked(LINK(this, SwFindEntryDialog, CloseHdl_Impl)); } SwFindEntryDialog::~SwFindEntryDialog() { -disposeOnce(); -} - -void SwFindEntryDialog::dispose() -{ -m_pFindED.clear(); -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/dbui/customizeaddresslistdialog.cxx | 44 --- sw/source/ui/dbui/customizeaddresslistdialog.hxx | 30 +++ sw/uiconfig/swriter/ui/addentrydialog.ui |9 sw/uiconfig/swriter/ui/renameentrydialog.ui | 10 - 4 files changed, 47 insertions(+), 46 deletions(-) New commits: commit 1cfcf1a5c7437b935da652e6bd25db536c4f4cf7 Author: Caolán McNamara AuthorDate: Thu Oct 4 10:43:24 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 4 15:42:39 2018 +0200 weld SwAddRenameEntryDialog Change-Id: I687486a392450fcf3b92fdc4d7a193b10f829835 Reviewed-on: https://gerrit.libreoffice.org/61363 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx index 81deb59639e2..3c466a415487 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx @@ -85,19 +85,19 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, Button*, pButton, voi if(nPos == LISTBOX_ENTRY_NOTFOUND) nPos = 0; -ScopedVclPtr pDlg; +std::unique_ptr xDlg; if (bRename) -pDlg.disposeAndReset(VclPtr::Create(pButton, m_pNewData->aDBColumnHeaders)); +xDlg.reset(new SwRenameEntryDialog(GetFrameWeld(), m_pNewData->aDBColumnHeaders)); else -pDlg.disposeAndReset(VclPtr::Create(pButton, m_pNewData->aDBColumnHeaders)); -if(bRename) +xDlg.reset(new SwAddEntryDialog(GetFrameWeld(), m_pNewData->aDBColumnHeaders)); +if (bRename) { OUString aTemp = m_pFieldsLB->GetEntry(nPos); -pDlg->SetFieldName(aTemp); +xDlg->SetFieldName(aTemp); } -if(RET_OK == pDlg->Execute()) +if (xDlg->run() == RET_OK) { -OUString sNew = pDlg->GetFieldName(); +OUString sNew = xDlg->GetFieldName(); if(bRename) { m_pNewData->aDBColumnHeaders[nPos] = sNew; @@ -177,32 +177,20 @@ void SwCustomizeAddressListDialog::UpdateButtons() SwAddRenameEntryDialog::SwAddRenameEntryDialog( -vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, +weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID, const std::vector< OUString >& rCSVHeader) -: SfxModalDialog(pParent, rID, rUIXMLDescription) +: SfxDialogController(pParent, rUIXMLDescription, rID) , m_rCSVHeader(rCSVHeader) +, m_xFieldNameED(m_xBuilder->weld_entry("entry")) +, m_xOK(m_xBuilder->weld_button("ok")) { -get(m_pOK, "ok"); -get(m_pFieldNameED, "entry"); -m_pFieldNameED->SetModifyHdl(LINK(this, SwAddRenameEntryDialog, ModifyHdl_Impl)); -ModifyHdl_Impl(*m_pFieldNameED); -} - -SwAddRenameEntryDialog::~SwAddRenameEntryDialog() -{ -disposeOnce(); -} - -void SwAddRenameEntryDialog::dispose() -{ -m_pFieldNameED.clear(); -m_pOK.clear(); -SfxModalDialog::dispose(); +m_xFieldNameED->connect_changed(LINK(this, SwAddRenameEntryDialog, ModifyHdl_Impl)); +ModifyHdl_Impl(*m_xFieldNameED); } -IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit&, rEdit, void) +IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, weld::Entry&, rEdit, void) { -OUString sEntry = rEdit.GetText(); +OUString sEntry = rEdit.get_text(); bool bFound = sEntry.isEmpty(); if(!bFound) @@ -217,7 +205,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit&, rEdit, void) break; } } -m_pOK->Enable(!bFound); +m_xOK->set_sensitive(!bFound); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx index a138d83ddf94..e5e2fdb4fae8 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx @@ -53,31 +53,29 @@ public: std::unique_ptr ReleaseNewData() { return std::move(m_pNewData);} }; -class SwAddRenameEntryDialog : public SfxModalDialog +class SwAddRenameEntryDialog : public SfxDialogController { -VclPtr m_pFieldNameED; -VclPtr m_pOK; const std::vector< OUString >& m_rCSVHeader; +std::unique_ptr m_xFieldNameED; +std::unique_ptr m_xOK; -DECL_LINK(ModifyHdl_Impl, Edit&, void); +DECL_LINK(ModifyHdl_Impl, weld::Entry&, void); protected: -SwAddRenameEntryDialog(vcl::Window* pParent, const OUString& rID, -const OUString& rUIXMLDescription, const std::vector< OUString >& rCSVHeader); -virtual ~SwAddRenameEntryDialog() override; -virtual void dispose() override; +SwAddRenameEntryDialog(weld::Window* pParent, const OUString& rUIXMLDescription, +const OString& rID, const std::vector< OUString >& rCSVHeader); public: -voidSetFieldName(const OUString& rName)
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/misc/pgfnote.cxx | 199 ++--- sw/source/uibase/inc/pgfnote.hxx | 37 ++--- sw/uiconfig/swriter/ui/footnoteareapage.ui | 103 +-- 3 files changed, 152 insertions(+), 187 deletions(-) New commits: commit a91dfea300a379c2f754dbb1d5a002d093b73032 Author: Caolán McNamara AuthorDate: Wed Sep 5 10:30:59 2018 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 5 16:12:28 2018 +0200 weld SwFootNotePage Change-Id: Iadc26837cc71537cd6a8533d731a51117ebf56fc Reviewed-on: https://gerrit.libreoffice.org/60021 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index e8ed6d4d6044..c861014e804e 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -52,77 +53,79 @@ const sal_uInt16 SwFootNotePage::aPageRg[] = { // handler to switch between the different possibilities how the footnote // region's height can be set. -IMPL_LINK_NOARG(SwFootNotePage, HeightPage, Button*, void) +IMPL_LINK_NOARG(SwFootNotePage, HeightPage, weld::ToggleButton&, void) { -m_pMaxHeightEdit->Enable(false); +if (m_xMaxHeightPageBtn->get_active()) +m_xMaxHeightEdit->set_sensitive(false); } -IMPL_LINK_NOARG(SwFootNotePage, HeightMetric, Button*, void) +IMPL_LINK_NOARG(SwFootNotePage, HeightMetric, weld::ToggleButton&, void) { -m_pMaxHeightEdit->Enable(); -m_pMaxHeightEdit->GrabFocus(); +if (m_xMaxHeightBtn->get_active()) +{ +m_xMaxHeightEdit->set_sensitive(true); +m_xMaxHeightEdit->grab_focus(); +} } // handler limit values -IMPL_LINK_NOARG(SwFootNotePage, HeightModify, Control&, void) +IMPL_LINK_NOARG(SwFootNotePage, HeightModify, weld::MetricSpinButton&, void) { -m_pMaxHeightEdit->SetMax(m_pMaxHeightEdit->Normalize(lMaxHeight - -(m_pDistEdit->Denormalize(m_pDistEdit->GetValue(FUNIT_TWIP)) + - m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP, +m_xMaxHeightEdit->set_max(m_xMaxHeightEdit->normalize(lMaxHeight - +(m_xDistEdit->denormalize(m_xDistEdit->get_value(FUNIT_TWIP)) + + m_xLineDistEdit->denormalize(m_xLineDistEdit->get_value(FUNIT_TWIP, FUNIT_TWIP); -if(m_pMaxHeightEdit->GetValue() < 0) -m_pMaxHeightEdit->SetValue(0); -m_pDistEdit->SetMax(m_pDistEdit->Normalize(lMaxHeight - - (m_pMaxHeightEdit->Denormalize(m_pMaxHeightEdit->GetValue(FUNIT_TWIP)) + - m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP, +if (m_xMaxHeightEdit->get_value(FUNIT_NONE) < 0) +m_xMaxHeightEdit->set_value(0, FUNIT_NONE); +m_xDistEdit->set_max(m_xDistEdit->normalize(lMaxHeight - + (m_xMaxHeightEdit->denormalize(m_xMaxHeightEdit->get_value(FUNIT_TWIP)) + + m_xLineDistEdit->denormalize(m_xLineDistEdit->get_value(FUNIT_TWIP, FUNIT_TWIP); -if(m_pDistEdit->GetValue() < 0) -m_pDistEdit->SetValue(0); -m_pLineDistEdit->SetMax(m_pLineDistEdit->Normalize(lMaxHeight - - (m_pMaxHeightEdit->Denormalize(m_pMaxHeightEdit->GetValue(FUNIT_TWIP)) + -m_pDistEdit->Denormalize(m_pDistEdit->GetValue(FUNIT_TWIP, +if (m_xDistEdit->get_value(FUNIT_NONE) < 0) +m_xDistEdit->set_value(0, FUNIT_NONE); +m_xLineDistEdit->set_max(m_xLineDistEdit->normalize(lMaxHeight - + (m_xMaxHeightEdit->denormalize(m_xMaxHeightEdit->get_value(FUNIT_TWIP)) + +m_xDistEdit->denormalize(m_xDistEdit->get_value(FUNIT_TWIP, FUNIT_TWIP); } -IMPL_LINK_NOARG(SwFootNotePage, LineWidthChanged_Impl, Edit&, void) +IMPL_LINK_NOARG(SwFootNotePage, LineWidthChanged_Impl, weld::MetricSpinButton&, void) { -sal_Int64 nVal = static_cast(MetricField::ConvertDoubleValue( -m_pLineWidthEdit->GetValue( ), -m_pLineWidthEdit->GetDecimalDigits( ), -m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip )); -m_pLineTypeBox->SetWidth( nVal ); +sal_Int64 nVal = m_xLineWidthEdit->get_value(FUNIT_NONE); +nVal = static_cast(MetricField::ConvertDoubleValue( +nVal, +m_xLineWidthEdit->get_digits(), +m_xLineWidthEdit->get_unit(), MapUnit::MapTwip )); +m_xLineTypeBox->SetWidth(nVal); } -IMPL_LINK(SwFootNotePage, LineColorSelected_Impl, SvxColorListBox&, rColorBox, void) +IMPL_LINK(SwFootNotePage, LineColorSelected_Impl, ColorListBox&, rColorBox, void) { -m_pLineTypeBox->SetColor(rColorBox.GetSelectEntryColor()); +m_xLineTypeBox->SetColor(rColorBox.GetSelectEntryColor()); } -SwFootNotePage::SwFootNotePage(vcl::Window *pParent, const SfxItemSet ) -: SfxTabPage(pParent, "FootnoteAreaPage", -"modules/swriter/ui/footnoteareapage.ui", )
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/chrdlg/chardlg.cxx | 145 +++--- sw/source/uibase/inc/chrdlg.hxx | 38 sw/uiconfig/swriter/ui/charurlpage.ui | 22 +++-- 3 files changed, 96 insertions(+), 109 deletions(-) New commits: commit 765d91d84a423bdeab71c36117df764014683ba6 Author: Caolán McNamara Date: Fri Jun 15 11:27:51 2018 +0100 weld SwCharURLPage Change-Id: I5263147c2dd15e6cab5b405d1680c2a3778137a6 Reviewed-on: https://gerrit.libreoffice.org/55861 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 8680340f7819..ce27eae7dcfa 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -131,23 +131,21 @@ void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage ) } } -SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) -: SfxTabPage(pParent, "CharURLPage", "modules/swriter/ui/charurlpage.ui", ) +SwCharURLPage::SwCharURLPage(TabPageParent pParent, const SfxItemSet& rCoreSet) +: SfxTabPage(pParent, "modules/swriter/ui/charurlpage.ui", "CharURLPage", ) , pINetItem(nullptr) , bModified(false) - +, m_xURLED(m_xBuilder->weld_entry("urled")) +, m_xTextFT(m_xBuilder->weld_label("textft")) +, m_xTextED(m_xBuilder->weld_entry("texted")) +, m_xNameED(m_xBuilder->weld_entry("nameed")) +, m_xTargetFrameLB(m_xBuilder->weld_combo_box_text("targetfrmlb")) +, m_xURLPB(m_xBuilder->weld_button("urlpb")) +, m_xEventPB(m_xBuilder->weld_button("eventpb")) +, m_xVisitedLB(m_xBuilder->weld_combo_box_text("visitedlb")) +, m_xNotVisitedLB(m_xBuilder->weld_combo_box_text("unvisitedlb")) +, m_xCharStyleContainer(m_xBuilder->weld_widget("charstyle")) { -get(m_pURLED, "urled"); -get(m_pTextFT, "textft"); -get(m_pTextED, "texted"); -get(m_pNameED, "nameed"); -get(m_pTargetFrameLB, "targetfrmlb"); -get(m_pURLPB, "urlpb"); -get(m_pEventPB, "eventpb"); -get(m_pVisitedLB, "visitedlb"); -get(m_pNotVisitedLB, "unvisitedlb"); -get(m_pCharStyleContainer, "charstyle"); - const SfxPoolItem* pItem; SfxObjectShell* pShell; if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, ) || @@ -155,31 +153,28 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) nullptr != (pItem = pShell->GetItem(SID_HTML_MODE { sal_uInt16 nHtmlMode = static_cast(pItem)->GetValue(); -if(HTMLMODE_ON & nHtmlMode) -m_pCharStyleContainer->Hide(); +if (HTMLMODE_ON & nHtmlMode) +m_xCharStyleContainer->hide(); } -m_pURLPB->SetClickHdl (LINK( this, SwCharURLPage, InsertFileHdl)); -m_pEventPB->SetClickHdl(LINK( this, SwCharURLPage, EventHdl )); +m_xURLPB->connect_clicked(LINK( this, SwCharURLPage, InsertFileHdl)); +m_xEventPB->connect_clicked(LINK( this, SwCharURLPage, EventHdl)); SwView *pView = ::GetActiveView(); -::FillCharStyleListBox(*m_pVisitedLB, pView->GetDocShell()); -::FillCharStyleListBox(*m_pNotVisitedLB, pView->GetDocShell()); - m_pVisitedLB->SelectEntryPos(m_pVisitedLB->GetEntryPos(reinterpret_cast(RES_POOLCHR_INET_VISIT))); -m_pVisitedLB->SaveValue(); - m_pNotVisitedLB->SelectEntryPos(m_pNotVisitedLB->GetEntryPos(reinterpret_cast(RES_POOLCHR_INET_NORMAL))); -m_pNotVisitedLB->SaveValue(); +::FillCharStyleListBox(*m_xVisitedLB, pView->GetDocShell()); +::FillCharStyleListBox(*m_xNotVisitedLB, pView->GetDocShell()); +m_xVisitedLB->set_active_id(OUString::number(RES_POOLCHR_INET_VISIT)); +m_xVisitedLB->save_value(); +m_xNotVisitedLB->set_active_id(OUString::number(RES_POOLCHR_INET_NORMAL)); +m_xNotVisitedLB->save_value(); std::unique_ptr pList( new TargetList ); SfxFrame::GetDefaultTargetList(*pList); -if ( !pList->empty() ) -{ -size_t nCount = pList->size(); -for ( size_t i = 0; i < nCount; i++ ) -{ -m_pTargetFrameLB->InsertEntry( pList->at( i ) ); -} +size_t nCount = pList->size(); +for (size_t i = 0; i < nCount; ++i) +{ +m_xTargetFrameLB->append_text(pList->at(i)); } } @@ -191,29 +186,20 @@ SwCharURLPage::~SwCharURLPage() void SwCharURLPage::dispose() { delete pINetItem; -m_pURLED.clear(); -m_pTextFT.clear(); -m_pTextED.clear(); -m_pNameED.clear(); -m_pTargetFrameLB.clear(); -m_pURLPB.clear(); -m_pEventPB.clear(); -m_pVisitedLB.clear(); -m_pNotVisitedLB.clear(); -m_pCharStyleContainer.clear(); SfxTabPage::dispose(); } void SwCharURLPage::Reset(const SfxItemSet* rSet) { const SfxPoolItem* pItem; -if ( SfxItemState::SET == rSet->GetItemState( RES_TXTATR_INETFMT, false, ) ) +if (SfxItemState::SET == rSet->GetItemState(RES_TXTATR_INETFMT, false, )) {
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/chrdlg/numpara.cxx | 267 +++--- sw/source/ui/chrdlg/pardlg.cxx|4 sw/source/ui/fmtui/tmpdlg.cxx |4 sw/source/uibase/inc/numpara.hxx | 51 +++--- sw/uiconfig/swriter/ui/numparapage.ui | 16 +- 5 files changed, 156 insertions(+), 186 deletions(-) New commits: commit aeb330a350ec4eb78dd51147517a0bf3b2670614 Author: Caolán McNamara Date: Fri Jun 15 10:51:30 2018 +0100 weld SwParagraphNumTabPage Change-Id: I6d95b5235d43dabc17515f3ac31063093c68d959 Reviewed-on: https://gerrit.libreoffice.org/55860 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 589e808fe4e7..fda0958c26a7 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -42,40 +42,36 @@ const sal_uInt16 SwParagraphNumTabPage::aPageRg[] = { 0 }; -SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItemSet& rAttr ) : -SfxTabPage(pParent, "NumParaPage", "modules/swriter/ui/numparapage.ui", ), - -msOutlineNumbering( SwResId( STR_OUTLINE_NUMBERING ) ), -bModified(false), -bCurNumrule(false) +SwParagraphNumTabPage::SwParagraphNumTabPage(TabPageParent pParent, const SfxItemSet& rAttr) +: SfxTabPage(pParent, "modules/swriter/ui/numparapage.ui", "NumParaPage", ) +, msOutlineNumbering(SwResId(STR_OUTLINE_NUMBERING )) +, bModified(false) +, bCurNumrule(false) +, m_xOutlineStartBX(m_xBuilder->weld_widget("boxOUTLINE")) +, m_xOutlineLvLB(m_xBuilder->weld_combo_box_text("comboLB_OUTLINE_LEVEL")) +, m_xNumberStyleBX(m_xBuilder->weld_widget("boxNUMBER_STYLE")) +, m_xNumberStyleLB(m_xBuilder->weld_combo_box_text("comboLB_NUMBER_STYLE")) +, m_xEditNumStyleBtn(m_xBuilder->weld_button("editnumstyle")) +, m_xNewStartCB(m_xBuilder->weld_check_button("checkCB_NEW_START")) +, m_xNewStartBX(m_xBuilder->weld_widget("boxNEW_START")) +, m_xNewStartNumberCB(m_xBuilder->weld_check_button("checkCB_NUMBER_NEW_START")) +, m_xNewStartNF(m_xBuilder->weld_spin_button("spinNF_NEW_START")) +, m_xCountParaFram(m_xBuilder->weld_widget("frameFL_COUNT_PARA")) +, m_xCountParaCB(m_xBuilder->weld_check_button("checkCB_COUNT_PARA")) +, m_xRestartParaCountCB(m_xBuilder->weld_check_button("checkCB_RESTART_PARACOUNT")) +, m_xRestartBX(m_xBuilder->weld_widget("boxRESTART_NO")) +, m_xRestartNF(m_xBuilder->weld_spin_button("spinNF_RESTART_PARA")) { -get(m_pOutlineStartBX, "boxOUTLINE"); -get(m_pOutlineLvLB,"comboLB_OUTLINE_LEVEL"); - -get(m_pNumberStyleBX, "boxNUMBER_STYLE"); -get(m_pNumberStyleLB, "comboLB_NUMBER_STYLE"); -get(m_pEditNumStyleBtn,"editnumstyle"); -get(m_pNewStartBX, "boxNEW_START"); -get(m_pNewStartCB, "checkCB_NEW_START"); -m_pNewStartCB->SetState(TRISTATE_FALSE); -get(m_pNewStartNumberCB, "checkCB_NUMBER_NEW_START"); -m_pNewStartNumberCB->SetState(TRISTATE_FALSE); -get(m_pNewStartNF, "spinNF_NEW_START"); - -get(m_pCountParaFram, "frameFL_COUNT_PARA"); -get(m_pCountParaCB,"checkCB_COUNT_PARA"); -m_pCountParaCB->SetState(TRISTATE_FALSE); -get(m_pRestartParaCountCB, "checkCB_RESTART_PARACOUNT"); -m_pRestartParaCountCB->SetState(TRISTATE_FALSE); - -get(m_pRestartBX, "boxRESTART_NO"); -get(m_pRestartNF, "spinNF_RESTART_PARA"); - -sal_Int32 numSelectPos = m_pNumberStyleLB->GetSelectedEntryPos(); -if ( numSelectPos == 0 ) -m_pEditNumStyleBtn->Disable(); +m_xNewStartCB->set_state(TRISTATE_FALSE); +m_xNewStartNumberCB->set_state(TRISTATE_FALSE); +m_xCountParaCB->set_state(TRISTATE_FALSE); +m_xRestartParaCountCB->set_state(TRISTATE_FALSE); + +int numSelectPos = m_xNumberStyleLB->get_active(); +if (numSelectPos == 0) +m_xEditNumStyleBtn->set_sensitive(false); else -m_pEditNumStyleBtn->Enable(); +m_xEditNumStyleBtn->set_sensitive(true); const SfxPoolItem* pItem; SfxObjectShell* pObjSh; @@ -86,53 +82,32 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem const sal_uInt16 nHtmlMode = static_cast(pItem)->GetValue(); if (HTMLMODE_ON & nHtmlMode) -m_pCountParaFram->Hide(); +m_xCountParaFram->hide(); } -m_pNewStartCB->SetClickHdl(LINK(this, SwParagraphNumTabPage, NewStartHdl_Impl)); -m_pNewStartNumberCB->SetClickHdl(LINK(this, SwParagraphNumTabPage, NewStartHdl_Impl)); -m_pNumberStyleLB->SetSelectHdl(LINK(this, SwParagraphNumTabPage, StyleHdl_Impl)); -m_pCountParaCB->SetClickHdl(LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl)); -m_pRestartParaCountCB->SetClickHdl( LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl)); -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/table/tabledlg.cxx | 228 -- sw/source/uibase/inc/prcntfld.hxx |1 sw/source/uibase/table/tablepg.hxx| 39 ++--- sw/uiconfig/swriter/ui/tablecolumnpage.ui | 91 --- 4 files changed, 178 insertions(+), 181 deletions(-) New commits: commit d86549db56b25c2b201285cb6752111b8bae Author: Caolán McNamara Date: Mon Jun 11 21:18:57 2018 +0100 weld SwTableColumnPage Change-Id: I2e92de5899bdee7c5a8a7c29c3a0f407cbb5a1d3 Reviewed-on: https://gerrit.libreoffice.org/55645 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 9f9c703d7e60..ee4fb784772f 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -131,7 +131,7 @@ void SwFormatTablePage::Init() m_xRightBtn->connect_toggled( aLk2 ); m_xCenterBtn->connect_toggled( aLk2 ); -Link aLk = LINK( this, SwFormatTablePage, UpDownHdl ); +Link aLk = LINK(this, SwFormatTablePage, ValueChangedHdl); m_xTopMF->connect_value_changed(aLk); m_xBottomMF->connect_value_changed(aLk); m_xRightMF->connect_value_changed(aLk); @@ -256,9 +256,9 @@ void SwFormatTablePage::RightModify() } } -IMPL_LINK( SwFormatTablePage, UpDownHdl, weld::MetricSpinButton&, rEdit, void ) +IMPL_LINK( SwFormatTablePage, ValueChangedHdl, weld::MetricSpinButton&, rEdit, void ) { -if( m_xRightMF->get() == ) +if (m_xRightMF->get() == ) RightModify(); ModifyHdl(rEdit); } @@ -697,9 +697,8 @@ DeactivateRC SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) } //Description: Page column configuration -SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSet) -: SfxTabPage(pParent, "TableColumnPage", -"modules/swriter/ui/tablecolumnpage.ui", ) +SwTableColumnPage::SwTableColumnPage(TabPageParent pParent, const SfxItemSet& rSet) +: SfxTabPage(pParent, "modules/swriter/ui/tablecolumnpage.ui", "TableColumnPage", ) , pTableData(nullptr) , nTableWidth(0) , nMinWidth(MINLAY) @@ -708,28 +707,25 @@ SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSe , bModified(false) , bModifyTable(false) , bPercentMode(false) +, m_aFieldArr { m_xBuilder->weld_metric_spin_button("width1", FUNIT_CM), +m_xBuilder->weld_metric_spin_button("width2", FUNIT_CM), +m_xBuilder->weld_metric_spin_button("width3", FUNIT_CM), +m_xBuilder->weld_metric_spin_button("width4", FUNIT_CM), +m_xBuilder->weld_metric_spin_button("width5", FUNIT_CM), +m_xBuilder->weld_metric_spin_button("width6", FUNIT_CM) } +, m_aTextArr { std::unique_ptr(m_xBuilder->weld_label("1")), + std::unique_ptr(m_xBuilder->weld_label("2")), + std::unique_ptr(m_xBuilder->weld_label("3")), + std::unique_ptr(m_xBuilder->weld_label("4")), + std::unique_ptr(m_xBuilder->weld_label("5")), + std::unique_ptr(m_xBuilder->weld_label("6")) } +, m_xModifyTableCB(m_xBuilder->weld_check_button("adaptwidth")) +, m_xProportionalCB(m_xBuilder->weld_check_button("adaptcolumns")) +, m_xSpaceFT(m_xBuilder->weld_label("spaceft")) +, m_xSpaceED(m_xBuilder->weld_metric_spin_button("space", FUNIT_CM)) +, m_xUpBtn(m_xBuilder->weld_button("next")) +, m_xDownBtn(m_xBuilder->weld_button("back")) { -get(m_pModifyTableCB, "adaptwidth"); -get(m_pProportionalCB, "adaptcolumns"); -get(m_pSpaceFT, "spaceft"); -get(m_pSpaceED, "space-nospin"); -get(m_pUpBtn, "next"); -get(m_pDownBtn, "back"); - -m_aFieldArr[0].set(get("width1")); -m_aFieldArr[1].set(get("width2")); -m_aFieldArr[2].set(get("width3")); -m_aFieldArr[3].set(get("width4")); -m_aFieldArr[4].set(get("width5")); -m_aFieldArr[5].set(get("width6")); - -m_pTextArr[0] = get("1"); -m_pTextArr[1] = get("2"); -m_pTextArr[2] = get("3"); -m_pTextArr[3] = get("4"); -m_pTextArr[4] = get("5"); -m_pTextArr[5] = get("6"); - SetExchangeSupport(); const SfxPoolItem* pItem; @@ -739,26 +735,11 @@ SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSe SwTableColumnPage::~SwTableColumnPage() { -disposeOnce(); -} - -void SwTableColumnPage::dispose() -{ -m_pModifyTableCB.clear(); -m_pProportionalCB.clear(); -m_pSpaceFT.clear(); -m_pSpaceED.clear(); -m_pUpBtn.clear(); -m_pDownBtn.clear(); -for (auto& p : m_pTextArr) -p.clear(); -SfxTabPage::dispose(); } -VclPtr SwTableColumnPage::Create( TabPageParent pParent, - const SfxItemSet* rAttrSet) +VclPtr SwTableColumnPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet) { -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/uibase/docvw/HeaderFooterWin.cxx |5 + sw/uiconfig/swriter/ui/headerfootermenu.ui |8 2 files changed, 13 insertions(+) New commits: commit 2a93d2a4af7bb72b155f91e18239cc1b5bc90a4e Author: Gulsah KoseDate: Wed May 23 09:53:10 2018 +0300 [Pardus] tdf#92685 Add insert page count option to header menu This patch is sponsored by ULAKBIM/Pardus project. Change-Id: I5ecca4f58ec0ecf6a639153b52a4424af1966820 Signed-off-by: Gulsah Kose Reviewed-on: https://gerrit.libreoffice.org/54687 Tested-by: Jenkins diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index e8fe4b84bfe3..e1c157ee3afe 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -466,6 +466,11 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent) SfxViewFrame* pVFrame = rSh.GetView().GetViewFrame(); pVFrame->GetBindings().Execute(FN_INSERT_FLD_PGNUMBER); } +else if (rIdent == "insert_pagecount") +{ +SfxViewFrame* pVFrame = rSh.GetView().GetViewFrame(); +pVFrame->GetBindings().Execute(FN_INSERT_FLD_PGCOUNT); +} } void SwHeaderFooterWin::SetReadonly( bool bReadonly ) diff --git a/sw/uiconfig/swriter/ui/headerfootermenu.ui b/sw/uiconfig/swriter/ui/headerfootermenu.ui index 6167ff654469..03edd05c8271 100644 --- a/sw/uiconfig/swriter/ui/headerfootermenu.ui +++ b/sw/uiconfig/swriter/ui/headerfootermenu.ui @@ -35,5 +35,13 @@ True + + +True +False +Insert Page Count +True + + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/UIConfig_swriter.mk |1 sw/source/ui/dbui/mmresultdialogs.cxx| 16 +-- sw/source/ui/inc/mmresultdialogs.hxx |2 sw/source/uibase/dbui/dbmgr.cxx |3 sw/source/uibase/dbui/dbui.cxx | 28 +++--- sw/source/uibase/inc/dbui.hxx| 21 +++- sw/uiconfig/swriter/ui/printmonitordialog.ui | 34 ++-- sw/uiconfig/swriter/ui/savemonitordialog.ui | 114 +++ 8 files changed, 164 insertions(+), 55 deletions(-) New commits: commit f08c5fbabf9f2b84786cd95131590be2e15bc604 Author: Caolán McNamaraDate: Sun May 13 21:21:43 2018 +0100 split PrintMonitor and weld SaveMonitor part Change-Id: I72325530027df69cabe8a0ec85b7b77d239ad453 Reviewed-on: https://gerrit.libreoffice.org/54300 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 02b81e3a268c..0ab905433e7d 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -239,6 +239,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/rowheight \ sw/uiconfig/swriter/ui/saveashtmldialog \ sw/uiconfig/swriter/ui/savelabeldialog \ + sw/uiconfig/swriter/ui/savemonitordialog \ sw/uiconfig/swriter/ui/sectionpage \ sw/uiconfig/swriter/ui/selectaddressdialog \ sw/uiconfig/swriter/ui/selectautotextdialog \ diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index b0c82cbc2ac5..ff1487e2cd90 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -462,7 +462,7 @@ IMPL_LINK_NOARG(SwMMResultEmailDialog, CopyToHdl_Impl, Button*, void) } } -IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveCancelHdl_Impl, Button*, void) +IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveCancelHdl_Impl, weld::Button&, void) { m_bCancelSaving = true; } @@ -625,13 +625,12 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&, void) } SwView* pSourceView = xConfigItem->GetSourceView(); -//TODOScopedVclPtrInstance< PrintMonitor > aSaveMonitor(this, false, PrintMonitor::MONITOR_TYPE_SAVE); -ScopedVclPtrInstance< PrintMonitor > aSaveMonitor(nullptr, false, PrintMonitor::MONITOR_TYPE_SAVE); - aSaveMonitor->m_pDocName->SetText(pSourceView->GetDocShell()->GetTitle(22)); -aSaveMonitor->SetCancelHdl(LINK(this, SwMMResultSaveDialog, SaveCancelHdl_Impl)); -aSaveMonitor->m_pPrinter->SetText( INetURLObject( sPath ).getFSysPath( FSysStyle::Detect ) ); +std::shared_ptr xSaveMonitor(new SaveMonitor(m_xDialog.get())); + xSaveMonitor->m_xDocName->set_label(pSourceView->GetDocShell()->GetTitle(22)); +xSaveMonitor->m_xCancel->connect_clicked(LINK(this, SwMMResultSaveDialog, SaveCancelHdl_Impl)); +xSaveMonitor->m_xPrinter->set_label( INetURLObject( sPath ).getFSysPath( FSysStyle::Detect ) ); m_bCancelSaving = false; -aSaveMonitor->Show(); +weld::DialogController::runAsync(xSaveMonitor, [](int) {}); for(sal_uInt32 nDoc = nBegin; nDoc < nEnd && !m_bCancelSaving; ++nDoc) { @@ -643,7 +642,7 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&, void) sPath += "." + sExtension; } OUString sStat = SwResId(STR_STATSTR_LETTER) + " " + OUString::number( nDoc ); -aSaveMonitor->m_pPrintInfo->SetText(sStat); +xSaveMonitor->m_xPrintInfo->set_label(sStat); //now extract a document from the target document // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here @@ -708,6 +707,7 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&, void) } } } +xSaveMonitor->response(RET_OK); ::osl::File::remove( sTargetTempURL ); } diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx index c08b9c067f30..cde6faee8f9f 100644 --- a/sw/source/ui/inc/mmresultdialogs.hxx +++ b/sw/source/ui/inc/mmresultdialogs.hxx @@ -57,7 +57,7 @@ class SwMMResultSaveDialog : public weld::GenericDialogController std::unique_ptr m_xOKButton; DECL_LINK(SaveOutputHdl_Impl, weld::Button& , void); -DECL_LINK(SaveCancelHdl_Impl, Button*, void); +DECL_LINK(SaveCancelHdl_Impl, weld::Button&, void); DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void); public: diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 2083deff7b1f..c4ed68804959 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1324,8 +1324,7 @@ bool
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/misc/glossary.cxx | 132 +++-- sw/uiconfig/swriter/ui/renameautotextdialog.ui | 42 +++ 2 files changed, 76 insertions(+), 98 deletions(-) New commits: commit 9f55cc13d64b4c8d60b1ff2e93ed854b0dccad46 Author: Caolán McNamaraDate: Sun May 13 17:55:03 2018 +0100 weld SwNewGlosNameDlg Change-Id: Ie1c320958813bfb602da46738782b9e1e9fe5a9e Reviewed-on: https://gerrit.libreoffice.org/54196 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index b38de3134e14..c62a67a214c6 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -114,64 +114,54 @@ struct GroupUserData }; // dialog for new block name -class SwNewGlosNameDlg : public ModalDialog +class SwNewGlosNameDlg : public weld::GenericDialogController { -VclPtrm_pNewName; TextFilter m_aNoSpaceFilter; -VclPtrm_pNewShort; -VclPtrm_pOk; -VclPtrm_pOldName; -VclPtrm_pOldShort; +VclPtr m_pParent; + +std::unique_ptr m_xNewName; +std::unique_ptr m_xNewShort; +std::unique_ptr m_xOk; +std::unique_ptr m_xOldName; +std::unique_ptr m_xOldShort; protected: -DECL_LINK( Modify, Edit&, void ); -DECL_LINK(Rename, Button*, void); +DECL_LINK(Modify, weld::Entry&, void); +DECL_LINK(Rename, weld::Button&, void); +DECL_LINK(TextFilterHdl, OUString&, bool); public: -SwNewGlosNameDlg( vcl::Window* pParent, - const OUString& rOldName, - const OUString& rOldShort ); -virtual ~SwNewGlosNameDlg() override; -virtual void dispose() override; - -OUString GetNewName() const { return m_pNewName->GetText(); } -OUString GetNewShort() const { return m_pNewShort->GetText(); } -}; +SwNewGlosNameDlg(SwGlossaryDlg* pParent, + const OUString& rOldName, + const OUString& rOldShort); -SwNewGlosNameDlg::SwNewGlosNameDlg(vcl::Window* pParent, -const OUString& rOldName, -const OUString& rOldShort ) -: ModalDialog(pParent, "RenameAutoTextDialog", -"modules/swriter/ui/renameautotextdialog.ui") -{ -get(m_pNewName, "newname"); -get(m_pNewShort, "newsc"); -m_pNewShort->SetTextFilter(_aNoSpaceFilter); -get(m_pOk, "ok"); -get(m_pOldName, "oldname"); -get(m_pOldShort, "oldsc"); - -m_pOldName->SetText( rOldName ); -m_pOldShort->SetText( rOldShort ); -m_pNewName->SetModifyHdl(LINK(this, SwNewGlosNameDlg, Modify )); -m_pNewShort->SetModifyHdl(LINK(this, SwNewGlosNameDlg, Modify )); -m_pOk->SetClickHdl(LINK(this, SwNewGlosNameDlg, Rename )); -m_pNewName->GrabFocus(); -} +OUString GetNewName() const { return m_xNewName->get_text(); } +OUString GetNewShort() const { return m_xNewShort->get_text(); } +}; -SwNewGlosNameDlg::~SwNewGlosNameDlg() +IMPL_LINK(SwNewGlosNameDlg, TextFilterHdl, OUString&, rTest, bool) { -disposeOnce(); +rTest = m_aNoSpaceFilter.filter(rTest); +return true; } -void SwNewGlosNameDlg::dispose() +SwNewGlosNameDlg::SwNewGlosNameDlg(SwGlossaryDlg* pParent, const OUString& rOldName, const OUString& rOldShort) +: GenericDialogController(pParent->GetFrameWeld(), "modules/swriter/ui/renameautotextdialog.ui", "RenameAutoTextDialog") +, m_pParent(pParent) +, m_xNewName(m_xBuilder->weld_entry("newname")) +, m_xNewShort(m_xBuilder->weld_entry("newsc")) +, m_xOk(m_xBuilder->weld_button("ok")) +, m_xOldName(m_xBuilder->weld_entry("oldname")) +, m_xOldShort(m_xBuilder->weld_entry("oldsc")) { -m_pNewName.clear(); -m_pNewShort.clear(); -m_pOk.clear(); -m_pOldName.clear(); -m_pOldShort.clear(); -ModalDialog::dispose(); +m_xNewShort->connect_insert_text(LINK(this, SwNewGlosNameDlg, TextFilterHdl)); + +m_xOldName->set_text(rOldName); +m_xOldShort->set_text(rOldShort); +m_xNewName->connect_changed(LINK(this, SwNewGlosNameDlg, Modify )); +m_xNewShort->connect_changed(LINK(this, SwNewGlosNameDlg, Modify )); +m_xOk->connect_clicked(LINK(this, SwNewGlosNameDlg, Rename )); +m_xNewName->grab_focus(); } // query / set currently set group @@ -503,17 +493,15 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) else if (sItemIdent == "rename") { m_pShortNameEdit->SetText(pGlossaryHdl->GetGlossaryShortName(m_pNameED->GetText())); -ScopedVclPtrInstance pNewNameDlg(this, m_pNameED->GetText(), - m_pShortNameEdit->GetText()); -if( RET_OK == pNewNameDlg->Execute() && -pGlossaryHdl->Rename( m_pShortNameEdit->GetText(), -
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/misc/outline.cxx | 440 ++--- sw/source/uibase/inc/numberingtypelistbox.hxx |3 sw/source/uibase/inc/numprevw.hxx | 50 ++ sw/source/uibase/inc/outline.hxx | 50 +- sw/uiconfig/swriter/ui/outlinenumberingpage.ui | 72 ++-- 5 files changed, 446 insertions(+), 169 deletions(-) New commits: commit ee9ab9c13731399047c78de8d7f57302e33fb95d Author: Caolán McNamaraDate: Fri May 4 10:17:18 2018 +0100 weld SwOutlineSettingsTabPage Change-Id: I5032c0d446cee1eae443a4c0876f862c3a6af81a Reviewed-on: https://gerrit.libreoffice.org/53838 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index c76b640226dd..6baa4cc17535 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -399,46 +399,45 @@ short SwOutlineTabDialog::Ok() return RET_OK; } -SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent, +SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(TabPageParent pPage, const SfxItemSet& rSet) -: SfxTabPage(pParent, "OutlineNumberingPage", -"modules/swriter/ui/outlinenumberingpage.ui", ) +: SfxTabPage(pPage, "modules/swriter/ui/outlinenumberingpage.ui", "OutlineNumberingPage", ) , aNoFormatName(SwResId(SW_STR_NONE)) , pSh(nullptr) , pNumRule(nullptr) , pCollNames(nullptr) , nActLevel(1) +, m_xLevelLB(m_xBuilder->weld_tree_view("level")) +, m_xCollBox(m_xBuilder->weld_combo_box_text("style")) +, m_xNumberBox(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("numbering"))) +, m_xCharFormatLB(m_xBuilder->weld_combo_box_text("charstyle")) +, m_xAllLevelFT(m_xBuilder->weld_label("sublevelsft")) +, m_xAllLevelNF(m_xBuilder->weld_spin_button("sublevelsnf")) +, m_xPrefixED(m_xBuilder->weld_entry("prefix")) +, m_xSuffixED(m_xBuilder->weld_entry("suffix")) +, m_xStartEdit(m_xBuilder->weld_spin_button("startat")) +, m_xPreviewWIN(new SwNumberingPreview(m_xBuilder->weld_drawing_area("preview"))) { -get(m_pLevelLB, "level"); -get(m_pCollBox, "style"); -m_pCollBox->SetStyle(m_pCollBox->GetStyle()|WB_SORT); -get(m_pNumberBox, "numbering"); -get(m_pCharFormatLB, "charstyle"); -get(m_pAllLevelFT, "sublevelsft"); -get(m_pAllLevelNF, "sublevelsnf"); -get(m_pPrefixED, "prefix"); -get(m_pSuffixED, "suffix"); -get(m_pStartEdit, "startat"); -get(m_pPreviewWIN, "preview"); - SetExchangeSupport(); -m_pCollBox->InsertEntry(aNoFormatName); -m_pLevelLB->SetSelectHdl(LINK(this,SwOutlineSettingsTabPage, LevelHdl)); -m_pAllLevelNF->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, ToggleComplete)); -m_pCollBox->SetSelectHdl(LINK(this,SwOutlineSettingsTabPage, CollSelect)); -m_pCollBox->SetGetFocusHdl(LINK(this, SwOutlineSettingsTabPage, CollSelectGetFocus)); -m_pNumberBox->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, NumberSelect)); -m_pPrefixED->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, DelimModify)); -m_pSuffixED->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, DelimModify)); -m_pStartEdit->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, StartModified)); -m_pCharFormatLB->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, CharFormatHdl)); +m_xNumberBox->Reload(SwInsertNumTypes::NoNumbering | SwInsertNumTypes::Extended); +m_xCollBox->make_sorted(); +m_xCollBox->append_text(aNoFormatName); +m_xLevelLB->connect_changed(LINK(this,SwOutlineSettingsTabPage, LevelHdl)); +m_xAllLevelNF->connect_value_changed(LINK(this, SwOutlineSettingsTabPage, ToggleComplete)); +m_xCollBox->connect_changed(LINK(this,SwOutlineSettingsTabPage, CollSelect)); +m_xCollBox->connect_focus_in(LINK(this, SwOutlineSettingsTabPage, CollSelectGetFocus)); +m_xNumberBox->connect_changed(LINK(this, SwOutlineSettingsTabPage, NumberSelect)); +m_xPrefixED->connect_changed(LINK(this, SwOutlineSettingsTabPage, DelimModify)); +m_xSuffixED->connect_changed(LINK(this, SwOutlineSettingsTabPage, DelimModify)); +m_xStartEdit->connect_value_changed(LINK(this, SwOutlineSettingsTabPage, StartModified)); +m_xCharFormatLB->connect_changed(LINK(this, SwOutlineSettingsTabPage, CharFormatHdl)); } voidSwOutlineSettingsTabPage::Update() { // if a template was already selected for this level, select it in the ListBox -m_pCollBox->Enable(USHRT_MAX != nActLevel); +m_xCollBox->set_sensitive(USHRT_MAX != nActLevel); if(USHRT_MAX == nActLevel) { bool bSamePrefix = true; @@ -470,43 +469,43 @@ voidSwOutlineSettingsTabPage::Update() } }
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/envelp/labprt.cxx | 100 - sw/source/ui/envelp/labprt.hxx | 23 +++--- sw/uiconfig/swriter/ui/labeloptionspage.ui | 40 +++ 3 files changed, 65 insertions(+), 98 deletions(-) New commits: commit c31668c50fff0c7050cc176a7a5a83a08c670c12 Author: Caolán McNamaraDate: Mon Apr 23 09:10:08 2018 +0100 weld SwLabPrtPage Change-Id: I64ae3826298ad210ec095256e4364b607684abca Reviewed-on: https://gerrit.libreoffice.org/53327 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index faecd0ee8018..872f31d7f070 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -27,35 +27,31 @@ #include -SwLabPrtPage::SwLabPrtPage(vcl::Window* pParent, const SfxItemSet& rSet) -: SfxTabPage(pParent, "LabelOptionsPage", -"modules/swriter/ui/labeloptionspage.ui", ) +SwLabPrtPage::SwLabPrtPage(TabPageParent pParent, const SfxItemSet& rSet) +: SfxTabPage(pParent, "modules/swriter/ui/labeloptionspage.ui", "LabelOptionsPage", ) , pPrinter(nullptr) +, m_xPageButton(m_xBuilder->weld_radio_button("entirepage")) +, m_xSingleButton(m_xBuilder->weld_radio_button("singlelabel")) +, m_xSingleGrid(m_xBuilder->weld_widget("singlegrid")) +, m_xPrinterFrame(m_xBuilder->weld_widget("printerframe")) +, m_xColField(m_xBuilder->weld_spin_button("cols")) +, m_xRowField(m_xBuilder->weld_spin_button("rows")) +, m_xSynchronCB(m_xBuilder->weld_check_button("synchronize")) +, m_xPrinterInfo(m_xBuilder->weld_label("printername")) +, m_xPrtSetup(m_xBuilder->weld_button("setup")) { -get(m_pPageButton, "entirepage"); -get(m_pSingleButton, "singlelabel"); -get(m_pSingleGrid, "singlegrid"); -get(m_pColField, "cols"); -get(m_pRowField, "rows"); -get(m_pSynchronCB, "synchronize"); -get(m_pPrinterFrame, "printerframe"); -get(m_pPrinterInfo, "printername"); -get(m_pPrtSetup, "setup"); SetExchangeSupport(); // Install handlers -Link
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/envelp/labfmt.cxx| 67 ++ sw/source/ui/envelp/labfmt.hxx| 24 ++ sw/uiconfig/swriter/ui/savelabeldialog.ui | 26 +-- 3 files changed, 58 insertions(+), 59 deletions(-) New commits: commit 2448d6d7126cdbe73c1f56d6703f390f9f88216b Author: Caolán McNamaraDate: Thu Apr 19 15:24:43 2018 +0100 weld SwSaveLabelDlg Change-Id: I463ee75667e22d3b4b3ec64afabad52c5159d4ac Reviewed-on: https://gerrit.libreoffice.org/53168 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 82a5b754f9c7..90672ac0fd10 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -574,10 +574,10 @@ IMPL_LINK_NOARG(SwLabFormatPage, SaveHdl, Button*, void) aRec.m_nPWidth = static_cast< long >(GETFLDVAL(*m_pPWidthField )); aRec.m_nPHeight = static_cast< long >(GETFLDVAL(*m_pPHeightField)); aRec.m_bCont = aItem.m_bCont; -ScopedVclPtrInstance< SwSaveLabelDlg > pSaveDlg(this, aRec); -pSaveDlg->SetLabel(aItem.m_aLstMake, aItem.m_aLstType); -pSaveDlg->Execute(); -if(pSaveDlg->GetLabel(aItem)) +SwSaveLabelDlg aSaveDlg(this, aRec); +aSaveDlg.SetLabel(aItem.m_aLstMake, aItem.m_aLstType); +aSaveDlg.run(); +if (aSaveDlg.GetLabel(aItem)) { bModified = false; const std::vector& rMan = GetParentSwLabDlg()->GetLabelsConfig().GetManufacturers(); @@ -592,60 +592,47 @@ IMPL_LINK_NOARG(SwLabFormatPage, SaveHdl, Button*, void) } SwSaveLabelDlg::SwSaveLabelDlg(SwLabFormatPage* pParent, SwLabRec& rRec) -: ModalDialog(pParent, "SaveLabelDialog", -"modules/swriter/ui/savelabeldialog.ui") +: GenericDialogController(pParent->GetFrameWeld(), "modules/swriter/ui/savelabeldialog.ui", "SaveLabelDialog") , bSuccess(false) , pLabPage(pParent) , rLabRec(rRec) +, m_xMakeCB(m_xBuilder->weld_combo_box_text("brand")) +, m_xTypeED(m_xBuilder->weld_entry("type")) +, m_xOKPB(m_xBuilder->weld_button("ok")) { -get(m_pMakeCB, "brand"); -get(m_pTypeED, "type"); -get(m_pOKPB, "ok"); - -m_pOKPB->SetClickHdl(LINK(this, SwSaveLabelDlg, OkHdl)); -Link aLk(LINK(this, SwSaveLabelDlg, ModifyHdl)); -m_pMakeCB->SetModifyHdl(aLk); -m_pTypeED->SetModifyHdl(aLk); +m_xOKPB->connect_clicked(LINK(this, SwSaveLabelDlg, OkHdl)); +m_xMakeCB->connect_changed(LINK(this, SwSaveLabelDlg, ModifyComboHdl)); +m_xTypeED->connect_changed(LINK(this, SwSaveLabelDlg, ModifyEntryHdl)); SwLabelConfig& rCfg = pLabPage->GetParentSwLabDlg()->GetLabelsConfig(); const std::vector& rMan = rCfg.GetManufacturers(); for (const auto & i : rMan) { -m_pMakeCB->InsertEntry(i); +m_xMakeCB->append_text(i); } } SwSaveLabelDlg::~SwSaveLabelDlg() { -disposeOnce(); -} - -void SwSaveLabelDlg::dispose() -{ -m_pMakeCB.clear(); -m_pTypeED.clear(); -m_pOKPB.clear(); -pLabPage.clear(); -ModalDialog::dispose(); } -IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl, Button*, void) +IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl, weld::Button&, void) { SwLabelConfig& rCfg = pLabPage->GetParentSwLabDlg()->GetLabelsConfig(); -OUString sMake(m_pMakeCB->GetText()); -OUString sType(m_pTypeED->GetText()); +OUString sMake(m_xMakeCB->get_active_text()); +OUString sType(m_xTypeED->get_text()); if(rCfg.HasLabel(sMake, sType)) { if ( rCfg.IsPredefinedLabel(sMake, sType) ) { SAL_WARN( "sw.envelp", "label is predefined and cannot be overwritten" ); -std::unique_ptr xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/cannotsavelabeldialog.ui")); +std::unique_ptr xBuilder(Application::CreateBuilder(m_xDialog.get(), "modules/swriter/ui/cannotsavelabeldialog.ui")); std::unique_ptr xBox(xBuilder->weld_message_dialog("CannotSaveLabelDialog")); xBox->run(); return; } -std::unique_ptr xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/querysavelabeldialog.ui")); +std::unique_ptr xBuilder(Application::CreateBuilder(m_xDialog.get(), "modules/swriter/ui/querysavelabeldialog.ui")); std::unique_ptr xQuery(xBuilder->weld_message_dialog("QuerySaveLabelDialog")); xQuery->set_primary_text(xQuery->get_primary_text(). replaceAll("%1", sMake).replaceAll("%2", sType)); @@ -658,20 +645,30 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl, Button*, void) rLabRec.m_aType = sType; rCfg.SaveLabel(sMake, sType, rLabRec); bSuccess = true; -EndDialog(RET_OK); +m_xDialog->response(RET_OK); +} + +void SwSaveLabelDlg::Modify() +{ +