summaryrefslogtreecommitdiff
path: root/oox/source/ppt
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ppt')
-rw-r--r--oox/source/ppt/pptgraphicshapecontext.cxx8
-rw-r--r--oox/source/ppt/pptshape.cxx62
-rw-r--r--oox/source/ppt/pptshapecontext.cxx4
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx6
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx2
5 files changed, 41 insertions, 41 deletions
diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx
index f16eb4a454d7..296263762897 100644
--- a/oox/source/ppt/pptgraphicshapecontext.cxx
+++ b/oox/source/ppt/pptgraphicshapecontext.cxx
@@ -75,10 +75,10 @@ ContextHandlerRef PPTGraphicShapeContext::onCreateContext( sal_Int32 aElementTok
{
// TODO: use id to shape map
SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersist.get() && rAttribs.hasAttribute( XML_idx ) )
+ if ( pMasterPersist && rAttribs.hasAttribute( XML_idx ) )
pPlaceholder = PPTShape::findPlaceholderByIndex( nIdx, pMasterPersist->getShapes()->getChildren() );
}
- if ( !pPlaceholder.get() && ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) ) )
+ if ( !pPlaceholder && ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) ) )
{
// inheriting properties from placeholder objects by cloning shape
@@ -123,13 +123,13 @@ ContextHandlerRef PPTGraphicShapeContext::onCreateContext( sal_Int32 aElementTok
else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects
{
SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersist.get() )
+ if ( pMasterPersist )
pPlaceholder = PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
}
}
}
- if ( pPlaceholder.get() )
+ if ( pPlaceholder )
{
bool bUseText = true;
switch( pPlaceholder->getSubType() )
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 99bba509fa47..edf527b67049 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -93,15 +93,15 @@ oox::drawingml::TextListStylePtr PPTShape::getSubTypeTextListStyle( const SlideP
{
case XML_ctrTitle :
case XML_title :
- pTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
+ pTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
break;
case XML_subTitle :
case XML_obj :
case XML_body :
if ( rSlidePersist.isNotesPage() )
- pTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getNotesTextStyle() : rSlidePersist.getNotesTextStyle();
+ pTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getNotesTextStyle() : rSlidePersist.getNotesTextStyle();
else
- pTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ pTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
break;
}
@@ -141,7 +141,7 @@ void PPTShape::addShape(
case XML_title :
{
sServiceName = "com.sun.star.presentation.TitleTextShape";
- aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
}
break;
case XML_subTitle :
@@ -150,14 +150,14 @@ void PPTShape::addShape(
sServiceName = OUString();
else {
sServiceName = "com.sun.star.presentation.SubtitleShape";
- aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
}
}
break;
case XML_obj :
{
sServiceName = sOutlinerShapeService;
- aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
}
break;
case XML_body :
@@ -165,12 +165,12 @@ void PPTShape::addShape(
if (rSlidePersist.isNotesPage())
{
sServiceName = "com.sun.star.presentation.NotesShape";
- aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getNotesTextStyle() : rSlidePersist.getNotesTextStyle();
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getNotesTextStyle() : rSlidePersist.getNotesTextStyle();
}
else
{
sServiceName = sOutlinerShapeService;
- aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
}
}
break;
@@ -246,10 +246,10 @@ void PPTShape::addShape(
if (mnSubType && getSubTypeIndex().has() && meShapeLocation == Layout)
{
oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex().get(), rSlidePersist.getShapes()->getChildren(), true );
- if (!pPlaceholder.get())
+ if (!pPlaceholder)
pPlaceholder = PPTShape::findPlaceholder( mnSubType, 0, getSubTypeIndex(), rSlidePersist.getShapes()->getChildren(), true );
- if (pPlaceholder.get()) {
+ if (pPlaceholder) {
if (maSize.Width == 0 || maSize.Height == 0) {
awt::Size aSize = maSize;
if (maSize.Width == 0)
@@ -270,24 +270,24 @@ void PPTShape::addShape(
}
// use placeholder index if possible
- if (mnSubType && getSubTypeIndex().has() && rSlidePersist.getMasterPersist().get())
+ if (mnSubType && getSubTypeIndex().has() && rSlidePersist.getMasterPersist())
{
oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex(getSubTypeIndex().get(), rSlidePersist.getMasterPersist()->getShapes()->getChildren());
// TODO: Check if this is required for non-notes slides as well...
- if (rSlidePersist.isNotesPage() && pPlaceholder.get() && pPlaceholder->getSubType() != getSubType())
+ if (rSlidePersist.isNotesPage() && pPlaceholder && pPlaceholder->getSubType() != getSubType())
pPlaceholder.reset();
- if (pPlaceholder.get()) {
+ if (pPlaceholder) {
SAL_INFO("oox.ppt","found placeholder with index: " << getSubTypeIndex().get() << " and type: " << lclDebugSubType( mnSubType ));
}
- if (pPlaceholder.get()) {
+ if (pPlaceholder) {
PPTShape* pPPTPlaceholder = dynamic_cast< PPTShape* >( pPlaceholder.get() );
TextListStylePtr pNewTextListStyle = std::make_shared<TextListStyle>();
if (pPlaceholder->getTextBody()) {
pNewTextListStyle->apply( pPlaceholder->getTextBody()->getTextListStyle() );
- if (pPlaceholder->getMasterTextListStyle().get())
+ if (pPlaceholder->getMasterTextListStyle())
pNewTextListStyle->apply( *pPlaceholder->getMasterTextListStyle() );
// SAL_INFO("oox.ppt","placeholder body style");
@@ -299,34 +299,34 @@ void PPTShape::addShape(
// SAL_INFO("oox.ppt","combined master text list style");
// aMasterTextListStyle->dump();
}
- if (pPPTPlaceholder && pPPTPlaceholder->mpPlaceholder.get()) {
+ if (pPPTPlaceholder && pPPTPlaceholder->mpPlaceholder) {
SAL_INFO("oox.ppt","placeholder has parent placeholder: " << pPPTPlaceholder->mpPlaceholder->getId() << " type: " << lclDebugSubType( pPPTPlaceholder->mpPlaceholder->getSubType() ) << " index: " << pPPTPlaceholder->mpPlaceholder->getSubTypeIndex().get() );
SAL_INFO("oox.ppt","has textbody " << (pPPTPlaceholder->mpPlaceholder->getTextBody() != nullptr) );
TextListStylePtr pPlaceholderStyle = getSubTypeTextListStyle( rSlidePersist, pPPTPlaceholder->mpPlaceholder->getSubType() );
if (pPPTPlaceholder->mpPlaceholder->getTextBody())
pNewTextListStyle->apply( pPPTPlaceholder->mpPlaceholder->getTextBody()->getTextListStyle() );
- if (pPlaceholderStyle.get()) {
+ if (pPlaceholderStyle) {
pNewTextListStyle->apply( *pPlaceholderStyle );
//pPlaceholderStyle->dump();
}
}
- } else if (!mpPlaceholder.get()) {
+ } else if (!mpPlaceholder) {
aMasterTextListStyle.reset();
}
- SAL_INFO("oox.ppt","placeholder id: " << (pPlaceholder.get() ? pPlaceholder->getId() : "not found"));
+ SAL_INFO("oox.ppt","placeholder id: " << (pPlaceholder ? pPlaceholder->getId() : "not found"));
}
if (!sServiceName.isEmpty())
{
- if (!aMasterTextListStyle.get())
+ if (!aMasterTextListStyle)
{
- bool isOther = !getTextBody().get() && sServiceName != "com.sun.star.drawing.GroupShape";
+ bool isOther = !getTextBody() && sServiceName != "com.sun.star.drawing.GroupShape";
TextListStylePtr aSlideStyle = isOther ? rSlidePersist.getOtherTextStyle() : rSlidePersist.getDefaultTextStyle();
// Combine from MasterSlide details as well.
- if (rSlidePersist.getMasterPersist().get())
+ if (rSlidePersist.getMasterPersist())
{
aMasterTextListStyle = isOther ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getMasterPersist()->getDefaultTextStyle();
- if (aSlideStyle.get())
+ if (aSlideStyle)
aMasterTextListStyle->apply( *aSlideStyle );
}
else
@@ -335,12 +335,12 @@ void PPTShape::addShape(
}
}
- if( aMasterTextListStyle.get() && getTextBody().get() ) {
+ if( aMasterTextListStyle && getTextBody() ) {
TextListStylePtr aCombinedTextListStyle = std::make_shared<TextListStyle>();
aCombinedTextListStyle->apply( *aMasterTextListStyle );
- if( mpPlaceholder.get() && mpPlaceholder->getTextBody().get() )
+ if( mpPlaceholder && mpPlaceholder->getTextBody() )
aCombinedTextListStyle->apply( mpPlaceholder->getTextBody()->getTextListStyle() );
aCombinedTextListStyle->apply( getTextBody()->getTextListStyle() );
@@ -436,7 +436,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal
void add(const oox::drawingml::ShapePtr& aShape, sal_Int32 nFirstSubType, sal_Int32 nSecondSubType, const OptValue< sal_Int32 >& oSubTypeIndex)
{
- if (!aShape.get())
+ if (!aShape)
return;
// get flags
@@ -460,7 +460,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal
// add
if (aPrioIndex != -1)
{
- if (!aChoice.at(aPrioIndex).get())
+ if (!aChoice.at(aPrioIndex))
{
aChoice.at(aPrioIndex) = aShape;
}
@@ -472,7 +472,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal
{
for (const oox::drawingml::ShapePtr& aShape : aChoice)
{
- if (aShape.get())
+ if (aShape)
{
return aShape;
}
@@ -483,7 +483,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal
bool hasByPrio(size_t aIndex) const
{
- return aChoice.at(aIndex).get();
+ return bool(aChoice.at(aIndex));
}
private:
@@ -507,7 +507,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal
if (!rChildren.empty())
{
const oox::drawingml::ShapePtr aShape = findPlaceholder( nFirstSubType, nSecondSubType, oSubTypeIndex, rChildren, bMasterOnly );
- if (aShape.get())
+ if (aShape)
{
aPlaceholders.add(aShape, nFirstSubType, nSecondSubType, oSubTypeIndex);
}
@@ -538,7 +538,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholderByIndex( const sal_Int32 nIdx,
}
std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren();
aShapePtr = findPlaceholderByIndex( nIdx, rChildren, bMasterOnly );
- if ( aShapePtr.get() )
+ if ( aShapePtr )
break;
++aRevIter;
}
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
index c8677bdd8371..25bcc9200bef 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -126,13 +126,13 @@ ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, con
else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects
{
SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersist.get() )
+ if ( pMasterPersist )
{
pPlaceholder = PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
}
}
- if ( pPlaceholder.get() )
+ if ( pPlaceholder )
{
SAL_INFO("oox.ppt","shape " << mpShapePtr->getId() <<
" will get shape reference " << pPlaceholder->getId() << " applied");
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index ea8d692ac2fc..03863baa8b3d 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -274,7 +274,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
}
}
- if ( !pMasterPersistPtr.get() )
+ if ( !pMasterPersistPtr )
{ // masterpersist not found, we have to load it
Reference< drawing::XDrawPage > xMasterPage;
Reference< drawing::XMasterPagesSupplier > xMPS( xModel, uno::UNO_QUERY_THROW );
@@ -336,7 +336,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
}
// importing slide page
- if (pMasterPersistPtr.get()) {
+ if (pMasterPersistPtr) {
pSlidePersistPtr->setMasterPersist( pMasterPersistPtr );
pSlidePersistPtr->setTheme( pMasterPersistPtr->getTheme() );
Reference< drawing::XMasterPageTarget > xMasterPageTarget( pSlidePersistPtr->getPage(), UNO_QUERY );
@@ -562,7 +562,7 @@ void PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlide
{
Reference< drawing::XDrawPage > xSlide( rSlidePersistPtr->getPage() );
SlidePersistPtr pMasterPersistPtr( rSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersistPtr.get() )
+ if ( pMasterPersistPtr )
{
// Setting "Layout" property adds extra title and outliner preset shapes to the master slide
Reference< drawing::XDrawPage > xMasterSlide(pMasterPersistPtr->getPage());
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 5feaf8532513..c607e17d7a4e 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -179,7 +179,7 @@ SlideFragmentHandler::~SlideFragmentHandler()
case PPT_TOKEN( clrMap ): // CT_ColorMapping
{
oox::drawingml::ClrMapPtr pClrMapPtr =
- ( aElementToken == PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() || !mpSlidePersistPtr->getClrMap().get() )
+ ( aElementToken == PPT_TOKEN( clrMap ) || !mpSlidePersistPtr || !mpSlidePersistPtr->getClrMap() )
? std::make_shared<oox::drawingml::ClrMap>()
: std::make_shared<oox::drawingml::ClrMap>( *mpSlidePersistPtr->getClrMap() );
ContextHandlerRef ret = new oox::drawingml::clrMapContext( *this, rAttribs, *pClrMapPtr );