summaryrefslogtreecommitdiff
path: root/svx/source/items/galleryitem.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2013-07-27 15:11:32 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-07-29 13:05:56 +0000
commit4e3f7d32b80fcb44f20abe634a2035d2c90c9e08 (patch)
tree3fe76a82fb73584a6ea96e0f7905edc939a21ed9 /svx/source/items/galleryitem.cxx
parent15dc66c81a5a0af8db52a98e51e289f8f134d8c4 (diff)
fdo#67274 Always embed images from gallery
This patch removes the options to link images from the gallery. Users should never link to the gallery. The links wouldn't work anymore if you just change the operating system, because the gallery is on a different place. Changes: * Removed option in "Bullets and Numbering" dialog to link graphical bullets * Change the Gallery image context menu. Before: Insert Copy Link Background Page Paragraph ... Now: Insert Insert as Background Page Paragraph ... Change-Id: I699042a7d7a27369775f9ee4c14c4a6964489a92 Reviewed-on: https://gerrit.libreoffice.org/5141 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'svx/source/items/galleryitem.cxx')
-rw-r--r--svx/source/items/galleryitem.cxx27
1 files changed, 7 insertions, 20 deletions
diff --git a/svx/source/items/galleryitem.cxx b/svx/source/items/galleryitem.cxx
index 18a73f76ccaf..50b39a1e5326 100644
--- a/svx/source/items/galleryitem.cxx
+++ b/svx/source/items/galleryitem.cxx
@@ -30,7 +30,6 @@ TYPEINIT1_AUTOFACTORY( SvxGalleryItem, SfxPoolItem );
SvxGalleryItem::SvxGalleryItem()
: m_nType( css::gallery::GalleryItemType::EMPTY )
- , m_bIsLink( sal_False )
{
DBG_CTOR(SvxGalleryItem, 0);
}
@@ -38,7 +37,6 @@ SvxGalleryItem::SvxGalleryItem()
SvxGalleryItem::SvxGalleryItem( const SvxGalleryItem &rItem )
: SfxPoolItem( rItem )
, m_nType( rItem.m_nType )
- , m_bIsLink( rItem.m_bIsLink )
, m_aURL( rItem.m_aURL )
, m_xDrawing( rItem.m_xDrawing )
, m_xGraphic( rItem.m_xGraphic )
@@ -50,7 +48,6 @@ SvxGalleryItem::SvxGalleryItem(
const ::sal_uInt16 nId )
: SfxPoolItem( nId )
, m_nType( css::gallery::GalleryItemType::EMPTY )
- , m_bIsLink( sal_False )
{
DBG_CTOR(SvxGalleryItem, 0);
}
@@ -66,16 +63,14 @@ bool SvxGalleryItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /* nMemberId */
aSeq[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_TYPE ));
aSeq[0].Value <<= m_nType;
- aSeq[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_LINK ));
- aSeq[1].Value <<= m_bIsLink;
- aSeq[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_URL ));
+ aSeq[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_URL ));
+ aSeq[1].Value <<= m_aURL;
+ aSeq[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_FILTER ));
aSeq[2].Value <<= m_aURL;
- aSeq[3].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_FILTER ));
- aSeq[3].Value <<= m_aURL;
- aSeq[4].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_DRAWING ));
- aSeq[4].Value <<= m_xDrawing;
- aSeq[5].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_GRAPHIC ));
- aSeq[5].Value <<= m_xGraphic;
+ aSeq[3].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_DRAWING ));
+ aSeq[3].Value <<= m_xDrawing;
+ aSeq[4].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVXGALLERYITEM_GRAPHIC ));
+ aSeq[4].Value <<= m_xGraphic;
rVal <<= aSeq;
@@ -94,7 +89,6 @@ bool SvxGalleryItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /* nMemberId
sal_Bool bIsSetType( sal_False );
sal_Int8 nType(0);
- sal_Bool bIsLink( sal_False );
rtl::OUString aURL, aFilterName;
css::uno::Reference< css::lang::XComponent > xDrawing;
css::uno::Reference< css::graphic::XGraphic > xGraphic;
@@ -108,11 +102,6 @@ bool SvxGalleryItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /* nMemberId
bAllConverted &= bIsSetType = ( pProp->Value >>= nType );
++nConverted;
}
- else if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SVXGALLERYITEM_LINK ) ) )
- {
- bAllConverted &= ( pProp->Value >>= bIsLink );
- ++nConverted;
- }
else if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SVXGALLERYITEM_URL ) ) )
{
bAllConverted &= ( pProp->Value >>= aURL );
@@ -139,7 +128,6 @@ bool SvxGalleryItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /* nMemberId
return false;
m_nType = nType;
- m_bIsLink = bIsLink;
m_aURL = aURL;
m_aFilterName = aFilterName;
m_xDrawing = xDrawing;
@@ -155,7 +143,6 @@ int SvxGalleryItem::operator==( const SfxPoolItem& rAttr ) const
const SvxGalleryItem& rItem = static_cast<const SvxGalleryItem&>(rAttr);
int bRet = m_nType == rItem.m_nType &&
- m_bIsLink == rItem.m_bIsLink &&
m_aURL == rItem.m_aURL &&
m_xDrawing == rItem.m_xDrawing &&
m_xGraphic == rItem.m_xGraphic;