Kaydet (Commit) 98ebfb6a authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add test for tdf#105245

Change-Id: I4760ede6d14429be811fe96b28bf1c7663592678
Reviewed-on: https://gerrit.libreoffice.org/36394Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst cb57a432
......@@ -166,6 +166,7 @@ public:
void testFormulaRefUpdateNameDelete();
void testFormulaRefUpdateValidity();
void testTokenArrayRefUpdateMove();
void testSingleCellCopyColumnLabel();
void testMultipleOperations();
void testFuncCOLUMN();
void testFuncCOUNT();
......
......@@ -30,6 +30,7 @@
#include <scitems.hxx>
#include <patattr.hxx>
#include <docpool.hxx>
#include "docoptio.hxx"
#include <formula/vectortoken.hxx>
#include <officecfg/Office/Common.hxx>
......@@ -7711,4 +7712,29 @@ void Test::testRefR1C1WholeRow()
m_pDoc->DeleteTab(0);
}
void Test::testSingleCellCopyColumnLabel()
{
ScDocOptions aOptions = m_pDoc->GetDocOptions();
aOptions.SetLookUpColRowNames(true);
m_pDoc->SetDocOptions(aOptions);
m_pDoc->InsertTab(0, "Test");
m_pDoc->SetString(0, 0, 0, "a");
m_pDoc->SetValue(0, 1, 0, 1.0);
m_pDoc->SetValue(0, 2, 0, 2.0);
m_pDoc->SetValue(0, 3, 0, 3.0);
m_pDoc->SetString(1, 1, 0, "='a'");
double nVal = m_pDoc->GetValue(1, 1, 0);
ASSERT_DOUBLES_EQUAL(1.0, nVal);
ScDocument aClipDoc(SCDOCMODE_CLIP);
copyToClip(m_pDoc, ScRange(1, 1, 0), &aClipDoc);
pasteOneCellFromClip(m_pDoc, ScRange(1, 2, 0), &aClipDoc);
nVal = m_pDoc->GetValue(1, 2, 0);
ASSERT_DOUBLES_EQUAL(2.0, nVal);
m_pDoc->DeleteTab(0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment