diff options
author | Noel Power <noel.power@suse.com> | 2013-08-29 17:15:33 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-08-29 21:42:05 +0100 |
commit | bcc51fb2ebdf77a1cc089857775fd742085b45b6 (patch) | |
tree | a828e81a8c283a99d991f695178c0db686b10f86 /sc/inc | |
parent | 9d7c5dcf448fed668cc772d3cffa31712b1834a3 (diff) |
add support for in-place style preview
selecting a style in the styles dialog ( without double clicking )
will apply the style to the currently selected cell(s) You can
with the keys navigate to other styles and they in turn will
also be applied. Preview will end when you click back onto the
document.
*FIXME* - the styles dialog isn't really suitable for previewing, a
new dialog ( possibly in the toolbar ) might be nicer ( see Excel )
*FIXME* - when there is a multiple selection the highlight colour
(applied as a transparent overlay) is most annoying ( and is mixed
with any background colour applied if part of a style )
see ( ScGridWindow::UpdateSelectionOverlay() ) However my puny
attempts to make the selection use a transparent colour made all the
borders of the selected cells dissappear. I guess maybe a box/border
around each selected cell ( or group of cells ) would also work
but I didn't try that
Change-Id: I0950e79085ffb75f60ee961835665df0c230172f
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/document.hxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index ab84d4c10b06..9c307f59e81e 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -46,6 +46,7 @@ #include <vector> #include <boost/ptr_container/ptr_vector.hpp> #include <boost/scoped_ptr.hpp> +#include "markdata.hxx" namespace editeng { class SvxBorderLine; } namespace sc { @@ -306,7 +307,8 @@ private: ScLookupCacheMapImpl* pLookupCacheMapImpl; // cache for lookups like VLOOKUP and MATCH SfxItemSet* pPreviewFont; // convert to std::auto_ptr or whatever - ScMarkData* pPreviewSelection; + ScStyleSheet* pPreviewCellStyle; + ScMarkData maPreviewSelection; sal_Int64 nUnoObjectId; // counted up for UNO objects sal_uInt32 nRangeOverflowType; // used in (xml) loading for overflow warnings @@ -967,8 +969,11 @@ public: void SetPreviewFont( SfxItemSet* pFontSet ); SfxItemSet* GetPreviewFont() { return pPreviewFont; } SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab ); - const ScMarkData& GetPreviewSelection(); + const ScMarkData GetPreviewSelection(); void SetPreviewSelection( ScMarkData& rSel ); + ScStyleSheet* GetPreviewCellStyle() { return pPreviewCellStyle; } + ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ); + void SetPreviewCellStyle( ScStyleSheet* pStyle ) { pPreviewCellStyle = pStyle; } SC_DLLPUBLIC void SetAutoNameCache( ScAutoNameCache* pCache ); /** Creates a ScLookupCache cache for the range if it |