diff options
-rw-r--r-- | include/vcl/dialog.hxx | 4 | ||||
-rw-r--r-- | include/vcl/edit.hxx | 4 | ||||
-rw-r--r-- | include/vcl/layout.hxx | 4 | ||||
-rw-r--r-- | include/vcl/vclref.hxx | 20 | ||||
-rw-r--r-- | vcl/qa/cppunit/lifecycle.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/dbggui.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 72 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 50 | ||||
-rw-r--r-- | vcl/unx/generic/app/i18n_status.cxx | 2 |
10 files changed, 89 insertions, 79 deletions
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index e937c81824b2..8dad86385b34 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -89,8 +89,8 @@ public: virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT) SAL_OVERRIDE; virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE; - VclButtonBox* get_action_area() { return mpActionArea.get(); } - VclBox* get_content_area() { return mpContentArea.get(); } + VclButtonBox* get_action_area() { return mpActionArea; } + VclBox* get_content_area() { return mpContentArea; } virtual bool Close() SAL_OVERRIDE; diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index 5a28ecb58360..959a8555095e 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -188,7 +188,7 @@ public: virtual void SetModifyFlag(); virtual void ClearModifyFlag(); - virtual bool IsModified() const { return mpSubEdit.get() ? mpSubEdit->mbModified : mbModified; } + virtual bool IsModified() const { return mpSubEdit ? mpSubEdit->mbModified : mbModified; } virtual void EnableUpdateData( sal_uLong nTimeout = EDIT_UPDATEDATA_TIMEOUT ); virtual void DisableUpdateData() { delete mpUpdateDataTimer; mpUpdateDataTimer = NULL; } @@ -238,7 +238,7 @@ public: virtual void SetUpdateDataHdl( const Link& rLink ) { maUpdateDataHdl = rLink; } void SetSubEdit( VclReference<Edit> pEdit ); - Edit* GetSubEdit() const { return mpSubEdit.get(); } + Edit* GetSubEdit() const { return mpSubEdit; } boost::signals2::signal< void ( Edit* ) > autocompleteSignal; AutocompleteAction GetAutocompleteAction() const { return meAutocompleteAction; } diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index f67717218390..c0d8c505f581 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -572,8 +572,8 @@ public: virtual vcl::Window *get_child() SAL_OVERRIDE; virtual const vcl::Window *get_child() const SAL_OVERRIDE; virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE; - ScrollBar& getVertScrollBar() { return *m_pVScroll.get(); } - ScrollBar& getHorzScrollBar() { return *m_pHScroll.get(); } + ScrollBar& getVertScrollBar() { return *m_pVScroll; } + ScrollBar& getHorzScrollBar() { return *m_pHScroll; } Size getVisibleChildSize() const; //set to true to disable the built-in scrolling callbacks to allow the user //to override it diff --git a/include/vcl/vclref.hxx b/include/vcl/vclref.hxx index b8c15eaea804..0827af66bdd2 100644 --- a/include/vcl/vclref.hxx +++ b/include/vcl/vclref.hxx @@ -111,26 +111,36 @@ public: inline VclReference( const VclReference< derived_type > & rRef, typename ::vcl::detail::UpCast< reference_type, derived_type >::t = 0 ) - : m_rInnerRef( static_cast<reference_type*>(rRef.get()) ) + : m_rInnerRef( static_cast<reference_type*>(rRef) ) { } + /** Probably most common used: handle->someBodyOp(). + */ + inline reference_type * SAL_CALL operator->() const + { + return m_rInnerRef.get(); + } + /** Get the body. Can be used instead of operator->(). I.e. handle->someBodyOp() and handle.get()->someBodyOp() are the same. - */ + */ inline reference_type * SAL_CALL get() const { return m_rInnerRef.get(); } - /** Probably most common used: handle->someBodyOp(). - */ - inline reference_type * SAL_CALL operator->() const + inline SAL_CALL operator reference_type * () const { return m_rInnerRef.get(); } + inline SAL_CALL operator bool () const + { + return m_rInnerRef.get() != NULL; + } + inline void disposeAndClear() { // hold it alive for the lifetime of this method diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx index a2d75dfee2d2..c4eef2eb2109 100644 --- a/vcl/qa/cppunit/lifecycle.cxx +++ b/vcl/qa/cppunit/lifecycle.cxx @@ -90,7 +90,7 @@ void LifecycleTest::testParentedWidgets() VclReference<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL, WB_APP|WB_STDWORK)); CPPUNIT_ASSERT(xWin.get() != NULL); - testWidgets(xWin.get()); + testWidgets(xWin); } CPPUNIT_TEST_SUITE_REGISTRATION(LifecycleTest); diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 65c0dc822682..0cca9cbbd62c 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -314,7 +314,7 @@ DbgDialog::DbgDialog() : IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton ) { - if ( pButton == maOKButton.get() ) + if ( pButton == maOKButton ) { DbgData aData; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index d7e2341f922c..3866d99a219e 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -578,7 +578,7 @@ void ComboBox::Resize() void ComboBox::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); - AppendLayoutData( *mpSubEdit.get() ); + AppendLayoutData( *mpSubEdit ); mpSubEdit->SetLayoutDataParent( this ); ImplListBoxWindowPtr rMainWindow = mpImplLB->GetMainWindow(); if( mpFloatWin ) @@ -692,7 +692,7 @@ bool ComboBox::PreNotify( NotifyEvent& rNEvt ) bool ComboBox::Notify( NotifyEvent& rNEvt ) { bool nDone = false; - if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && ( rNEvt.GetWindow() == mpSubEdit.get() ) + if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && ( rNEvt.GetWindow() == mpSubEdit ) && !IsReadOnly() ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); @@ -730,7 +730,7 @@ bool ComboBox::Notify( NotifyEvent& rNEvt ) case KEY_RETURN: { - if( ( rNEvt.GetWindow() == mpSubEdit.get() ) && IsInDropDown() ) + if( ( rNEvt.GetWindow() == mpSubEdit ) && IsInDropDown() ) { mpImplLB->ProcessKeyInput( aKeyEvt ); nDone = true; @@ -748,7 +748,7 @@ bool ComboBox::Notify( NotifyEvent& rNEvt ) } else if( (rNEvt.GetType() == MouseNotifyEvent::COMMAND) && (rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) && - (rNEvt.GetWindow() == mpSubEdit.get()) ) + (rNEvt.GetWindow() == mpSubEdit) ) { sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() ); if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS ) diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 5ceb7515c6b0..d748ee1d37bd 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1328,7 +1328,7 @@ void Edit::ImplPaste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC void Edit::MouseButtonDown( const MouseEvent& rMEvt ) { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) { Control::MouseButtonDown( rMEvt ); return; @@ -1750,7 +1750,7 @@ void Edit::KeyInput( const KeyEvent& rKEvt ) if ( mpUpdateDataTimer && !mbIsSubEdit && mpUpdateDataTimer->IsActive() ) mpUpdateDataTimer->Start();//do not update while the user is still travelling in the control - if ( mpSubEdit.get() || !ImplHandleKeyEvent( rKEvt ) ) + if ( mpSubEdit || !ImplHandleKeyEvent( rKEvt ) ) Control::KeyInput( rKEvt ); } @@ -1762,13 +1762,13 @@ void Edit::FillLayoutData() const void Edit::Paint( const Rectangle& ) { - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) ImplRepaint(); } void Edit::Resize() { - if ( !mpSubEdit.get() && IsReallyVisible() ) + if ( !mpSubEdit && IsReallyVisible() ) { Control::Resize(); // Wegen vertikaler Zentrierung... @@ -1881,7 +1881,7 @@ void Edit::ImplInvalidateOutermostBorder( vcl::Window* pWin ) void Edit::GetFocus() { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->ImplGrabFocus( GetGetFocusFlags() ); else if ( !mbActivePopup ) { @@ -1934,7 +1934,7 @@ void Edit::GetFocus() vcl::Window* Edit::GetPreferredKeyInputWindow() { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) return mpSubEdit->GetPreferredKeyInputWindow(); else return this; @@ -1949,7 +1949,7 @@ void Edit::LoseFocus() mpUpdateDataTimer->Timeout(); } - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) { // FIXME: this is currently only on OS X // check for other platforms that need similar handling @@ -2208,11 +2208,11 @@ void Edit::StateChanged( StateChangedType nType ) { if ( nType == StateChangedType::INITSHOW ) { - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) { mnXOffset = 0; // if GrabFocus before while size was still wrong ImplAlign(); - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) ImplShowCursor( false ); } // update background (eventual SetPaintTransparent) @@ -2220,7 +2220,7 @@ void Edit::StateChanged( StateChangedType nType ) } else if ( nType == StateChangedType::ENABLE ) { - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) { // change text color only ImplInvalidateOrRepaint(); @@ -2267,7 +2267,7 @@ void Edit::StateChanged( StateChangedType nType ) } else if ( nType == StateChangedType::ZOOM ) { - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) { ImplInitSettings( true, false, false ); ImplShowCursor( true ); @@ -2276,7 +2276,7 @@ void Edit::StateChanged( StateChangedType nType ) } else if ( nType == StateChangedType::CONTROLFONT ) { - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) { ImplInitSettings( true, false, false ); ImplShowCursor(); @@ -2285,7 +2285,7 @@ void Edit::StateChanged( StateChangedType nType ) } else if ( nType == StateChangedType::CONTROLFOREGROUND ) { - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) { ImplInitSettings( false, true, false ); Invalidate(); @@ -2293,7 +2293,7 @@ void Edit::StateChanged( StateChangedType nType ) } else if ( nType == StateChangedType::CONTROLBACKGROUND ) { - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) { ImplInitSettings( false, false, true ); Invalidate(); @@ -2310,7 +2310,7 @@ void Edit::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - if ( !mpSubEdit.get() ) + if ( !mpSubEdit ) { ImplInitSettings( true, true, true ); ImplShowCursor( true ); @@ -2443,7 +2443,7 @@ void Edit::EnableUpdateData( sal_uLong nTimeout ) void Edit::SetEchoChar( sal_Unicode c ) { mcEchoChar = c; - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->SetEchoChar( c ); } @@ -2452,7 +2452,7 @@ void Edit::SetReadOnly( bool bReadOnly ) if ( mbReadOnly != bool(bReadOnly) ) { mbReadOnly = bReadOnly; - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->SetReadOnly( bReadOnly ); StateChanged( StateChangedType::READONLY ); @@ -2464,7 +2464,7 @@ void Edit::SetInsertMode( bool bInsert ) if ( bInsert != mbInsertMode ) { mbInsertMode = bInsert; - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->SetInsertMode( bInsert ); else ImplShowCursor(); @@ -2473,7 +2473,7 @@ void Edit::SetInsertMode( bool bInsert ) bool Edit::IsInsertMode() const { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) return mpSubEdit->IsInsertMode(); else return mbInsertMode; @@ -2483,7 +2483,7 @@ void Edit::SetMaxTextLen(sal_Int32 nMaxLen) { mnMaxTextLen = nMaxLen > 0 ? nMaxLen : EDIT_NOLIMIT; - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->SetMaxTextLen( mnMaxTextLen ); else { @@ -2498,7 +2498,7 @@ void Edit::SetSelection( const Selection& rSelection ) // directly afterwards which would change the selection again if ( IsTracking() ) EndTracking(); - else if ( mpSubEdit.get() && mpSubEdit->IsTracking() ) + else if ( mpSubEdit && mpSubEdit->IsTracking() ) mpSubEdit->EndTracking(); ImplSetSelection( rSelection ); @@ -2506,7 +2506,7 @@ void Edit::SetSelection( const Selection& rSelection ) void Edit::ImplSetSelection( const Selection& rSelection, bool bPaint ) { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->ImplSetSelection( rSelection ); else { @@ -2568,7 +2568,7 @@ void Edit::ImplSetSelection( const Selection& rSelection, bool bPaint ) const Selection& Edit::GetSelection() const { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) return mpSubEdit->GetSelection(); else return maSelection; @@ -2576,7 +2576,7 @@ const Selection& Edit::GetSelection() const void Edit::ReplaceSelected( const OUString& rStr ) { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->ReplaceSelected( rStr ); else ImplInsertText( rStr ); @@ -2584,7 +2584,7 @@ void Edit::ReplaceSelected( const OUString& rStr ) void Edit::DeleteSelected() { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->DeleteSelected(); else { @@ -2595,7 +2595,7 @@ void Edit::DeleteSelected() OUString Edit::GetSelected() const { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) return mpSubEdit->GetSelected(); else { @@ -2631,7 +2631,7 @@ void Edit::Paste() void Edit::Undo() { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->Undo(); else { @@ -2656,7 +2656,7 @@ void Edit::SetText( const OUString& rStr ) void Edit::SetText( const OUString& rStr, const Selection& rSelection ) { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->SetText( rStr, rSelection ); else ImplSetText( rStr, &rSelection ); @@ -2664,7 +2664,7 @@ void Edit::SetText( const OUString& rStr, const Selection& rSelection ) OUString Edit::GetText() const { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) return mpSubEdit->GetText(); else return maText.toString(); @@ -2672,7 +2672,7 @@ OUString Edit::GetText() const void Edit::SetPlaceholderText( const OUString& rStr ) { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->SetPlaceholderText( rStr ); else if ( maPlaceholderText != rStr ) { @@ -2684,7 +2684,7 @@ void Edit::SetPlaceholderText( const OUString& rStr ) OUString Edit::GetPlaceholderText() const { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) return mpSubEdit->GetPlaceholderText(); return maPlaceholderText; @@ -2692,7 +2692,7 @@ OUString Edit::GetPlaceholderText() const void Edit::SetModifyFlag() { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->mbModified = true; else mbModified = true; @@ -2700,7 +2700,7 @@ void Edit::SetModifyFlag() void Edit::ClearModifyFlag() { - if ( mpSubEdit.get() ) + if ( mpSubEdit ) mpSubEdit->mbModified = false; else mbModified = false; @@ -2710,7 +2710,7 @@ void Edit::SetSubEdit( VclReference<Edit> pEdit ) { mpSubEdit.disposeAndClear(); mpSubEdit = pEdit; - if ( mpSubEdit.get() ) + if ( mpSubEdit ) { SetPointer( POINTER_ARROW ); // Nur das SubEdit hat den BEAM... mpSubEdit->mbIsSubEdit = true; @@ -2806,7 +2806,7 @@ Size Edit::CalcSize(sal_Int32 nChars) const sal_Int32 Edit::GetMaxVisChars() const { - const vcl::Window* pW = mpSubEdit.get() ? mpSubEdit.get() : this; + const vcl::Window* pW = mpSubEdit ? mpSubEdit : this; sal_Int32 nOutWidth = pW->GetOutputSizePixel().Width(); sal_Int32 nCharWidth = GetTextWidth( OUString('x') ); return nCharWidth ? nOutWidth/nCharWidth : 0; @@ -3038,7 +3038,7 @@ void Edit::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEv OUString Edit::GetSurroundingText() const { - if (mpSubEdit.get()) + if (mpSubEdit) return mpSubEdit->GetSurroundingText(); return maText.toString(); } diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index c323ca39b4a2..79f8f67cc06e 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1471,7 +1471,7 @@ const vcl::Window *VclExpander::get_child() const { const WindowImpl* pWindowImpl = ImplGetWindowImpl(); - assert(pWindowImpl->mpFirstChild == m_pDisclosureButton.get()); + assert(pWindowImpl->mpFirstChild == m_pDisclosureButton); return pWindowImpl->mpFirstChild->GetWindow(WINDOW_NEXT); } @@ -1493,7 +1493,7 @@ Size VclExpander::calculateRequisition() const if (pChild && pChild->IsVisible() && m_pDisclosureButton->IsChecked()) aRet = getLayoutRequisition(*pChild); - Size aExpanderSize = getLayoutRequisition(*m_pDisclosureButton.get()); + Size aExpanderSize = getLayoutRequisition(*m_pDisclosureButton); if (pLabel && pLabel->IsVisible()) { @@ -1527,7 +1527,7 @@ void VclExpander::setAllocation(const Size &rAllocation) vcl::Window *pChild = get_child(); vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL; - Size aButtonSize = getLayoutRequisition(*m_pDisclosureButton.get()); + Size aButtonSize = getLayoutRequisition(*m_pDisclosureButton); Size aLabelSize; Size aExpanderSize = aButtonSize; if (pLabel && pLabel->IsVisible()) @@ -1545,7 +1545,7 @@ void VclExpander::setAllocation(const Size &rAllocation) long nExtraExpanderHeight = aExpanderSize.Height() - aButtonSize.Height(); Point aButtonPos(aChildPos.X(), aChildPos.Y() + nExtraExpanderHeight/2); - setLayoutAllocation(*m_pDisclosureButton.get(), aButtonPos, aButtonSize); + setLayoutAllocation(*m_pDisclosureButton, aButtonPos, aButtonSize); if (pLabel && pLabel->IsVisible()) { @@ -1672,10 +1672,10 @@ Size VclScrolledWindow::calculateRequisition() const aRet = getLayoutRequisition(*pChild); if (GetStyle() & WB_VSCROLL) - aRet.Width() += getLayoutRequisition(*m_pVScroll.get()).Width(); + aRet.Width() += getLayoutRequisition(*m_pVScroll).Width(); if (GetStyle() & WB_HSCROLL) - aRet.Height() += getLayoutRequisition(*m_pHScroll.get()).Height(); + aRet.Height() += getLayoutRequisition(*m_pHScroll).Height(); return aRet; } @@ -1721,7 +1721,7 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation) } if (m_pVScroll->IsVisible()) - nAvailWidth -= getLayoutRequisition(*m_pVScroll.get()).Width(); + nAvailWidth -= getLayoutRequisition(*m_pVScroll).Width(); // horz. ScrollBar if (GetStyle() & WB_AUTOHSCROLL) @@ -1730,7 +1730,7 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation) m_pHScroll->Show(bShowHScroll); if (bShowHScroll) - nAvailHeight -= getLayoutRequisition(*m_pHScroll.get()).Height(); + nAvailHeight -= getLayoutRequisition(*m_pHScroll).Height(); if (GetStyle() & WB_AUTOVSCROLL) m_pVScroll->Show(nAvailHeight < aChildReq.Height()); @@ -1741,10 +1741,10 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation) if (m_pVScroll->IsVisible()) { - nScrollBarWidth = getLayoutRequisition(*m_pVScroll.get()).Width(); + nScrollBarWidth = getLayoutRequisition(*m_pVScroll).Width(); Point aScrollPos(rAllocation.Width() - nScrollBarWidth, 0); Size aScrollSize(nScrollBarWidth, rAllocation.Height()); - setLayoutAllocation(*m_pVScroll.get(), aScrollPos, aScrollSize); + setLayoutAllocation(*m_pVScroll, aScrollPos, aScrollSize); aChildAllocation.Width() -= nScrollBarWidth; aInnerSize.Width() -= nScrollBarWidth; aChildAllocation.Height() = aChildReq.Height(); @@ -1752,10 +1752,10 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation) if (m_pHScroll->IsVisible()) { - nScrollBarHeight = getLayoutRequisition(*m_pHScroll.get()).Height(); + nScrollBarHeight = getLayoutRequisition(*m_pHScroll).Height(); Point aScrollPos(0, rAllocation.Height() - nScrollBarHeight); Size aScrollSize(rAllocation.Width(), nScrollBarHeight); - setLayoutAllocation(*m_pHScroll.get(), aScrollPos, aScrollSize); + setLayoutAllocation(*m_pHScroll, aScrollPos, aScrollSize); aChildAllocation.Height() -= nScrollBarHeight; aInnerSize.Height() -= nScrollBarHeight; aChildAllocation.Width() = aChildReq.Width(); @@ -1811,7 +1811,7 @@ bool VclScrolledWindow::Notify(NotifyEvent& rNEvt) const CommandWheelData* pData = rCEvt.GetWheelData(); if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) ) { - nDone = HandleScrollCommand(rCEvt, m_pHScroll.get(), m_pVScroll.get()); + nDone = HandleScrollCommand(rCEvt, m_pHScroll, m_pVScroll); } } } @@ -1942,7 +1942,7 @@ void MessageDialog::create_owned_areas() m_pOwnedContentArea = new VclVBox(this, false, 24); set_content_area(m_pOwnedContentArea); m_pOwnedContentArea->Show(); - m_pOwnedActionArea = new VclHButtonBox(m_pOwnedContentArea.get()); + m_pOwnedActionArea = new VclHButtonBox(m_pOwnedContentArea); set_action_area(m_pOwnedActionArea); m_pOwnedActionArea->Show(); } @@ -2100,7 +2100,7 @@ short MessageDialog::Execute() { setDeferredProperties(); - if (!m_pGrid.get()) + if (!m_pGrid) { VclContainer *pContainer = get_content_area(); assert(pContainer); @@ -2110,7 +2110,7 @@ short MessageDialog::Execute() m_pGrid->set_column_spacing(12); m_pGrid->set_row_spacing(GetTextHeight()); - m_pImage = new FixedImage(m_pGrid.get(), WB_CENTER | WB_VCENTER | WB_3DLOOK); + m_pImage = new FixedImage(m_pGrid, WB_CENTER | WB_VCENTER | WB_3DLOOK); switch (m_eMessageType) { case VCL_MESSAGE_INFO: @@ -2135,7 +2135,7 @@ short MessageDialog::Execute() bool bHasSecondaryText = !m_sSecondaryString.isEmpty(); - m_pPrimaryMessage = new VclMultiLineEdit(m_pGrid.get(), nWinStyle); + m_pPrimaryMessage = new VclMultiLineEdit(m_pGrid, nWinStyle); m_pPrimaryMessage->SetPaintTransparent(true); m_pPrimaryMessage->EnableCursor(false); @@ -2145,7 +2145,7 @@ short MessageDialog::Execute() m_pPrimaryMessage->SetText(m_sPrimaryString); m_pPrimaryMessage->Show(!m_sPrimaryString.isEmpty()); - m_pSecondaryMessage = new VclMultiLineEdit(m_pGrid.get(), nWinStyle); + m_pSecondaryMessage = new VclMultiLineEdit(m_pGrid, nWinStyle); m_pSecondaryMessage->SetPaintTransparent(true); m_pSecondaryMessage->EnableCursor(false); m_pSecondaryMessage->set_grid_left_attach(1); @@ -2169,45 +2169,45 @@ short MessageDialog::Execute() pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); - m_aResponses[pBtn.get()] = RET_OK; + m_aResponses[pBtn] = RET_OK; break; case VCL_BUTTONS_CLOSE: pBtn = new CloseButton(pButtonBox); pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); - m_aResponses[pBtn.get()] = RET_CLOSE; + m_aResponses[pBtn] = RET_CLOSE; break; case VCL_BUTTONS_CANCEL: pBtn = new CancelButton(pButtonBox); pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); m_aOwnedButtons.push_back(pBtn); - m_aResponses[pBtn.get()] = RET_CANCEL; + m_aResponses[pBtn] = RET_CANCEL; break; case VCL_BUTTONS_YES_NO: pBtn = new PushButton(pButtonBox); pBtn->SetText(Button::GetStandardText(StandardButtonType::Yes) pBtn->Show(); m_aOwnedButtons.push_back(pBtn); - m_aResponses[pBtn.get()] = RET_YES; + m_aResponses[pBtn] = RET_YES; pBtn = new PushButton(pButtonBox); pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->SetText(Button::GetStandardText(StandardButtonType::No)); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); - m_aResponses[pBtn.get()] = RET_NO; + m_aResponses[pBtn] = RET_NO; break; case VCL_BUTTONS_OK_CANCEL: pBtn = new OKButton(pButtonBox); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); - m_aResponses[pBtn.get()] = RET_OK; + m_aResponses[pBtn] = RET_OK; pBtn = new CancelButton(pButtonBox); pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); - m_aResponses[pBtn.get()] = RET_CANCEL; + m_aResponses[pBtn] = RET_CANCEL; break; } setButtonHandlers(pButtonBox); diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index 85e9e50af667..684a4ee8fa1d 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -468,7 +468,7 @@ void IIIMPStatusWindow::GetFocus() IMPL_LINK( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn ) { - if( pBtn == m_aStatusBtn.get() ) + if( pBtn == m_aStatusBtn ) { const ::std::vector< I18NStatus::ChoiceData >& rChoices( I18NStatus::get().getChoices() ); unsigned int nIndex = m_aStatusBtn->GetCurItemId()-1; |