SvxBrushItem::GetGraphicLink no longer returns a pointer

...since cfb4463d2a "convert
include/editeng/brushitem.hxx from String to OUString", which boldly changed it
from returning a pointer to returning a reference, probably not even taking into
account that that broke the value set (from string+null to just string).

However, that change appears to have worked OK in practice, and there maybe
wasn't a need after all to distinguish a null value from an empty string.  These
two places here were missed in the change, and happened to keep working, as they
picked the operator ==(sal_Unicode const *, OUString const &) overload, that
happens to treat a null first argument like an empty string.

Change-Id: If2d76951fa4bf6c7821321327ad653bd0a95a788
This commit is contained in:
Stephan Bergmann
2016-10-31 11:28:48 +01:00
parent 1b36f23b51
commit a8cfc979b4
2 changed files with 2 additions and 2 deletions

View File

@@ -698,7 +698,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); SvxGraphicPosition eNewPos = GetGraphicPosition_Impl();
const bool bIsLink = m_pBtnLink->IsChecked(); const bool bIsLink = m_pBtnLink->IsChecked();
const bool bWasLink = (nullptr != rOldItem.GetGraphicLink() ); const bool bWasLink = !rOldItem.GetGraphicLink().isEmpty();
if ( !bIsLink && !bIsGraphicValid ) if ( !bIsLink && !bIsGraphicValid )

View File

@@ -2216,7 +2216,7 @@ static bool OutCSS1_FrameFormatBrush( SwHTMLWriter& rWrt,
/// output brush of frame format, if its background color is not "no fill"/"auto fill" /// output brush of frame format, if its background color is not "no fill"/"auto fill"
/// or it has a background graphic. /// or it has a background graphic.
if( rBrushItem.GetColor() != COL_TRANSPARENT || if( rBrushItem.GetColor() != COL_TRANSPARENT ||
nullptr != rBrushItem.GetGraphicLink() || !rBrushItem.GetGraphicLink().isEmpty() ||
0 != rBrushItem.GetGraphicPos() ) 0 != rBrushItem.GetGraphicPos() )
{ {
OutCSS1_SvxBrush( rWrt, rBrushItem, CSS1_BACKGROUND_FLY, nullptr ); OutCSS1_SvxBrush( rWrt, rBrushItem, CSS1_BACKGROUND_FLY, nullptr );