Kaydet (Commit) 359cbefc authored tarafından Michael Meeks's avatar Michael Meeks

more toolkit API adaptations.

Change-Id: I55e3153bf38af376fe367d575ceb19f5b4405e1c
üst ad194534
......@@ -86,7 +86,7 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen
SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
StatusBar* pStatusBar = static_cast<StatusBar*>(VCLUnoHelper::GetWindow(m_xParentWindow));
VclPtr< StatusBar > pStatusBar = static_cast<StatusBar*>(VCLUnoHelper::GetWindow(m_xParentWindow).get());
if ( pStatusBar )
{
const sal_uInt16 nCount = pStatusBar->GetItemCount();
......
......@@ -127,7 +127,7 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
VclPtr< ToolBox > pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()).get());
if ( pToolBox )
{
const sal_uInt16 nCount = pToolBox->GetItemCount();
......
......@@ -1201,8 +1201,9 @@ public:
if (aDev >>= xRenderDevice)
{
VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL;
mpPrinter = dynamic_cast<Printer*>(pOut);
VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice()
: VclPtr< OutputDevice >();
mpPrinter = dynamic_cast<Printer*>(pOut.get());
Size aPageSizePixel = mpPrinter ? mpPrinter->GetPaperSizePixel() : Size();
if( aPageSizePixel != maPrinterPageSizePixel )
{
......
......@@ -1023,8 +1023,8 @@ void SAL_CALL SmModel::render(
if (xRenderDevice.is())
{
VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL;
VclRef< OutputDevice> pOut = pDevice ? pDevice->GetOutputDevice()
: VclRef< OutputDevice >();
if (!pOut)
throw RuntimeException();
......
......@@ -172,7 +172,7 @@ public:
class SwPrintUIOptions : public vcl::PrinterOptionsHelper
{
OutputDevice* m_pLast;
VclPtr< OutputDevice > m_pLast;
const SwPrintData & m_rDefaultPrintData;
public:
......
......@@ -158,7 +158,6 @@ SwPrintUIOptions::SwPrintUIOptions(
bool bHasSelection,
bool bHasPostIts,
const SwPrintData &rDefaultPrintData ) :
m_pLast( NULL ),
m_rDefaultPrintData( rDefaultPrintData )
{
ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) );
......@@ -478,7 +477,7 @@ bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< bea
if (pDevice)
pOut = pDevice->GetOutputDevice();
}
bChanged = bChanged || (pOut != m_pLast);
bChanged = bChanged || (pOut.get() != m_pLast.get());
if( pOut )
m_pLast = pOut;
......
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