[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/sfx2 sfx2/source
include/sfx2/sfxhelp.hxx |1 + sfx2/source/appl/sfxhelp.cxx | 19 +++ 2 files changed, 16 insertions(+), 4 deletions(-) New commits: commit c83fc23a69949a8408c9e4ad8dc19ee9fa9d82a1 Author: Caolán McNamara AuthorDate: Mon Mar 22 16:16:36 2021 + Commit: Xisco Fauli CommitDate: Mon Mar 22 21:15:50 2021 +0100 tdf#140539 don't allow help to be relaunched during launch its fine once it is launched to fire help again, just not during the launch itself via the yield-call done during html load that probably exists to let the progress bar redraw Change-Id: I42e0bf670023d91f70cb1de3fa0fda23e82d0678 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112804 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx index 7f4d687b102d..ed44309888ed 100644 --- a/include/sfx2/sfxhelp.hxx +++ b/include/sfx2/sfxhelp.hxx @@ -28,6 +28,7 @@ class SFX2_DLLPUBLIC SfxHelp final : public Help { boolbIsDebug; +boolbLaunchingHelp; // tdf#140539 don't allow help to be re-launched during help launch private: SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const vcl::Window* pWindow, const OUString& rKeyword ); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index b4f31d914a9c..7d81085fa651 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -338,8 +338,9 @@ OUString SfxHelp_Impl::GetHelpText( const OUString& aCommandURL, const OUString& return SfxContentHelper::GetActiveHelpString( aHelpURL.makeStringAndClear() ); } -SfxHelp::SfxHelp() : -bIsDebug( false ) +SfxHelp::SfxHelp() +: bIsDebug(false) +, bLaunchingHelp(false) { // read the environment variable "HELP_DEBUG" // if it's set, you will see debug output on active help @@ -691,12 +692,22 @@ void SfxHelp::SearchKeyword( const OUString& rKeyword ) bool SfxHelp::Start( const OUString& rURL, const vcl::Window* pWindow ) { -return Start_Impl( rURL, pWindow, OUString() ); +if (bLaunchingHelp) +return true; +bLaunchingHelp = true; +bool bRet = Start_Impl( rURL, pWindow, OUString() ); +bLaunchingHelp = false; +return bRet; } bool SfxHelp::Start(const OUString& rURL, weld::Widget* pWidget) { -return Start_Impl(rURL, pWidget, OUString()); +if (bLaunchingHelp) +return true; +bLaunchingHelp = true; +bool bRet = Start_Impl(rURL, pWidget, OUString()); +bLaunchingHelp = false; +return bRet; } /// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/sfx2 sfx2/source sw/source
include/sfx2/tabdlg.hxx |2 ++ sfx2/source/dialog/tabdlg.cxx |7 ++- sw/source/ui/fldui/flddb.cxx |4 sw/source/ui/fldui/flddb.hxx |1 + 4 files changed, 13 insertions(+), 1 deletion(-) New commits: commit 64f98e467794f98836a99719ecde51bf6a8f8bad Author: Mike Kaganski AuthorDate: Sun Mar 14 14:42:15 2021 +0300 Commit: Xisco Fauli CommitDate: Wed Mar 17 19:34:43 2021 +0100 tdf#141011: Postpone SwFieldDBPage::Reset to tab activation This way, it will only ask for password when dialog is switched to that tab. Change-Id: Ie2a453b0b6867ceb1ef3728a8565de4f6cbf4757 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112469 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 0adf52a644aaf85ba2bd666147c62c134234ffbb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112516 Reviewed-by: Xisco Fauli diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 0d770572f051..50f378d14dc4 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -208,6 +208,8 @@ public: virtual boolFillItemSet( SfxItemSet* ); virtual voidReset( const SfxItemSet* ); +// Allows to postpone some initialization to the first activation +virtual boolDeferResetToFirstActivation(); boolHasExchangeSupport() const { return bHasExchangeSupport; } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 22acd6791b25..484b431a690e 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -168,6 +168,8 @@ void SfxTabPage::Reset( const SfxItemSet* ) { } +bool SfxTabPage::DeferResetToFirstActivation() { return false; } + void SfxTabPage::ActivatePage( const SfxItemSet& ) /* [Description] @@ -919,7 +921,10 @@ void SfxTabDialogController::CreatePages() pDataObject->xTabPage->SetUserData(sUserData); PageCreated(pDataObject->sId, *pDataObject->xTabPage); -pDataObject->xTabPage->Reset(m_pSet.get()); +if (pDataObject->xTabPage->DeferResetToFirstActivation()) +pDataObject->bRefresh = true; // Reset will be called in ActivatePageHdl +else +pDataObject->xTabPage->Reset(m_pSet.get()); } } diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index e2097cb77291..220ccbb58302 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -178,6 +178,10 @@ void SwFieldDBPage::Reset(const SfxItemSet*) } } +// SwFieldDBPage may ask for password to select current document's data source, +// so only do that when activating the page, not when dialog is creating all pages +bool SwFieldDBPage::DeferResetToFirstActivation() { return true; } + bool SwFieldDBPage::FillItemSet(SfxItemSet* ) { OUString sTableName; diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx index e507fcb86ee0..b25c38699234 100644 --- a/sw/source/ui/fldui/flddb.hxx +++ b/sw/source/ui/fldui/flddb.hxx @@ -70,6 +70,7 @@ public: virtual boolFillItemSet( SfxItemSet* rSet ) override; virtual voidReset( const SfxItemSet* rSet ) override; +virtual boolDeferResetToFirstActivation() override; virtual voidFillUserData() override; voidActivateMailMergeAddress(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/sfx2 sfx2/source sw/source
include/sfx2/ctrlitem.hxx|8 ++- sfx2/source/control/ctrlitem.cxx | 29 ++- sw/source/uibase/sidebar/PageFormatPanel.cxx |1 3 files changed, 19 insertions(+), 19 deletions(-) New commits: commit cf175d313b7cb3084f99f01e6213cd124d92 Author: Caolán McNamara AuthorDate: Fri Jan 22 10:18:38 2021 + Commit: Caolán McNamara CommitDate: Fri Jan 22 21:02:18 2021 +0100 tdf#135590 MapUnit::Map100thMM fallback is inappropiate for writer which uses MapUnit::Twip so directly after insert, envelope, ok the new document sidebar was using MapUnit::Map100thMM to lookup paper sizes instead of MapUnit::Twip giving inconsistent results against format, page Change-Id: I6a92fddedfe9fef8ad7532ad00b2b38b9741bb69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109751 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx index 489fdb9461a8..da9f86f93e1c 100644 --- a/include/sfx2/ctrlitem.hxx +++ b/include/sfx2/ctrlitem.hxx @@ -30,9 +30,10 @@ class SfxBindings; class SFX2_DLLPUBLIC SfxControllerItem { private: -sal_uInt16 nId; +sal_uInt16 nId; SfxControllerItem* pNext; // to notify next ControllerItem SfxBindings*pBindings; +MapUnit eFallbackCoreMetric; public: SfxBindings & GetBindings() { @@ -67,6 +68,11 @@ public: virtual voidGetControlState( sal_uInt16 nSID, boost::property_tree::ptree& ); MapUnit GetCoreMetric() const; +// override what GetCoreMetric will return if it cannot determine the current CoreMetric +voidSetFallbackCoreMetric(MapUnit eFallback) +{ +eFallbackCoreMetric = eFallback; +} static SfxItemState GetItemState( const SfxPoolItem* pState ); diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index 1b039e44ad9d..308706f95b8c 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -152,9 +152,7 @@ void SfxControllerItem::ClearCache() pBindings->ClearCache_Impl( GetId() ); } - // replaces the successor in the list of bindings of the same id - SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLink ) { SfxControllerItem* pOldLink = pNext; @@ -164,37 +162,32 @@ SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLin // changes the id of unbound functions (e.g. for sub-menu-ids) - void SfxControllerItem::SetId( sal_uInt16 nItemId ) { DBG_ASSERT( !IsBound(), "changing id of bound binding" ); nId = nItemId; } - // creates an atomic item for a controller without registration. - -SfxControllerItem::SfxControllerItem(): -nId(0), -pNext(this), -pBindings(nullptr) +SfxControllerItem::SfxControllerItem() +: nId(0) +, pNext(this) +, pBindings(nullptr) +, eFallbackCoreMetric(MapUnit::Map100thMM) { } - // creates a representation of the function nId and registers it - -SfxControllerItem::SfxControllerItem( sal_uInt16 nID, SfxBindings ): -nId(nID), -pNext(this), -pBindings() +SfxControllerItem::SfxControllerItem(sal_uInt16 nID, SfxBindings ) +: nId(nID) +, pNext(this) +, pBindings() +, eFallbackCoreMetric(MapUnit::Map100thMM) { Bind(nId, ); } - // unregisters the item in the bindings - SfxControllerItem::~SfxControllerItem() { dispose(); @@ -345,7 +338,7 @@ MapUnit SfxControllerItem::GetCoreMetric() const } SAL_INFO( "sfx.control", "W1: Can not find ItemPool!" ); -return MapUnit::Map100thMM; +return eFallbackCoreMetric; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx index 45019db48e9d..31d556ca15ee 100644 --- a/sw/source/uibase/sidebar/PageFormatPanel.cxx +++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx @@ -139,6 +139,7 @@ void PageFormatPanel::dispose() void PageFormatPanel::Initialize() { mxPaperSizeBox->FillPaperSizeEntries( PaperSizeApp::Std ); +maPaperSizeController.SetFallbackCoreMetric(MapUnit::MapTwip); meUnit = maPaperSizeController.GetCoreMetric(); mxPaperWidth->SetFieldUnit(meFUnit); mxPaperHeight->SetFieldUnit(meFUnit); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/sfx2 sfx2/source
include/sfx2/sidebar/TabBar.hxx |2 -- include/sfx2/sidebar/Theme.hxx |3 --- sfx2/source/sidebar/TabBar.cxx | 10 -- sfx2/source/sidebar/Theme.cxx | 22 -- 4 files changed, 37 deletions(-) New commits: commit 1186dfea12738c6157d6214f32b49d821db1f280 Author: Caolán McNamara AuthorDate: Tue Dec 1 10:22:09 2020 + Commit: Caolán McNamara CommitDate: Tue Dec 1 15:44:40 2020 +0100 cid#1470362 Uninitialized scalar field Change-Id: I8828b7e098c1af9411b15b449f425242f5e64635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106972 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx index 53135697230d..8a6b03f74d17 100644 --- a/include/sfx2/sidebar/TabBar.hxx +++ b/include/sfx2/sidebar/TabBar.hxx @@ -69,7 +69,6 @@ public: virtual ~TabBar() override; virtual void dispose() override; -virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rUpdateArea) override; virtual void DataChanged (const DataChangedEvent& rDataChangedEvent) override; virtual bool EventNotify (NotifyEvent& rEvent) override; @@ -120,7 +119,6 @@ private: typedef ::std::vector> ItemContainer; ItemContainer maItems; const ::std::function maDeckActivationFunctor; -sal_Int32 mnMenuSeparatorY; PopupMenuProvider maPopupMenuProvider; static void CreateTabItem(weld::Toolbar& rButton, const DeckDescriptor& rDeckDescriptor); diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx index 9b35ce7aa6dd..c59d71233b00 100644 --- a/include/sfx2/sidebar/Theme.hxx +++ b/include/sfx2/sidebar/Theme.hxx @@ -61,7 +61,6 @@ public: Color_DeckTitleFont, Color_PanelTitleFont, -Color_TabMenuSeparator, Color_Highlight, Color_HighlightText, Color_DeckBackground, @@ -79,8 +78,6 @@ public: Int_DeckBorderSize, Int_DeckSeparatorHeight, Int_PanelTitleBarHeight, -Int_TabMenuPadding, -Int_TabMenuSeparatorPadding, Int_DeckLeftPadding, Int_DeckTopPadding, Int_DeckRightPadding, diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index ee6b901c65de..9738ae6ca29f 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -95,16 +95,6 @@ void TabBar::dispose() InterimItemWindow::dispose(); } -void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) -{ -InterimItemWindow::Paint(rRenderContext, rUpdateArea); - -const sal_Int32 nHorizontalPadding(Theme::GetInteger(Theme::Int_TabMenuSeparatorPadding)); - rRenderContext.SetLineColor(Theme::GetColor(Theme::Color_TabMenuSeparator)); -rRenderContext.DrawLine(Point(nHorizontalPadding, mnMenuSeparatorY), -Point(GetSizePixel().Width() - nHorizontalPadding, mnMenuSeparatorY)); -} - sal_Int32 TabBar::GetDefaultWidth() { if (!gDefaultWidth) diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 063572b5c97e..bd64a87b7907 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -180,16 +180,6 @@ void Theme::UpdateTheme() maPropertyIdToNameMap[Color_TabBarBackground], Any(sal_Int32(aBaseBackgroundColor.GetRGBColor(; -setPropertyValue( -maPropertyIdToNameMap[Int_TabMenuPadding], -Any(sal_Int32(3))); -setPropertyValue( -maPropertyIdToNameMap[Color_TabMenuSeparator], -Any(sal_Int32(aBorderColor.GetRGBColor(; -setPropertyValue( -maPropertyIdToNameMap[Int_TabMenuSeparatorPadding], -Any(sal_Int32(3))); - setPropertyValue( maPropertyIdToNameMap[Color_DropDownBackground], Any(sal_Int32(aBaseBackgroundColor.GetRGBColor(; @@ -512,9 +502,6 @@ void Theme::SetupPropertyMaps() maPropertyNameToIdMap["Color_PanelTitleFont"]=Color_PanelTitleFont; maPropertyIdToNameMap[Color_PanelTitleFont]="Color_PanelTitleFont"; -maPropertyNameToIdMap["Color_TabMenuSeparator"]=Color_TabMenuSeparator; -maPropertyIdToNameMap[Color_TabMenuSeparator]="Color_TabMenuSeparator"; - maPropertyNameToIdMap["Color_Highlight"]=Color_Highlight; maPropertyIdToNameMap[Color_Highlight]="Color_Highlight"; @@ -559,12 +546,6 @@ void Theme::SetupPropertyMaps() maPropertyNameToIdMap["Int_PanelTitleBarHeight"]=Int_PanelTitleBarHeight; maPropertyIdToNameMap[Int_PanelTitleBarHeight]="Int_PanelTitleBarHeight"; -maPropertyNameToIdMap["Int_TabMenuPadding"]=Int_TabMenuPadding; -maPropertyIdToNameMap[Int_TabMenuPadding]="Int_TabMenuPadding"; - - maPropertyNameToIdMap["Int_TabMenuSeparatorPadding"]=Int_TabMenuSeparatorPadding; -