sw/qa/core/data/docm/testFontColor.docm |binary sw/qa/core/macros-test.cxx | 9 +++++++++ sw/source/ui/vba/vbafont.cxx | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-)
New commits: commit 78071a36def92096920a0441b5fdac0fdd5a7c8e Author: Hannah Meeks <hmeeks4...@gmail.com> AuthorDate: Sat Jul 23 18:24:31 2022 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Sun Jul 24 08:18:20 2022 +0200 VBA Fix Color mapping issues wdRed should retrun wdRed etc. Change-Id: I5ae359c8b5ec9c34ddd2fd18894bd860384b3cc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137383 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sw/qa/core/data/docm/testFontColor.docm b/sw/qa/core/data/docm/testFontColor.docm new file mode 100755 index 000000000000..8e43601cf6d3 Binary files /dev/null and b/sw/qa/core/data/docm/testFontColor.docm differ diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index dd612ae509d8..0bc278d8d688 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -113,6 +113,15 @@ void SwMacrosTest::testVba() { OUString("testDocumentRange.docm"), OUString("vnd.sun.Star.script:Project.Module1.testAll?language=Basic&location=document") + }, + /*{ + OUString("testSelectionFind.docm"), + OUString("vnd.sun.Star.script:Project.Module1.testAll?language=Basic&location=document") + },*/ + { + //current working tests here! + OUString("testFontColor.docm"), + OUString("vnd.sun.Star.script:Project.ThisDocument.testAll?language=Basic&location=document") } /* TODO - make these pass in Writer { diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx index c36efb4c471f..e7a1f30a1381 100644 --- a/sw/source/ui/vba/vbafont.cxx +++ b/sw/source/ui/vba/vbafont.cxx @@ -146,7 +146,7 @@ SwVbaFont::setColorIndex( const uno::Any& _colorindex ) { sal_Int32 nIndex = 0; _colorindex >>= nIndex; - return setColor( OORGBToXLRGB(mxPalette->getByIndex( nIndex )) ); + return setColor( mxPalette->getByIndex( nIndex ) ); } uno::Any SAL_CALL @@ -154,7 +154,7 @@ SwVbaFont::getColorIndex() { sal_Int32 nColor = 0; - XLRGBToOORGB( getColor() ) >>= nColor; + getColor() >>= nColor; sal_Int32 nElems = mxPalette->getCount(); sal_Int32 nIndex = 0; for ( sal_Int32 count=0; count<nElems; ++count )