summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHannah Meeks <hmeeks4135@gmail.com>2022-12-23 21:54:01 +0000
committerMike Kaganski <mike.kaganski@collabora.com>2023-02-20 16:55:31 +0000
commit0548269ca03f093c41f6292e783cc6c77328808e (patch)
treea71544a66c43a6341607e61a2f5d9e0b9130ae16 /sc
parent9ba251fb3e7d3b76c8ce730e4b3a3a7859bc119b (diff)
VBA: Remove conversions in writer from OORGBTOXLRGB (XLRGB is actually BGR!)
Enum to store if document is Writer or Calc because font colors are treated differently depending on this: In writer the colors come in as RGB but in calc they are in BGR and both palettes are in RBG so we only need this conversion for calc. Includes testdoc for calc - to show this still works Change-Id: I79d9d585dbfc527c0781543ce1f1095c4db190b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144788 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rwxr-xr-xsc/qa/extras/testdocuments/BGR-RGBTest.xlsbin0 -> 14888 bytes
-rw-r--r--sc/qa/extras/vba-macro-test.cxx2
-rw-r--r--sc/source/ui/vba/vbafont.cxx2
3 files changed, 3 insertions, 1 deletions
diff --git a/sc/qa/extras/testdocuments/BGR-RGBTest.xls b/sc/qa/extras/testdocuments/BGR-RGBTest.xls
new file mode 100755
index 000000000000..e2bf43fb0e92
--- /dev/null
+++ b/sc/qa/extras/testdocuments/BGR-RGBTest.xls
Binary files differ
diff --git a/sc/qa/extras/vba-macro-test.cxx b/sc/qa/extras/vba-macro-test.cxx
index 04e4efece2cf..2464996d2812 100644
--- a/sc/qa/extras/vba-macro-test.cxx
+++ b/sc/qa/extras/vba-macro-test.cxx
@@ -466,6 +466,8 @@ void VBAMacroTest::testVba()
{ OUString("vba_findFunction."),
OUString(
"vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document") },
+ { OUString("BGR-RGBTest."),
+ OUString("vnd.sun.Star.script:VBAProject.Module1.test?language=Basic&location=document") }
};
OUString sTempDir;
OUString sTempDirURL;
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 99afd919bea7..db49f013499c 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -37,7 +37,7 @@ ScVbaFont::ScVbaFont(
const ScVbaPalette& dPalette,
const uno::Reference< beans::XPropertySet >& xPropertySet,
ScCellRangeObj* pRangeObj, bool bFormControl ) :
- ScVbaFont_BASE( xParent, xContext, dPalette.getPalette(), xPropertySet, bFormControl ),
+ ScVbaFont_BASE( xParent, xContext, dPalette.getPalette(), xPropertySet, Component::EXCEL, bFormControl ),
mpRangeObj( pRangeObj )
{
}