From cfb4463d2afd36ca6d0fbb9e374bf5387fee84df Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 9 Sep 2013 15:19:26 +0200 Subject: 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 --- cui/source/tabpages/backgrnd.cxx | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'cui/source/tabpages/backgrnd.cxx') 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: -- cgit