diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-10 22:25:06 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-10 22:32:54 -0500 |
commit | 9b853ee45050b78a8e623269c3c7db5c63c2716e (patch) | |
tree | a0b584ab2249218dd6f52b838b1f249dfc7ecd4b /sc/source | |
parent | e24a27b4cc920cbb1b87c33f99b7379f50d2e0f7 (diff) |
fdo#44147: Sheet 0 is selected by default.
ScViewData's default ctor sets current sheet to 0, but its selected
sheet data didn't have it selected which meant that the two data
were out-of-sync when created. This affected entering data into cell
when the sheet was embedded (because no sheet was "selected"). In
reality at least one sheet is selected at all times.
The above bug was present before, but was masked by a hack in ScTabView
which always selected sheet 0 when activated. I removed that because
it was interfering with syncing the sheet selection data before and
after print preview. And removing that hack exposed this.
This commit is the right fix.
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 176a8497d259..8a9640392316 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -323,6 +323,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) : bPagebreak ( false ), bSelCtrlMouseClick( false ) { + mpMarkData->SelectOneTable(0); // Sync with nTabNo. SetGridMode ( sal_True ); SetSyntaxMode ( false ); @@ -369,6 +370,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) : ScViewData::ScViewData( const ScViewData& rViewData ) : maTabData( rViewData.maTabData ), + mpMarkData(new ScMarkData(*rViewData.mpMarkData)), pDocShell ( rViewData.pDocShell ), pDoc ( rViewData.pDoc ), pView ( rViewData.pView ), |