[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - sc/source
sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx |5 +++-- sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 10 ++ sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx | 10 ++ 3 files changed, 15 insertions(+), 10 deletions(-) New commits: commit b195fc7549dd17fb659795ea9e916af99f9909b5 Author: Caolán McNamara caol...@redhat.com Date: Mon Feb 2 21:04:28 2015 + Related: fdo#88455 crash using delete in available fields Change-Id: I4ac5fe6f42b425ee96124b2dde39ff397a081638 (cherry picked from commit 1746c886362b8525b04365dd6b7203b8098b99ba) Reviewed-on: https://gerrit.libreoffice.org/14290 Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx index 2d53653..a2c78e9 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx @@ -253,12 +253,14 @@ void ScPivotLayoutTreeListData::KeyInput(const KeyEvent rKeyEvent) KeyCode aCode = rKeyEvent.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); -switch (nCode) +if (nCode == KEY_DELETE) { -case KEY_DELETE: -GetModel()-Remove(GetCurEntry()); -return; +const SvTreeListEntry* pEntry = GetCurEntry(); +if (pEntry) +GetModel()-Remove(pEntry); +return; } + SvTreeListBox::KeyInput(rKeyEvent); } diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx index 6617b0b..013ce2c 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx @@ -78,12 +78,14 @@ void ScPivotLayoutTreeListLabel::KeyInput(const KeyEvent rKeyEvent) KeyCode aCode = rKeyEvent.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); -switch (nCode) +if (nCode == KEY_DELETE) { -case KEY_DELETE: -GetModel()-Remove(GetCurEntry()); -return; +const SvTreeListEntry* pEntry = GetCurEntry(); +if (pEntry) +GetModel()-Remove(pEntry); +return; } + SvTreeListBox::KeyInput(rKeyEvent); } commit 86ea9493fda77e6aa5e6ebd666b2d8306057d6cc Author: Caolán McNamara caol...@redhat.com Date: Sat Jan 24 20:59:27 2015 + Resolves: rhbz#1179642 crash in GetFocus with empty mpPreviouslyFocusedListBox Change-Id: I7559067c00617482d34e7cbdd177202868cbfc76 (cherry picked from commit dae7d2089516d9cf014b9fad0adb484f19282a29) Reviewed-on: https://gerrit.libreoffice.org/14161 Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx index f4201dc..9dd08ce 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx @@ -122,9 +122,10 @@ void ScPivotLayoutTreeListBase::GetFocus() if( GetGetFocusFlags() GETFOCUS_MNEMONIC ) { SvTreeListEntry* pEntry = mpParent-mpPreviouslyFocusedListBox-GetCurEntry(); -InsertEntryForSourceTarget(pEntry, NULL); +if (pEntry) +InsertEntryForSourceTarget(pEntry, NULL); -if(mpParent-mpPreviouslyFocusedListBox != NULL) +if (mpParent-mpPreviouslyFocusedListBox != NULL) mpParent-mpPreviouslyFocusedListBox-GrabFocus(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - sc/source
sc/source/core/data/table3.cxx | 15 + sc/source/core/tool/token.cxx | 67 + 2 files changed, 76 insertions(+), 6 deletions(-) New commits: commit 800eb8025233c340b154843c074fd5b6e8d21d35 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Mon Oct 27 07:32:32 2014 -0700 fdo#85282: Correct adjustment of range reference on delete shift. Change-Id: I6e01c160f77599dfa4a2e55b60e23d256184c822 diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 7208d9d..f78e1c1 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2536,6 +2536,9 @@ void setRefDeleted( ScComplexRefData rRef, const sc::RefUpdateContext rCxt ) bool shrinkRange( const sc::RefUpdateContext rCxt, ScRange rRefRange, const ScRange rDeletedRange ) { +if (!rDeletedRange.Intersects(rRefRange)) +return false; + if (rCxt.mnColDelta 0) { // Shifting left. @@ -2543,9 +2546,35 @@ bool shrinkRange( const sc::RefUpdateContext rCxt, ScRange rRefRange, const Sc // Deleted range is only partially overlapping in vertical direction. Bail out. return false; -// Move the last column position to the left. -SCCOL nDelta = rDeletedRange.aStart.Col() - rDeletedRange.aEnd.Col() - 1; -rRefRange.aEnd.IncCol(nDelta); +if (rDeletedRange.aStart.Col() = rRefRange.aStart.Col()) +{ +if (rRefRange.aEnd.Col() = rDeletedRange.aEnd.Col()) +{ +// Reference is entirely deleted. +rRefRange.SetInvalid(); +} +else +{ +// The reference range is truncated on the left. +SCCOL nOffset = rDeletedRange.aStart.Col() - rRefRange.aStart.Col(); +SCCOL nDelta = rRefRange.aStart.Col() - rDeletedRange.aEnd.Col() - 1; +rRefRange.aStart.IncCol(nOffset); +rRefRange.aEnd.IncCol(nDelta+nOffset); +} +} +else if (rDeletedRange.aEnd.Col() rRefRange.aEnd.Col()) +{ +// Reference is deleted in the middle. Move the last column +// position to the left. +SCCOL nDelta = rDeletedRange.aStart.Col() - rDeletedRange.aEnd.Col() - 1; +rRefRange.aEnd.IncCol(nDelta); +} +else +{ +// The reference range is truncated on the right. +SCCOL nDelta = rDeletedRange.aStart.Col() - rRefRange.aEnd.Col() - 1; +rRefRange.aEnd.IncCol(nDelta); +} return true; } else if (rCxt.mnRowDelta 0) @@ -2556,9 +2585,35 @@ bool shrinkRange( const sc::RefUpdateContext rCxt, ScRange rRefRange, const Sc // Deleted range is only partially overlapping in horizontal direction. Bail out. return false; -// Move the last row position up. -SCROW nDelta = rDeletedRange.aStart.Row() - rDeletedRange.aEnd.Row() - 1; -rRefRange.aEnd.IncRow(nDelta); +if (rDeletedRange.aStart.Row() = rRefRange.aStart.Row()) +{ +if (rRefRange.aEnd.Row() = rDeletedRange.aEnd.Row()) +{ +// Reference is entirely deleted. +rRefRange.SetInvalid(); +} +else +{ +// The reference range is truncated on the top. +SCCOL nOffset = rDeletedRange.aStart.Row() - rRefRange.aStart.Row(); +SCCOL nDelta = rRefRange.aStart.Row() - rDeletedRange.aEnd.Row() - 1; +rRefRange.aStart.IncRow(nOffset); +rRefRange.aEnd.IncRow(nDelta+nOffset); +} +} +else if (rDeletedRange.aEnd.Row() rRefRange.aEnd.Row()) +{ +// Reference is deleted in the middle. Move the last row +// position upward. +SCCOL nDelta = rDeletedRange.aStart.Row() - rDeletedRange.aEnd.Row() - 1; +rRefRange.aEnd.IncRow(nDelta); +} +else +{ +// The reference range is truncated on the bottom. +SCCOL nDelta = rDeletedRange.aStart.Row() - rRefRange.aEnd.Row() - 1; +rRefRange.aEnd.IncRow(nDelta); +} return true; } commit 452165fb459dd026b86de1e4b5fe0ade5beb3a83 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Mon Oct 27 08:52:38 2014 -0700 fdo#85215: Ensure that formula broadcasting works after sort. When the reference update on sort is turned off. Change-Id: I547dd1525a638dd447fe331e22583af4a7947308 (cherry picked from commit 1eb82c78a223d9a0b2bb5c3f5c129c1ee8bdf303) diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 9a6069c..d646678 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -802,6 +802,15 @@ void ScTable::SortReorderByRow( ScSortInfoArray::RowsType*
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - sc/source
sc/source/core/data/table2.cxx |7 +- sc/source/core/tool/token.cxx | 47 + 2 files changed, 49 insertions(+), 5 deletions(-) New commits: commit 701ea5c08efd63bbea82a43e49405a911f7419c8 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Sat Oct 18 20:22:53 2014 -0400 fdo#82047: Correctly adjust references in range names on row deletion. Change-Id: Iac924b0b6932863f7f9cc088f996e0b07c340d2c (cherry picked from commit 281847613bd3ae472523822f4be9c21cc353867e) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 73d284a..7208d9d 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -3164,6 +3164,53 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName( if (adjustDoubleRefInName(rRef, rCxt, rPos)) aRes.mbReferenceModified = true; } +else if (rCxt.mnRowDelta 0) +{ +// row(s) deleted. +if (rRef.Ref1.IsRowRel() || rRef.Ref2.IsRowRel()) +// Don't modify relative references in names. +break; + +if (aAbs.aStart.Col() rCxt.maRange.aStart.Col() || rCxt.maRange.aEnd.Col() aAbs.aEnd.Col()) +// column range of the reference is not entirely in the deleted column range. +break; + +ScRange aDeleted = rCxt.maRange; +aDeleted.aStart.IncRow(rCxt.mnRowDelta); + aDeleted.aEnd.SetRow(aDeleted.aStart.Row()-rCxt.mnRowDelta-1); + +if (aAbs.aEnd.Row() aDeleted.aStart.Row() || aDeleted.aEnd.Row() aAbs.aStart.Row()) +// reference range doesn't intersect with the deleted range. +break; + +if (aDeleted.aStart.Row() = aAbs.aStart.Row() aAbs.aEnd.Row() = aDeleted.aEnd.Row()) +{ +// This reference is entirely deleted. +rRef.Ref1.SetRowDeleted(true); +rRef.Ref2.SetRowDeleted(true); +aRes.mbReferenceModified = true; +break; +} + +if (aAbs.aStart.Row() aDeleted.aStart.Row()) +{ +if (aDeleted.aEnd.Row() aAbs.aEnd.Row()) +// Deleted in the middle. Make the reference shorter. +rRef.Ref2.IncRow(rCxt.mnRowDelta); +else +// Deleted at tail end. Cut off the lower part. +rRef.Ref2.SetAbsRow(aDeleted.aStart.Row()-1); +} +else +{ +// Deleted at the top. Cut the top off and shift up. +rRef.Ref1.SetAbsRow(aDeleted.aEnd.Row()+1); +rRef.Ref1.IncRow(rCxt.mnRowDelta); +rRef.Ref2.IncRow(rCxt.mnRowDelta); +} + +aRes.mbReferenceModified = true; +} else if (rCxt.maRange.Intersects(aAbs)) { if (rCxt.mnColDelta rCxt.maRange.aStart.Row() = aAbs.aStart.Row() aAbs.aEnd.Row() = rCxt.maRange.aEnd.Row()) commit 5ff49c8461d91fd04a321051f27335b4fe8c0970 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Fri Oct 17 21:48:31 2014 -0400 fdo#80284: Avoid broadcasting during cell delete shift. Broadcasting it here and marking formula cells dirty prevents them from being entered into the formula tree at the end. They get marked postponed dirty during reference update, and are supposed to be set dirty at the end. Change-Id: I65977300ee4ee26b6166d170acd2145abcbbf288 (cherry picked from commit 7fef943114b9184e69c8c714bf158116b8d9caf7) diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 56a2768..101eb18 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -389,11 +389,8 @@ void ScTable::DeleteCol( } } -{ // scope for bulk broadcast -ScBulkBroadcast aBulkBroadcast( pDocument-GetBASM()); -for (SCSIZE i = 0; i nSize; i++) -aCol[nStartCol + i].DeleteArea(nStartRow, nEndRow, IDF_ALL); -} +for (SCSIZE i = 0; i nSize; i++) +aCol[nStartCol + i].DeleteArea(nStartRow, nEndRow, IDF_ALL, false); if ((nStartRow == 0) (nEndRow == MAXROW)) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - sc/source
sc/source/core/tool/token.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 69a7f2d94f0cb87cbc7f911f0393204a9c0eef1a Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Mon Oct 6 14:33:49 2014 -0400 cp#1000103: Set 3D flag when adjusting reference on cell move. This is conceptually a backport of 31abf4ce4e18cf2e94c6e598f255ae7cd8f675fa, adjusted to apply to the 4.2 code base. Change-Id: Id2979c7699e2b28cc752d527f4cb328da1529c0d diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 68f9cf6..73d284a 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2899,6 +2899,8 @@ void ScTokenArray::MoveReference( { aAbs.Move(rDelta.Col(), rDelta.Row(), rDelta.Tab()); rRef.SetAddress(aAbs, rPos); +if (rDelta.Tab()) +rRef.SetFlag3D(aAbs.Tab()!=rPos.Tab()); } } break; @@ -2911,6 +2913,8 @@ void ScTokenArray::MoveReference( { aAbs.Move(rDelta.Col(), rDelta.Row(), rDelta.Tab()); rRef.SetRange(aAbs, rPos); +if (rDelta.Tab()) +rRef.Ref1.SetFlag3D(aAbs.aStart.Tab()!=rPos.Tab()); } } break; commit 470ff027834f40682cbff14e36f32530f7a237af Author: Eike Rathke er...@redhat.com Date: Fri Aug 22 12:59:47 2014 +0200 resolved fdo#82936 do not clear the 3D flag on refupdate Change-Id: I2ae1368a2ffc20e988ff3ab66590a9f98902b862 (cherry picked from commit 75aad687cb5e63a41303aea568bf68b2b5f15d31) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 24f0343..68f9cf6 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2847,7 +2847,8 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove( } rRef.SetAddress(aAbs, rNewPos); -rRef.SetFlag3D(b3DFlag); +if (b3DFlag) +rRef.SetFlag3D(b3DFlag); } break; case svDoubleRef: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - sc/source svx/source
sc/source/ui/view/drawview.cxx |2 +- svx/source/svdraw/gradtrns.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 21e4d0de7b8cce4941bebacf3e8d75c9e68ee176 Author: Damien Chambe damien.cha...@gmail.com Date: Sun Jun 15 21:17:41 2014 +0200 Resolves fdo#76160 Calc invalid image position on zooming Change-Id: Idd268a3378a902c173dc4d75d879714c2e919b2d Reviewed-on: https://gerrit.libreoffice.org/9792 Reviewed-by: Kohei Yoshida libreoff...@kohei.us Tested-by: Kohei Yoshida libreoff...@kohei.us (cherry picked from commit b8d84a3bf59212a9652f76d7852c81191b8c8a3b) diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index c4a4da2..09d845a 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -321,7 +321,7 @@ void ScDrawView::RecalcScale() if (nEndCol20) nEndCol = 20; if (nEndRow20) -nEndRow = 1000; +nEndRow = 20; ScDrawUtil::CalcScale( pDoc, nTab, 0,0, nEndCol,nEndRow, pDev,aZoomX,aZoomY,nPPTX,nPPTY, aScaleX,aScaleY ); commit cb27f7ab60a0aac36de0dfe184149ffb339ad59b Author: Hideki Ikeda hideki.ik...@gmail.com Date: Tue Jun 24 19:05:51 2014 -0400 fdo#37401 - fixed the old vector length The center-left point in the area is used to calculate the old vector length but the coordinate was incorrect. Change-Id: I81a88182d11e30ee7a5caee3eac879b082bff160 Reviewed-on: https://gerrit.libreoffice.org/9887 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com (cherry picked from commit 03675ab4a8994cb7000fd738d1685720c8b9e584) Related: fdo#37401 adjust fix to original aCenter use i.e. as far as I can see the bug came about during commit 74cb1c4cb5f72fd8cf80c6d144eda00841394647 Author: Ivo Hinkelmann i...@openoffice.org Date: Tue Nov 14 12:37:46 2006 + with 2006/10/27 12:14:08 aw 1.2.1208.5: #i39528# ::basegfx - basegfx adaption in -Vector2D aFullVec(aStartPos - aEndPos); -Vector2D aOldVec(Vector2D(aRect.Left(), aCenter.Y()) - aRect.TopLeft()); ^^^ -double fFullLen = aFullVec.GetLength(); -double fOldLen = aOldVec.GetLength(); -double fNewBorder = (fFullLen * 100.0) / fOldLen; -sal_Int32 nNewBorder = 100 - (sal_Int32)(fNewBorder + 0.5); +basegfx::B2DVector aFullVec(aStartPos - aEndPos); +const basegfx::B2DPoint aTopLeft(aRange.getMinX(), aRange.getMinY()); +const basegfx::B2DPoint aCenterLeft(aRange.getMinX(), aRange.getHeight()); ^^ +const basegfx::B2DVector aOldVec(aCenterLeft - aTopLeft); +const double fFullLen(aFullVec.getLength()); +const double fOldLen(aOldVec.getLength()); +const double fNewBorder((fFullLen * 100.0) / fOldLen); +sal_Int32 nNewBorder(100L - FRound(fNewBorder)); Change-Id: I840caa5e49a04f9b6460c4fa8e3731f3e5ebde05 (cherry picked from commit ef16d765306c932c49254f295f57e5853129c1ea) (cherry picked from commit 383135d77867d0f2c05b4c807eb17b099604eaa1) diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx index f0bdfeb..be875b2 100644 --- a/svx/source/svdraw/gradtrns.cxx +++ b/svx/source/svdraw/gradtrns.cxx @@ -468,7 +468,7 @@ void GradTransformer::VecToGrad(GradTransVector rV, GradTransGradient rG, Grad { basegfx::B2DVector aFullVec(aStartPos - aEndPos); const basegfx::B2DPoint aTopLeft(aRange.getMinX(), aRange.getMinY()); -const basegfx::B2DPoint aCenterLeft(aRange.getMinX(), aRange.getHeight()); +const basegfx::B2DPoint aCenterLeft(aRange.getMinX(), aCenter.getY()); const basegfx::B2DVector aOldVec(aCenterLeft - aTopLeft); const double fFullLen(aFullVec.getLength()); const double fOldLen(aOldVec.getLength()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - sc/source
sc/source/core/data/column3.cxx |4 ++-- sc/source/core/data/document.cxx | 20 ++-- 2 files changed, 20 insertions(+), 4 deletions(-) New commits: commit 8ee9a8f96cbaa466d64cf644506fa95334c2016a Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Fri May 9 14:04:30 2014 -0400 fdo#77379: Don't return from the call. Notes are handled at the end. Returning prematurely would end up skipping pasting of notes. Change-Id: I79e0968023342a68fe729f31eb6cfc3cfacd5850 (cherry picked from commit f4673ccd5e26d38a28f297d64ed70ba719d21ef2) Reviewed-on: https://gerrit.libreoffice.org/9295 Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index ef726d1..6f5e4e2 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -881,7 +881,7 @@ public: case sc::element_type_string: { if (!bString) -return; +break; sc::string_block::const_iterator it = sc::string_block::begin(*node.data); std::advance(it, nOffset); @@ -905,7 +905,7 @@ public: case sc::element_type_edittext: { if (!bString) -return; +break; sc::edittext_block::const_iterator it = sc::edittext_block::begin(*node.data); std::advance(it, nOffset); commit f89b4a7de1669c75e33748dae438c7c6c2b6524e Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Fri May 9 11:44:51 2014 -0400 fdo#77806: Check the boundaries before accessing an array Change-Id: I0878f734599f566cde83183947cd7613c0f8d5c6 (cherry picked from commit a45973a90625f4b9e0f603154194f357ff2418d4) Reviewed-on: https://gerrit.libreoffice.org/9292 Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 8c69412..47164be 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -6113,14 +6113,30 @@ bool ScDocument::HasNote(const ScAddress rPos) const { return HasNote(rPos.Col(), rPos.Row(), rPos.Tab()); } + bool ScDocument::HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const { -const ScPostIt* pNote = maTabs[nTab]-aCol[nCol].GetCellNote(nRow); +if (!ValidColRow(nCol, nRow)) +return false; + +const ScTable* pTab = FetchTable(nTab); +if (!pTab) +return false; + +const ScPostIt* pNote = pTab-aCol[nCol].GetCellNote(nRow); return pNote != NULL; } + bool ScDocument::HasColNotes(SCCOL nCol, SCTAB nTab) const { -return maTabs[nTab]-aCol[nCol].HasCellNotes(); +if (!ValidCol(nCol)) +return false; + +const ScTable* pTab = FetchTable(nTab); +if (!pTab) +return false; + +return pTab-aCol[nCol].HasCellNotes(); } bool ScDocument::HasTabNotes(SCTAB nTab) const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits