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