summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-14 17:25:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-14 17:25:47 +0100
commitc1f416feda0ef4ef215ca587b9bac03659b48c7a (patch)
tree034acd437ef021c2580682b38bd5a8361618ce93 /cui
parenta1115a5983e126f872c6d7f14aef8ce5bba4010a (diff)
SvxBrushItem: Improve Referer from member to GetGraphic[Object] parameter
Change-Id: I034132c315b74d0ea5e03b7d5f7cc225a6c8164e
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/backgrnd.cxx8
-rw-r--r--cui/source/tabpages/grfpage.cxx17
-rw-r--r--cui/source/tabpages/tpline.cxx2
3 files changed, 20 insertions, 7 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 7948b6ca5066..e1e598ddb6a6 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -843,7 +843,7 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
SvxBrushItem aTmpBrush(nWhich);
if ( bIsLink )
{
- aTmpBrush = SvxBrushItem( aBgdGraphicPath, ""/*TODO?*/,
+ aTmpBrush = SvxBrushItem( aBgdGraphicPath,
aBgdGraphicFilter,
eNewPos,
nWhich );
@@ -881,7 +881,7 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
SvxBrushItem* pTmpBrush = 0;
if ( m_pBtnLink->IsChecked() )
{
- pTmpBrush = new SvxBrushItem( aBgdGraphicPath, ""/*TODO?*/,
+ pTmpBrush = new SvxBrushItem( aBgdGraphicPath,
aBgdGraphicFilter,
GetGraphicPosition_Impl(),
nWhich );
@@ -1665,7 +1665,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
bIsGraphicValid = LoadLinkedGraphic_Impl();
if ( bIsLink )
- *pActItem = SvxBrushItem( aBgdGraphicPath, ""/*TODO?*/,
+ *pActItem = SvxBrushItem( aBgdGraphicPath,
aBgdGraphicFilter,
eNewPos,
pActItem->Which() );
@@ -1746,7 +1746,7 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox )
bIsGraphicValid = LoadLinkedGraphic_Impl();
if ( bIsLink )
- *pActItem = SvxBrushItem( aBgdGraphicPath, ""/*TODO?*/,
+ *pActItem = SvxBrushItem( aBgdGraphicPath,
aBgdGraphicFilter,
eNewPos,
pActItem->Which() );
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 1a41bde3560f..1365ce5c7815 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -19,6 +19,7 @@
#include <tools/shl.hxx>
#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/app.hxx>
#include <sfx2/module.hxx>
#include <sfx2/sfxsids.hrc>
@@ -206,7 +207,13 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet )
sal_Bool bFound = sal_False;
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) )
{
- const Graphic* pGrf = ((SvxBrushItem*)pItem)->GetGraphic();
+ OUString referer;
+ SfxStringItem const * it = static_cast<SfxStringItem const *>(
+ rSet.GetItem(SID_REFERER));
+ if (it != 0) {
+ referer = it->GetValue();
+ }
+ const Graphic* pGrf = ((SvxBrushItem*)pItem)->GetGraphic(referer);
if( pGrf ) {
aOrigSize = GetGrfOrigSize( *pGrf );
if (pGrf->GetType() == GRAPHIC_BITMAP && aOrigSize.Width() && aOrigSize.Height()) {
@@ -353,7 +360,13 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
aGraphicName != rBrush.GetGraphicLink() )
aGraphicName = rBrush.GetGraphicLink();
- const Graphic* pGrf = rBrush.GetGraphic();
+ OUString referer;
+ SfxStringItem const * it = static_cast<SfxStringItem const *>(
+ rSet.GetItem(SID_REFERER));
+ if (it != 0) {
+ referer = it->GetValue();
+ }
+ const Graphic* pGrf = rBrush.GetGraphic(referer);
if( pGrf )
{
aExampleWN.SetGraphic( *pGrf );
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index a5a9cdc752fb..458b6b920d93 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -266,7 +266,7 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton)
pUIName = &aPhysicalName;
}
- SvxBrushItem* pBrushItem = new SvxBrushItem(*it, ""/*TODO?*/, aEmptyStr, GPOS_AREA, SID_ATTR_BRUSH);
+ SvxBrushItem* pBrushItem = new SvxBrushItem(*it, aEmptyStr, GPOS_AREA, SID_ATTR_BRUSH);
pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl));
SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();