tdf#156174 sc DBData: fix regression of database ranges
Regression from commit 0c0444c441
"tdf#126926 sc DBData: delete the database range".
Change-Id: If6cccc41af42a44cadbb8485bfa5b9a8eca5a757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154582
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
committed by
László Németh
parent
56ce1aa923
commit
94ca402cd1
@@ -1446,6 +1446,32 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testTdf155796)
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Sheet1.A1:Sheet1.A3"), aMarkedAreaString);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testTdf156174)
|
||||
{
|
||||
createScDoc();
|
||||
ScDocument* pDoc = getScDoc();
|
||||
|
||||
insertNewSheet(*pDoc);
|
||||
|
||||
insertStringToCell("A1", u"1");
|
||||
insertStringToCell("A2", u"2");
|
||||
insertStringToCell("B1", u"3");
|
||||
insertStringToCell("B2", u"4");
|
||||
|
||||
ScDBData* pDBData = new ScDBData("testDB", 1, 0, 0, 1, 1);
|
||||
bool bInserted
|
||||
= pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData));
|
||||
CPPUNIT_ASSERT(bInserted);
|
||||
|
||||
insertNewSheet(*pDoc);
|
||||
uno::Sequence<beans::PropertyValue> aArgs(
|
||||
comphelper::InitPropertySequence({ { "Index", uno::Any(sal_uInt16(3)) } }));
|
||||
dispatchCommand(mxComponent, ".uno:Remove", aArgs);
|
||||
|
||||
ScDBCollection* pDBs = pDoc->GetDBCollection();
|
||||
CPPUNIT_ASSERT(!pDBs->empty());
|
||||
}
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -286,12 +286,7 @@ ScRefUpdateRes ScRefUpdate::Update( const ScDocument* pDoc, UpdateRefMode eUpdat
|
||||
bool bExp = (bExpand && IsExpand( theTab1, theTab2, nTab1, nDz ));
|
||||
bCut1 = lcl_MoveStart( theTab1, nTab1, nDz, nMaxTab );
|
||||
bCut2 = lcl_MoveEnd( theTab2, nTab1, nDz, nMaxTab );
|
||||
if ( theTab2 < theTab1 )
|
||||
{
|
||||
eRet = UR_INVALID;
|
||||
theTab2 = theTab1;
|
||||
}
|
||||
else if ( bCut1 || bCut2 )
|
||||
if ( bCut1 || bCut2 )
|
||||
eRet = UR_UPDATED;
|
||||
if ( bExp )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user