Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c94a5149
Kaydet (Commit)
c94a5149
authored
Şub 05, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#39135: Add unit test for this.
Change-Id: Id857bfdfd7a2e9024eabdc2b63c02d3d61e7e4f6
üst
1651080f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+35
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
c94a5149
...
...
@@ -4991,6 +4991,41 @@ void Test::testToggleRefFlag()
CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R2C1" );
}
{
// Excel R1C1: Selection at the end of the formula string and does not
// overlap the formula string at all (inspired by fdo#39135).
OUString aFormula("=R1C1");
ScAddress aPos(1, 1, 0);
ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_XL_R1C1);
// Original
CPPUNIT_ASSERT_EQUAL(aFormula, OUString(aFinder.GetText()));
// Make the column relative.
sal_Int32 n = aFormula.getLength();
aFinder.ToggleRel(n, n);
aFormula = aFinder.GetText();
CPPUNIT_ASSERT_EQUAL(OUString("=R1C[-1]"), aFormula);
// Make the row relative.
n = aFormula.getLength();
aFinder.ToggleRel(n, n);
aFormula = aFinder.GetText();
CPPUNIT_ASSERT_EQUAL(OUString("=R[-1]C1"), aFormula);
// Make both relative.
n = aFormula.getLength();
aFinder.ToggleRel(n, n);
aFormula = aFinder.GetText();
CPPUNIT_ASSERT_EQUAL(OUString("=R[-1]C[-1]"), aFormula);
// Back to the original.
n = aFormula.getLength();
aFinder.ToggleRel(n, n);
aFormula = aFinder.GetText();
CPPUNIT_ASSERT_EQUAL(OUString("=R1C1"), aFormula);
}
// TODO: Add more test cases esp. for 3D references, Excel A1 syntax, and
// partial selection within formula string.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment