diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-24 16:08:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-24 16:10:30 +0000 |
commit | 08706f37737a2b5c92ef3c6e492b152e75fcd11b (patch) | |
tree | 1dbc6380c671f0c794a554c072b5cd433542f023 | |
parent | eeecaf597ae2fb45ab575fd6aab5fcbe3428c033 (diff) |
restore the helpid for impress animation dialog after initialization
Document and centralize the uses of undoing the helpid clear after
helpid->uniqueid hack
Change-Id: I4e651235407a0eca26dc0acfc089ef8f8ce57b13
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 3 | ||||
-rw-r--r-- | sfx2/inc/sfx2/basedlgs.hxx | 10 |
3 files changed, 15 insertions, 3 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index dc58a5a6310b..f76feaad5517 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -1744,9 +1744,8 @@ FormulaDlg::FormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, , this, _pFunctionMgr, _pDlg)) { FreeResource(); - if(GetHelpId().isEmpty()) //Hack which hides the HelpId for a model Dialog in SfxModelessDialog - SetHelpId(GetUniqueId()); //and will be changed in a UniqueId, - //at this point we reverse it. + //undo SfxModelessDialog HelpId clear hack + reverseUniqueHelpIdHack(*this); SetText(m_pImpl->aTitle1); } diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 7dde8b46c22a..0c26014e25ee 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -24,6 +24,7 @@ #include <svl/eitem.hxx> #include <svx/svdograf.hxx> #include <svx/svdogrp.hxx> +#include <sfx2/basedlgs.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/progress.hxx> #include <vcl/msgbox.hxx> @@ -162,6 +163,8 @@ AnimationWindow::AnimationWindow( SfxBindings* pInBindings, { aCtlDisplay.SetAccessibleName(String (SdResId(STR_DISPLAY))); FreeResource(); + //undo SfxDockingWindow HelpId clear hack + reverseUniqueHelpIdHack(*this); // neues Dokument mit Seite erzeugen pMyDoc = new SdDrawDocument(DOCUMENT_TYPE_IMPRESS, NULL); diff --git a/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx index c3684e5a883c..fe86e3d0d659 100644 --- a/sfx2/inc/sfx2/basedlgs.hxx +++ b/sfx2/inc/sfx2/basedlgs.hxx @@ -40,6 +40,16 @@ class HelpButton; class Button; class FixedLine; +//There is a hack which hides the HelpId for a Dialog in SfxModelessDialog +//and SfxDockingWindow, where it is changed into a UniqueId and cleared +//This reverses the clear of the HelpId + +SFX2_DLLPUBLIC inline void reverseUniqueHelpIdHack(Window &rWindow) +{ + if (rWindow.GetHelpId().isEmpty()) + rWindow.SetHelpId(rWindow.GetUniqueId()); +} + // class SfxModalDialog -------------------------------------------------- class SFX2_DLLPUBLIC SfxModalDialog: public ModalDialog |