summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-06-19 15:51:22 +0300
committerخالد حسني <khaled@libreoffice.org>2023-06-19 20:46:36 +0200
commit558892a77d8532edbb7fcd311f7dbd18a8fa7f90 (patch)
tree081c0d5725ab701d026d2bd42563277ebd7d9624 /cppcanvas
parent5dfaecfd87df45953f6d4a85704aab9eb99b0d0e (diff)
CppunitTest_cppcanvas_test: clang-format
Change-Id: Id6497a9dd275ec4e782bcb58b90a27ef569764fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153266 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/qa/unit/test.cxx36
1 files changed, 19 insertions, 17 deletions
diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx
index 63d75c61bff2..5d30509db94b 100644
--- a/cppcanvas/qa/unit/test.cxx
+++ b/cppcanvas/qa/unit/test.cxx
@@ -11,7 +11,6 @@
#include <sal/config.h>
-
#include <vcl/wrkwin.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/virdev.hxx>
@@ -63,41 +62,44 @@ static std::ostream& operator<<(std::ostream& rStream, const std::vector<sal_Boo
class CanvasTest : public test::BootstrapFixture
{
public:
- CanvasTest() : BootstrapFixture(true, false) {}
+ CanvasTest()
+ : BootstrapFixture(true, false)
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(CanvasTest, testComposite)
{
- ScopedVclPtrInstance<WorkWindow> pWin( nullptr, WB_STDWORK );
+ ScopedVclPtrInstance<WorkWindow> pWin(nullptr, WB_STDWORK);
- uno::Reference<rendering::XCanvas> xCanvas = pWin->GetOutDev()->GetCanvas ();
+ uno::Reference<rendering::XCanvas> xCanvas = pWin->GetOutDev()->GetCanvas();
CPPUNIT_ASSERT(xCanvas.is());
// a huge canvas ...
- Size aSize (1, 1);
- uno::Reference<rendering::XBitmap> xBitmap = xCanvas->getDevice ()->createCompatibleAlphaBitmap(
- vcl::unotools::integerSize2DFromSize( aSize ) );
- CPPUNIT_ASSERT( xBitmap.is() );
+ Size aSize(1, 1);
+ uno::Reference<rendering::XBitmap> xBitmap = xCanvas->getDevice()->createCompatibleAlphaBitmap(
+ vcl::unotools::integerSize2DFromSize(aSize));
+ CPPUNIT_ASSERT(xBitmap.is());
- uno::Reference< rendering::XBitmapCanvas > xBitmapCanvas( xBitmap, uno::UNO_QUERY );
- CPPUNIT_ASSERT( xBitmapCanvas.is() );
+ uno::Reference<rendering::XBitmapCanvas> xBitmapCanvas(xBitmap, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xBitmapCanvas.is());
BitmapEx aBitmapEx;
{
// clear the canvas and basic sanity check ...
xBitmapCanvas->clear();
- CPPUNIT_ASSERT( aBitmapEx.Create( xBitmapCanvas, aSize ) );
- CPPUNIT_ASSERT( aBitmapEx.IsAlpha() );
- CPPUNIT_ASSERT( !aBitmapEx.GetAlphaMask().IsEmpty() );
+ CPPUNIT_ASSERT(aBitmapEx.Create(xBitmapCanvas, aSize));
+ CPPUNIT_ASSERT(aBitmapEx.IsAlpha());
+ CPPUNIT_ASSERT(!aBitmapEx.GetAlphaMask().IsEmpty());
}
{
// render something
rendering::RenderState aDefaultState;
- uno::Sequence< double > aRedTransparent{ 1.0, // R
- 0.0, // G
- 0.0, // B
- 0.5 }; // A
+ uno::Sequence<double> aRedTransparent{ 1.0, // R
+ 0.0, // G
+ 0.0, // B
+ 0.5 }; // A
aDefaultState.DeviceColor = aRedTransparent;
#if 0
// words fail me to describe the sheer beauty of allocating a UNO