diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-30 11:09:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-30 11:38:04 +0100 |
commit | 7a211e834fc271d3f28d7f8c49197c925242d862 (patch) | |
tree | 8c7c28628c96ba4503f4a459abb8869ee5474c5c /include | |
parent | e705c37c44e8ce43047c70e5ad9ae65bd79ae962 (diff) |
Resolves: fdo#79360 impress hangs on using sidebar new style
because those styles are "pseudo-styles" and a new one cannot be
added. The possibility is supposed to be disabled, and it is
disabled in the floating stylelist. The old code assumes there
can only be one of these stylelists and when a stylelist
queries if the "new" should be disabled the callback asks
the stylelist what family is selected, but only asks the floating one.
So, floating closed, sidebar open, the new is not disabled.
Implement the ancient TODO now that we have to. Instead of asking
the stylelist what family is selected, query the frame for what
is the current SID_STYLE_FAMILY as set by whatever is the active
stylelist.
What's disturbing is the SID_STYLE_FAMILY values are not SfxStyleFamily, but
indexes that have to be mapped to SfxStyleFamily. I bet there are a pile of
bugs around that, especially with little islands of different conversion
codesites
Change-Id: I85c8032d7c26ae6eea245685748f89b2a860e767
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/app.hxx | 3 | ||||
-rw-r--r-- | include/sfx2/templdlg.hxx | 18 |
2 files changed, 5 insertions, 16 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 17b80b90ba1f..3f81077d5b43 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -174,9 +174,6 @@ public: SfxTemplateDialog* GetTemplateDialog(); Window* GetTopWindow() const; - // TODO/CLEANUP: make currently selected family a view property and so we don't need to query the status from the "TemplateCommon" - ISfxTemplateCommon* GetCurrentTemplateCommon( SfxBindings& ); - // members SfxFilterMatcher& GetFilterMatcher(); SfxProgress* GetProgress() const; diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx index bc6cdc72cb1d..8c9f2f1e47cb 100644 --- a/include/sfx2/templdlg.hxx +++ b/include/sfx2/templdlg.hxx @@ -30,19 +30,7 @@ class SfxTemplateDialog_Impl; -// class ISfxTemplateCommon ---------------------------------------------- - -class ISfxTemplateCommon -{ -public: - virtual SfxStyleFamily GetActualFamily() const = 0; - -protected: - ~ISfxTemplateCommon() {} -}; - // class SfxTemplateDialog ----------------------------------------------- - class SfxTemplateDialog : public SfxDockingWindow { private: @@ -62,8 +50,12 @@ public: virtual void Update(); - ISfxTemplateCommon* GetISfxTemplateCommon(); void SetParagraphFamily(); + + // converts from SFX_STYLE_FAMILY Ids to 1-5 + static sal_uInt16 SFX2_DLLPUBLIC SfxFamilyIdToNId(SfxStyleFamily nFamily); + // converts from 1-5 to SFX_STYLE_FAMILY Ids + static SfxStyleFamily SFX2_DLLPUBLIC NIdToSfxFamilyId(sal_uInt16 nId); }; // class SfxTemplateDialogWrapper ---------------------------------------- |