[Libreoffice-commits] core.git: 3 commits - bin/findunusedcode include/vcl unusedcode.easy vcl/source
Caolán McNamara
caolanm at redhat.com
Sat Apr 26 04:35:13 PDT 2014
bin/findunusedcode | 1
include/vcl/outdev.hxx | 3 -
unusedcode.easy | 39 ------------------
vcl/source/outdev/outdev.cxx | 82 +++++++++++++++++++-------------------
vcl/source/outdev/outdevstate.cxx | 40 +++---------------
5 files changed, 52 insertions(+), 113 deletions(-)
New commits:
commit cb040cc7487ec91f43919b8c2d208df0627d4583
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Apr 26 12:34:16 2014 +0100
unnecessary to check for null before delete
Change-Id: I82b5c5ced8a4f0e719d1aeffed86845b9db1b68b
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index da4b004..e060267 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -34,49 +34,25 @@
OutDevState::~OutDevState()
{
if ( mnFlags & PUSH_LINECOLOR )
- {
- if ( mpLineColor )
- delete mpLineColor;
- }
+ delete mpLineColor;
if ( mnFlags & PUSH_FILLCOLOR )
- {
- if ( mpFillColor )
- delete mpFillColor;
- }
+ delete mpFillColor;
if ( mnFlags & PUSH_FONT )
delete mpFont;
if ( mnFlags & PUSH_TEXTCOLOR )
delete mpTextColor;
if ( mnFlags & PUSH_TEXTFILLCOLOR )
- {
- if ( mpTextFillColor )
- delete mpTextFillColor;
- }
+ delete mpTextFillColor;
if ( mnFlags & PUSH_TEXTLINECOLOR )
- {
- if ( mpTextLineColor )
- delete mpTextLineColor;
- }
+ delete mpTextLineColor;
if ( mnFlags & PUSH_OVERLINECOLOR )
- {
- if ( mpOverlineColor )
- delete mpOverlineColor;
- }
+ delete mpOverlineColor;
if ( mnFlags & PUSH_MAPMODE )
- {
- if ( mpMapMode )
- delete mpMapMode;
- }
+ delete mpMapMode;
if ( mnFlags & PUSH_CLIPREGION )
- {
- if ( mpClipRegion )
- delete mpClipRegion;
- }
+ delete mpClipRegion;
if ( mnFlags & PUSH_REFPOINT )
- {
- if ( mpRefPoint )
- delete mpRefPoint;
- }
+ delete mpRefPoint;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 94e175e9614f05c906f5820439557d608efab307
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Apr 26 12:29:39 2014 +0100
the OutDevState dtors are never called
regression since cf3c6cb40f99fa1761a6af3d7447a899b9447868
Change-Id: Iaeb44d948d3e0a0b26cfd3e16aa81b979cf56457
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 40f3345..1d98f41 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -42,6 +42,7 @@
#include <unotools/fontdefs.hxx>
#include <boost/scoped_ptr.hpp>
+#include <boost/ptr_container/ptr_deque.hpp>
#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/uno/Reference.h>
@@ -264,7 +265,7 @@ private:
mutable PhysicalFontCollection* mpFontCollection;
mutable ImplGetDevFontList* mpGetDevFontList;
mutable ImplGetDevSizeList* mpGetDevSizeList;
- std::stack < OutDevState* >* mpOutDevStateStack;
+ boost::ptr_deque<OutDevState>* mpOutDevStateStack;
ImplOutDevData* mpOutDevData;
VCLXGraphicsList_impl* mpUnoGraphicsList;
vcl::PDFWriterImpl* mpPDFWriter;
diff --git a/unusedcode.easy b/unusedcode.easy
index 6eb74e6..e3a896f 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -26,7 +26,6 @@ MenuBar::GetMenuBarButtonRectPixel(unsigned short)
MenuBar::RemoveMenuBarButton(unsigned short)
MenuBar::SetMenuBarButtonHighlightHdl(unsigned short, Link const&)
OpenGLContext::getOpenGLWindow()
-OutDevState::~OutDevState()
OutputDevice::GetCanvas() const
OutputDevice::HasAlpha()
OutputDevice::LogicToLogic(basegfx::B2DPolyPolygon const&, MapMode const&, MapMode const&)
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 3a9c3c1..4e65d98 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -109,7 +109,7 @@ OutputDevice::OutputDevice() :
mpFontCollection = NULL;
mpGetDevFontList = NULL;
mpGetDevSizeList = NULL;
- mpOutDevStateStack = new std::stack< OutDevState* >();
+ mpOutDevStateStack = new boost::ptr_deque<OutDevState>();
mpOutDevData = NULL;
mpPDFWriter = NULL;
mpAlphaVDev = NULL;
@@ -217,7 +217,7 @@ OutputDevice::~OutputDevice()
SAL_WARN( "vcl.gdi", "OutputDevice::~OutputDevice(): OutputDevice::Push() calls != OutputDevice::Pop() calls" );
while ( !mpOutDevStateStack->empty() )
{
- mpOutDevStateStack->pop();
+ mpOutDevStateStack->pop_back();
}
}
@@ -334,7 +334,7 @@ void OutputDevice::Push( sal_uInt16 nFlags )
pState->mpRefPoint = NULL;
}
- mpOutDevStateStack->push( pState );
+ mpOutDevStateStack->push_back( pState );
if( mpAlphaVDev )
mpAlphaVDev->Push();
@@ -354,90 +354,90 @@ void OutputDevice::Pop()
SAL_WARN( "vcl.gdi", "OutputDevice::Pop() without OutputDevice::Push()" );
return;
}
- OutDevState* pState = mpOutDevStateStack->top();
+ const OutDevState& rState = mpOutDevStateStack->back();
if( mpAlphaVDev )
mpAlphaVDev->Pop();
- if ( pState->mnFlags & PUSH_LINECOLOR )
+ if ( rState.mnFlags & PUSH_LINECOLOR )
{
- if ( pState->mpLineColor )
- SetLineColor( *pState->mpLineColor );
+ if ( rState.mpLineColor )
+ SetLineColor( *rState.mpLineColor );
else
SetLineColor();
}
- if ( pState->mnFlags & PUSH_FILLCOLOR )
+ if ( rState.mnFlags & PUSH_FILLCOLOR )
{
- if ( pState->mpFillColor )
- SetFillColor( *pState->mpFillColor );
+ if ( rState.mpFillColor )
+ SetFillColor( *rState.mpFillColor );
else
SetFillColor();
}
- if ( pState->mnFlags & PUSH_FONT )
- SetFont( *pState->mpFont );
+ if ( rState.mnFlags & PUSH_FONT )
+ SetFont( *rState.mpFont );
- if ( pState->mnFlags & PUSH_TEXTCOLOR )
- SetTextColor( *pState->mpTextColor );
+ if ( rState.mnFlags & PUSH_TEXTCOLOR )
+ SetTextColor( *rState.mpTextColor );
- if ( pState->mnFlags & PUSH_TEXTFILLCOLOR )
+ if ( rState.mnFlags & PUSH_TEXTFILLCOLOR )
{
- if ( pState->mpTextFillColor )
- SetTextFillColor( *pState->mpTextFillColor );
+ if ( rState.mpTextFillColor )
+ SetTextFillColor( *rState.mpTextFillColor );
else
SetTextFillColor();
}
- if ( pState->mnFlags & PUSH_TEXTLINECOLOR )
+ if ( rState.mnFlags & PUSH_TEXTLINECOLOR )
{
- if ( pState->mpTextLineColor )
- SetTextLineColor( *pState->mpTextLineColor );
+ if ( rState.mpTextLineColor )
+ SetTextLineColor( *rState.mpTextLineColor );
else
SetTextLineColor();
}
- if ( pState->mnFlags & PUSH_OVERLINECOLOR )
+ if ( rState.mnFlags & PUSH_OVERLINECOLOR )
{
- if ( pState->mpOverlineColor )
- SetOverlineColor( *pState->mpOverlineColor );
+ if ( rState.mpOverlineColor )
+ SetOverlineColor( *rState.mpOverlineColor );
else
SetOverlineColor();
}
- if ( pState->mnFlags & PUSH_TEXTALIGN )
- SetTextAlign( pState->meTextAlign );
+ if ( rState.mnFlags & PUSH_TEXTALIGN )
+ SetTextAlign( rState.meTextAlign );
- if( pState->mnFlags & PUSH_TEXTLAYOUTMODE )
- SetLayoutMode( pState->mnTextLayoutMode );
+ if( rState.mnFlags & PUSH_TEXTLAYOUTMODE )
+ SetLayoutMode( rState.mnTextLayoutMode );
- if( pState->mnFlags & PUSH_TEXTLANGUAGE )
- SetDigitLanguage( pState->meTextLanguage );
+ if( rState.mnFlags & PUSH_TEXTLANGUAGE )
+ SetDigitLanguage( rState.meTextLanguage );
- if ( pState->mnFlags & PUSH_RASTEROP )
- SetRasterOp( pState->meRasterOp );
+ if ( rState.mnFlags & PUSH_RASTEROP )
+ SetRasterOp( rState.meRasterOp );
- if ( pState->mnFlags & PUSH_MAPMODE )
+ if ( rState.mnFlags & PUSH_MAPMODE )
{
- if ( pState->mpMapMode )
- SetMapMode( *pState->mpMapMode );
+ if ( rState.mpMapMode )
+ SetMapMode( *rState.mpMapMode );
else
SetMapMode();
- mbMap = pState->mbMapActive;
+ mbMap = rState.mbMapActive;
}
- if ( pState->mnFlags & PUSH_CLIPREGION )
- SetDeviceClipRegion( pState->mpClipRegion );
+ if ( rState.mnFlags & PUSH_CLIPREGION )
+ SetDeviceClipRegion( rState.mpClipRegion );
- if ( pState->mnFlags & PUSH_REFPOINT )
+ if ( rState.mnFlags & PUSH_REFPOINT )
{
- if ( pState->mpRefPoint )
- SetRefPoint( *pState->mpRefPoint );
+ if ( rState.mpRefPoint )
+ SetRefPoint( *rState.mpRefPoint );
else
SetRefPoint();
}
- mpOutDevStateStack->pop();
+ mpOutDevStateStack->pop_back();
mpMetaFile = pOldMetaFile;
}
commit 27041c83cb4c6e7843a4fc112cbab65dfbea929a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Apr 26 12:29:08 2014 +0100
callcatcher: hide glTF methods from easy list
Change-Id: Id91272de715bbab7b3a18a1905ca593cf959422c
diff --git a/bin/findunusedcode b/bin/findunusedcode
index 59dbade..4e012ae 100755
--- a/bin/findunusedcode
+++ b/bin/findunusedcode
@@ -55,6 +55,7 @@ grep ::.*\( unusedcode.all \
| grep -v ^cppu:: \
| grep -v ^CppUnit:: \
| grep -v ^Dde \
+ | grep -v ^glTF:: \
| grep -v ^graphite2:: \
| grep -v ^jvmaccess:: \
| grep -v ^libcdr:: \
diff --git a/unusedcode.easy b/unusedcode.easy
index f75e3b1..6eb74e6 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -220,44 +220,6 @@ connectivity::file::OStatement_Base::reset()
connectivity::firebird::release(int&, cppu::OBroadcastHelperVar<cppu::OMultiTypeInterfaceContainerHelper, com::sun::star::uno::Type>&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>&, com::sun::star::lang::XComponent*)
connectivity::sdbcx::OGroup::OGroup(bool)
connectivity::sdbcx::OGroup::OGroup(rtl::OUString const&, bool)
-glTF::Camera::getLookAt()
-glTF::Camera::getPosition()
-glTF::Camera::getUp()
-glTF::Camera::setLookAt(glTF::Vector3D&)
-glTF::Camera::setPosition(glTF::Vector3D&)
-glTF::Camera::setUp(glTF::Vector3D&)
-glTF::Light::getAttenuationConstant()
-glTF::Light::getAttenuationLinear()
-glTF::Light::getAttenuationQuadratic()
-glTF::Light::getDirection()
-glTF::Light::getLightSourceType()
-glTF::Light::getName()
-glTF::Light::getPosition()
-glTF::Light::getPositions()
-glTF::Light::setAttenuationConstant(float)
-glTF::Light::setAttenuationLinear(float)
-glTF::Light::setAttenuationQuadratic(float)
-glTF::Light::setColor(glTF::Vector3D)
-glTF::Light::setDirection(glTF::Vector3D)
-glTF::Light::setName(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-glTF::MaterialProperty::getDataLength()
-glTF::Mesh::getMeshName()
-glTF::Node::getNodeName() const
-glTF::Node::getNodeType() const
-glTF::Node::getParentNode()
-glTF::Primitives::getAttributeSize() const
-glTF::Scene::findLightTransformation()
-glTF::Scene::getCameraMatrix() const
-glTF::TechAttribute::getAttributeIndex()
-glTF::TechUniform::getUniformIndex()
-glTF::TechUniform::getUniformName()
-glTF::Technique::getFragmentShader()
-glTF::Technique::getTechAttributeSize() const
-glTF::Technique::getTechUniform(unsigned int)
-glTF::Technique::getTechUniformSize() const
-glTF::Technique::getVertexShader()
-glTF::Technique::setProgramId(unsigned int)
-glTF::gltf_get_json_string(glTF::glTFHandle*)
oglcanvas::CanvasHelper::flush() const
oglcanvas::TextLayout::draw(com::sun::star::rendering::ViewState const&, com::sun::star::rendering::RenderState const&, com::sun::star::uno::Reference<com::sun::star::rendering::XGraphicDevice> const&) const
oox::drawingml::CustomShapeProvider::createParameterPairSequence(unsigned long, oox::drawingml::CustomShapeProvider::ParameterPairData const*)
More information about the Libreoffice-commits
mailing list