diff options
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/helper/qahelper.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export_test4.cxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/uicalc/uicalc.cxx | 11 | ||||
-rw-r--r-- | sc/qa/unit/uicalc/uicalc2.cxx | 15 |
5 files changed, 24 insertions, 14 deletions
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 635a27585f97..4034ab23e188 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -198,10 +198,10 @@ void ScModelTestBase::testFormats(ScDocument* pDoc,std::u16string_view sFormat) CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", tools::Long(240), aFont.GetFontSize().getHeight()); pPattern = pDoc->GetPattern(0,2,1); pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, aFont.GetItalic()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, aFont.GetItalicMaybeAskConfig()); pPattern = pDoc->GetPattern(0,4,1); pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeightMaybeAskConfig()); pPattern = pDoc->GetPattern(1,0,1); pPattern->fillFontOnly(aFont); pPattern->fillColor(aComplexColor, ScAutoFontColorMode::Raw); diff --git a/sc/qa/unit/subsequent_export_test4.cxx b/sc/qa/unit/subsequent_export_test4.cxx index e0c129063fd6..87a225a2cf77 100644 --- a/sc/qa/unit/subsequent_export_test4.cxx +++ b/sc/qa/unit/subsequent_export_test4.cxx @@ -1580,13 +1580,15 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testWholeRowBold) CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0)); vcl::Font aFont; pDoc->GetPattern(pDoc->MaxCol(), 1, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); saveAndReload(u"Calc Office Open XML"_ustr); pDoc = getScDoc(); CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0)); pDoc->GetPattern(pDoc->MaxCol(), 1, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); } CPPUNIT_TEST_FIXTURE(ScExportTest4, testXlsxRowsOrder) diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index d91355ef0d48..2e1c8fc40341 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1435,7 +1435,7 @@ CPPUNIT_TEST_FIXTURE(Test, testIteratorsUnallocatedColumnsAttributes) vcl::Font aFont; const ScPatternAttr* pattern = m_pDoc->GetPattern(m_pDoc->MaxCol(), 1, 0); pattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeightMaybeAskConfig()); // Test iterators. ScDocAttrIterator docit( *m_pDoc, 0, allocatedColsCount - 1, 1, allocatedColsCount, 2 ); diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index 86e638a5dc03..375aa5fe8be3 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -1939,7 +1939,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteTransposed) const ScPatternAttr* pPattern = pDoc->GetPattern(0, 1, 0); vcl::Font aFont; pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); goToCell(u"A1:A3"_ustr); @@ -1965,7 +1966,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteTransposed) pPattern = pDoc->GetPattern(1, 0, 0); pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); } // Test the call of .uno:PasteAsLink (tdf#90101) @@ -1994,7 +1996,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteAsLink) const ScPatternAttr* pPattern = pDoc->GetPattern(0, 1, 0); vcl::Font aFont; pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); goToCell(u"A1:A3"_ustr); @@ -2018,7 +2021,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteAsLink) pPattern = pDoc->GetPattern(2, 1, 0); pPattern->fillFontOnly(aFont); CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be normal (cell attributes should not be copied)", - WEIGHT_NORMAL, aFont.GetWeight()); + WEIGHT_NORMAL, aFont.GetWeightMaybeAskConfig()); } CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119659) diff --git a/sc/qa/unit/uicalc/uicalc2.cxx b/sc/qa/unit/uicalc/uicalc2.cxx index 83bf9fcd36f5..253fb35c4b9d 100644 --- a/sc/qa/unit/uicalc/uicalc2.cxx +++ b/sc/qa/unit/uicalc/uicalc2.cxx @@ -1319,16 +1319,19 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testUnallocatedColumnsAttributes) CPPUNIT_ASSERT_EQUAL(INITIALCOLCOUNT, pDoc->GetAllocatedColumnsCount(0)); vcl::Font aFont; pDoc->GetPattern(pDoc->MaxCol(), 0, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); goToCell(u"A2:CV2"_ustr); // first 100 cells in row 2 dispatchCommand(mxComponent, u".uno:Bold"_ustr, {}); // These need to be explicitly allocated. CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0)); pDoc->GetPattern(99, 1, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); pDoc->GetPattern(100, 1, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should not be bold", WEIGHT_NORMAL, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should not be bold", WEIGHT_NORMAL, + aFont.GetWeightMaybeAskConfig()); goToCell("CW3:" + pDoc->MaxColAsString() + "3"); // All but first 100 cells in row 3. dispatchCommand(mxComponent, u".uno:Bold"_ustr, {}); @@ -1336,9 +1339,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testUnallocatedColumnsAttributes) // by the default attribute. CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0)); pDoc->GetPattern(99, 2, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should not be bold", WEIGHT_NORMAL, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should not be bold", WEIGHT_NORMAL, + aFont.GetWeightMaybeAskConfig()); pDoc->GetPattern(100, 2, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); } CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testAutoSum) |