diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-09 15:19:26 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-09-11 09:45:34 +0200 |
commit | cfb4463d2afd36ca6d0fbb9e374bf5387fee84df (patch) | |
tree | 4411584498dcf21eff5e71c284e7af1ed6b5489a /cui | |
parent | b044a9535e0fb573fe5d28b0d44c96a3b5db66c2 (diff) |
convert include/editeng/brushitem.hxx from String to OUString
and convert String* to OUString, no need to hold a pointer
to a ref-counted value type.
Change-Id: I79c62979ee8ec0d5e6d2efc50609ad5595571a7d
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 31 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 10 |
2 files changed, 19 insertions, 22 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 4e002f8d0074..8c17e5b4ebbc 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -829,13 +829,13 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( !bIsLink && !bIsGraphicValid ) bIsGraphicValid = LoadLinkedGraphic_Impl(); - if ( bGraphTransparencyChanged || - eNewPos != eOldPos + if ( bGraphTransparencyChanged || + eNewPos != eOldPos || bIsLink != bWasLink - || ( bWasLink && *rOldItem.GetGraphicLink() - != aBgdGraphicPath ) - || ( !bWasLink && rOldItem.GetGraphic()->GetBitmap() - != aBgdGraphic.GetBitmap() ) + || ( bWasLink && rOldItem.GetGraphicLink() + != aBgdGraphicPath ) + || ( !bWasLink && rOldItem.GetGraphic()->GetBitmap() + != aBgdGraphic.GetBitmap() ) ) { bModified = sal_True; @@ -1035,7 +1035,7 @@ sal_Bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSe SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); int bBitmapChanged = ( ( eNewPos != eOldPos ) || - ( *rOldItem.GetGraphicLink() != aBgdGraphicPath ) ); + ( rOldItem.GetGraphicLink() != aBgdGraphicPath ) ); int bBrushChanged = ( rOldItem.GetColor() != aBgdColor ); if( bBitmapChanged || bBrushChanged ) { @@ -1846,19 +1846,19 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, } else { - const String* pStrLink = rBgdAttr.GetGraphicLink(); - const String* pStrFilter = rBgdAttr.GetGraphicFilter(); + const OUString aStrLink = rBgdAttr.GetGraphicLink(); + const OUString aStrFilter = rBgdAttr.GetGraphicFilter(); lcl_setFillStyle(m_pLbSelect, XFILL_BITMAP); ShowBitmapUI_Impl(); - if ( pStrLink ) + if ( !aStrLink.isEmpty() ) { #ifdef DBG_UTIL - INetURLObject aObj( *pStrLink ); + INetURLObject aObj( aStrLink ); DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); #endif - aBgdGraphicPath = *pStrLink; + aBgdGraphicPath = aStrLink; m_pBtnLink->Check( sal_True ); m_pBtnLink->Enable(); } @@ -1881,12 +1881,9 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, FileClickHdl_Impl(m_pBtnLink); - if ( pStrFilter ) - aBgdGraphicFilter = *pStrFilter; - else - aBgdGraphicFilter.Erase(); + aBgdGraphicFilter = aStrFilter; - if ( !pStrLink || m_pBtnPreview->IsChecked() ) + if ( aStrLink.isEmpty() || m_pBtnPreview->IsChecked() ) { // Graphic exists in the item and doesn't have // to be loaded: diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 0f635d64b02c..be95f47f6f45 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -222,8 +222,8 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) aExampleWN.SetFrameSize( aOrigSize ); bFound = sal_True; - if( ((SvxBrushItem*)pItem)->GetGraphicLink() ) - aGraphicName = *((SvxBrushItem*)pItem)->GetGraphicLink(); + if( !((SvxBrushItem*)pItem)->GetGraphicLink().isEmpty() ) + aGraphicName = ((SvxBrushItem*)pItem)->GetGraphicLink(); } } @@ -349,9 +349,9 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) ) { const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem; - if( rBrush.GetGraphicLink() && - aGraphicName != *rBrush.GetGraphicLink() ) - aGraphicName = *rBrush.GetGraphicLink(); + if( !rBrush.GetGraphicLink().isEmpty() && + aGraphicName != rBrush.GetGraphicLink() ) + aGraphicName = rBrush.GetGraphicLink(); const Graphic* pGrf = rBrush.GetGraphic(); if( pGrf ) |