include/sfx2/sfxsids.hrc | 2 +- sfx2/source/appl/appuno.cxx | 2 +- sfx2/source/doc/objstor.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 663834876fd7dcc4d79240505e81f4b3ab1c5bab Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jan 31 10:55:18 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Jan 31 14:06:16 2022 +0100 SID_COPY_STREAM_IF_POSSIBLE is a SfxBoolItem The cast in appuno.cxx has been wrong since this constant was introduced in commit ecccc429183b999f2e488e991ef41bbee17604b6 Author: Oliver Bolte <o...@openoffice.org> Date: Mon Mar 27 08:33:39 2006 +0000 INTEGRATION: CWS fwk36 (1.113.44); FILE MERGED 2006/03/16 15:44:13 cd 1.113.44.2: #i46895# Fixed typos 2006/03/16 14:55:24 mav 1.113.44.1: #i46895# allow to create a copy of the document if possible and I looked that cast when I added the TypedWhichId annotation. Change-Id: I1d541094e08633e5aced2423c30904506ca68368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 90197dbcddf3..7f40ddc2284c 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -248,7 +248,7 @@ class SvxZoomItem; #define SID_APPLY_STYLE (SID_SFX_START + 1703) #define SID_MACRO_SIGNATURE (SID_SFX_START + 1704) #define SID_ATTR_WARNALIENFORMAT (SID_SFX_START + 1705) -#define SID_COPY_STREAM_IF_POSSIBLE TypedWhichId<SfxUnoAnyItem>(SID_SFX_START + 1706) +#define SID_COPY_STREAM_IF_POSSIBLE TypedWhichId<SfxBoolItem>(SID_SFX_START + 1706) #define SID_MAIL_SENDDOCASFORMAT (SID_SFX_START + 1707) #define SID_MAIL_SENDDOCASMS (SID_SFX_START + 1708) #define SID_MAIL_SENDDOCASOOO (SID_SFX_START + 1709) diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 17c2304ed10a..72076871ee98 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1621,7 +1621,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = sCopyStreamIfPossible; - pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue(); + pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue(); } if ( rSet.GetItemState( SID_NOAUTOSAVE, false, &pItem ) == SfxItemState::SET ) { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 76e7734b402c..d07d406ec271 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2712,7 +2712,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString } - const SfxBoolItem* pCopyStreamItem = rItemSet.GetItem<SfxBoolItem>(SID_COPY_STREAM_IF_POSSIBLE, false); + const SfxBoolItem* pCopyStreamItem = rItemSet.GetItem(SID_COPY_STREAM_IF_POSSIBLE, false); if ( bSaveTo && pCopyStreamItem && pCopyStreamItem->GetValue() && !IsModified() ) { if (pMedium->TryDirectTransfer(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), rItemSet))