summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svddrgmt.cxx10
-rw-r--r--svx/source/svdraw/svdedtv.cxx8
-rw-r--r--svx/source/svdraw/svdedtv1.cxx8
-rwxr-xr-xsvx/source/svdraw/svdmodel.cxx16
-rw-r--r--svx/source/svdraw/svdoashp.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx6
-rw-r--r--svx/source/svdraw/svdogrp.cxx1
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx6
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx8
-rw-r--r--svx/source/svdraw/svdpntv.cxx2
10 files changed, 41 insertions, 26 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index afbb6d0b4066..7590b7d14ae8 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -247,7 +247,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdrDragEntryPointGlueDrag::create
{
drawinglayer::primitive2d::Primitive2DSequence aRetval;
- if(maPositions.size())
+ if(!maPositions.empty())
{
basegfx::B2DPolygon aPolygon;
sal_uInt32 a(0);
@@ -499,7 +499,7 @@ void SdrDragMethod::createSdrDragEntries_PointDrag()
}
}
- if(aPositions.size())
+ if(!aPositions.empty())
{
addSdrDragEntry(new SdrDragEntryPointGlueDrag(aPositions, true));
}
@@ -543,7 +543,7 @@ void SdrDragMethod::createSdrDragEntries_GlueDrag()
}
}
- if(aPositions.size())
+ if(!aPositions.empty())
{
addSdrDragEntry(new SdrDragEntryPointGlueDrag(aPositions, false));
}
@@ -670,14 +670,14 @@ void SdrDragMethod::CancelSdrDrag()
void SdrDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlayManager)
{
// create SdrDragEntries on demand
- if(!maSdrDragEntries.size())
+ if(maSdrDragEntries.empty())
{
createSdrDragEntries();
}
// if there are entries, derive OverlayObjects from the entries, including
// modification from current interactive state
- if(maSdrDragEntries.size())
+ if(!maSdrDragEntries.empty())
{
drawinglayer::primitive2d::Primitive2DSequence aResult;
drawinglayer::primitive2d::Primitive2DSequence aResultTransparent;
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index d8b31a9a0ccb..784866869d61 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -785,7 +785,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
}
// fire scene updaters
- while(aUpdaters.size())
+ while(!aUpdaters.empty())
{
delete aUpdaters.back();
aUpdaters.pop_back();
@@ -794,7 +794,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
if( !bUndo )
{
// now delete removed scene objects
- while(aRemoved3DObjects.size())
+ while(!aRemoved3DObjects.empty())
{
SdrObject::Free( aRemoved3DObjects.back() );
aRemoved3DObjects.pop_back();
@@ -840,7 +840,7 @@ void SdrEditView::DeleteMarkedObj()
if(pParent)
{
- if(aParents.size())
+ if(!aParents.empty())
{
std::vector< SdrObject* >::iterator aFindResult =
std::find(aParents.begin(), aParents.end(), pParent);
@@ -857,7 +857,7 @@ void SdrEditView::DeleteMarkedObj()
}
}
- if(aParents.size())
+ if(!aParents.empty())
{
// in a 2nd run, remove all objects which may already be scheduled for
// removal. I am not sure if this can happen, but theoretically
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 3502db48e4e9..ee95d8486e60 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -318,7 +318,7 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nWink, bool bCopy)
}
// fire scene updaters
- while(aUpdaters.size())
+ while(!aUpdaters.empty())
{
delete aUpdaters.back();
aUpdaters.pop_back();
@@ -378,7 +378,7 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b
}
// fire scene updaters
- while(aUpdaters.size())
+ while(!aUpdaters.empty())
{
delete aUpdaters.back();
aUpdaters.pop_back();
@@ -1051,7 +1051,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
{
SdrTextObj* pTextObj = ((SdrTextObj*)pObj);
- if(0 != aCharWhichIds.size())
+ if(!aCharWhichIds.empty())
{
Rectangle aOldBoundRect = pTextObj->GetLastBoundRect();
@@ -1079,7 +1079,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
}
// fire scene updaters
- while(aUpdaters.size())
+ while(!aUpdaters.empty())
{
delete aUpdaters.back();
aUpdaters.pop_back();
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 30628a10df86..f012cac1757c 100755
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -69,6 +69,9 @@
#include "svx/svdstr.hrc" // Objektname
#include "svdoutlinercache.hxx"
+#include "svx/xflclit.hxx"
+#include "svx/xflhtit.hxx"
+#include "svx/xlnclit.hxx"
#include <svl/asiancfg.hxx>
#include "editeng/fontitem.hxx"
@@ -210,6 +213,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
pItemPool->SetPoolDefaultItem( SdrTextWordWrapItem( sal_False ) );
SetTextDefaults();
+
pLayerAdmin=new SdrLayerAdmin;
pLayerAdmin->SetModel(this);
ImpSetUIUnit();
@@ -2167,6 +2171,18 @@ const ::com::sun::star::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelImpleme
return *pSeq;
}
+void SdrModel::SetDrawingLayerPoolDefaults()
+{
+ const String aNullStr;
+ const Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE);
+ const Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING);
+ const XHatch aNullHatch(aNullLineCol);
+
+ pItemPool->SetPoolDefaultItem( XFillColorItem(aNullStr,aNullFillCol) );
+ pItemPool->SetPoolDefaultItem( XFillHatchItem(pItemPool,aNullHatch) );
+ pItemPool->SetPoolDefaultItem( XLineColorItem(aNullStr,aNullLineCol) );
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
TYPEINIT1(SdrHint,SfxHint);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 30791ce216d4..f595909e654f 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2438,7 +2438,7 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat )
aRect1 = Rectangle( rStat.GetNow(), Size( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight ) );
// subtracting the horizontal difference of the latest handle from shape position
- if ( aInteractionHandles.size() )
+ if ( !aInteractionHandles.empty() )
{
sal_Int32 nHandlePos = aInteractionHandles[ aInteractionHandles.size() - 1 ].xInteraction->getPosition().X;
aRect1.Move( aRect.Left() - nHandlePos, 0 );
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 81ff5005d0f6..cc2ece168ec7 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -929,7 +929,7 @@ const Rectangle& SdrObject::GetLastBoundRect() const
void SdrObject::RecalcBoundRect()
{
// #i101680# suppress BoundRect calculations on import(s)
- if(pModel && pModel->isLocked() )
+ if(pModel && pModel->isLocked())
return;
// central new method which will calculate the BoundRect using primitive geometry
@@ -2440,7 +2440,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, sal_Bool bForceLin
// #i102241# check for line results
const std::vector< basegfx::B2DPolygon >& rHairlineVector = aExtractor.getExtractedHairlines();
- if(rHairlineVector.size())
+ if(!rHairlineVector.empty())
{
// for SdrObject creation, just copy all to a single Hairline-PolyPolygon
for(sal_uInt32 a(0); a < rHairlineVector.size(); a++)
@@ -2452,7 +2452,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, sal_Bool bForceLin
// #i102241# check for fill rsults
const std::vector< basegfx::B2DPolyPolygon >& rLineFillVector(aExtractor.getExtractedLineFills());
- if(rLineFillVector.size())
+ if(!rLineFillVector.empty())
{
// merge to a single PolyPolygon (OR)
aMergedLineFillPolyPolygon = basegfx::tools::mergeToSinglePolyPolygon(rLineFillVector);
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index ede6b35178f9..152ab501f8e6 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -282,7 +282,6 @@ const Rectangle& SdrObjGroup::GetCurrentBoundRect() const
// <--
}
-
const Rectangle& SdrObjGroup::GetSnapRect() const
{
// --> OD 2007-02-01 #144962#
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 9bc3bbb4958c..0ef0732ac80d 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -491,7 +491,7 @@ namespace
{
// only create a line primitive when we had content; there is no need for
// empty line primitives (contrary to paragraphs, see below).
- if(maTextPortionPrimitives.size())
+ if(!maTextPortionPrimitives.empty())
{
drawinglayer::primitive2d::Primitive2DSequence aLineSequence(impConvertVectorToPrimitive2DSequence(maTextPortionPrimitives));
maTextPortionPrimitives.clear();
@@ -658,13 +658,13 @@ namespace
drawinglayer::primitive2d::Primitive2DSequence impTextBreakupHandler::getPrimitive2DSequence()
{
- if(maTextPortionPrimitives.size())
+ if(!maTextPortionPrimitives.empty())
{
// collect non-closed lines
impFlushTextPortionPrimitivesToLinePrimitives();
}
- if(maLinePrimitives.size())
+ if(!maLinePrimitives.empty())
{
// collect non-closed paragraphs
impFlushLinePrimitivesToParagraphPrimitives();
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 72de016703bd..7b6f71eed59c 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -200,7 +200,7 @@ namespace
mrOutliner.SetDrawPortionHdl(LINK(this, impTextBreakupHandler, decompositionPathTextPrimitive));
mrOutliner.StripPortions();
- if(maPathTextPortions.size())
+ if(!maPathTextPortions.empty())
{
// sort portions by paragraph, x and y
::std::sort(maPathTextPortions.begin(), maPathTextPortions.end());
@@ -627,7 +627,7 @@ namespace
// get text outlines and their object transformation
pTextCandidate->getTextOutlinesAndTransformation(aB2DPolyPolyVector, aPolygonTransform);
- if(aB2DPolyPolyVector.size())
+ if(!aB2DPolyPolyVector.empty())
{
// create stroke primitives
std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aStrokePrimitives;
@@ -712,7 +712,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
impTextBreakupHandler aConverter(rOutliner);
const ::std::vector< impPathTextPortion > rPathTextPortions = aConverter.decompositionPathTextPrimitive();
- if(rPathTextPortions.size())
+ if(!rPathTextPortions.empty())
{
// get FormText and polygon values
const drawinglayer::attribute::SdrFormTextAttribute& rFormTextAttribute = rSdrPathTextPrimitive.getSdrFormTextAttribute();
@@ -753,7 +753,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
}
// handle data pair polygon/ParagraphTextPortions
- if(aParagraphTextPortions.size())
+ if(!aParagraphTextPortions.empty())
{
aPolygonParagraphHandler.HandlePair(rPathPolyPolygon.getB2DPolygon(a), aParagraphTextPortions);
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index aaa83ed5f1fe..fd2327dd8139 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -308,7 +308,7 @@ SdrPaintView::~SdrPaintView()
#endif
// delete existing SdrPaintWindows
- while(maPaintWindows.size())
+ while(!maPaintWindows.empty())
{
delete maPaintWindows.back();
maPaintWindows.pop_back();