Kaydet (Commit) cf8a3e70 authored tarafından Valentin Kettner's avatar Valentin Kettner

Cleaning up of IDocumentDeviceAccess methods in SwDoc.

Moved all SwDoc::getReferenceDevice and SwDoc::setReferenceDevice calls to their
appropriate interface methods (SwDoc::getIDocumentDeviceAccess::").

Change-Id: I2a1b488500fa4f0bfbb7ebadccde2c94b70efd85
üst 50682e72
......@@ -679,8 +679,6 @@ public:
// IDocumentDeviceAccess
const IDocumentDeviceAccess* getIDocumentDeviceAccessConst() const;
IDocumentDeviceAccess* getIDocumentDeviceAccess();
virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const;
virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes );
virtual const JobSetup* getJobsetup() const;
virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup );
virtual const SwPrintData & getPrintData() const;
......
......@@ -254,16 +254,6 @@ IDocumentDeviceAccess* SwDoc::getIDocumentDeviceAccess()
return m_DeviceAccess.get();
}
OutputDevice* SwDoc::getReferenceDevice(/*[in]*/ bool bCreate ) const
{
return getIDocumentDeviceAccessConst()->getReferenceDevice( bCreate );
}
void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes )
{
getIDocumentDeviceAccess()->setReferenceDeviceType( bNewVirtual, bNewHiRes );
}
const JobSetup* SwDoc::getJobsetup() const
{
return getIDocumentDeviceAccessConst()->getJobsetup();
......
......@@ -596,7 +596,7 @@ void SwDoc::InitDrawModel()
mpDrawModel->SetLinkManager( &GetLinkManager() );
mpDrawModel->SetAddExtLeading( get(IDocumentSettingAccess::ADD_EXT_LEADING) );
OutputDevice* pRefDev = getReferenceDevice( false );
OutputDevice* pRefDev = getIDocumentDeviceAccessConst()->getReferenceDevice( false );
if ( pRefDev )
mpDrawModel->SetRefDevice( pRefDev );
......
......@@ -1999,7 +1999,7 @@ OutputDevice& SwViewShell::GetRefDev() const
else if ( 0 != mpTmpRef )
pTmpOut = mpTmpRef;
else
pTmpOut = GetDoc()->getReferenceDevice( true );
pTmpOut = GetDoc()->getIDocumentDeviceAccessConst()->getReferenceDevice( true );
return *pTmpOut;
}
......
......@@ -876,7 +876,7 @@ Printer *SwDocShell::GetDocumentPrinter()
OutputDevice* SwDocShell::GetDocumentRefDev()
{
return pDoc->getReferenceDevice( false );
return pDoc->getIDocumentDeviceAccessConst()->getReferenceDevice( false );
}
void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
......
......@@ -423,7 +423,7 @@ void SwDocShell::UpdateFontList()
if( pDoc )
{
delete pFontList;
pFontList = new FontList( pDoc->getReferenceDevice( true ) );
pFontList = new FontList( pDoc->getIDocumentDeviceAccessConst()->getReferenceDevice( true ) );
PutItem( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) );
}
bInUpdateFontList = false;
......
......@@ -520,7 +520,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
else if ( nTmp != document::PrinterIndependentLayout::HIGH_RESOLUTION )
throw IllegalArgumentException();
mpDoc->setReferenceDeviceType( bUseVirDev, bHiResVirDev );
mpDoc->getIDocumentDeviceAccess()->setReferenceDeviceType( bUseVirDev, bHiResVirDev );
}
break;
case HANDLE_IS_LABEL_DOC :
......
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