summaryrefslogtreecommitdiff
path: root/slideshow/source/engine
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-02-20 16:03:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-02-21 08:09:46 +0100
commitba8a70365ef459c967cd8a71a6d48ca53dd341bd (patch)
tree397ae034cac2f06ea40ed550a7ce39cf4a42966e /slideshow/source/engine
parent0adb36835bcbe55bdf2717556a98e51f1873b19f (diff)
New loplugin:nestedunnamed
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c Reviewed-on: https://gerrit.libreoffice.org/50048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'slideshow/source/engine')
-rw-r--r--slideshow/source/engine/opengl/TransitionerImpl.cxx591
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx45
2 files changed, 313 insertions, 323 deletions
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx
index 299dff9862ab..b0ceabef524b 100644
--- a/slideshow/source/engine/opengl/TransitionerImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx
@@ -464,358 +464,353 @@ void OGLTransitionerImpl::createTexture( GLuint* texID,
CHECK_GL_ERROR();
}
-namespace
+class OGLColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
{
- class OGLColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
- {
- private:
- uno::Sequence< sal_Int8 > maComponentTags;
- uno::Sequence< sal_Int32 > maBitCounts;
+private:
+ uno::Sequence< sal_Int8 > maComponentTags;
+ uno::Sequence< sal_Int32 > maBitCounts;
- virtual sal_Int8 SAL_CALL getType( ) override
+ virtual sal_Int8 SAL_CALL getType( ) override
+ {
+ return rendering::ColorSpaceType::RGB;
+ }
+ virtual uno::Sequence< sal_Int8 > SAL_CALL getComponentTags( ) override
+ {
+ return maComponentTags;
+ }
+ virtual sal_Int8 SAL_CALL getRenderingIntent( ) override
+ {
+ return rendering::RenderingIntent::PERCEPTUAL;
+ }
+ virtual uno::Sequence< beans::PropertyValue > SAL_CALL getProperties( ) override
+ {
+ return uno::Sequence< beans::PropertyValue >();
+ }
+ virtual uno::Sequence< double > SAL_CALL convertColorSpace( const uno::Sequence< double >& deviceColor,
+ const uno::Reference< rendering::XColorSpace >& targetColorSpace ) override
+ {
+ // TODO(P3): if we know anything about target
+ // colorspace, this can be greatly sped up
+ uno::Sequence<rendering::ARGBColor> aIntermediate(
+ convertToARGB(deviceColor));
+ return targetColorSpace->convertFromARGB(aIntermediate);
+ }
+ virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& deviceColor ) override
+ {
+ const double* pIn( deviceColor.getConstArray() );
+ const std::size_t nLen( deviceColor.getLength() );
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
+ "number of channels no multiple of 4",
+ static_cast<rendering::XColorSpace*>(this), 0);
+
+ uno::Sequence< rendering::RGBColor > aRes(nLen/4);
+ rendering::RGBColor* pOut( aRes.getArray() );
+ for( std::size_t i=0; i<nLen; i+=4 )
{
- return rendering::ColorSpaceType::RGB;
+ *pOut++ = rendering::RGBColor(pIn[0],pIn[1],pIn[2]);
+ pIn += 4;
}
- virtual uno::Sequence< sal_Int8 > SAL_CALL getComponentTags( ) override
+ return aRes;
+ }
+ virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& deviceColor ) override
+ {
+ const double* pIn( deviceColor.getConstArray() );
+ const std::size_t nLen( deviceColor.getLength() );
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
+ "number of channels no multiple of 4",
+ static_cast<rendering::XColorSpace*>(this), 0);
+
+ uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
+ rendering::ARGBColor* pOut( aRes.getArray() );
+ for( std::size_t i=0; i<nLen; i+=4 )
{
- return maComponentTags;
+ *pOut++ = rendering::ARGBColor(pIn[3],pIn[0],pIn[1],pIn[2]);
+ pIn += 4;
}
- virtual sal_Int8 SAL_CALL getRenderingIntent( ) override
+ return aRes;
+ }
+ virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& deviceColor ) override
+ {
+ const double* pIn( deviceColor.getConstArray() );
+ const std::size_t nLen( deviceColor.getLength() );
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
+ "number of channels no multiple of 4",
+ static_cast<rendering::XColorSpace*>(this), 0);
+
+ uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
+ rendering::ARGBColor* pOut( aRes.getArray() );
+ for( std::size_t i=0; i<nLen; i+=4 )
{
- return rendering::RenderingIntent::PERCEPTUAL;
+ *pOut++ = rendering::ARGBColor(pIn[3],pIn[3]*pIn[0],pIn[3]*pIn[1],pIn[3]*pIn[2]);
+ pIn += 4;
}
- virtual uno::Sequence< beans::PropertyValue > SAL_CALL getProperties( ) override
+ return aRes;
+ }
+ virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) override
+ {
+ const rendering::RGBColor* pIn( rgbColor.getConstArray() );
+ const std::size_t nLen( rgbColor.getLength() );
+
+ uno::Sequence< double > aRes(nLen*4);
+ double* pColors=aRes.getArray();
+ for( std::size_t i=0; i<nLen; ++i )
{
- return uno::Sequence< beans::PropertyValue >();
+ *pColors++ = pIn->Red;
+ *pColors++ = pIn->Green;
+ *pColors++ = pIn->Blue;
+ *pColors++ = 1.0;
+ ++pIn;
}
- virtual uno::Sequence< double > SAL_CALL convertColorSpace( const uno::Sequence< double >& deviceColor,
- const uno::Reference< rendering::XColorSpace >& targetColorSpace ) override
+ return aRes;
+ }
+ virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) override
+ {
+ const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
+ const std::size_t nLen( rgbColor.getLength() );
+
+ uno::Sequence< double > aRes(nLen*4);
+ double* pColors=aRes.getArray();
+ for( std::size_t i=0; i<nLen; ++i )
{
- // TODO(P3): if we know anything about target
- // colorspace, this can be greatly sped up
- uno::Sequence<rendering::ARGBColor> aIntermediate(
- convertToARGB(deviceColor));
- return targetColorSpace->convertFromARGB(aIntermediate);
+ *pColors++ = pIn->Red;
+ *pColors++ = pIn->Green;
+ *pColors++ = pIn->Blue;
+ *pColors++ = pIn->Alpha;
+ ++pIn;
}
- virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& deviceColor ) override
- {
- const double* pIn( deviceColor.getConstArray() );
- const std::size_t nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
- "number of channels no multiple of 4",
- static_cast<rendering::XColorSpace*>(this), 0);
+ return aRes;
+ }
+ virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) override
+ {
+ const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
+ const std::size_t nLen( rgbColor.getLength() );
- uno::Sequence< rendering::RGBColor > aRes(nLen/4);
- rendering::RGBColor* pOut( aRes.getArray() );
- for( std::size_t i=0; i<nLen; i+=4 )
- {
- *pOut++ = rendering::RGBColor(pIn[0],pIn[1],pIn[2]);
- pIn += 4;
- }
- return aRes;
- }
- virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& deviceColor ) override
+ uno::Sequence< double > aRes(nLen*4);
+ double* pColors=aRes.getArray();
+ for( std::size_t i=0; i<nLen; ++i )
{
- const double* pIn( deviceColor.getConstArray() );
- const std::size_t nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
- "number of channels no multiple of 4",
- static_cast<rendering::XColorSpace*>(this), 0);
-
- uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
- rendering::ARGBColor* pOut( aRes.getArray() );
- for( std::size_t i=0; i<nLen; i+=4 )
- {
- *pOut++ = rendering::ARGBColor(pIn[3],pIn[0],pIn[1],pIn[2]);
- pIn += 4;
- }
- return aRes;
+ *pColors++ = pIn->Red/pIn->Alpha;
+ *pColors++ = pIn->Green/pIn->Alpha;
+ *pColors++ = pIn->Blue/pIn->Alpha;
+ *pColors++ = pIn->Alpha;
+ ++pIn;
}
- virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& deviceColor ) override
+ return aRes;
+ }
+
+ // XIntegerBitmapColorSpace
+ virtual sal_Int32 SAL_CALL getBitsPerPixel( ) override
+ {
+ return 32;
+ }
+ virtual uno::Sequence< sal_Int32 > SAL_CALL getComponentBitCounts( ) override
+ {
+ return maBitCounts;
+ }
+ virtual sal_Int8 SAL_CALL getEndianness( ) override
+ {
+ return util::Endianness::LITTLE;
+ }
+ virtual uno::Sequence<double> SAL_CALL convertFromIntegerColorSpace( const uno::Sequence< sal_Int8 >& deviceColor,
+ const uno::Reference< rendering::XColorSpace >& targetColorSpace ) override
+ {
+ if( dynamic_cast<OGLColorSpace*>(targetColorSpace.get()) )
{
- const double* pIn( deviceColor.getConstArray() );
- const std::size_t nLen( deviceColor.getLength() );
+ const sal_Int8* pIn( deviceColor.getConstArray() );
+ const std::size_t nLen( deviceColor.getLength() );
ENSURE_ARG_OR_THROW2(nLen%4==0,
"number of channels no multiple of 4",
static_cast<rendering::XColorSpace*>(this), 0);
- uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
- rendering::ARGBColor* pOut( aRes.getArray() );
+ uno::Sequence<double> aRes(nLen);
+ double* pOut( aRes.getArray() );
for( std::size_t i=0; i<nLen; i+=4 )
{
- *pOut++ = rendering::ARGBColor(pIn[3],pIn[3]*pIn[0],pIn[3]*pIn[1],pIn[3]*pIn[2]);
- pIn += 4;
+ *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
+ *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
+ *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
+ *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
}
return aRes;
}
- virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) override
+ else
{
- const rendering::RGBColor* pIn( rgbColor.getConstArray() );
- const std::size_t nLen( rgbColor.getLength() );
-
- uno::Sequence< double > aRes(nLen*4);
- double* pColors=aRes.getArray();
- for( std::size_t i=0; i<nLen; ++i )
- {
- *pColors++ = pIn->Red;
- *pColors++ = pIn->Green;
- *pColors++ = pIn->Blue;
- *pColors++ = 1.0;
- ++pIn;
- }
- return aRes;
- }
- virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) override
- {
- const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
- const std::size_t nLen( rgbColor.getLength() );
-
- uno::Sequence< double > aRes(nLen*4);
- double* pColors=aRes.getArray();
- for( std::size_t i=0; i<nLen; ++i )
- {
- *pColors++ = pIn->Red;
- *pColors++ = pIn->Green;
- *pColors++ = pIn->Blue;
- *pColors++ = pIn->Alpha;
- ++pIn;
- }
- return aRes;
- }
- virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) override
- {
- const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
- const std::size_t nLen( rgbColor.getLength() );
-
- uno::Sequence< double > aRes(nLen*4);
- double* pColors=aRes.getArray();
- for( std::size_t i=0; i<nLen; ++i )
- {
- *pColors++ = pIn->Red/pIn->Alpha;
- *pColors++ = pIn->Green/pIn->Alpha;
- *pColors++ = pIn->Blue/pIn->Alpha;
- *pColors++ = pIn->Alpha;
- ++pIn;
- }
- return aRes;
- }
-
- // XIntegerBitmapColorSpace
- virtual sal_Int32 SAL_CALL getBitsPerPixel( ) override
- {
- return 32;
- }
- virtual uno::Sequence< sal_Int32 > SAL_CALL getComponentBitCounts( ) override
- {
- return maBitCounts;
+ // TODO(P3): if we know anything about target
+ // colorspace, this can be greatly sped up
+ uno::Sequence<rendering::ARGBColor> aIntermediate(
+ convertIntegerToARGB(deviceColor));
+ return targetColorSpace->convertFromARGB(aIntermediate);
}
- virtual sal_Int8 SAL_CALL getEndianness( ) override
+ }
+ virtual uno::Sequence< sal_Int8 > SAL_CALL convertToIntegerColorSpace( const uno::Sequence< sal_Int8 >& deviceColor,
+ const uno::Reference< rendering::XIntegerBitmapColorSpace >& targetColorSpace ) override
+ {
+ if( dynamic_cast<OGLColorSpace*>(targetColorSpace.get()) )
{
- return util::Endianness::LITTLE;
+ // it's us, so simply pass-through the data
+ return deviceColor;
}
- virtual uno::Sequence<double> SAL_CALL convertFromIntegerColorSpace( const uno::Sequence< sal_Int8 >& deviceColor,
- const uno::Reference< rendering::XColorSpace >& targetColorSpace ) override
+ else
{
- if( dynamic_cast<OGLColorSpace*>(targetColorSpace.get()) )
- {
- const sal_Int8* pIn( deviceColor.getConstArray() );
- const std::size_t nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
- "number of channels no multiple of 4",
- static_cast<rendering::XColorSpace*>(this), 0);
-
- uno::Sequence<double> aRes(nLen);
- double* pOut( aRes.getArray() );
- for( std::size_t i=0; i<nLen; i+=4 )
- {
- *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
- *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
- *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
- *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
- }
- return aRes;
- }
- else
- {
- // TODO(P3): if we know anything about target
- // colorspace, this can be greatly sped up
- uno::Sequence<rendering::ARGBColor> aIntermediate(
- convertIntegerToARGB(deviceColor));
- return targetColorSpace->convertFromARGB(aIntermediate);
- }
+ // TODO(P3): if we know anything about target
+ // colorspace, this can be greatly sped up
+ uno::Sequence<rendering::ARGBColor> aIntermediate(
+ convertIntegerToARGB(deviceColor));
+ return targetColorSpace->convertIntegerFromARGB(aIntermediate);
}
- virtual uno::Sequence< sal_Int8 > SAL_CALL convertToIntegerColorSpace( const uno::Sequence< sal_Int8 >& deviceColor,
- const uno::Reference< rendering::XIntegerBitmapColorSpace >& targetColorSpace ) override
+ }
+ virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertIntegerToRGB( const uno::Sequence< sal_Int8 >& deviceColor ) override
+ {
+ const sal_Int8* pIn( deviceColor.getConstArray() );
+ const std::size_t nLen( deviceColor.getLength() );
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
+ "number of channels no multiple of 4",
+ static_cast<rendering::XColorSpace*>(this), 0);
+
+ uno::Sequence< rendering::RGBColor > aRes(nLen/4);
+ rendering::RGBColor* pOut( aRes.getArray() );
+ for( std::size_t i=0; i<nLen; i+=4 )
{
- if( dynamic_cast<OGLColorSpace*>(targetColorSpace.get()) )
- {
- // it's us, so simply pass-through the data
- return deviceColor;
- }
- else
- {
- // TODO(P3): if we know anything about target
- // colorspace, this can be greatly sped up
- uno::Sequence<rendering::ARGBColor> aIntermediate(
- convertIntegerToARGB(deviceColor));
- return targetColorSpace->convertIntegerFromARGB(aIntermediate);
- }
- }
- virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertIntegerToRGB( const uno::Sequence< sal_Int8 >& deviceColor ) override
- {
- const sal_Int8* pIn( deviceColor.getConstArray() );
- const std::size_t nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
- "number of channels no multiple of 4",
- static_cast<rendering::XColorSpace*>(this), 0);
-
- uno::Sequence< rendering::RGBColor > aRes(nLen/4);
- rendering::RGBColor* pOut( aRes.getArray() );
- for( std::size_t i=0; i<nLen; i+=4 )
- {
- *pOut++ = rendering::RGBColor(
- vcl::unotools::toDoubleColor(pIn[0]),
- vcl::unotools::toDoubleColor(pIn[1]),
- vcl::unotools::toDoubleColor(pIn[2]));
- pIn += 4;
- }
- return aRes;
+ *pOut++ = rendering::RGBColor(
+ vcl::unotools::toDoubleColor(pIn[0]),
+ vcl::unotools::toDoubleColor(pIn[1]),
+ vcl::unotools::toDoubleColor(pIn[2]));
+ pIn += 4;
}
+ return aRes;
+ }
- virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const uno::Sequence< sal_Int8 >& deviceColor ) override
+ virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const uno::Sequence< sal_Int8 >& deviceColor ) override
+ {
+ const sal_Int8* pIn( deviceColor.getConstArray() );
+ const std::size_t nLen( deviceColor.getLength() );
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
+ "number of channels no multiple of 4",
+ static_cast<rendering::XColorSpace*>(this), 0);
+
+ uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
+ rendering::ARGBColor* pOut( aRes.getArray() );
+ for( std::size_t i=0; i<nLen; i+=4 )
{
- const sal_Int8* pIn( deviceColor.getConstArray() );
- const std::size_t nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
- "number of channels no multiple of 4",
- static_cast<rendering::XColorSpace*>(this), 0);
-
- uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
- rendering::ARGBColor* pOut( aRes.getArray() );
- for( std::size_t i=0; i<nLen; i+=4 )
- {
- *pOut++ = rendering::ARGBColor(
- vcl::unotools::toDoubleColor(pIn[3]),
- vcl::unotools::toDoubleColor(pIn[0]),
- vcl::unotools::toDoubleColor(pIn[1]),
- vcl::unotools::toDoubleColor(pIn[2]));
- pIn += 4;
- }
- return aRes;
+ *pOut++ = rendering::ARGBColor(
+ vcl::unotools::toDoubleColor(pIn[3]),
+ vcl::unotools::toDoubleColor(pIn[0]),
+ vcl::unotools::toDoubleColor(pIn[1]),
+ vcl::unotools::toDoubleColor(pIn[2]));
+ pIn += 4;
}
+ return aRes;
+ }
- virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const uno::Sequence< sal_Int8 >& deviceColor ) override
+ virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const uno::Sequence< sal_Int8 >& deviceColor ) override
+ {
+ const sal_Int8* pIn( deviceColor.getConstArray() );
+ const std::size_t nLen( deviceColor.getLength() );
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
+ "number of channels no multiple of 4",
+ static_cast<rendering::XColorSpace*>(this), 0);
+
+ uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
+ rendering::ARGBColor* pOut( aRes.getArray() );
+ for( std::size_t i=0; i<nLen; i+=4 )
{
- const sal_Int8* pIn( deviceColor.getConstArray() );
- const std::size_t nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
- "number of channels no multiple of 4",
- static_cast<rendering::XColorSpace*>(this), 0);
-
- uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
- rendering::ARGBColor* pOut( aRes.getArray() );
- for( std::size_t i=0; i<nLen; i+=4 )
- {
- const sal_Int8 nAlpha( pIn[3] );
- *pOut++ = rendering::ARGBColor(
- vcl::unotools::toDoubleColor(nAlpha),
- vcl::unotools::toDoubleColor(nAlpha*pIn[0]),
- vcl::unotools::toDoubleColor(nAlpha*pIn[1]),
- vcl::unotools::toDoubleColor(nAlpha*pIn[2]));
- pIn += 4;
- }
- return aRes;
+ const sal_Int8 nAlpha( pIn[3] );
+ *pOut++ = rendering::ARGBColor(
+ vcl::unotools::toDoubleColor(nAlpha),
+ vcl::unotools::toDoubleColor(nAlpha*pIn[0]),
+ vcl::unotools::toDoubleColor(nAlpha*pIn[1]),
+ vcl::unotools::toDoubleColor(nAlpha*pIn[2]));
+ pIn += 4;
}
+ return aRes;
+ }
- virtual uno::Sequence< sal_Int8 > SAL_CALL convertIntegerFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) override
- {
- const rendering::RGBColor* pIn( rgbColor.getConstArray() );
- const std::size_t nLen( rgbColor.getLength() );
-
- uno::Sequence< sal_Int8 > aRes(nLen*4);
- sal_Int8* pColors=aRes.getArray();
- for( std::size_t i=0; i<nLen; ++i )
- {
- *pColors++ = vcl::unotools::toByteColor(pIn->Red);
- *pColors++ = vcl::unotools::toByteColor(pIn->Green);
- *pColors++ = vcl::unotools::toByteColor(pIn->Blue);
- *pColors++ = -1;
- ++pIn;
- }
- return aRes;
- }
+ virtual uno::Sequence< sal_Int8 > SAL_CALL convertIntegerFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) override
+ {
+ const rendering::RGBColor* pIn( rgbColor.getConstArray() );
+ const std::size_t nLen( rgbColor.getLength() );
- virtual uno::Sequence< sal_Int8 > SAL_CALL convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) override
+ uno::Sequence< sal_Int8 > aRes(nLen*4);
+ sal_Int8* pColors=aRes.getArray();
+ for( std::size_t i=0; i<nLen; ++i )
{
- const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
- const std::size_t nLen( rgbColor.getLength() );
-
- uno::Sequence< sal_Int8 > aRes(nLen*4);
- sal_Int8* pColors=aRes.getArray();
- for( std::size_t i=0; i<nLen; ++i )
- {
- *pColors++ = vcl::unotools::toByteColor(pIn->Red);
- *pColors++ = vcl::unotools::toByteColor(pIn->Green);
- *pColors++ = vcl::unotools::toByteColor(pIn->Blue);
- *pColors++ = vcl::unotools::toByteColor(pIn->Alpha);
- ++pIn;
- }
- return aRes;
+ *pColors++ = vcl::unotools::toByteColor(pIn->Red);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Green);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Blue);
+ *pColors++ = -1;
+ ++pIn;
}
+ return aRes;
+ }
- virtual uno::Sequence< sal_Int8 > SAL_CALL convertIntegerFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) override
- {
- const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
- const std::size_t nLen( rgbColor.getLength() );
-
- uno::Sequence< sal_Int8 > aRes(nLen*4);
- sal_Int8* pColors=aRes.getArray();
- for( std::size_t i=0; i<nLen; ++i )
- {
- *pColors++ = vcl::unotools::toByteColor(pIn->Red/pIn->Alpha);
- *pColors++ = vcl::unotools::toByteColor(pIn->Green/pIn->Alpha);
- *pColors++ = vcl::unotools::toByteColor(pIn->Blue/pIn->Alpha);
- *pColors++ = vcl::unotools::toByteColor(pIn->Alpha);
- ++pIn;
- }
- return aRes;
- }
+ virtual uno::Sequence< sal_Int8 > SAL_CALL convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) override
+ {
+ const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
+ const std::size_t nLen( rgbColor.getLength() );
- public:
- OGLColorSpace() :
- maComponentTags(4),
- maBitCounts(4)
+ uno::Sequence< sal_Int8 > aRes(nLen*4);
+ sal_Int8* pColors=aRes.getArray();
+ for( std::size_t i=0; i<nLen; ++i )
{
- sal_Int8* pTags = maComponentTags.getArray();
- sal_Int32* pBitCounts = maBitCounts.getArray();
- pTags[0] = rendering::ColorComponentTag::RGB_RED;
- pTags[1] = rendering::ColorComponentTag::RGB_GREEN;
- pTags[2] = rendering::ColorComponentTag::RGB_BLUE;
- pTags[3] = rendering::ColorComponentTag::ALPHA;
-
- pBitCounts[0] =
- pBitCounts[1] =
- pBitCounts[2] =
- pBitCounts[3] = 8;
+ *pColors++ = vcl::unotools::toByteColor(pIn->Red);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Green);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Blue);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Alpha);
+ ++pIn;
}
- };
+ return aRes;
+ }
- struct OGLColorSpaceHolder : public rtl::StaticWithInit<uno::Reference<rendering::XIntegerBitmapColorSpace>, OGLColorSpaceHolder>
+ virtual uno::Sequence< sal_Int8 > SAL_CALL convertIntegerFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) override
{
- uno::Reference<rendering::XIntegerBitmapColorSpace> operator()()
+ const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
+ const std::size_t nLen( rgbColor.getLength() );
+
+ uno::Sequence< sal_Int8 > aRes(nLen*4);
+ sal_Int8* pColors=aRes.getArray();
+ for( std::size_t i=0; i<nLen; ++i )
{
- return new OGLColorSpace();
+ *pColors++ = vcl::unotools::toByteColor(pIn->Red/pIn->Alpha);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Green/pIn->Alpha);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Blue/pIn->Alpha);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Alpha);
+ ++pIn;
}
- };
+ return aRes;
+ }
- uno::Reference<rendering::XIntegerBitmapColorSpace> const &
- getOGLColorSpace()
+public:
+ OGLColorSpace() :
+ maComponentTags(4),
+ maBitCounts(4)
{
- return OGLColorSpaceHolder::get();
+ sal_Int8* pTags = maComponentTags.getArray();
+ sal_Int32* pBitCounts = maBitCounts.getArray();
+ pTags[0] = rendering::ColorComponentTag::RGB_RED;
+ pTags[1] = rendering::ColorComponentTag::RGB_GREEN;
+ pTags[2] = rendering::ColorComponentTag::RGB_BLUE;
+ pTags[3] = rendering::ColorComponentTag::ALPHA;
+
+ pBitCounts[0] =
+ pBitCounts[1] =
+ pBitCounts[2] =
+ pBitCounts[3] = 8;
}
-}
+};
+
+struct OGLColorSpaceHolder : public rtl::StaticWithInit<uno::Reference<rendering::XIntegerBitmapColorSpace>, OGLColorSpaceHolder>
+{
+ uno::Reference<rendering::XIntegerBitmapColorSpace> operator()()
+ {
+ return new OGLColorSpace();
+ }
+};
-namespace {
+uno::Reference<rendering::XIntegerBitmapColorSpace> const &
+getOGLColorSpace()
+{
+ return OGLColorSpaceHolder::get();
+}
void buildMipmaps(
GLint internalFormat, GLsizei width, GLsizei height, GLenum format,
@@ -838,8 +833,6 @@ void buildMipmaps(
GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
}
-}
-
void OGLTransitionerImpl::impl_createTexture(
bool useMipmap,
uno::Sequence<sal_Int8>& data,
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index c81dfff0d10a..ab1214538af3 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -688,37 +688,34 @@ SlideBitmapSharedPtr SlideImpl::createCurrentSlideBitmap( const UnoViewSharedPtr
return std::make_shared<SlideBitmap>( pBitmap );
}
-namespace
+class MainSequenceSearcher
{
- class MainSequenceSearcher
+public:
+ MainSequenceSearcher()
{
- public:
- MainSequenceSearcher()
- {
- maSearchKey.Name = "node-type";
- maSearchKey.Value <<= presentation::EffectNodeType::MAIN_SEQUENCE;
- }
-
- void operator()( const uno::Reference< animations::XAnimationNode >& xChildNode )
- {
- uno::Sequence< beans::NamedValue > aUserData( xChildNode->getUserData() );
+ maSearchKey.Name = "node-type";
+ maSearchKey.Value <<= presentation::EffectNodeType::MAIN_SEQUENCE;
+ }
- if( findNamedValue( aUserData, maSearchKey ) )
- {
- maMainSequence = xChildNode;
- }
- }
+ void operator()( const uno::Reference< animations::XAnimationNode >& xChildNode )
+ {
+ uno::Sequence< beans::NamedValue > aUserData( xChildNode->getUserData() );
- const uno::Reference< animations::XAnimationNode >& getMainSequence() const
+ if( findNamedValue( aUserData, maSearchKey ) )
{
- return maMainSequence;
+ maMainSequence = xChildNode;
}
+ }
- private:
- beans::NamedValue maSearchKey;
- uno::Reference< animations::XAnimationNode > maMainSequence;
- };
-}
+ const uno::Reference< animations::XAnimationNode >& getMainSequence() const
+ {
+ return maMainSequence;
+ }
+
+private:
+ beans::NamedValue maSearchKey;
+ uno::Reference< animations::XAnimationNode > maMainSequence;
+};
bool SlideImpl::implPrefetchShow()
{