summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-02-09 09:21:53 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-02-09 08:11:34 +0000
commit538f276ae0414ea34ede6090b5f56e8fecd6fc65 (patch)
treeefbfb952f3236a6f56540ddae6a896c8c73774a0 /forms
parentf12e483589888f87843026ceff5ae3c1e615ca02 (diff)
Formatting changes across all modules
+ Removed comment cruft + Tab formatting in number of files + Some commented out code removed + Tab characters replaced with spaces + Newline cleanup in quite a few files + Tweak header guard #endifs Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc Reviewed-on: https://gerrit.libreoffice.org/22221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/imgprod.cxx28
-rw-r--r--forms/source/component/imgprod.hxx13
2 files changed, 11 insertions, 30 deletions
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 0c66a21d1c96..e279cde4cef8 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -32,8 +32,6 @@
#include "svtools/imageresourceaccess.hxx"
#include <comphelper/processfactory.hxx>
-// - ImgProdLockBytes -
-
class ImgProdLockBytes : public SvLockBytes
{
@@ -54,14 +52,12 @@ public:
};
-
ImgProdLockBytes::ImgProdLockBytes( SvStream* pStm, bool bOwner ) :
SvLockBytes( pStm, bOwner )
{
}
-
ImgProdLockBytes::ImgProdLockBytes( css::uno::Reference< css::io::XInputStream > & rStmRef ) :
xStmRef( rStmRef )
{
@@ -88,11 +84,11 @@ ImgProdLockBytes::ImgProdLockBytes( css::uno::Reference< css::io::XInputStream >
}
-
ImgProdLockBytes::~ImgProdLockBytes()
{
}
+
ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
void* pBuffer, sal_Size nCount, sal_Size * pRead) const
{
@@ -123,6 +119,7 @@ ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
}
}
+
ErrCode ImgProdLockBytes::WriteAt(sal_uInt64 const nPos,
const void* pBuffer, sal_Size nCount, sal_Size * pWritten)
{
@@ -136,14 +133,12 @@ ErrCode ImgProdLockBytes::WriteAt(sal_uInt64 const nPos,
}
-
ErrCode ImgProdLockBytes::Flush() const
{
return ERRCODE_NONE;
}
-
ErrCode ImgProdLockBytes::SetSize(sal_uInt64 const nSize)
{
if( GetStream() )
@@ -156,7 +151,6 @@ ErrCode ImgProdLockBytes::SetSize(sal_uInt64 const nSize)
}
-
ErrCode ImgProdLockBytes::Stat( SvLockBytesStat* pStat, SvLockBytesStatFlag eFlag ) const
{
if( GetStream() )
@@ -169,7 +163,7 @@ ErrCode ImgProdLockBytes::Stat( SvLockBytesStat* pStat, SvLockBytesStatFlag eFla
}
}
-// - ImageProducer -
+
ImageProducer::ImageProducer()
: mpStm(nullptr)
, mnTransIndex(0)
@@ -187,7 +181,8 @@ ImageProducer::~ImageProducer()
mpStm = nullptr;
}
-// css::uno::XInterface
+
+// XInterface
css::uno::Any ImageProducer::queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception)
{
css::uno::Any aRet = ::cppu::queryInterface( rType,
@@ -197,7 +192,6 @@ css::uno::Any ImageProducer::queryInterface( const css::uno::Type & rType ) thro
}
-
void ImageProducer::addConsumer( const css::uno::Reference< css::awt::XImageConsumer >& rxConsumer )
throw(css::uno::RuntimeException,
std::exception)
@@ -208,7 +202,6 @@ void ImageProducer::addConsumer( const css::uno::Reference< css::awt::XImageCons
}
-
void ImageProducer::removeConsumer( const css::uno::Reference< css::awt::XImageConsumer >& rxConsumer ) throw(css::uno::RuntimeException, std::exception)
{
ConsumerList_t::reverse_iterator riter = std::find(maConsList.rbegin(),maConsList.rend(),rxConsumer);
@@ -218,7 +211,6 @@ void ImageProducer::removeConsumer( const css::uno::Reference< css::awt::XImageC
}
-
void ImageProducer::SetImage( const OUString& rPath )
{
maURL = rPath;
@@ -240,7 +232,6 @@ void ImageProducer::SetImage( const OUString& rPath )
}
-
void ImageProducer::SetImage( SvStream& rStm )
{
maURL.clear();
@@ -252,7 +243,6 @@ void ImageProducer::SetImage( SvStream& rStm )
}
-
void ImageProducer::setImage( css::uno::Reference< css::io::XInputStream > & rInputStmRef )
{
maURL.clear();
@@ -267,7 +257,6 @@ void ImageProducer::setImage( css::uno::Reference< css::io::XInputStream > & rIn
}
-
void ImageProducer::NewDataAvailable()
{
if( ( GRAPHIC_NONE == mpGraphic->GetType() ) || mpGraphic->GetContext() )
@@ -275,7 +264,6 @@ void ImageProducer::NewDataAvailable()
}
-
void ImageProducer::startProduction() throw(css::uno::RuntimeException, std::exception)
{
if( !maConsList.empty() || maDoneHdl.IsSet() )
@@ -320,7 +308,6 @@ void ImageProducer::startProduction() throw(css::uno::RuntimeException, std::exc
}
-
bool ImageProducer::ImplImportGraphic( Graphic& rGraphic )
{
if (!mpStm)
@@ -340,7 +327,6 @@ bool ImageProducer::ImplImportGraphic( Graphic& rGraphic )
}
-
void ImageProducer::ImplUpdateData( const Graphic& rGraphic )
{
ImplInitConsumer( rGraphic );
@@ -360,7 +346,6 @@ void ImageProducer::ImplUpdateData( const Graphic& rGraphic )
}
-
void ImageProducer::ImplInitConsumer( const Graphic& rGraphic )
{
Bitmap aBmp( rGraphic.GetBitmapEx().GetBitmap() );
@@ -431,7 +416,6 @@ void ImageProducer::ImplInitConsumer( const Graphic& rGraphic )
}
-
void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
@@ -538,6 +522,7 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
}
}
+
void ImageProducer::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw (css::uno::Exception, css::uno::RuntimeException, std::exception)
{
if ( aArguments.getLength() == 1 )
@@ -551,6 +536,7 @@ void ImageProducer::initialize( const css::uno::Sequence< css::uno::Any >& aArgu
}
}
+
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
com_sun_star_form_ImageProducer_get_implementation(css::uno::XComponentContext*,
css::uno::Sequence<css::uno::Any> const &)
diff --git a/forms/source/component/imgprod.hxx b/forms/source/component/imgprod.hxx
index 5bda64f12cfa..49e1107893d2 100644
--- a/forms/source/component/imgprod.hxx
+++ b/forms/source/component/imgprod.hxx
@@ -29,11 +29,6 @@
#include <vector>
-// - ImageProducer -
-
-
-
-
class SvStream;
class Graphic;
@@ -58,7 +53,7 @@ private:
bool mbConsInit;
Link<Graphic*,void> maDoneHdl;
- bool ImplImportGraphic( Graphic& rGraphic );
+ bool ImplImportGraphic( Graphic& rGraphic );
void ImplUpdateData( const Graphic& rGraphic );
void ImplInitConsumer( const Graphic& rGraphic );
void ImplUpdateConsumer( const Graphic& rGraphic );
@@ -76,9 +71,9 @@ public:
void SetDoneHdl( const Link<Graphic*,void>& i_rHdl ) { maDoneHdl = i_rHdl; }
// css::uno::XInterface
- css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
- void SAL_CALL acquire() throw() override { OWeakObject::acquire(); }
- void SAL_CALL release() throw() override { OWeakObject::release(); }
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
+ void SAL_CALL acquire() throw() override { OWeakObject::acquire(); }
+ void SAL_CALL release() throw() override { OWeakObject::release(); }
// MT: ???
void setImage( css::uno::Reference< css::io::XInputStream > & rStmRef );