impress210: #i105310# set tooltip for items and some refactoring

# HG changeset patch
# User Ocke.Janssen@oracle.com
# Date 1297164555 -3600
# Node ID 902597eed5414555107034f62583c4ccc2cdfd4b
# Parent  2f0f385e8b25938777bb9fed6a86a2ff43e0b7cd

impress210: #i105310# set tooltip for items and some refactoring
This commit is contained in:
Ocke.Janssen@oracle.com 2011-12-06 01:28:00 +01:00 committed by Thorsten Behrens
parent 0851453849
commit 9753031300
29 changed files with 75 additions and 78 deletions

View file

@ -630,7 +630,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n
sal_Int32 nCategory = (rand() * pCategoryList->size() / RAND_MAX);
PresetCategoryPtr pCategory = (*pCategoryList)[nCategory];
if( pCategory.get() && pCategory->maEffects.size() )
if( pCategory.get() && !pCategory->maEffects.empty() )
{
sal_Int32 nDescriptor = (rand() * pCategory->maEffects.size() / RAND_MAX);
CustomAnimationPresetPtr pPreset = pCategory->maEffects[nDescriptor];
@ -639,7 +639,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n
UStringList aSubTypes = pPreset->getSubTypes();
OUString aSubType;
if( aSubTypes.size() )
if( !aSubTypes.empty() )
{
sal_Int32 nSubType = (rand() * aSubTypes.size() / RAND_MAX);
aSubType = aSubTypes[nSubType];

View file

@ -2036,7 +2036,7 @@ void CustomAnimationPane::createPath( PathKind eKind, std::vector< Any >& rTarge
void CustomAnimationPane::onRemove()
{
if( maListSelection.size() )
if( !maListSelection.empty() )
{
addUndo();

View file

@ -107,7 +107,7 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void)
// Close the spell check dialog when there are no more sentences to
// check.
if (aResult.size() == 0)
if (aResult.empty())
{
SfxBoolItem aItem (SID_SPELL_DIALOG, sal_False);
GetBindings().GetDispatcher()->Execute(

View file

@ -902,7 +902,7 @@ void AssistentDlgImpl::TemplateScanDone (
// HACK! presnt directory is always initially selected.
// We have to look at the first entry to get a URL.
if (pDir->maEntries.size() > 0)
if (!pDir->maEntries.empty() )
{
TemplateEntry* pEntry = pDir->maEntries.front();
if (pEntry != NULL)
@ -927,7 +927,7 @@ void AssistentDlgImpl::TemplateScanDone (
// HACK! layout directory is always initially selected.
// We have to look at the first entry to get a URL.
if (pDir->maEntries.size() > 0)
if (!pDir->maEntries.empty() )
{
TemplateEntry* pEntry = pDir->maEntries.front();
if (pEntry != NULL)

View file

@ -184,14 +184,14 @@ void ConfigurationControllerBroadcaster::DisposeAndClear (void)
{
lang::EventObject aEvent;
aEvent.Source = mxConfigurationController;
while (maListenerMap.size() > 0)
while (!maListenerMap.empty())
{
ListenerMap::iterator iMap (maListenerMap.begin());
if (iMap == maListenerMap.end())
break;
// When the first vector is empty then remove it from the map.
if (iMap->second.size() == 0)
if (iMap->second.empty())
{
maListenerMap.erase(iMap);
continue;

View file

@ -183,7 +183,7 @@ OUString SAL_CALL
ResourceId::getResourceURL (void)
throw(com::sun::star::uno::RuntimeException)
{
if (maResourceURLs.size() > 0)
if (!maResourceURLs.empty())
return maResourceURLs[0];
else
return OUString();
@ -200,7 +200,7 @@ util::URL SAL_CALL
return *mpURL;
Reference<util::XURLTransformer> xURLTransformer (mxURLTransformerWeak);
if (xURLTransformer.is() && maResourceURLs.size() > 0)
if (xURLTransformer.is() && !maResourceURLs.empty() )
{
mpURL.reset(new util::URL);
mpURL->Complete = maResourceURLs[0];
@ -209,7 +209,7 @@ util::URL SAL_CALL
}
util::URL aURL;
if (maResourceURLs.size() > 0)
if (!maResourceURLs.empty())
aURL.Complete = maResourceURLs[0];
return aURL;
}
@ -268,7 +268,7 @@ OUString SAL_CALL
ResourceId::getResourceTypePrefix (void)
throw (RuntimeException)
{
if (maResourceURLs.size() > 0)
if (!maResourceURLs.empty() )
{
// Return the "private:resource/<type>/" prefix.
@ -298,7 +298,7 @@ sal_Int16 SAL_CALL
if ( ! rxResourceId.is())
{
// The empty reference is interpreted as empty resource id object.
if (maResourceURLs.size() > 0)
if (!maResourceURLs.empty())
nResult = +1;
else
nResult = 0;
@ -610,7 +610,7 @@ void ResourceId::ParseResourceURL (void)
Reference<XInterface>(xURLTransformer,UNO_QUERY));
}
if (xURLTransformer.is() && maResourceURLs.size() > 0)
if (xURLTransformer.is() && !maResourceURLs.empty() )
{
mpURL.reset(new util::URL);
mpURL->Complete = maResourceURLs[0];

View file

@ -524,7 +524,7 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& r
if (xResource.is())
{
static ::std::vector<Reference<XResourceId> > maCacheableResources;
if (maCacheableResources.size() == 0)
if (maCacheableResources.empty() )
{
::boost::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(*mpBase));

View file

@ -273,7 +273,7 @@ IMPL_LINK(Animator, TimeoutHandler, Timer*, EMPTYARG)
// Unlock the draw lock. This should lead to a repaint.
mpDrawLock.reset();
if (maAnimations.size() > 0)
if (!maAnimations.empty())
RequestNextFrame();
return 0;

View file

@ -335,7 +335,7 @@ void DocumentHelper::AssignMasterPageToPageList (
aCleanedList.push_back(*iPage);
}
}
if (aCleanedList.size() == 0)
if (aCleanedList.empty() )
return;
::svl::IUndoManager* pUndoMgr = rTargetDocument.GetDocSh()->GetUndoManager();

View file

@ -481,7 +481,7 @@ int ViewTabBar::GetHeight (void)
{
int nHeight (0);
if (maTabBarButtons.size() > 0)
if (!maTabBarButtons.empty())
{
TabPage* pActivePage (mpTabControl->GetTabPage(
mpTabControl->GetCurPageId()));

View file

@ -43,7 +43,7 @@
#define RID_GALLERYSTR_THEME_MAPS (RID_GALLERYSTR_THEME_START + 12)
#define RID_GALLERYSTR_THEME_PEOPLE (RID_GALLERYSTR_THEME_START + 13)
#define RID_GALLERYSTR_THEME_SURFACES (RID_GALLERYSTR_THEME_START + 14)
#define RID_GALLERYSTR_THEME_HTMLBUTTONS (RID_GALLERYSTR_THEME_START + 15)
// free
#define RID_GALLERYSTR_THEME_POWERPOINT (RID_GALLERYSTR_THEME_START + 16)
#define RID_GALLERYSTR_THEME_RULERS (RID_GALLERYSTR_THEME_START + 17)
#define RID_GALLERYSTR_THEME_SOUNDS (RID_GALLERYSTR_THEME_START + 18)

View file

@ -64,7 +64,7 @@
#define GALLERY_THEME_MAPS 12
#define GALLERY_THEME_PEOPLE 13
#define GALLERY_THEME_SURFACES 14
#define GALLERY_THEME_HTMLBUTTONS 15
// free
#define GALLERY_THEME_POWERPOINT 16
#define GALLERY_THEME_RULERS 17
#define GALLERY_THEME_SOUNDS 18

View file

@ -1559,7 +1559,7 @@ void FmXFormShell::ExecuteSearch()
aContextNames.swap( aValidContexts );
}
if (m_aSearchForms.size() == 0)
if (m_aSearchForms.empty() )
{ // es gibt keine Controls, die alle Bedingungen fuer eine Suche erfuellen
ErrorBox(NULL, WB_OK, SVX_RESSTR(RID_STR_NODATACONTROLS)).Execute();
return;
@ -2566,7 +2566,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
strFieldList.EraseTrailingChars(';');
sFieldDisplayNames.EraseTrailingChars(';');
if (!pfmscContextInfo->arrFields.size())
if (pfmscContextInfo->arrFields.empty())
{
pfmscContextInfo->arrFields.clear();
pfmscContextInfo->xCursor = NULL;
@ -3670,7 +3670,7 @@ void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeacti
// move all events from our queue to a new one, omit the events for the deactivated
// page
::std::queue< FmLoadAction > aNewEvents;
while ( m_aLoadingPages.size() )
while ( !m_aLoadingPages.empty() )
{
FmLoadAction aAction = m_aLoadingPages.front();
m_aLoadingPages.pop();

View file

@ -256,9 +256,8 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa
// -----------------------------------------------------------------------------
::std::vector< sal_uInt16 > GalleryBrowser1::ImplGetExecuteVector()
void GalleryBrowser1::ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec)
{
::std::vector< sal_uInt16 > aExecVector;
GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this );
if( pTheme )
@ -282,23 +281,21 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa
bUpdateAllowed = bRenameAllowed = bRemoveAllowed = sal_True;
if( bUpdateAllowed && pTheme->GetObjectCount() )
aExecVector.push_back( MN_ACTUALIZE );
o_aExec.push_back( MN_ACTUALIZE );
if( bRenameAllowed )
aExecVector.push_back( MN_RENAME );
o_aExec.push_back( MN_RENAME );
if( bRemoveAllowed )
aExecVector.push_back( MN_DELETE );
o_aExec.push_back( MN_DELETE );
if( bIdDialog && !pTheme->IsReadOnly() && !pTheme->IsImported() )
aExecVector.push_back( MN_ASSIGN_ID );
o_aExec.push_back( MN_ASSIGN_ID );
aExecVector.push_back( MN_PROPERTIES );
o_aExec.push_back( MN_PROPERTIES );
mpGallery->ReleaseTheme( pTheme, *this );
}
return aExecVector;
}
// -----------------------------------------------------------------------------
@ -585,7 +582,8 @@ sal_Bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow )
if( !bRet )
{
::std::vector< sal_uInt16 > aExecVector( ImplGetExecuteVector() );
::std::vector< sal_uInt16 > aExecVector;
ImplGetExecuteVector(aExecVector);
sal_uInt16 nExecuteId = 0;
sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1();
@ -649,9 +647,10 @@ sal_Bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow )
IMPL_LINK( GalleryBrowser1, ShowContextMenuHdl, void*, EMPTYARG )
{
::std::vector< sal_uInt16 > aExecVector( ImplGetExecuteVector() );
::std::vector< sal_uInt16 > aExecVector;
ImplGetExecuteVector(aExecVector);
if( aExecVector.size() )
if( !aExecVector.empty() )
{
PopupMenu aMenu( GAL_RESID( RID_SVXMN_GALLERY1 ) );

View file

@ -102,7 +102,7 @@ private:
void ImplAdjustControls();
sal_uIntPtr ImplInsertThemeEntry( const GalleryThemeEntry* pEntry );
void ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData );
::std::vector< sal_uInt16 > ImplGetExecuteVector();
void ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec);
void ImplExecute( sal_uInt16 nId );
void ImplGalleryThemeProperties( const String & rThemeName, bool bCreateNew );
void ImplEndGalleryThemeProperties( VclAbstractDialog2* pDialog, bool bCreateNew );

View file

@ -401,7 +401,7 @@ void GalleryIconView::UserDraw( const UserDrawEvent& rUDEvt )
aGraphic.Draw( pDev, aPos, aSize );
}
SetItemText( nId, GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_THEMENAME | GALLERY_ITEM_TITLE | GALLERY_ITEM_PATH ) );
SetItemText( nId, GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_TITLE) );
mpTheme->ReleaseObject( pObj );
}
}

View file

@ -326,16 +326,19 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
if( xContentAccess.is() )
{
static const ::rtl::OUString s_sTitle(RTL_CONSTASCII_USTRINGPARAM("Title"));
static const ::rtl::OUString s_sIsReadOnly(RTL_CONSTASCII_USTRINGPARAM("IsReadOnly"));
static const ::rtl::OUString s_sSDG_EXT(RTL_CONSTASCII_USTRINGPARAM("sdg"));
static const ::rtl::OUString s_sSDV_EXT(RTL_CONSTASCII_USTRINGPARAM("sdv"));
while( xResultSet->next() )
{
INetURLObject aThmURL( xContentAccess->queryContentIdentifierString() );
if(aThmURL.GetExtension().equalsIgnoreAsciiCaseAscii("thm"))
{
INetURLObject aSdgURL( aThmURL); aSdgURL.SetExtension( OUString(RTL_CONSTASCII_USTRINGPARAM("sdg")) );
INetURLObject aSdvURL( aThmURL ); aSdvURL.SetExtension( OUString(RTL_CONSTASCII_USTRINGPARAM("sdv")) );
const OUString aTitleProp( RTL_CONSTASCII_USTRINGPARAM("Title") );
const OUString aReadOnlyProp( RTL_CONSTASCII_USTRINGPARAM("IsReadOnly") );
INetURLObject aSdgURL( aThmURL); aSdgURL.SetExtension( s_sSDG_EXT );
INetURLObject aSdvURL( aThmURL ); aSdvURL.SetExtension( s_sSDV_EXT );
OUString aTitle;
sal_Bool bReadOnly = sal_False;
@ -347,7 +350,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
try
{
aThmCnt.getPropertyValue( aTitleProp ) >>= aTitle;
aThmCnt.getPropertyValue( s_sTitle ) >>= aTitle;
}
catch( const uno::RuntimeException& )
{
@ -360,7 +363,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
{
try
{
aThmCnt.getPropertyValue( aReadOnlyProp ) >>= bReadOnly;
aThmCnt.getPropertyValue( s_sIsReadOnly ) >>= bReadOnly;
}
catch( const uno::RuntimeException& )
{
@ -373,7 +376,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
{
try
{
aSdgCnt.getPropertyValue( aTitleProp ) >>= aTitle;
aSdgCnt.getPropertyValue( s_sTitle ) >>= aTitle;
}
catch( const ::com::sun::star::uno::RuntimeException& )
{
@ -386,7 +389,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
{
try
{
aSdgCnt.getPropertyValue( aReadOnlyProp ) >>= bReadOnly;
aSdgCnt.getPropertyValue( s_sIsReadOnly ) >>= bReadOnly;
}
catch( const uno::RuntimeException& )
{
@ -401,7 +404,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
{
try
{
aSdvCnt.getPropertyValue( aTitleProp ) >>= aTitle;
aSdvCnt.getPropertyValue( s_sTitle ) >>= aTitle;
}
catch( const ::com::sun::star::uno::RuntimeException& )
{
@ -414,7 +417,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
{
try
{
aSdvCnt.getPropertyValue( aReadOnlyProp ) >>= bReadOnly;
aSdvCnt.getPropertyValue( s_sIsReadOnly ) >>= bReadOnly;
}
catch( const uno::RuntimeException& )
{

View file

@ -1191,18 +1191,13 @@ sal_Bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, s
uno::Sequence< OUString > aProps( 1 );
aProps.getArray()[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM("Url"));
uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) );
if( xResultSet.is() )
uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
if( xContentAccess.is() )
{
uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
if( xContentAccess.is() )
while( xResultSet->next() )
{
while( xResultSet->next() )
{
aURL.SetSmartURL( xContentAccess->queryContentIdentifierString() );
aURLVector.push_back( aURL );
}
aURL.SetSmartURL( xContentAccess->queryContentIdentifierString() );
aURLVector.push_back( aURL );
}
}
}

View file

@ -65,7 +65,7 @@ namespace sdr
std::vector< ViewObjectContact* > aLocalVOCList(maViewObjectContactVector);
maViewObjectContactVector.clear();
while(aLocalVOCList.size())
while(!aLocalVOCList.empty())
{
ViewObjectContact* pCandidate = aLocalVOCList.back();
aLocalVOCList.pop_back();

View file

@ -81,7 +81,7 @@ namespace sdr
std::vector< ViewObjectContact* > aLocalVOCList(maViewObjectContactVector);
maViewObjectContactVector.clear();
while(aLocalVOCList.size())
while(!aLocalVOCList.empty())
{
ViewObjectContact* pCandidate = aLocalVOCList.back();
aLocalVOCList.pop_back();
@ -146,7 +146,7 @@ namespace sdr
{
maViewObjectContactVector.erase(aFindResult);
if(0 == maViewObjectContactVector.size())
if(maViewObjectContactVector.empty())
{
// This may need to get asynchron later since it eventually triggers
// deletes of OCs where the VOC is still added.

View file

@ -82,7 +82,7 @@ namespace sdr
BaseEvent* EventHandler::GetEvent()
{
if(maVector.size())
if(!maVector.empty())
{
// get the last event, that one is fastest to be removed
return maVector.back();
@ -99,7 +99,7 @@ namespace sdr
EventHandler::~EventHandler()
{
while(maVector.size())
while(!maVector.empty())
{
delete GetEvent();
}

View file

@ -82,7 +82,7 @@ namespace sdr
bool OverlayObjectList::isHitLogic(const basegfx::B2DPoint& rLogicPosition, double fLogicTolerance) const
{
if(maVector.size())
if(!maVector.empty())
{
OverlayObjectVector::const_iterator aStart(maVector.begin());
sdr::overlay::OverlayObject* pFirst = *aStart;
@ -133,7 +133,7 @@ namespace sdr
bool OverlayObjectList::isHitPixel(const Point& rDiscretePosition, sal_uInt32 nDiscreteTolerance) const
{
if(maVector.size())
if(!maVector.empty())
{
OverlayObjectVector::const_iterator aStart(maVector.begin());
sdr::overlay::OverlayObject* pCandidate = *aStart;
@ -163,7 +163,7 @@ namespace sdr
{
basegfx::B2DRange aRetval;
if(maVector.size())
if(!maVector.empty())
{
OverlayObjectVector::const_iterator aStart(maVector.begin());

View file

@ -246,7 +246,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdrDragEntryPointGlueDrag::create
{
drawinglayer::primitive2d::Primitive2DSequence aRetval;
if(maPositions.size())
if(!maPositions.empty())
{
basegfx::B2DPolygon aPolygon;
sal_uInt32 a(0);
@ -666,14 +666,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;

View file

@ -2146,7 +2146,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 );

View file

@ -2311,7 +2311,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++)
@ -2323,7 +2323,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);

View file

@ -199,7 +199,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());
@ -626,7 +626,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;
@ -711,7 +711,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();
@ -752,7 +752,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
}
// handle data pair polygon/ParagraphTextPortions
if(aParagraphTextPortions.size())
if(!aParagraphTextPortions.empty())
{
aPolygonParagraphHandler.HandlePair(rPathPolyPolygon.getB2DPolygon(a), aParagraphTextPortions);
}

View file

@ -247,7 +247,7 @@ SdrPaintView::~SdrPaintView()
#endif
// delete existing SdrPaintWindows
while(maPaintWindows.size())
while(!maPaintWindows.empty())
{
delete maPaintWindows.back();
maPaintWindows.pop_back();

View file

@ -2014,7 +2014,7 @@ Window* SvxStyleToolBoxControl::CreateItemWindow( Window *pParent )
pImpl->aClearForm,
pImpl->aMore,
pImpl->bSpecModeWriter || pImpl->bSpecModeCalc );
if( pImpl->aDefaultStyles.size())
if( !pImpl->aDefaultStyles.empty())
pBox->SetDefaultStyle( pImpl->aDefaultStyles[0] );
// Set visibility listener to bind/unbind controller
pBox->SetVisibilityListener( LINK( this, SvxStyleToolBoxControl, VisibilityNotification ));

View file

@ -809,7 +809,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
bRet = false;
}
if( bRet && aShapes.size() )
if( bRet && !aShapes.empty() )
{
// special treatment for only one SdrGrafObj that has text
sal_Bool bSingleGraphic = sal_False;