summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-04-09 13:56:50 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-04-09 13:56:50 +0100
commit79c6797c2e17cb4f417621e83a85b46af16f29ed (patch)
tree59a92757af01384e8b18d23daa65eea9a93f0040
parentcalm warnings, get it to compile. (diff)
downloadcore-79c6797c2e17cb4f417621e83a85b46af16f29ed.tar.gz
core-79c6797c2e17cb4f417621e83a85b46af16f29ed.zip
remove dead code and vspace waste.
Change-Id: I0aec25cd0de8f0f379c8910ca7ea275211602fcd
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx90
1 files changed, 5 insertions, 85 deletions
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
index 601525951231..781060e95aad 100644
--- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
@@ -75,7 +75,6 @@ void DeviceCopy (
rSourceDevice);
}
-
void ForAllRectangles (const Region& rRegion, ::boost::function<void(const Rectangle&)> aFunction)
{
OSL_ASSERT(aFunction);
@@ -134,9 +133,6 @@ public:
~LayerContainer (void) {}
};
-
-
-
//===== LayeredDevice =========================================================
LayeredDevice::LayeredDevice (const SharedSdWindow& rpTargetWindow)
@@ -148,16 +144,10 @@ LayeredDevice::LayeredDevice (const SharedSdWindow& rpTargetWindow)
mpBackBuffer->SetOutputSizePixel(mpTargetWindow->GetSizePixel());
}
-
-
-
LayeredDevice::~LayeredDevice (void)
{
}
-
-
-
void LayeredDevice::Invalidate (
const Rectangle& rInvalidationArea,
const sal_Int32 nLayer)
@@ -165,33 +155,25 @@ void LayeredDevice::Invalidate (
if (nLayer<0 || size_t(nLayer)>=mpLayers->size())
{
OSL_ASSERT(nLayer>=0 && size_t(nLayer)<mpLayers->size());
- return;
}
-
- (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea);
+ else
+ {
+ (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea);
+ }
}
-
-
-
void LayeredDevice::InvalidateAllLayers (const Rectangle& rInvalidationArea)
{
for (sal_uInt32 nLayer=0; nLayer<mpLayers->size(); ++nLayer)
(*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea);
}
-
-
-
void LayeredDevice::InvalidateAllLayers (const Region& rInvalidationRegion)
{
for (sal_uInt32 nLayer=0; nLayer<mpLayers->size(); ++nLayer)
(*mpLayers)[nLayer]->InvalidateRegion(rInvalidationRegion);
}
-
-
-
void LayeredDevice::RegisterPainter (
const SharedILayerPainter& rpPainter,
const sal_Int32 nLayer)
@@ -226,9 +208,6 @@ void LayeredDevice::RegisterPainter (
SharedILayerInvalidator(new LayerInvalidator(shared_from_this(),mpTargetWindow,nLayer)));
}
-
-
-
void LayeredDevice::RemovePainter (
const SharedILayerPainter& rpPainter,
const sal_Int32 nLayer)
@@ -253,9 +232,6 @@ void LayeredDevice::RemovePainter (
mpLayers->erase(mpLayers->end()-1);
}
-
-
-
void LayeredDevice::Repaint (const Region& rRepaintRegion)
{
// Validate the contents of all layers (that have their own devices.)
@@ -267,9 +243,6 @@ void LayeredDevice::Repaint (const Region& rRepaintRegion)
ForAllRectangles(rRepaintRegion, ::boost::bind(&LayeredDevice::RepaintRectangle, this, _1));
}
-
-
-
void LayeredDevice::RepaintRectangle (const Rectangle& rRepaintRectangle)
{
if (mpLayers->empty())
@@ -294,9 +267,6 @@ void LayeredDevice::RepaintRectangle (const Rectangle& rRepaintRectangle)
}
}
-
-
-
void LayeredDevice::Resize (void)
{
const Size aSize (mpTargetWindow->GetSizePixel());
@@ -304,18 +274,12 @@ void LayeredDevice::Resize (void)
::std::for_each(mpLayers->begin(), mpLayers->end(), ::boost::bind(&Layer::Resize, _1, aSize));
}
-
-
-
void LayeredDevice::Dispose (void)
{
::std::for_each(mpLayers->begin(), mpLayers->end(), ::boost::bind(&Layer::Dispose, _1));
mpLayers->clear();
}
-
-
-
bool LayeredDevice::HandleMapModeChange (void)
{
const MapMode& rMapMode (mpTargetWindow->GetMapMode());
@@ -379,9 +343,6 @@ bool LayeredDevice::HandleMapModeChange (void)
return true;
}
-
-
-
//===== Layer =================================================================
Layer::Layer (void)
@@ -391,48 +352,29 @@ Layer::Layer (void)
{
}
-
-
-
Layer::~Layer (void)
{
}
-
-
-
void Layer::Initialize (const SharedSdWindow& rpTargetWindow)
{
-#if 0
- (void)rpTargetWindow;
-#else
- if ( ! mpLayerDevice)
+ if (!mpLayerDevice)
{
mpLayerDevice.reset(new VirtualDevice(*rpTargetWindow));
mpLayerDevice->SetOutputSizePixel(rpTargetWindow->GetSizePixel());
}
-#endif
}
-
-
-
void Layer::InvalidateRectangle (const Rectangle& rInvalidationBox)
{
maInvalidationRegion.Union(rInvalidationBox);
}
-
-
-
void Layer::InvalidateRegion (const Region& rInvalidationRegion)
{
maInvalidationRegion.Union(rInvalidationRegion);
}
-
-
-
void Layer::Validate (const MapMode& rMapMode)
{
if (mpLayerDevice && ! maInvalidationRegion.IsEmpty())
@@ -447,9 +389,6 @@ void Layer::Validate (const MapMode& rMapMode)
}
}
-
-
-
void Layer::ValidateRectangle (const Rectangle& rBox)
{
if ( ! mpLayerDevice)
@@ -469,9 +408,6 @@ void Layer::ValidateRectangle (const Rectangle& rBox)
mpLayerDevice->SetClipRegion(aSavedClipRegion);
}
-
-
-
void Layer::Repaint (
OutputDevice& rTargetDevice,
const Rectangle& rRepaintRectangle)
@@ -492,9 +428,6 @@ void Layer::Repaint (
}
}
-
-
-
void Layer::Resize (const Size& rSize)
{
if (mpLayerDevice)
@@ -504,9 +437,6 @@ void Layer::Resize (const Size& rSize)
}
}
-
-
-
void Layer::AddPainter (const SharedILayerPainter& rpPainter)
{
OSL_ASSERT(::std::find(maPainters.begin(), maPainters.end(), rpPainter) == maPainters.end());
@@ -514,9 +444,6 @@ void Layer::AddPainter (const SharedILayerPainter& rpPainter)
maPainters.push_back(rpPainter);
}
-
-
-
void Layer::RemovePainter (const SharedILayerPainter& rpPainter)
{
const ::std::vector<SharedILayerPainter>::iterator iPainter (
@@ -531,23 +458,16 @@ void Layer::RemovePainter (const SharedILayerPainter& rpPainter)
}
}
-
-
-
bool Layer::HasPainter (void) const
{
return !maPainters.empty();
}
-
-
-
void Layer::Dispose (void)
{
maPainters.clear();
}
-
} } } // end of namespace ::sd::slidesorter::view
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */