[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Jan 10 19:32:50 PST 2012
sc/source/ui/view/viewdata.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 9b853ee45050b78a8e623269c3c7db5c63c2716e
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Tue Jan 10 22:25:06 2012 -0500
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.
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 176a849..8a96403 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 ),
More information about the Libreoffice-commits
mailing list