Kaydet (Commit) a98ac722 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

TransferableObjectDescriptor::mnOle2Misc field is unused

which means that SfxObjectShell::GetMiscStatus becomes unused

Change-Id: I5c89a2cd5c77c7f08a57fdac08237aab514fc7fa
Reviewed-on: https://gerrit.libreoffice.org/38843Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 2404a17e
......@@ -92,10 +92,6 @@ enum class SfxEventHintId;
#define ASPECT_ICON 4
#define ASPECT_DOCPRINT 8
// must be the same as in OLE2
#define SVOBJ_MISCSTATUS_NOTRESIZEABLE 512
#define SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE 2048
namespace sfx2
{
class SvLinkSource;
......@@ -626,7 +622,6 @@ public:
virtual void SetVisArea( const tools::Rectangle & rVisArea );
const tools::Rectangle & GetVisArea() const;
void SetVisAreaSize( const Size & rVisSize );
virtual sal_uIntPtr GetMiscStatus() const;
MapUnit GetMapUnit() const;
void SetMapUnit( MapUnit nMUnit );
......
......@@ -70,13 +70,11 @@ struct TransferableObjectDescriptor
sal_uInt16 mnViewAspect;
Point maDragStartPos;
Size maSize;
sal_uInt32 mnOle2Misc;
OUString maTypeName;
OUString maDisplayName;
TransferableObjectDescriptor()
: mnViewAspect(css::embed::Aspects::MSOLE_CONTENT)
, mnOle2Misc(0)
{}
SVT_DLLPUBLIC friend SvStream& WriteTransferableObjectDescriptor( SvStream& rOStm, const TransferableObjectDescriptor& rObjDesc );
......
......@@ -524,10 +524,6 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
{
if (xObj.is())
{
//TODO/LATER: needs status for RESIZEONPRINTERCHANGE
//if( SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->getStatus( nAspect ) )
// aIPObj->OnDocumentPrinterChanged( mpDocSh->GetPrinter(sal_False) );
bool bInsertNewObject = true;
Size aSize;
......
......@@ -136,12 +136,6 @@ void SfxObjectShell::SetVisAreaSize( const Size & rVisSize )
}
sal_uIntPtr SfxObjectShell::GetMiscStatus() const
{
return 0;
}
MapUnit SfxObjectShell::GetMapUnit() const
{
return pImpl->m_nMapUnit;
......@@ -161,7 +155,6 @@ void SfxObjectShell::FillTransferableObjectDescriptor( TransferableObjectDescrip
FillClass( &rDesc.maClassName, &nClipFormat, &aAppName, &rDesc.maTypeName, &aShortName, SOFFICE_FILEFORMAT_CURRENT );
rDesc.mnViewAspect = ASPECT_CONTENT;
rDesc.mnOle2Misc = GetMiscStatus();
rDesc.maSize = OutputDevice::LogicToLogic( GetVisArea().GetSize(), GetMapUnit(), MapUnit::Map100thMM );
rDesc.maDragStartPos = Point();
rDesc.maDisplayName.clear();
......
......@@ -1891,8 +1891,6 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla
// TODO/LATER: ViewAspect needs to be sal_Int64
aDesc.mnViewAspect = sal::static_int_cast< sal_uInt16 >( embed::Aspects::MSOLE_CONTENT );
//TODO/LATER: status needs to become sal_Int64
aDesc.mnOle2Misc = m_pData->m_pObjectShell->GetMiscStatus();
Size aSize = m_pData->m_pObjectShell->GetVisArea().GetSize();
MapUnit aMapUnit = m_pData->m_pObjectShell->GetMapUnit();
......
......@@ -116,7 +116,6 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener
sal_Int32 nFileFormat,
bool bTemplate = false ) const override;
virtual sal_uIntPtr GetMiscStatus() const override;
virtual void OnDocumentPrinterChanged( Printer * ) override;
virtual bool InitNew( const css::uno::Reference< css::embed::XStorage >& xStorage ) override;
virtual bool Load( SfxMedium& rMedium ) override;
......
......@@ -1294,12 +1294,6 @@ void SmDocShell::FillClass(SvGlobalName* pClassName,
}
}
sal_uIntPtr SmDocShell::GetMiscStatus() const
{
return SfxObjectShell::GetMiscStatus() | SVOBJ_MISCSTATUS_NOTRESIZEABLE
| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
void SmDocShell::SetModified(bool bModified)
{
if( IsEnableSetModified() )
......
......@@ -215,9 +215,6 @@ void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObject
// so for internal transport something different should be found
rDesc.mnViewAspect = sal::static_int_cast<sal_uInt16>( nAspect );
//TODO/LATER: status needs to become sal_Int64
rDesc.mnOle2Misc = sal::static_int_cast<sal_Int32>(xObj->getStatus( rDesc.mnViewAspect ));
Size aSize;
MapMode aMapMode( MapUnit::Map100thMM );
if ( nAspect == embed::Aspects::MSOLE_ICON )
......
......@@ -999,22 +999,6 @@ void SdrOle2Obj::Connect_Impl()
<< comphelper::anyToString( cppu::getCaughtException() ) );
}
}
//TODO/LATER: wait for definition of MiscStatus RESIZEONPRINTERCHANGE
//if ( xObjRef.is() && (*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
{
//TODO/LATER: needs a new handling for OnPrinterChanged
/*
if (pModel && pModel->GetRefDevice() &&
pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
{
// no RefDevice or RefDevice is not a printer
bool bModified = (*ppObjRef)->IsModified();
Printer* pPrinter = (Printer*) pModel->GetRefDevice();
(*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
(*ppObjRef)->SetModified( bModified );
}*/
}
}
void SdrOle2Obj::ObjectLoaded()
......@@ -1853,33 +1837,6 @@ void SdrOle2Obj::GetObjRef_Impl()
pModel->SetChanged( false );
}
}
sal_Int64 nMiscStatus = mpImpl->mxObjRef->getStatus( GetAspect() );
(void)nMiscStatus;
//TODO/LATER: wait until ResizeOnPrinterChange is defined
//if ( nMiscStatus & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
{
if (pModel && pModel->GetRefDevice() &&
pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
{
if (!mpImpl->mbInDestruction)
{
//TODO/LATER: printerchange notification
/*
// prevent SetModified (don't want no update here)
bool bWasEnabled = (*ppObjRef)->IsEnableSetModified();
if ( bWasEnabled )
(*ppObjRef)->EnableSetModified( false );
// no RefDevice or RefDevice is not a printer
Printer* pPrinter = (Printer*) pModel->GetRefDevice();
(*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
// reset state
(*ppObjRef)->EnableSetModified( bWasEnabled );*/
}
}
}
}
if ( mpImpl->mxObjRef.is() )
......
......@@ -180,7 +180,6 @@ public:
virtual Printer *GetDocumentPrinter() override;
virtual OutputDevice* GetDocumentRefDev() override;
virtual void OnDocumentPrinterChanged( Printer * pNewPrinter ) override;
virtual sal_uLong GetMiscStatus() const override;
virtual void PrepareReload() override;
virtual void SetModified( bool = true ) override;
......
......@@ -902,11 +902,6 @@ void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
GetDoc()->getIDocumentDeviceAccess().setPrinter( nullptr, true, true );
}
sal_uLong SwDocShell::GetMiscStatus() const
{
return SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
// #i20883# Digital Signatures and Encryption
HiddenInformation SwDocShell::GetHiddenInformationState( HiddenInformation nStates )
{
......
......@@ -711,8 +711,6 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc)
|| bLinkingChart
// TODO/LATER: ResizeOnPrinterChange
//|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus()
// --> OD #i117189# - refine condition for non-resizable objects
// non-resizable objects need to be set the size back by this method
|| ( bNoTextFramePrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment