diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-09-01 13:39:49 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-09-01 13:39:49 +0200 |
commit | 7c006c81f4d7eb4c1dd371585ca09bfc3549a0d7 (patch) | |
tree | 2f22cbb93099ba2fffaa5b392dbe7b74e01b765a /sfx2/inc/viewfac.hxx | |
parent | 6fc90af7fff8c629587051cc9c31a135da3b6a99 (diff) |
dba33i: #i111146# completely put the responsibility for remembering/restoring view data, when switching to the
print preview and back, to SFX
In particular, the following changes have been applied
- the SfxViewFactory now supports a programmatic API name, as documented in XModel2.getAvailableViewControllerNames
- the new SFX_IMPL_NAMED_VIEWFACTORY, complementing the existing SFX_IMPL_VIEWFACTORY, allows to create view
factories for such named views
- SfxViewFrame::SwitchToViewShell_Impl has been extended to recognize the case where a non-PrintPreview view
is exchanged with another view. In this case, it preserves the view's view data at the model
- Calc's own mechanism for preserving the standard view's view data, and restoring it when coming back from
the print preview, has been removed completely.
What probably is left here is to migrate the other applications from SFX_IMPL_VIEWFACTORY to SFX_IMPL_NAMED_VIEWFACTORY.
This way, they could also benefit from the new mechanism. Also, the UNO API would then be more precise, as the
view names would be speaking then, instead of the current "view<number>" names.
Diffstat (limited to 'sfx2/inc/viewfac.hxx')
-rw-r--r-- | sfx2/inc/viewfac.hxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sfx2/inc/viewfac.hxx b/sfx2/inc/viewfac.hxx index 6f9ae1d3cb37..0e6498b1f8a5 100644 --- a/sfx2/inc/viewfac.hxx +++ b/sfx2/inc/viewfac.hxx @@ -47,6 +47,8 @@ class SFX2_DLLPUBLIC SfxViewFactory public: SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, USHORT nOrdinal, const ResId& aDescrResId ); + SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, + USHORT nOrdinal, const sal_Char* asciiViewName ); ~SfxViewFactory(); SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh); @@ -56,14 +58,22 @@ public: { return String( aDescription ); } USHORT GetOrdinal() const { return nOrd; } - /// returns an API-compatible view name. For the moment, this is "view" with an appended ordinal/ID - String GetViewName() const; + /// returns a legacy view name. This is "view" with an appended ordinal/ID. + String GetLegacyViewName() const; + + /** returns a API-compatible view name. + + For details on which view names are specified, see the XModel2.getAvailableViewControllerNames + documentation. + */ + String GetAPIViewName() const; private: SfxViewCtor fnCreate; SfxViewInit fnInit; USHORT nOrd; ResId aDescription; + const String m_sViewName; }; #endif |