diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-15 20:41:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-16 12:54:44 +0000 |
commit | a1ceacc17e3f30d5e9c06b3218ad8ec26ca2f1b9 (patch) | |
tree | 56a29f66f75f326a0a677ab1697ce28f1bc9fcbf | |
parent | 18f41dfaf19d656d290c47d196ef2702e169a522 (diff) |
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
162 files changed, 2446 insertions, 2597 deletions
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx index 74a96adba625..faef86e00e6b 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx @@ -22,11 +22,9 @@ #define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOX_HXX #include <accessibility/extended/AccessibleBrowseBoxBase.hxx> -#include <boost/scoped_ptr.hpp> #include <cppuhelper/weakref.hxx> #include <svtools/accessibletableprovider.hxx> - - +#include <memory> namespace accessibility { @@ -185,7 +183,7 @@ protected: private: // members ---------------------------------------------------------------- - boost::scoped_ptr< AccessibleBrowseBoxImpl > m_pImpl; + std::unique_ptr< AccessibleBrowseBoxImpl > m_xImpl; }; diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx index 8d174d62190e..db50af9ee0a5 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx @@ -22,11 +22,9 @@ #include <accessibility/extended/AccessibleGridControlBase.hxx> #include <accessibility/extended/AccessibleGridControlTable.hxx> -#include <boost/scoped_ptr.hpp> #include <cppuhelper/weakref.hxx> #include <svtools/accessibletable.hxx> - - +#include <memory> namespace accessibility { @@ -173,7 +171,7 @@ protected: private: // members ---------------------------------------------------------------- - boost::scoped_ptr< AccessibleGridControl_Impl > m_pImpl; + std::unique_ptr< AccessibleGridControl_Impl > m_xImpl; }; diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx index b627e9e8ad74..8c7df5fd6464 100644 --- a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx @@ -23,7 +23,7 @@ #include <cppuhelper/implbase1.hxx> #include <toolkit/awt/vclxaccessiblecomponent.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svt { @@ -71,7 +71,7 @@ namespace accessibility virtual void FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& i_rStateSet ) SAL_OVERRIDE; private: - ::boost::scoped_ptr< AccessibleToolPanelDeck_Impl > m_pImpl; + std::unique_ptr< AccessibleToolPanelDeck_Impl > m_xImpl; }; diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx index 5ea31e7cd741..a1e74e01fcf6 100644 --- a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx @@ -23,7 +23,7 @@ #include <cppuhelper/implbase1.hxx> #include <toolkit/awt/vclxaccessiblecomponent.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svt { @@ -72,7 +72,7 @@ namespace accessibility virtual void FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& i_rStateSet ) SAL_OVERRIDE; private: - ::boost::scoped_ptr< AccessibleToolPanelTabBar_Impl > m_pImpl; + std::unique_ptr< AccessibleToolPanelTabBar_Impl > m_xImpl; }; diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx index 01749067ec0a..9124c701f380 100644 --- a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx @@ -23,7 +23,7 @@ #include <comphelper/accessiblecomponenthelper.hxx> #include <cppuhelper/implbase1.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svt { @@ -87,7 +87,7 @@ namespace accessibility virtual void SAL_CALL disposing() SAL_OVERRIDE; protected: - ::boost::scoped_ptr< AccessibleToolPanelDeckTabBarItem_Impl > m_pImpl; + std::unique_ptr< AccessibleToolPanelDeckTabBarItem_Impl > m_xImpl; }; diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx index 05c87f08f1df..a24e8c94af77 100644 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx @@ -53,7 +53,7 @@ #include <vcl/svapp.hxx> #include <unotools/accessiblerelationsethelper.hxx> #include <queue> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <unordered_map> class TextEngine; @@ -655,7 +655,7 @@ private: // All the following members have valid values only after calling init: - boost::scoped_ptr< Paragraphs > m_xParagraphs; + std::unique_ptr< Paragraphs > m_xParagraphs; // m_nViewOffset is from the start of the document (0) to the start of the // current view, and m_nViewHeight is the height of the view: diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index fbb8a02c57ed..03a5d342d2c5 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -67,8 +67,8 @@ AccessibleBrowseBox::AccessibleBrowseBox( IAccessibleTableProvider& _rBrowseBox ) : AccessibleBrowseBoxBase( _rxParent, _rBrowseBox,NULL, BBTYPE_BROWSEBOX ) { - m_pImpl.reset( new AccessibleBrowseBoxImpl() ); - m_pImpl->m_aCreator = _rxCreator; + m_xImpl.reset( new AccessibleBrowseBoxImpl() ); + m_xImpl->m_aCreator = _rxCreator; m_xFocusWindow = VCLUnoHelper::GetInterface(mpBrowseBox->GetWindowInstance()); } @@ -76,10 +76,10 @@ AccessibleBrowseBox::AccessibleBrowseBox( void AccessibleBrowseBox::setCreator( const Reference< XAccessible >& _rxCreator ) { #if OSL_DEBUG_LEVEL > 0 - Reference< XAccessible > xCreator(m_pImpl->m_aCreator); + Reference< XAccessible > xCreator(m_xImpl->m_aCreator); OSL_ENSURE( !xCreator.is(), "accessibility/extended/AccessibleBrowseBox::setCreator: creator already set!" ); #endif - m_pImpl->m_aCreator = _rxCreator; + m_xImpl->m_aCreator = _rxCreator; } @@ -92,22 +92,22 @@ void SAL_CALL AccessibleBrowseBox::disposing() { ::osl::MutexGuard aGuard( getOslMutex() ); - m_pImpl->m_pTable = NULL; - m_pImpl->m_pColumnHeaderBar = NULL; - m_pImpl->m_pRowHeaderBar = NULL; - m_pImpl->m_aCreator.clear(); + m_xImpl->m_pTable = NULL; + m_xImpl->m_pColumnHeaderBar = NULL; + m_xImpl->m_pRowHeaderBar = NULL; + m_xImpl->m_aCreator.clear(); - Reference< XAccessible > xTable = m_pImpl->mxTable; + Reference< XAccessible > xTable = m_xImpl->mxTable; - Reference< XComponent > xComp( m_pImpl->mxTable, UNO_QUERY ); + Reference< XComponent > xComp( m_xImpl->mxTable, UNO_QUERY ); if ( xComp.is() ) { xComp->dispose(); } -//! ::comphelper::disposeComponent(m_pImpl->mxTable); - ::comphelper::disposeComponent(m_pImpl->mxRowHeaderBar); - ::comphelper::disposeComponent(m_pImpl->mxColumnHeaderBar); +//! ::comphelper::disposeComponent(m_xImpl->mxTable); + ::comphelper::disposeComponent(m_xImpl->mxRowHeaderBar); + ::comphelper::disposeComponent(m_xImpl->mxColumnHeaderBar); AccessibleBrowseBoxBase::disposing(); } @@ -224,13 +224,13 @@ Rectangle AccessibleBrowseBox::implGetBoundingBoxOnScreen() Reference< XAccessible > AccessibleBrowseBox::implGetTable() { - if( !m_pImpl->mxTable.is() ) + if( !m_xImpl->mxTable.is() ) { - m_pImpl->m_pTable = createAccessibleTable(); - m_pImpl->mxTable = m_pImpl->m_pTable; + m_xImpl->m_pTable = createAccessibleTable(); + m_xImpl->mxTable = m_xImpl->m_pTable; } - return m_pImpl->mxTable; + return m_xImpl->mxTable; } @@ -241,21 +241,21 @@ AccessibleBrowseBox::implGetHeaderBar( AccessibleBrowseBoxObjType eObjType ) Reference< XAccessible >* pxMember = NULL; if( eObjType == BBTYPE_ROWHEADERBAR ) - pxMember = &m_pImpl->mxRowHeaderBar; + pxMember = &m_xImpl->mxRowHeaderBar; else if( eObjType == BBTYPE_COLUMNHEADERBAR ) - pxMember = &m_pImpl->mxColumnHeaderBar; + pxMember = &m_xImpl->mxColumnHeaderBar; if( pxMember ) { if( !pxMember->is() ) { AccessibleBrowseBoxHeaderBar* pHeaderBar = new AccessibleBrowseBoxHeaderBar( - m_pImpl->m_aCreator, *mpBrowseBox, eObjType ); + m_xImpl->m_aCreator, *mpBrowseBox, eObjType ); if ( BBTYPE_COLUMNHEADERBAR == eObjType) - m_pImpl->m_pColumnHeaderBar = pHeaderBar; + m_xImpl->m_pColumnHeaderBar = pHeaderBar; else - m_pImpl->m_pRowHeaderBar = pHeaderBar; + m_xImpl->m_pRowHeaderBar = pHeaderBar; *pxMember = pHeaderBar; } @@ -286,16 +286,16 @@ AccessibleBrowseBox::implGetFixedChild( sal_Int32 nChildIndex ) AccessibleBrowseBoxTable* AccessibleBrowseBox::createAccessibleTable() { - Reference< XAccessible > xCreator(m_pImpl->m_aCreator); + Reference< XAccessible > xCreator(m_xImpl->m_aCreator); OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleBrowseBox::createAccessibleTable: my creator died - how this?" ); return new AccessibleBrowseBoxTable( xCreator, *mpBrowseBox ); } void AccessibleBrowseBox::commitTableEvent(sal_Int16 _nEventId,const Any& _rNewValue,const Any& _rOldValue) { - if ( m_pImpl->mxTable.is() ) + if ( m_xImpl->mxTable.is() ) { - m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + m_xImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); } } @@ -303,8 +303,8 @@ void AccessibleBrowseBox::commitHeaderBarEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue,bool _bColumnHeaderBar) { - Reference< XAccessible > xHeaderBar = _bColumnHeaderBar ? m_pImpl->mxColumnHeaderBar : m_pImpl->mxRowHeaderBar; - AccessibleBrowseBoxHeaderBar* pHeaderBar = _bColumnHeaderBar ? m_pImpl->m_pColumnHeaderBar : m_pImpl->m_pRowHeaderBar; + Reference< XAccessible > xHeaderBar = _bColumnHeaderBar ? m_xImpl->mxColumnHeaderBar : m_xImpl->mxRowHeaderBar; + AccessibleBrowseBoxHeaderBar* pHeaderBar = _bColumnHeaderBar ? m_xImpl->m_pColumnHeaderBar : m_xImpl->m_pRowHeaderBar; if ( xHeaderBar.is() ) pHeaderBar->commitEvent(_nEventId,_rNewValue,_rOldValue); } diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 1f927ad08b26..34ca1fba3c6f 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -75,8 +75,8 @@ AccessibleGridControl::AccessibleGridControl( IAccessibleTable& _rTable ) : AccessibleGridControlBase( _rxParent, _rTable, TCTYPE_GRIDCONTROL ) { - m_pImpl.reset( new AccessibleGridControl_Impl() ); - m_pImpl->m_aCreator = _rxCreator; + m_xImpl.reset( new AccessibleGridControl_Impl() ); + m_xImpl->m_aCreator = _rxCreator; } @@ -89,29 +89,29 @@ void SAL_CALL AccessibleGridControl::disposing() { SolarMutexGuard g; - m_pImpl->m_pTable = NULL; - m_pImpl->m_pColumnHeaderBar = NULL; - m_pImpl->m_pRowHeaderBar = NULL; - m_pImpl->m_pCell = NULL; - m_pImpl->m_aCreator.clear(); + m_xImpl->m_pTable = NULL; + m_xImpl->m_pColumnHeaderBar = NULL; + m_xImpl->m_pRowHeaderBar = NULL; + m_xImpl->m_pCell = NULL; + m_xImpl->m_aCreator.clear(); - Reference< XAccessible > xTable = m_pImpl->m_xTable; + Reference< XAccessible > xTable = m_xImpl->m_xTable; - Reference< XComponent > xComp( m_pImpl->m_xTable, UNO_QUERY ); + Reference< XComponent > xComp( m_xImpl->m_xTable, UNO_QUERY ); if ( xComp.is() ) { xComp->dispose(); } - Reference< XAccessible > xCell = m_pImpl->m_xCell; + Reference< XAccessible > xCell = m_xImpl->m_xCell; - Reference< XComponent > xCellComp( m_pImpl->m_xCell, UNO_QUERY ); + Reference< XComponent > xCellComp( m_xImpl->m_xCell, UNO_QUERY ); if ( xCellComp.is() ) { xCellComp->dispose(); } - ::comphelper::disposeComponent(m_pImpl->m_xRowHeaderBar); - ::comphelper::disposeComponent(m_pImpl->m_xColumnHeaderBar); + ::comphelper::disposeComponent(m_xImpl->m_xRowHeaderBar); + ::comphelper::disposeComponent(m_xImpl->m_xColumnHeaderBar); AccessibleGridControlBase::disposing(); } @@ -141,31 +141,31 @@ AccessibleGridControl::getAccessibleChild( sal_Int32 nChildIndex ) { if(nChildIndex == 0 && m_aTable.HasColHeader()) { - if(!m_pImpl->m_xColumnHeaderBar.is()) + if(!m_xImpl->m_xColumnHeaderBar.is()) { - AccessibleGridControlHeader* pColHeaderBar = new AccessibleGridControlHeader(m_pImpl->m_aCreator, m_aTable, svt::table::TCTYPE_COLUMNHEADERBAR); - m_pImpl->m_xColumnHeaderBar = pColHeaderBar; + AccessibleGridControlHeader* pColHeaderBar = new AccessibleGridControlHeader(m_xImpl->m_aCreator, m_aTable, svt::table::TCTYPE_COLUMNHEADERBAR); + m_xImpl->m_xColumnHeaderBar = pColHeaderBar; } - xChild = m_pImpl->m_xColumnHeaderBar; + xChild = m_xImpl->m_xColumnHeaderBar; } else if(m_aTable.HasRowHeader() && (nChildIndex == 1 || nChildIndex == 0)) { - if(!m_pImpl->m_xRowHeaderBar.is()) + if(!m_xImpl->m_xRowHeaderBar.is()) { - AccessibleGridControlHeader* pRowHeaderBar = new AccessibleGridControlHeader(m_pImpl->m_aCreator, m_aTable, svt::table::TCTYPE_ROWHEADERBAR); - m_pImpl->m_xRowHeaderBar = pRowHeaderBar; + AccessibleGridControlHeader* pRowHeaderBar = new AccessibleGridControlHeader(m_xImpl->m_aCreator, m_aTable, svt::table::TCTYPE_ROWHEADERBAR); + m_xImpl->m_xRowHeaderBar = pRowHeaderBar; } - xChild = m_pImpl->m_xRowHeaderBar; + xChild = m_xImpl->m_xRowHeaderBar; } else { - if(!m_pImpl->m_xTable.is()) + if(!m_xImpl->m_xTable.is()) { - AccessibleGridControlTable* pTable = new AccessibleGridControlTable(m_pImpl->m_aCreator, m_aTable, svt::table::TCTYPE_TABLE); - m_pImpl->m_xTable = pTable; - m_pImpl->m_pTable = pTable; + AccessibleGridControlTable* pTable = new AccessibleGridControlTable(m_xImpl->m_aCreator, m_aTable, svt::table::TCTYPE_TABLE); + m_xImpl->m_xTable = pTable; + m_xImpl->m_pTable = pTable; } - xChild = m_pImpl->m_xTable; + xChild = m_xImpl->m_xTable; } } return xChild; @@ -250,12 +250,12 @@ Rectangle AccessibleGridControl::implGetBoundingBoxOnScreen() Reference< XAccessible > AccessibleGridControl::implGetTable() { - if( !m_pImpl->m_xTable.is() ) + if( !m_xImpl->m_xTable.is() ) { - m_pImpl->m_pTable = createAccessibleTable(); - m_pImpl->m_xTable = m_pImpl->m_pTable; + m_xImpl->m_pTable = createAccessibleTable(); + m_xImpl->m_xTable = m_xImpl->m_pTable; } - return m_pImpl->m_xTable; + return m_xImpl->m_xTable; } @@ -266,21 +266,21 @@ AccessibleGridControl::implGetHeaderBar( AccessibleTableControlObjType eObjType Reference< XAccessible >* pxMember = NULL; if( eObjType == TCTYPE_ROWHEADERBAR ) - pxMember = &m_pImpl->m_xRowHeaderBar; + pxMember = &m_xImpl->m_xRowHeaderBar; else if( eObjType == TCTYPE_COLUMNHEADERBAR ) - pxMember = &m_pImpl->m_xColumnHeaderBar; + pxMember = &m_xImpl->m_xColumnHeaderBar; if( pxMember ) { if( !pxMember->is() ) { AccessibleGridControlHeader* pHeaderBar = new AccessibleGridControlHeader( - m_pImpl->m_aCreator, m_aTable, eObjType ); + m_xImpl->m_aCreator, m_aTable, eObjType ); if ( TCTYPE_COLUMNHEADERBAR == eObjType) - m_pImpl->m_pColumnHeaderBar = pHeaderBar; + m_xImpl->m_pColumnHeaderBar = pHeaderBar; else - m_pImpl->m_pRowHeaderBar = pHeaderBar; + m_xImpl->m_pRowHeaderBar = pHeaderBar; *pxMember = pHeaderBar; } @@ -310,7 +310,7 @@ AccessibleGridControl::implGetFixedChild( sal_Int32 nChildIndex ) AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable() { - Reference< XAccessible > xCreator(m_pImpl->m_aCreator); + Reference< XAccessible > xCreator(m_xImpl->m_aCreator); OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" ); return new AccessibleGridControlTable( xCreator, m_aTable, TCTYPE_TABLE ); } @@ -324,35 +324,35 @@ void AccessibleGridControl::commitCellEvent(sal_Int16 _nEventId,const Any& _rNew { Reference< XAccessible > xAccessible = getAccessibleChild(i); com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessibleContext > xAccessibleChild = xAccessible->getAccessibleContext(); - if(m_pImpl->m_xTable == xAccessible) + if(m_xImpl->m_xTable == xAccessible) { std::vector< AccessibleGridControlTableCell* >& rCells = - m_pImpl->m_pTable->getCellVector(); + m_xImpl->m_pTable->getCellVector(); size_t nIndex = m_aTable.GetCurrentRow() * m_aTable.GetColumnCount() + m_aTable.GetCurrentColumn(); if (nIndex < rCells.size() && rCells[nIndex]) { - m_pImpl->m_pCell = rCells[nIndex]; - m_pImpl->m_pCell->commitEvent( _nEventId, _rNewValue, _rOldValue ); + m_xImpl->m_pCell = rCells[nIndex]; + m_xImpl->m_pCell->commitEvent( _nEventId, _rNewValue, _rOldValue ); } } } } else { - if ( m_pImpl->m_xTable.is() ) - m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + if ( m_xImpl->m_xTable.is() ) + m_xImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); } } void AccessibleGridControl::commitTableEvent(sal_Int16 _nEventId,const Any& _rNewValue,const Any& _rOldValue) { - if ( m_pImpl->m_xTable.is() ) + if ( m_xImpl->m_xTable.is() ) { if(_nEventId == AccessibleEventId::ACTIVE_DESCENDANT_CHANGED) { - Reference< XAccessible > xChild = m_pImpl->m_pTable->getAccessibleChild(m_aTable.GetCurrentRow()*m_aTable.GetColumnCount()+m_aTable.GetCurrentColumn()); - m_pImpl->m_pTable->commitEvent(_nEventId, makeAny(xChild),_rOldValue); + Reference< XAccessible > xChild = m_xImpl->m_pTable->getAccessibleChild(m_aTable.GetCurrentRow()*m_aTable.GetColumnCount()+m_aTable.GetCurrentColumn()); + m_xImpl->m_pTable->commitEvent(_nEventId, makeAny(xChild),_rOldValue); } else if(_nEventId == AccessibleEventId::TABLE_MODEL_CHANGED) { @@ -362,33 +362,33 @@ void AccessibleGridControl::commitTableEvent(sal_Int16 _nEventId,const Any& _rNe if(aChange.Type == AccessibleTableModelChangeType::DELETE) { std::vector< AccessibleGridControlTableCell* >& rCells = - m_pImpl->m_pTable->getCellVector(); + m_xImpl->m_pTable->getCellVector(); std::vector< Reference< XAccessible > >& rAccCells = - m_pImpl->m_pTable->getAccessibleCellVector(); + m_xImpl->m_pTable->getAccessibleCellVector(); int nColCount = m_aTable.GetColumnCount(); // check valid index - entries are inserted lazily size_t const nStart = nColCount * aChange.FirstRow; size_t const nEnd = nColCount * aChange.LastRow; if (nStart < rCells.size()) { - m_pImpl->m_pTable->getCellVector().erase( + m_xImpl->m_pTable->getCellVector().erase( rCells.begin() + nStart, rCells.begin() + std::min(rCells.size(), nEnd)); } if (nStart < rAccCells.size()) { - m_pImpl->m_pTable->getAccessibleCellVector().erase( + m_xImpl->m_pTable->getAccessibleCellVector().erase( rAccCells.begin() + nStart, rAccCells.begin() + std::min(rAccCells.size(), nEnd)); } - m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + m_xImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); } else - m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + m_xImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); } } else - m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + m_xImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); } } diff --git a/accessibility/source/extended/AccessibleToolPanelDeck.cxx b/accessibility/source/extended/AccessibleToolPanelDeck.cxx index 78e093d21a88..dfb8ede26120 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeck.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeck.cxx @@ -229,7 +229,7 @@ namespace accessibility AccessibleToolPanelDeck::AccessibleToolPanelDeck( const Reference< XAccessible >& i_rAccessibleParent, ::svt::ToolPanelDeck& i_rPanelDeck ) :AccessibleToolPanelDeck_Base( i_rPanelDeck.GetWindowPeer() ) - ,m_pImpl( new AccessibleToolPanelDeck_Impl( *this, i_rAccessibleParent, i_rPanelDeck ) ) + ,m_xImpl( new AccessibleToolPanelDeck_Impl( *this, i_rAccessibleParent, i_rPanelDeck ) ) { } @@ -239,11 +239,11 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleToolPanelDeck::getAccessibleChildCount( ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); - sal_Int32 nChildCount( m_pImpl->m_pPanelDeck->GetLayouter()->GetAccessibleChildCount() ); + sal_Int32 nChildCount( m_xImpl->m_pPanelDeck->GetLayouter()->GetAccessibleChildCount() ); - ::boost::optional< size_t > aActivePanel( m_pImpl->m_pPanelDeck->GetActivePanel() ); + ::boost::optional< size_t > aActivePanel( m_xImpl->m_pPanelDeck->GetActivePanel() ); if ( !!aActivePanel ) return ++nChildCount; @@ -252,62 +252,62 @@ namespace accessibility Reference< XAccessible > SAL_CALL AccessibleToolPanelDeck::getAccessibleChild( sal_Int32 i_nIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); const sal_Int32 nChildCount( getAccessibleChildCount() ); if ( ( i_nIndex < 0 ) || ( i_nIndex >= nChildCount ) ) throw IndexOutOfBoundsException( OUString(), *this ); // first "n" children are provided by the layouter - const size_t nLayouterCount( m_pImpl->m_pPanelDeck->GetLayouter()->GetAccessibleChildCount() ); + const size_t nLayouterCount( m_xImpl->m_pPanelDeck->GetLayouter()->GetAccessibleChildCount() ); if ( size_t( i_nIndex ) < nLayouterCount ) - return m_pImpl->m_pPanelDeck->GetLayouter()->GetAccessibleChild( + return m_xImpl->m_pPanelDeck->GetLayouter()->GetAccessibleChild( size_t( i_nIndex ), - m_pImpl->getOwnAccessible() + m_xImpl->getOwnAccessible() ); // the last child is the XAccessible of the active panel - return m_pImpl->getActivePanelAccessible(); + return m_xImpl->getActivePanelAccessible(); } Reference< XAccessible > SAL_CALL AccessibleToolPanelDeck::getAccessibleParent( ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); const Reference< XAccessible > xParent = implGetForeignControlledParent(); if ( xParent.is() ) return xParent; - return m_pImpl->m_xAccessibleParent; + return m_xImpl->m_xAccessibleParent; } sal_Int16 SAL_CALL AccessibleToolPanelDeck::getAccessibleRole( ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); return AccessibleRole::PANEL; } Reference< XAccessible > SAL_CALL AccessibleToolPanelDeck::getAccessibleAtPoint( const UnoPoint& i_rPoint ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); const ::Point aRequestedPoint( VCLUnoHelper::ConvertToVCLPoint( i_rPoint ) ); // check the panel window itself - const vcl::Window& rActivePanelAnchor( m_pImpl->m_pPanelDeck->GetPanelWindowAnchor() ); + const vcl::Window& rActivePanelAnchor( m_xImpl->m_pPanelDeck->GetPanelWindowAnchor() ); const Rectangle aPanelAnchorArea( rActivePanelAnchor.GetPosPixel(), rActivePanelAnchor.GetOutputSizePixel() ); if ( aPanelAnchorArea.IsInside( aRequestedPoint ) ) // note that this assumes that the Window which actually implements the concrete panel covers // the complete area of its "anchor" Window. But this is ensured by the ToolPanelDeck implementation. - return m_pImpl->getActivePanelAccessible(); + return m_xImpl->getActivePanelAccessible(); // check the XAccessible instances provided by the layouter try { - const ::svt::PDeckLayouter pLayouter( m_pImpl->m_pPanelDeck->GetLayouter() ); + const ::svt::PDeckLayouter pLayouter( m_xImpl->m_pPanelDeck->GetLayouter() ); ENSURE_OR_THROW( pLayouter.get() != NULL, "invalid layouter" ); const size_t nLayouterChildren = pLayouter->GetAccessibleChildCount(); for ( size_t i=0; i<nLayouterChildren; ++i ) { - const Reference< XAccessible > xLayoutItemAccessible( pLayouter->GetAccessibleChild( i, m_pImpl->getOwnAccessible() ), UNO_SET_THROW ); + const Reference< XAccessible > xLayoutItemAccessible( pLayouter->GetAccessibleChild( i, m_xImpl->getOwnAccessible() ), UNO_SET_THROW ); const Reference< XAccessibleComponent > xLayoutItemComponent( xLayoutItemAccessible->getAccessibleContext(), UNO_QUERY_THROW ); const ::Rectangle aLayoutItemBounds( VCLUnoHelper::ConvertToVCLRect( xLayoutItemComponent->getBounds() ) ); if ( aLayoutItemBounds.IsInside( aRequestedPoint ) ) @@ -324,14 +324,14 @@ namespace accessibility void SAL_CALL AccessibleToolPanelDeck::grabFocus( ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); - m_pImpl->m_pPanelDeck->GrabFocus(); + MethodGuard aGuard( *m_xImpl ); + m_xImpl->m_pPanelDeck->GrabFocus(); } void SAL_CALL AccessibleToolPanelDeck::disposing() { AccessibleToolPanelDeck_Base::disposing(); - m_pImpl->dispose(); + m_xImpl->dispose(); } Reference< XAccessible > AccessibleToolPanelDeck::GetChildAccessible( const VclWindowEvent& i_rVclWindowEvent ) @@ -345,7 +345,7 @@ namespace accessibility void AccessibleToolPanelDeck::FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& i_rStateSet ) { AccessibleToolPanelDeck_Base::FillAccessibleStateSet( i_rStateSet ); - if ( m_pImpl->isDisposed() ) + if ( m_xImpl->isDisposed() ) { i_rStateSet.AddState( AccessibleStateType::DEFUNC ); } diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx index 855419267baa..757c45257c6e 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx @@ -276,7 +276,7 @@ namespace accessibility AccessibleToolPanelTabBar::AccessibleToolPanelTabBar( const Reference< XAccessible >& i_rAccessibleParent, ::svt::IToolPanelDeck& i_rPanelDeck, ::svt::PanelTabBar& i_rTabBar ) :AccessibleToolPanelTabBar_Base( i_rTabBar.GetWindowPeer() ) - ,m_pImpl( new AccessibleToolPanelTabBar_Impl( *this, i_rAccessibleParent, i_rPanelDeck, i_rTabBar ) ) + ,m_xImpl( new AccessibleToolPanelTabBar_Impl( *this, i_rAccessibleParent, i_rPanelDeck, i_rTabBar ) ) { } @@ -286,22 +286,22 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleToolPanelTabBar::getAccessibleChildCount( ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); - const bool bHasScrollBack = m_pImpl->getTabBar()->GetScrollButton( false ).IsVisible(); - const bool bHasScrollForward = m_pImpl->getTabBar()->GetScrollButton( true ).IsVisible(); + const bool bHasScrollBack = m_xImpl->getTabBar()->GetScrollButton( false ).IsVisible(); + const bool bHasScrollForward = m_xImpl->getTabBar()->GetScrollButton( true ).IsVisible(); - return m_pImpl->getPanelDeck()->GetPanelCount() + return m_xImpl->getPanelDeck()->GetPanelCount() + ( bHasScrollBack ? 1 : 0 ) + ( bHasScrollForward ? 1 : 0 ); } Reference< XAccessible > SAL_CALL AccessibleToolPanelTabBar::getAccessibleChild( sal_Int32 i_nIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); - const bool bHasScrollBack = m_pImpl->getTabBar()->GetScrollButton( false ).IsVisible(); - const bool bHasScrollForward = m_pImpl->getTabBar()->GetScrollButton( true ).IsVisible(); + const bool bHasScrollBack = m_xImpl->getTabBar()->GetScrollButton( false ).IsVisible(); + const bool bHasScrollForward = m_xImpl->getTabBar()->GetScrollButton( true ).IsVisible(); const bool bScrollBackRequested = ( bHasScrollBack && ( i_nIndex == 0 ) ); const bool bScrollForwardRequested = ( bHasScrollForward && ( i_nIndex == getAccessibleChildCount() - 1 ) ); @@ -309,29 +309,29 @@ namespace accessibility if ( bScrollBackRequested || bScrollForwardRequested ) { - Reference< XAccessible > xScrollButtonAccessible( m_pImpl->getTabBar()->GetScrollButton( bScrollForwardRequested ).GetAccessible() ); + Reference< XAccessible > xScrollButtonAccessible( m_xImpl->getTabBar()->GetScrollButton( bScrollForwardRequested ).GetAccessible() ); ENSURE_OR_RETURN( xScrollButtonAccessible.is(), "AccessibleToolPanelTabBar::getAccessibleChild: invalid button accessible!", NULL ); #if OSL_DEBUG_LEVEL > 0 Reference< XAccessibleContext > xScrollButtonContext( xScrollButtonAccessible->getAccessibleContext() ); ENSURE_OR_RETURN( xScrollButtonContext.is(), "AccessibleToolPanelTabBar::getAccessibleChild: invalid button accessible context!", xScrollButtonAccessible ); - OSL_ENSURE( xScrollButtonContext->getAccessibleParent() == m_pImpl->getOwnAccessible(), + OSL_ENSURE( xScrollButtonContext->getAccessibleParent() == m_xImpl->getOwnAccessible(), "AccessibleToolPanelTabBar::getAccessibleChild: wrong parent at the button's accessible!" ); #endif return xScrollButtonAccessible; } - return m_pImpl->getAccessiblePanelItem( i_nIndex - ( bHasScrollBack ? 1 : 0 ) ); + return m_xImpl->getAccessiblePanelItem( i_nIndex - ( bHasScrollBack ? 1 : 0 ) ); } Reference< XAccessible > SAL_CALL AccessibleToolPanelTabBar::getAccessibleParent( ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); - return m_pImpl->getAccessibleParent(); + MethodGuard aGuard( *m_xImpl ); + return m_xImpl->getAccessibleParent(); } sal_Int16 SAL_CALL AccessibleToolPanelTabBar::getAccessibleRole( ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); return AccessibleRole::PAGE_TAB_LIST; } @@ -346,29 +346,29 @@ namespace accessibility Reference< XAccessible > SAL_CALL AccessibleToolPanelTabBar::getAccessibleAtPoint( const UnoPoint& i_rPoint ) throw (RuntimeException, std::exception) { - MethodGuard aGuard( *m_pImpl ); + MethodGuard aGuard( *m_xImpl ); // check the tab items const UnoPoint aOwnScreenPos( getLocationOnScreen() ); const ::Point aRequestedScreenPoint( i_rPoint.X + aOwnScreenPos.X, i_rPoint.Y + aOwnScreenPos.Y ); - for ( size_t i=0; i<m_pImpl->getPanelDeck()->GetPanelCount(); ++i ) + for ( size_t i=0; i<m_xImpl->getPanelDeck()->GetPanelCount(); ++i ) { - const ::Rectangle aItemScreenRect( m_pImpl->getTabBar()->GetItemScreenRect(i) ); + const ::Rectangle aItemScreenRect( m_xImpl->getTabBar()->GetItemScreenRect(i) ); if ( aItemScreenRect.IsInside( aRequestedScreenPoint ) ) - return m_pImpl->getAccessiblePanelItem(i); + return m_xImpl->getAccessiblePanelItem(i); } // check the scroll buttons const ::Point aRequestedClientPoint( VCLUnoHelper::ConvertToVCLPoint( i_rPoint ) ); - const bool bHasScrollBack = m_pImpl->getTabBar()->GetScrollButton( false ).IsVisible(); - if ( bHasScrollBack && lcl_covers( m_pImpl->getTabBar()->GetScrollButton( false ), aRequestedClientPoint ) ) - return m_pImpl->getTabBar()->GetScrollButton( false ).GetAccessible(); + const bool bHasScrollBack = m_xImpl->getTabBar()->GetScrollButton( false ).IsVisible(); + if ( bHasScrollBack && lcl_covers( m_xImpl->getTabBar()->GetScrollButton( false ), aRequestedClientPoint ) ) + return m_xImpl->getTabBar()->GetScrollButton( false ).GetAccessible(); - const bool bHasScrollForward = m_pImpl->getTabBar()->GetScrollButton( true ).IsVisible(); - if ( bHasScrollForward && lcl_covers( m_pImpl->getTabBar()->GetScrollButton( true ), aRequestedClientPoint ) ) - return m_pImpl->getTabBar()->GetScrollButton( true ).GetAccessible(); + const bool bHasScrollForward = m_xImpl->getTabBar()->GetScrollButton( true ).IsVisible(); + if ( bHasScrollForward && lcl_covers( m_xImpl->getTabBar()->GetScrollButton( true ), aRequestedClientPoint ) ) + return m_xImpl->getTabBar()->GetScrollButton( true ).GetAccessible(); // no hit return NULL; @@ -377,7 +377,7 @@ namespace accessibility void SAL_CALL AccessibleToolPanelTabBar::disposing() { AccessibleToolPanelTabBar_Base::disposing(); - m_pImpl->dispose(); + m_xImpl->dispose(); } Reference< XAccessible > AccessibleToolPanelTabBar::GetChildAccessible( const VclWindowEvent& i_rVclWindowEvent ) @@ -393,8 +393,8 @@ namespace accessibility AccessibleToolPanelTabBar_Base::FillAccessibleStateSet( i_rStateSet ); i_rStateSet.AddState( AccessibleStateType::FOCUSABLE ); - ENSURE_OR_RETURN_VOID( !m_pImpl->isDisposed(), "AccessibleToolPanelTabBar::FillAccessibleStateSet: already disposed!" ); - if ( m_pImpl->getTabBar()->IsVertical() ) + ENSURE_OR_RETURN_VOID( !m_xImpl->isDisposed(), "AccessibleToolPanelTabBar::FillAccessibleStateSet: already disposed!" ); + if ( m_xImpl->getTabBar()->IsVertical() ) i_rStateSet.AddState( AccessibleStateType::VERTICAL ); else i_rStateSet.AddState( AccessibleStateType::HORIZONTAL ); diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx index 0289189e31c6..33bca93ae759 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx @@ -238,7 +238,7 @@ namespace accessibility ::svt::IToolPanelDeck& i_rPanelDeck, ::svt::PanelTabBar& i_rTabBar, const size_t i_nItemPos ) : ::comphelper::OAccessibleExtendedComponentHelper( new VCLExternalSolarLock) - , m_pImpl(new AccessibleToolPanelDeckTabBarItem_Impl(*this, + , m_xImpl(new AccessibleToolPanelDeckTabBarItem_Impl(*this, i_rAccessibleParent, i_rPanelDeck, i_rTabBar, i_nItemPos)) { } @@ -260,8 +260,8 @@ namespace accessibility Reference< XAccessible > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleParent( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); - return m_pImpl->getAccessibleParent(); + ItemMethodGuard aGuard( *m_xImpl ); + return m_xImpl->getAccessibleParent(); } sal_Int16 SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleRole( ) throw (RuntimeException, std::exception) @@ -271,45 +271,45 @@ namespace accessibility OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleDescription( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); - return m_pImpl->getPanelDisplayName(); + ItemMethodGuard aGuard( *m_xImpl ); + return m_xImpl->getPanelDisplayName(); } OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleName( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); - return m_pImpl->getPanelDisplayName(); + ItemMethodGuard aGuard( *m_xImpl ); + return m_xImpl->getPanelDisplayName(); } Reference< XAccessibleRelationSet > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleRelationSet( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); + ItemMethodGuard aGuard( *m_xImpl ); ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper; return pRelationSet; } Reference< XAccessibleStateSet > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleStateSet( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); + ItemMethodGuard aGuard( *m_xImpl ); ::utl::AccessibleStateSetHelper* pStateSet( new ::utl::AccessibleStateSetHelper ); pStateSet->AddState( AccessibleStateType::FOCUSABLE ); pStateSet->AddState( AccessibleStateType::SELECTABLE ); pStateSet->AddState( AccessibleStateType::ICONIFIED ); - if ( m_pImpl->getItemPos() == m_pImpl->getPanelDeck()->GetActivePanel() ) + if ( m_xImpl->getItemPos() == m_xImpl->getPanelDeck()->GetActivePanel() ) { pStateSet->AddState( AccessibleStateType::ACTIVE ); pStateSet->AddState( AccessibleStateType::SELECTED ); } - if ( m_pImpl->getItemPos() == m_pImpl->getTabBar()->GetFocusedPanelItem() ) + if ( m_xImpl->getItemPos() == m_xImpl->getTabBar()->GetFocusedPanelItem() ) pStateSet->AddState( AccessibleStateType::FOCUSED ); - if ( m_pImpl->getTabBar()->IsEnabled() ) + if ( m_xImpl->getTabBar()->IsEnabled() ) pStateSet->AddState( AccessibleStateType::ENABLED ); - if ( m_pImpl->getTabBar()->IsVisible() ) + if ( m_xImpl->getTabBar()->IsVisible() ) { pStateSet->AddState( AccessibleStateType::SHOWING ); pStateSet->AddState( AccessibleStateType::VISIBLE ); @@ -320,7 +320,7 @@ namespace accessibility Reference< XAccessible > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleAtPoint( const UnoPoint& i_rLocation ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); + ItemMethodGuard aGuard( *m_xImpl ); // we do not have children ... (void)i_rLocation; return NULL; @@ -328,28 +328,28 @@ namespace accessibility void SAL_CALL AccessibleToolPanelDeckTabBarItem::grabFocus( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); - m_pImpl->getTabBar()->FocusPanelItem( m_pImpl->getItemPos() ); + ItemMethodGuard aGuard( *m_xImpl ); + m_xImpl->getTabBar()->FocusPanelItem( m_xImpl->getItemPos() ); } ::sal_Int32 SAL_CALL AccessibleToolPanelDeckTabBarItem::getForeground( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); - Reference< XAccessibleComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_SET_THROW ); + ItemMethodGuard aGuard( *m_xImpl ); + Reference< XAccessibleComponent > xParentComponent( m_xImpl->getParentAccessibleComponent(), UNO_SET_THROW ); return xParentComponent->getForeground(); } ::sal_Int32 SAL_CALL AccessibleToolPanelDeckTabBarItem::getBackground( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); - Reference< XAccessibleComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_SET_THROW ); + ItemMethodGuard aGuard( *m_xImpl ); + Reference< XAccessibleComponent > xParentComponent( m_xImpl->getParentAccessibleComponent(), UNO_SET_THROW ); return xParentComponent->getBackground(); } Reference< XFont > SAL_CALL AccessibleToolPanelDeckTabBarItem::getFont( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); - Reference< XAccessibleExtendedComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_QUERY_THROW ); + ItemMethodGuard aGuard( *m_xImpl ); + Reference< XAccessibleExtendedComponent > xParentComponent( m_xImpl->getParentAccessibleComponent(), UNO_QUERY_THROW ); // TODO: strictly, this is not correct: The TabBar implementation of the TabLayouter might use // a different font ... return xParentComponent->getFont(); @@ -357,24 +357,24 @@ namespace accessibility OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getTitledBorderText( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); + ItemMethodGuard aGuard( *m_xImpl ); // no support return OUString(); } OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getToolTipText( ) throw (RuntimeException, std::exception) { - ItemMethodGuard aGuard( *m_pImpl ); - return m_pImpl->getPanelDisplayName(); + ItemMethodGuard aGuard( *m_xImpl ); + return m_xImpl->getPanelDisplayName(); } UnoRectangle AccessibleToolPanelDeckTabBarItem::implGetBounds() throw (RuntimeException) { - ItemMethodGuard aGuard( *m_pImpl ); + ItemMethodGuard aGuard( *m_xImpl ); - const ::Rectangle aItemScreenRect( m_pImpl->getTabBar()->GetItemScreenRect( m_pImpl->getItemPos() ) ); + const ::Rectangle aItemScreenRect( m_xImpl->getTabBar()->GetItemScreenRect( m_xImpl->getItemPos() ) ); - Reference< XAccessibleComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_SET_THROW ); + Reference< XAccessibleComponent > xParentComponent( m_xImpl->getParentAccessibleComponent(), UNO_SET_THROW ); const UnoPoint aParentLocation( xParentComponent->getLocationOnScreen() ); return UnoRectangle( aItemScreenRect.Left() - aParentLocation.X, @@ -386,8 +386,8 @@ namespace accessibility void SAL_CALL AccessibleToolPanelDeckTabBarItem::disposing() { - ItemMethodGuard aGuard( *m_pImpl ); - m_pImpl->dispose(); + ItemMethodGuard aGuard( *m_xImpl ); + m_xImpl->dispose(); } } // namespace accessibility diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index 167433c0af75..85fe73690eed 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -35,14 +35,14 @@ struct BasicDLL::Impl bool bDebugMode; bool bBreakEnabled; - ::boost::scoped_ptr<ResMgr> pBasResMgr; - ::boost::scoped_ptr<SbxAppData> pSbxAppData; + std::unique_ptr<ResMgr> xBasResMgr; + std::unique_ptr<SbxAppData> xSbxAppData; Impl() : bDebugMode(false) , bBreakEnabled(true) - , pBasResMgr(ResMgr::CreateResMgr("sb", Application::GetSettings().GetUILanguageTag())) - , pSbxAppData(new SbxAppData) + , xBasResMgr(ResMgr::CreateResMgr("sb", Application::GetSettings().GetUILanguageTag())) + , xSbxAppData(new SbxAppData) { } }; @@ -52,7 +52,7 @@ BasResId::BasResId( sal_uInt32 nId ) : } BasicDLL::BasicDLL() - : m_pImpl(new Impl) + : m_xImpl(new Impl) { BASIC_DLL() = this; } @@ -61,7 +61,7 @@ BasicDLL::~BasicDLL() { } -ResMgr* BasicDLL::GetBasResMgr() const { return m_pImpl->pBasResMgr.get(); } +ResMgr* BasicDLL::GetBasResMgr() const { return m_xImpl->xBasResMgr.get(); } void BasicDLL::EnableBreak( bool bEnable ) { @@ -69,7 +69,7 @@ void BasicDLL::EnableBreak( bool bEnable ) DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" ); if ( pThis ) { - pThis->m_pImpl->bBreakEnabled = bEnable; + pThis->m_xImpl->bBreakEnabled = bEnable; } } @@ -79,7 +79,7 @@ void BasicDLL::SetDebugMode( bool bDebugMode ) DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" ); if ( pThis ) { - pThis->m_pImpl->bDebugMode = bDebugMode; + pThis->m_xImpl->bDebugMode = bDebugMode; } } @@ -95,7 +95,7 @@ void BasicDLL::BasicBreak() if ( pThis ) { if (StarBASIC::IsRunning() && !bJustStopping - && (pThis->m_pImpl->bBreakEnabled || pThis->m_pImpl->bDebugMode)) + && (pThis->m_xImpl->bBreakEnabled || pThis->m_xImpl->bDebugMode)) { bJustStopping = true; StarBASIC::Stop(); @@ -107,7 +107,7 @@ void BasicDLL::BasicBreak() SbxAppData& GetSbxData_Impl() { - return *BASIC_DLL()->m_pImpl->pSbxAppData; + return *BASIC_DLL()->m_xImpl->xSbxAppData; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 9191d2349e50..876e6f118634 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -23,10 +23,10 @@ #include <cassert> #include <cstddef> #include <limits> +#include <memory> #include <vector> #include "boost/noncopyable.hpp" -#include "boost/scoped_ptr.hpp" #include "com/sun/star/bridge/InvalidProtocolChangeException.hpp" #include "com/sun/star/bridge/XBridge.hpp" #include "com/sun/star/bridge/XInstanceProvider.hpp" @@ -584,7 +584,7 @@ bool Bridge::makeCall( bool setter, std::vector< BinaryAny > const & inArguments, BinaryAny * returnValue, std::vector< BinaryAny > * outArguments) { - boost::scoped_ptr< IncomingReply > resp; + std::unique_ptr< IncomingReply > resp; { uno_ThreadPool tp = getThreadPool(); AttachThread att(tp); diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx index 3accf57d28ab..880b1ad99d20 100644 --- a/binaryurp/source/reader.cxx +++ b/binaryurp/source/reader.cxx @@ -24,7 +24,6 @@ #include <memory> #include <vector> -#include "boost/scoped_ptr.hpp" #include "com/sun/star/connection/XConnection.hpp" #include "com/sun/star/io/IOException.hpp" #include "com/sun/star/uno/Any.hxx" @@ -80,7 +79,7 @@ css::uno::Sequence< sal_Int8 > read( extern "C" void SAL_CALL request(void * pThreadSpecificData) { assert(pThreadSpecificData != 0); - boost::scoped_ptr< IncomingRequest >( + std::unique_ptr< IncomingRequest >( static_cast< IncomingRequest * >(pThreadSpecificData))-> execute(); } diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx index ceb2b37eacb7..d9ecbcbe2e50 100644 --- a/comphelper/source/misc/asyncnotification.cxx +++ b/comphelper/source/misc/asyncnotification.cxx @@ -28,25 +28,17 @@ #include <functional> #include <algorithm> - namespace comphelper { - - - //= AnyEvent - - AnyEvent::AnyEvent() { } - AnyEvent::~AnyEvent() { } - //= ProcessableEvent struct ProcessableEvent @@ -101,7 +93,7 @@ namespace comphelper AsyncEventNotifier::AsyncEventNotifier(char const * name): - Thread(name), m_pImpl(new EventNotifierImpl) + Thread(name), m_xImpl(new EventNotifierImpl) { } @@ -113,35 +105,35 @@ namespace comphelper void AsyncEventNotifier::removeEventsForProcessor( const ::rtl::Reference< IEventProcessor >& _xProcessor ) { - ::osl::MutexGuard aGuard( m_pImpl->aMutex ); + ::osl::MutexGuard aGuard( m_xImpl->aMutex ); // remove all events for this processor - m_pImpl->aEvents.erase(::std::remove_if( m_pImpl->aEvents.begin(), m_pImpl->aEvents.end(), EqualProcessor( _xProcessor ) ), m_pImpl->aEvents.end()); + m_xImpl->aEvents.erase(::std::remove_if( m_xImpl->aEvents.begin(), m_xImpl->aEvents.end(), EqualProcessor( _xProcessor ) ), m_xImpl->aEvents.end()); } void SAL_CALL AsyncEventNotifier::terminate() { - ::osl::MutexGuard aGuard( m_pImpl->aMutex ); + ::osl::MutexGuard aGuard( m_xImpl->aMutex ); // remember the termination request - m_pImpl->bTerminate = true; + m_xImpl->bTerminate = true; // awake the thread - m_pImpl->aPendingActions.set(); + m_xImpl->aPendingActions.set(); } void AsyncEventNotifier::addEvent( const AnyEventRef& _rEvent, const ::rtl::Reference< IEventProcessor >& _xProcessor ) { - ::osl::MutexGuard aGuard( m_pImpl->aMutex ); + ::osl::MutexGuard aGuard( m_xImpl->aMutex ); OSL_TRACE( "AsyncEventNotifier(%p): adding %p", this, _rEvent.get() ); // remember this event - m_pImpl->aEvents.push_back( ProcessableEvent( _rEvent, _xProcessor ) ); + m_xImpl->aEvents.push_back( ProcessableEvent( _rEvent, _xProcessor ) ); // awake the thread - m_pImpl->aPendingActions.set(); + m_xImpl->aPendingActions.set(); } @@ -149,25 +141,25 @@ namespace comphelper { for (;;) { - m_pImpl->aPendingActions.wait(); + m_xImpl->aPendingActions.wait(); ProcessableEvent aEvent; { - osl::MutexGuard aGuard(m_pImpl->aMutex); - if (m_pImpl->bTerminate) + osl::MutexGuard aGuard(m_xImpl->aMutex); + if (m_xImpl->bTerminate) { break; } - if (!m_pImpl->aEvents.empty()) + if (!m_xImpl->aEvents.empty()) { - aEvent = m_pImpl->aEvents.front(); - m_pImpl->aEvents.pop_front(); + aEvent = m_xImpl->aEvents.front(); + m_xImpl->aEvents.pop_front(); OSL_TRACE( "AsyncEventNotifier(%p): popping %p", this, aEvent.aEvent.get()); } - if (m_pImpl->aEvents.empty()) + if (m_xImpl->aEvents.empty()) { - m_pImpl->aPendingActions.reset(); + m_xImpl->aPendingActions.reset(); } } if (aEvent.aEvent.is()) { diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 03b8ce4c4df5..91e3687a7ff8 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -514,13 +514,13 @@ bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString& aSeg class LifecycleProxy::Impl : public std::vector< uno::Reference< embed::XStorage > > {}; LifecycleProxy::LifecycleProxy() - : m_pBadness( new Impl() ) { } + : m_xBadness( new Impl() ) { } LifecycleProxy::~LifecycleProxy() { } void LifecycleProxy::commitStorages() { - for (Impl::reverse_iterator iter = m_pBadness->rbegin(); - iter != m_pBadness->rend(); ++iter) // reverse order (outwards) + for (Impl::reverse_iterator iter = m_xBadness->rbegin(); + iter != m_xBadness->rend(); ++iter) // reverse order (outwards) { uno::Reference<embed::XTransactedObject> const xTransaction(*iter, uno::UNO_QUERY); @@ -544,11 +544,11 @@ static uno::Reference< embed::XStorage > LookupStorageAtPath( LifecycleProxy &rNastiness ) { uno::Reference< embed::XStorage > xStorage( xParentStorage ); - rNastiness.m_pBadness->push_back( xStorage ); + rNastiness.m_xBadness->push_back( xStorage ); for( size_t i = 0; i < rElems.size() && xStorage.is(); i++ ) { xStorage = xStorage->openStorageElement( rElems[i], nOpenMode ); - rNastiness.m_pBadness->push_back( xStorage ); + rNastiness.m_xBadness->push_back( xStorage ); } return xStorage; } diff --git a/configmgr/inc/pch/precompiled_configmgr.hxx b/configmgr/inc/pch/precompiled_configmgr.hxx index 4a1909c8b55f..a7204b9642f8 100644 --- a/configmgr/inc/pch/precompiled_configmgr.hxx +++ b/configmgr/inc/pch/precompiled_configmgr.hxx @@ -16,7 +16,6 @@ #include <algorithm> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <cassert> #include <climits> #include <com/sun/star/beans/NamedValue.hpp> @@ -119,6 +118,7 @@ #include <i18nlangtag/languagetag.hxx> #include <list> #include <map> +#include <memory> #include <osl/conditn.hxx> #include <osl/file.h> #include <osl/file.hxx> diff --git a/configmgr/source/access.hxx b/configmgr/source/access.hxx index 807f2a2a9724..dde2848f35e8 100644 --- a/configmgr/source/access.hxx +++ b/configmgr/source/access.hxx @@ -23,12 +23,12 @@ #include <sal/config.h> #include <map> +#include <memory> #include <set> #include <vector> #include "config_map.hxx" #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <com/sun/star/beans/PropertyVetoException.hpp> #include <com/sun/star/beans/UnknownPropertyException.hpp> #include <com/sun/star/beans/XExactName.hpp> @@ -564,7 +564,7 @@ private: PropertiesChangeListeners propertiesChangeListeners_; bool disposed_; - boost::shared_ptr<osl::Mutex> lock_; + std::shared_ptr<osl::Mutex> lock_; #if !defined NDEBUG protected: diff --git a/configmgr/source/childaccess.hxx b/configmgr/source/childaccess.hxx index ee336fac20e1..2838bbd86c93 100644 --- a/configmgr/source/childaccess.hxx +++ b/configmgr/source/childaccess.hxx @@ -22,10 +22,9 @@ #include <sal/config.h> +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/lang/NoSupportException.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> @@ -137,10 +136,10 @@ private: rtl::Reference< Access > parent_; // null if free node OUString name_; rtl::Reference< Node > node_; - boost::scoped_ptr< com::sun::star::uno::Any > changedValue_; + std::unique_ptr< com::sun::star::uno::Any > changedValue_; bool inTransaction_; // to determine if a free node can be inserted underneath some root - boost::shared_ptr<osl::Mutex> lock_; + std::shared_ptr<osl::Mutex> lock_; }; } diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index ddb4d9e2959b..7f3e41c342d2 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -158,7 +158,7 @@ private: OUString url_; Data const & data_; osl::Condition delay_; - boost::shared_ptr<osl::Mutex> lock_; + std::shared_ptr<osl::Mutex> lock_; }; Components::WriteThread::WriteThread( diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx index 48c1f7a73199..a545914bef19 100644 --- a/configmgr/source/components.hxx +++ b/configmgr/source/components.hxx @@ -26,7 +26,6 @@ #include <set> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <com/sun/star/beans/Optional.hpp> #include <com/sun/star/uno/Reference.hxx> #include <rtl/ref.hxx> @@ -164,7 +163,7 @@ private: int sharedExtensionLayer_; int userExtensionLayer_; OUString modificationFileUrl_; - boost::shared_ptr<osl::Mutex> lock_; + std::shared_ptr<osl::Mutex> lock_; }; } diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx index b9f7d9b7e44c..31f6cff0618c 100644 --- a/configmgr/source/configurationprovider.cxx +++ b/configmgr/source/configurationprovider.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <cassert> +#include <memory> #include <vector> #include <boost/noncopyable.hpp> @@ -178,7 +179,7 @@ private: css::uno::Reference< css::uno::XComponentContext > context_; OUString locale_; bool default_; - boost::shared_ptr<osl::Mutex> lock_; + std::shared_ptr<osl::Mutex> lock_; }; css::uno::Reference< css::uno::XInterface > Service::createInstance( diff --git a/configmgr/source/lock.cxx b/configmgr/source/lock.cxx index 7a20135f95d3..66a2be9eeca6 100644 --- a/configmgr/source/lock.cxx +++ b/configmgr/source/lock.cxx @@ -25,9 +25,9 @@ namespace configmgr { -boost::shared_ptr<osl::Mutex> lock() +std::shared_ptr<osl::Mutex> lock() { - static boost::shared_ptr<osl::Mutex> theLock; + static std::shared_ptr<osl::Mutex> theLock; if (!theLock.get()) theLock.reset(new osl::Mutex); return theLock; diff --git a/configmgr/source/lock.hxx b/configmgr/source/lock.hxx index 1d5c33e0ac04..d8c050e824e6 100644 --- a/configmgr/source/lock.hxx +++ b/configmgr/source/lock.hxx @@ -22,11 +22,11 @@ #include <sal/config.h> #include <osl/mutex.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace configmgr { -boost::shared_ptr<osl::Mutex> lock(); +std::shared_ptr<osl::Mutex> lock(); } diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx index 4e300a7ba5c2..4f80907a90db 100644 --- a/configmgr/source/rootaccess.hxx +++ b/configmgr/source/rootaccess.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> +#include <memory> #include <set> #include <vector> @@ -30,7 +31,6 @@ #include <com/sun/star/util/ChangesSet.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XChangesNotifier.hpp> -#include <boost/shared_ptr.hpp> #include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <sal/types.h> @@ -148,7 +148,7 @@ private: OUString name_; ChangesListeners changesListeners_; - boost::shared_ptr<osl::Mutex> lock_; + std::shared_ptr<osl::Mutex> lock_; bool update_:1; bool finalized_:1; diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx index 616f32fdcda3..7c6371b493a5 100644 --- a/configmgr/source/update.cxx +++ b/configmgr/source/update.cxx @@ -20,10 +20,10 @@ #include <sal/config.h> #include <cassert> +#include <memory> #include <set> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <com/sun/star/configuration/XUpdate.hpp> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/RuntimeException.hpp> @@ -91,7 +91,7 @@ private: css::uno::Sequence< OUString > const & excludedPaths) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - boost::shared_ptr<osl::Mutex> lock_; + std::shared_ptr<osl::Mutex> lock_; css::uno::Reference< css::uno::XComponentContext > context_; }; diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 7791385dbba4..13923c0a5785 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -45,7 +45,7 @@ #include <tools/diagnose_ex.h> #include <unotools/sharedunocomponent.hxx> - +#include <algorithm> namespace dbtools { diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx index 4e0ee375be45..3e0d13b6ce7a 100644 --- a/dbaccess/source/ui/misc/dbaundomanager.cxx +++ b/dbaccess/source/ui/misc/dbaundomanager.cxx @@ -157,7 +157,7 @@ namespace dbaui // UndoManager UndoManager::UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ) - :m_pImpl( new UndoManager_Impl( *this, i_parent, i_mutex ) ) + :m_xImpl( new UndoManager_Impl( *this, i_parent, i_mutex ) ) { } @@ -167,162 +167,162 @@ namespace dbaui SfxUndoManager& UndoManager::GetSfxUndoManager() const { - return m_pImpl->aUndoManager; + return m_xImpl->aUndoManager; } void SAL_CALL UndoManager::acquire( ) throw () { - m_pImpl->rParent.acquire(); + m_xImpl->rParent.acquire(); } void SAL_CALL UndoManager::release( ) throw () { - m_pImpl->rParent.release(); + m_xImpl->rParent.release(); } void UndoManager::disposing() { { - ::osl::MutexGuard aGuard( m_pImpl->rMutex ); - m_pImpl->bDisposed = true; + ::osl::MutexGuard aGuard( m_xImpl->rMutex ); + m_xImpl->bDisposed = true; } - m_pImpl->aUndoHelper.disposing(); + m_xImpl->aUndoHelper.disposing(); } void SAL_CALL UndoManager::enterUndoContext( const OUString& i_title ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.enterUndoContext( i_title, aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.enterUndoContext( i_title, aGuard ); } void SAL_CALL UndoManager::enterHiddenUndoContext( ) throw (EmptyUndoStackException, RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.enterHiddenUndoContext( aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.enterHiddenUndoContext( aGuard ); } void SAL_CALL UndoManager::leaveUndoContext( ) throw (InvalidStateException, RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.leaveUndoContext( aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.leaveUndoContext( aGuard ); } void SAL_CALL UndoManager::addUndoAction( const Reference< XUndoAction >& i_action ) throw (IllegalArgumentException, RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.addUndoAction( i_action, aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.addUndoAction( i_action, aGuard ); } void SAL_CALL UndoManager::undo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; // (all our UndoActions work directly on VCL code, usually, so ...) - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.undo( aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.undo( aGuard ); } void SAL_CALL UndoManager::redo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; // (all our UndoActions work directly on VCL code, usually, so ...) - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.redo( aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.redo( aGuard ); } sal_Bool SAL_CALL UndoManager::isUndoPossible( ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - return m_pImpl->aUndoHelper.isUndoPossible(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + return m_xImpl->aUndoHelper.isUndoPossible(); } sal_Bool SAL_CALL UndoManager::isRedoPossible( ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - return m_pImpl->aUndoHelper.isRedoPossible(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + return m_xImpl->aUndoHelper.isRedoPossible(); } OUString SAL_CALL UndoManager::getCurrentUndoActionTitle( ) throw (EmptyUndoStackException, RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - return m_pImpl->aUndoHelper.getCurrentUndoActionTitle(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + return m_xImpl->aUndoHelper.getCurrentUndoActionTitle(); } OUString SAL_CALL UndoManager::getCurrentRedoActionTitle( ) throw (EmptyUndoStackException, RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - return m_pImpl->aUndoHelper.getCurrentRedoActionTitle(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + return m_xImpl->aUndoHelper.getCurrentRedoActionTitle(); } Sequence< OUString > SAL_CALL UndoManager::getAllUndoActionTitles( ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - return m_pImpl->aUndoHelper.getAllUndoActionTitles(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + return m_xImpl->aUndoHelper.getAllUndoActionTitles(); } Sequence< OUString > SAL_CALL UndoManager::getAllRedoActionTitles( ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - return m_pImpl->aUndoHelper.getAllRedoActionTitles(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + return m_xImpl->aUndoHelper.getAllRedoActionTitles(); } void SAL_CALL UndoManager::clear( ) throw (UndoContextNotClosedException, RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.clear( aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.clear( aGuard ); } void SAL_CALL UndoManager::clearRedo( ) throw (UndoContextNotClosedException, RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.clearRedo( aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.clearRedo( aGuard ); } void SAL_CALL UndoManager::reset( ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.reset( aGuard ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.reset( aGuard ); } void SAL_CALL UndoManager::addUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.addUndoManagerListener( i_listener ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.addUndoManagerListener( i_listener ); } void SAL_CALL UndoManager::removeUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.removeUndoManagerListener( i_listener ); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.removeUndoManagerListener( i_listener ); } void SAL_CALL UndoManager::lock( ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.lock(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.lock(); } void SAL_CALL UndoManager::unlock( ) throw (NotLockedException, RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - m_pImpl->aUndoHelper.unlock(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + m_xImpl->aUndoHelper.unlock(); } sal_Bool SAL_CALL UndoManager::isLocked( ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - return m_pImpl->aUndoHelper.isLocked(); + UndoManagerMethodGuard aGuard( *m_xImpl ); + return m_xImpl->aUndoHelper.isLocked(); } Reference< XInterface > SAL_CALL UndoManager::getParent( ) throw (RuntimeException, std::exception) { - UndoManagerMethodGuard aGuard( *m_pImpl ); - return *&m_pImpl->rParent; + UndoManagerMethodGuard aGuard( *m_xImpl ); + return *&m_xImpl->rParent; } void SAL_CALL UndoManager::setParent( const Reference< XInterface >& i_parent ) throw (NoSupportException, RuntimeException, std::exception) { (void)i_parent; - throw NoSupportException( OUString(), m_pImpl->getThis() ); + throw NoSupportException( OUString(), m_xImpl->getThis() ); } } // namespace dbaui diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 3e60db1431ff..387bbac49af6 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5148,8 +5148,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, new SvxMSDffShapeInfo(0, pImpRec->nShapeId)); SvxMSDffShapeInfos_ById::const_iterator const it = - m_pShapeInfosById->find(pTmpRec); - if (it != m_pShapeInfosById->end()) + m_xShapeInfosById->find(pTmpRec); + if (it != m_xShapeInfosById->end()) { SvxMSDffShapeInfo& rInfo = **it; pTextImpRec->bReplaceByFly = rInfo.bReplaceByFly; @@ -5531,7 +5531,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, :DffPropertyReader( *this ), pFormModel( NULL ), pBLIPInfos( new SvxMSDffBLIPInfos ), - m_pShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), + m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), pShapeOrders( new SvxMSDffShapeOrders ), nDefaultFontHeight( nDefaultFontHeight_), nOffsDgg( nOffsDgg_ ), @@ -5581,7 +5581,7 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL ) :DffPropertyReader( *this ), pFormModel( NULL ), pBLIPInfos( new SvxMSDffBLIPInfos ), - m_pShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), + m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), pShapeOrders( new SvxMSDffShapeOrders ), nDefaultFontHeight( 24 ), nOffsDgg( 0 ), @@ -5698,14 +5698,14 @@ void SvxMSDffManager::GetFidclData( sal_uInt32 nOffsDggL ) void SvxMSDffManager::CheckTxBxStoryChain() { - m_pShapeInfosById.reset(new SvxMSDffShapeInfos_ById); + m_xShapeInfosById.reset(new SvxMSDffShapeInfos_ById); // mangle old Info array, sorted by nTxBxComp sal_uLong nChain = ULONG_MAX; bool bSetReplaceFALSE = false; for (SvxMSDffShapeInfos_ByTxBxComp::iterator iter = - m_pShapeInfosByTxBxComp->begin(), - mark = m_pShapeInfosByTxBxComp->begin(); - iter != m_pShapeInfosByTxBxComp->end(); ++iter) + m_xShapeInfosByTxBxComp->begin(), + mark = m_xShapeInfosByTxBxComp->begin(); + iter != m_xShapeInfosByTxBxComp->end(); ++iter) { boost::shared_ptr<SvxMSDffShapeInfo> const pObj = *iter; if( pObj->nTxBxComp ) @@ -5739,12 +5739,12 @@ void SvxMSDffManager::CheckTxBxStoryChain() pObj->bReplaceByFly = false; } } - // copy all Shape Info objects to m_pShapeInfosById, sorted by nShapeId + // copy all Shape Info objects to m_xShapeInfosById, sorted by nShapeId pObj->nTxBxComp = pObj->nTxBxComp & 0xFFFF0000; - m_pShapeInfosById->insert( pObj ); + m_xShapeInfosById->insert( pObj ); } // free original array but don't free its elements - m_pShapeInfosByTxBxComp.reset(); + m_xShapeInfosByTxBxComp.reset(); } @@ -6136,7 +6136,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt, { aInfo.bReplaceByFly = true; } - m_pShapeInfosByTxBxComp->insert(::boost::shared_ptr<SvxMSDffShapeInfo>( + m_xShapeInfosByTxBxComp->insert(::boost::shared_ptr<SvxMSDffShapeInfo>( new SvxMSDffShapeInfo(aInfo))); pShapeOrders->push_back( new SvxMSDffShapeOrder( aInfo.nShapeId ) ); } @@ -6160,8 +6160,8 @@ bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape, new SvxMSDffShapeInfo(0, nId)); SvxMSDffShapeInfos_ById::const_iterator const it = - m_pShapeInfosById->find(pTmpRec); - if (it != m_pShapeInfosById->end()) + m_xShapeInfosById->find(pTmpRec); + if (it != m_xShapeInfosById->end()) { // Possibly delete old error flag. if( rStCtrl.GetError() ) diff --git a/framework/source/fwe/helper/documentundoguard.cxx b/framework/source/fwe/helper/documentundoguard.cxx index 35ed6b431b1b..f055b0cc5877 100644 --- a/framework/source/fwe/helper/documentundoguard.cxx +++ b/framework/source/fwe/helper/documentundoguard.cxx @@ -220,14 +220,14 @@ namespace framework //= DocumentUndoGuard DocumentUndoGuard::DocumentUndoGuard( const Reference< XInterface >& i_undoSupplierComponent ) - :m_pData( new DocumentUndoGuard_Data ) + :m_xData( new DocumentUndoGuard_Data ) { - lcl_init( *m_pData, i_undoSupplierComponent ); + lcl_init( *m_xData, i_undoSupplierComponent ); } DocumentUndoGuard::~DocumentUndoGuard() { - lcl_restore( *m_pData ); + lcl_restore( *m_xData ); } } // namespace framework diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx index 8244b1f57d59..8b0c9c58593d 100644 --- a/framework/source/fwe/helper/undomanagerhelper.cxx +++ b/framework/source/fwe/helper/undomanagerhelper.cxx @@ -876,7 +876,7 @@ namespace framework //= UndoManagerHelper UndoManagerHelper::UndoManagerHelper( IUndoManagerImplementation& i_undoManagerImpl ) - :m_pImpl( new UndoManagerHelper_Impl( i_undoManagerImpl ) ) + :m_xImpl( new UndoManagerHelper_Impl( i_undoManagerImpl ) ) { } @@ -886,22 +886,22 @@ namespace framework void UndoManagerHelper::disposing() { - m_pImpl->disposing(); + m_xImpl->disposing(); } void UndoManagerHelper::enterUndoContext( const OUString& i_title, IMutexGuard& i_instanceLock ) { - m_pImpl->enterUndoContext( i_title, false, i_instanceLock ); + m_xImpl->enterUndoContext( i_title, false, i_instanceLock ); } void UndoManagerHelper::enterHiddenUndoContext( IMutexGuard& i_instanceLock ) { - m_pImpl->enterUndoContext( OUString(), true, i_instanceLock ); + m_xImpl->enterUndoContext( OUString(), true, i_instanceLock ); } void UndoManagerHelper::leaveUndoContext( IMutexGuard& i_instanceLock ) { - m_pImpl->leaveUndoContext( i_instanceLock ); + m_xImpl->leaveUndoContext( i_instanceLock ); } void UndoManagerHelper_Impl::undo( IMutexGuard& i_instanceLock ) @@ -932,24 +932,24 @@ namespace framework void UndoManagerHelper::addUndoAction( const Reference< XUndoAction >& i_action, IMutexGuard& i_instanceLock ) { - m_pImpl->addUndoAction( i_action, i_instanceLock ); + m_xImpl->addUndoAction( i_action, i_instanceLock ); } void UndoManagerHelper::undo( IMutexGuard& i_instanceLock ) { - m_pImpl->undo( i_instanceLock ); + m_xImpl->undo( i_instanceLock ); } void UndoManagerHelper::redo( IMutexGuard& i_instanceLock ) { - m_pImpl->redo( i_instanceLock ); + m_xImpl->redo( i_instanceLock ); } bool UndoManagerHelper::isUndoPossible() const { // SYNCHRONIZED ---> - ::osl::MutexGuard aGuard( m_pImpl->getMutex() ); - IUndoManager& rUndoManager = m_pImpl->getUndoManager(); + ::osl::MutexGuard aGuard( m_xImpl->getMutex() ); + IUndoManager& rUndoManager = m_xImpl->getUndoManager(); if ( rUndoManager.IsInListAction() ) return false; return rUndoManager.GetUndoActionCount( IUndoManager::TopLevel ) > 0; @@ -959,8 +959,8 @@ namespace framework bool UndoManagerHelper::isRedoPossible() const { // SYNCHRONIZED ---> - ::osl::MutexGuard aGuard( m_pImpl->getMutex() ); - const IUndoManager& rUndoManager = m_pImpl->getUndoManager(); + ::osl::MutexGuard aGuard( m_xImpl->getMutex() ); + const IUndoManager& rUndoManager = m_xImpl->getUndoManager(); if ( rUndoManager.IsInListAction() ) return false; return rUndoManager.GetRedoActionCount( IUndoManager::TopLevel ) > 0; @@ -1015,55 +1015,55 @@ namespace framework OUString UndoManagerHelper::getCurrentUndoActionTitle() const { - return lcl_getCurrentActionTitle( *m_pImpl, true ); + return lcl_getCurrentActionTitle( *m_xImpl, true ); } OUString UndoManagerHelper::getCurrentRedoActionTitle() const { - return lcl_getCurrentActionTitle( *m_pImpl, false ); + return lcl_getCurrentActionTitle( *m_xImpl, false ); } Sequence< OUString > UndoManagerHelper::getAllUndoActionTitles() const { - return lcl_getAllActionTitles( *m_pImpl, true ); + return lcl_getAllActionTitles( *m_xImpl, true ); } Sequence< OUString > UndoManagerHelper::getAllRedoActionTitles() const { - return lcl_getAllActionTitles( *m_pImpl, false ); + return lcl_getAllActionTitles( *m_xImpl, false ); } void UndoManagerHelper::clear( IMutexGuard& i_instanceLock ) { - m_pImpl->clear( i_instanceLock ); + m_xImpl->clear( i_instanceLock ); } void UndoManagerHelper::clearRedo( IMutexGuard& i_instanceLock ) { - m_pImpl->clearRedo( i_instanceLock ); + m_xImpl->clearRedo( i_instanceLock ); } void UndoManagerHelper::reset( IMutexGuard& i_instanceLock ) { - m_pImpl->reset( i_instanceLock ); + m_xImpl->reset( i_instanceLock ); } void UndoManagerHelper::lock() { - m_pImpl->lock(); + m_xImpl->lock(); } void UndoManagerHelper::unlock() { - m_pImpl->unlock(); + m_xImpl->unlock(); } bool UndoManagerHelper::isLocked() { // SYNCHRONIZED ---> - ::osl::MutexGuard aGuard( m_pImpl->getMutex() ); + ::osl::MutexGuard aGuard( m_xImpl->getMutex() ); - IUndoManager& rUndoManager = m_pImpl->getUndoManager(); + IUndoManager& rUndoManager = m_xImpl->getUndoManager(); return !rUndoManager.IsUndoEnabled(); // <--- SYNCHRONIZED } @@ -1071,25 +1071,25 @@ namespace framework void UndoManagerHelper::addUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) { if ( i_listener.is() ) - m_pImpl->addUndoManagerListener( i_listener ); + m_xImpl->addUndoManagerListener( i_listener ); } void UndoManagerHelper::removeUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) { if ( i_listener.is() ) - m_pImpl->removeUndoManagerListener( i_listener ); + m_xImpl->removeUndoManagerListener( i_listener ); } void UndoManagerHelper::addModifyListener( const Reference< XModifyListener >& i_listener ) { if ( i_listener.is() ) - m_pImpl->addModifyListener( i_listener ); + m_xImpl->addModifyListener( i_listener ); } void UndoManagerHelper::removeModifyListener( const Reference< XModifyListener >& i_listener ) { if ( i_listener.is() ) - m_pImpl->removeModifyListener( i_listener ); + m_xImpl->removeModifyListener( i_listener ); } } // namespace framework diff --git a/include/basic/basrdll.hxx b/include/basic/basrdll.hxx index 274126d6c461..45ce39e2e3e1 100644 --- a/include/basic/basrdll.hxx +++ b/include/basic/basrdll.hxx @@ -20,9 +20,8 @@ #ifndef INCLUDED_BASIC_BASRDLL_HXX #define INCLUDED_BASIC_BASRDLL_HXX -#include <boost/scoped_ptr.hpp> - #include <basic/basicdllapi.h> +#include <memory> class ResMgr; @@ -30,7 +29,7 @@ class BASIC_DLLPUBLIC BasicDLL { public: struct Impl; - ::boost::scoped_ptr<Impl> m_pImpl; + std::unique_ptr<Impl> m_xImpl; public: BasicDLL(); diff --git a/include/canvas/rendering/bitmap.hxx b/include/canvas/rendering/bitmap.hxx index f68f74f34f91..9fc1070f243a 100644 --- a/include/canvas/rendering/bitmap.hxx +++ b/include/canvas/rendering/bitmap.hxx @@ -30,7 +30,7 @@ #include <canvas/rendering/isurfaceproxymanager.hxx> #include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <vector> namespace basegfx @@ -303,7 +303,7 @@ namespace canvas private: friend class ImplBitmap; - const ::boost::scoped_ptr< ImplBitmap > mpImpl; + const std::unique_ptr< ImplBitmap > mxImpl; }; typedef ::boost::shared_ptr< Bitmap > BitmapSharedPtr; diff --git a/include/comphelper/asyncnotification.hxx b/include/comphelper/asyncnotification.hxx index 58cb17df6a44..01d589c8540e 100644 --- a/include/comphelper/asyncnotification.hxx +++ b/include/comphelper/asyncnotification.hxx @@ -22,19 +22,15 @@ #include <sal/config.h> -#include <boost/scoped_ptr.hpp> #include <comphelper/comphelperdllapi.h> #include <rtl/ref.hxx> #include <sal/types.h> #include <salhelper/thread.hxx> #include <salhelper/simplereferenceobject.hxx> - +#include <memory> namespace comphelper { - - - //= AnyEvent /** the very basic instance to hold a description of an event @@ -104,7 +100,7 @@ namespace comphelper friend struct EventNotifierImpl; private: - boost::scoped_ptr< EventNotifierImpl > m_pImpl; + std::unique_ptr<EventNotifierImpl> m_xImpl; SAL_DLLPRIVATE virtual ~AsyncEventNotifier(); diff --git a/include/comphelper/scoped_disposing_ptr.hxx b/include/comphelper/scoped_disposing_ptr.hxx index e1f7b20a5afb..2625f40510b9 100644 --- a/include/comphelper/scoped_disposing_ptr.hxx +++ b/include/comphelper/scoped_disposing_ptr.hxx @@ -12,7 +12,6 @@ #include <cppuhelper/implbase1.hxx> #include <boost/utility.hpp> -#include <boost/scoped_ptr.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/frame/XDesktop.hpp> @@ -22,42 +21,42 @@ namespace comphelper { -//Similar to boost::scoped_ptr, except additionally releases the ptr on XComponent::disposing and/or XTerminateListener::notifyTermination if supported +//Similar to std::unique_ptr, except additionally releases the ptr on XComponent::disposing and/or XTerminateListener::notifyTermination if supported template<class T> class scoped_disposing_ptr : private boost::noncopyable { private: - boost::scoped_ptr<T> m_aItem; + std::unique_ptr<T> m_xItem; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTerminateListener> m_xTerminateListener; public: scoped_disposing_ptr( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &rComponent, T * p = 0 ) - : m_aItem(p) + : m_xItem(p) { m_xTerminateListener = new TerminateListener(rComponent, *this); } virtual void reset(T * p = 0) { - m_aItem.reset(p); + m_xItem.reset(p); } T & operator*() const { - return *m_aItem; + return *m_xItem; } T * get() const { - return m_aItem.get(); + return m_xItem.get(); } T * operator->() const { - return m_aItem.get(); + return m_xItem.get(); } operator bool () const { - return static_cast< bool >(m_aItem); + return static_cast< bool >(m_xItem); } virtual ~scoped_disposing_ptr() diff --git a/include/comphelper/storagehelper.hxx b/include/comphelper/storagehelper.hxx index 38c664fd49b3..ec551d7d70bc 100644 --- a/include/comphelper/storagehelper.hxx +++ b/include/comphelper/storagehelper.hxx @@ -19,13 +19,11 @@ #ifndef INCLUDED_COMPHELPER_STORAGEHELPER_HXX #define INCLUDED_COMPHELPER_STORAGEHELPER_HXX -#include <boost/scoped_ptr.hpp> - #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/embed/ElementModes.hpp> #include <comphelper/comphelperdllapi.h> - +#include <memory> #define PACKAGE_STORAGE_FORMAT_STRING "PackageFormat" #define ZIP_STORAGE_FORMAT_STRING "ZipFormat" @@ -58,7 +56,7 @@ class COMPHELPER_DLLPUBLIC LifecycleProxy private: class Impl; public: - ::boost::scoped_ptr<Impl> m_pBadness; + std::unique_ptr<Impl> m_xBadness; LifecycleProxy(); ~LifecycleProxy(); // commit the storages: necessary for writes to streams to take effect! diff --git a/include/comphelper/syntaxhighlight.hxx b/include/comphelper/syntaxhighlight.hxx index ef190bcf3b24..16d3c12e046d 100644 --- a/include/comphelper/syntaxhighlight.hxx +++ b/include/comphelper/syntaxhighlight.hxx @@ -19,10 +19,7 @@ #ifndef INCLUDED_COMPHELPER_SYNTAXHIGHLIGHT_HXX #define INCLUDED_COMPHELPER_SYNTAXHIGHLIGHT_HXX -#include <vector> - #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> #include <rtl/ustring.hxx> #include <comphelper/comphelperdllapi.h> @@ -31,6 +28,9 @@ #include <sys/resource.h> #endif +#include <vector> +#include <memory> + // Token-Typen TT_... enum TokenTypes { @@ -71,7 +71,7 @@ class COMPHELPER_DLLPUBLIC SyntaxHighlighter: private boost::noncopyable class Tokenizer; HighlighterLanguage eLanguage; - boost::scoped_ptr<Tokenizer> m_tokenizer; + std::unique_ptr<Tokenizer> m_tokenizer; public: SyntaxHighlighter(HighlighterLanguage language); diff --git a/include/dbaccess/dbaundomanager.hxx b/include/dbaccess/dbaundomanager.hxx index c9bcef7ca5df..e52176fe0343 100644 --- a/include/dbaccess/dbaundomanager.hxx +++ b/include/dbaccess/dbaundomanager.hxx @@ -26,7 +26,7 @@ #include <cppuhelper/implbase1.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> class SfxUndoManager; @@ -84,7 +84,7 @@ namespace dbaui virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: - ::boost::scoped_ptr< UndoManager_Impl > m_pImpl; + std::unique_ptr< UndoManager_Impl > m_xImpl; }; diff --git a/include/editeng/Trie.hxx b/include/editeng/Trie.hxx index c8963d89401d..302c6a622739 100644 --- a/include/editeng/Trie.hxx +++ b/include/editeng/Trie.hxx @@ -12,9 +12,9 @@ #include <sal/types.h> #include <rtl/ustring.hxx> -#include <vector> #include <editeng/editengdllapi.h> -#include <boost/scoped_ptr.hpp> +#include <memory> +#include <vector> namespace editeng { @@ -24,7 +24,7 @@ struct TrieNode; class EDITENG_DLLPUBLIC Trie { private: - boost::scoped_ptr<TrieNode> mRoot; + std::unique_ptr<TrieNode> mRoot; public: Trie(); diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index c85429eecd84..a6fdf663c0d4 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -27,7 +27,6 @@ #include <set> #include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> #include <boost/ptr_container/ptr_vector.hpp> #include <boost/ptr_container/ptr_set.hpp> @@ -400,8 +399,8 @@ class MSFILTER_DLLPUBLIC SvxMSDffManager : public DffPropertyReader { FmFormModel* pFormModel; SvxMSDffBLIPInfos* pBLIPInfos; - ::boost::scoped_ptr<SvxMSDffShapeInfos_ByTxBxComp> m_pShapeInfosByTxBxComp; - ::boost::scoped_ptr<SvxMSDffShapeInfos_ById> m_pShapeInfosById; + std::unique_ptr<SvxMSDffShapeInfos_ByTxBxComp> m_xShapeInfosByTxBxComp; + std::unique_ptr<SvxMSDffShapeInfos_ById> m_xShapeInfosById; SvxMSDffShapeOrders* pShapeOrders; sal_uLong nDefaultFontHeight; sal_uInt32 nOffsDgg; @@ -682,7 +681,7 @@ public: const Rectangle& rGlobalChildRect ); inline const SvxMSDffShapeInfos_ById* GetShapeInfos( void ) const - { return m_pShapeInfosById.get(); } + { return m_xShapeInfosById.get(); } inline SvxMSDffShapeOrders* GetShapeOrders( void ) const { return pShapeOrders; } diff --git a/include/framework/documentundoguard.hxx b/include/framework/documentundoguard.hxx index 905038cedb0c..ab2f1c91b3b0 100644 --- a/include/framework/documentundoguard.hxx +++ b/include/framework/documentundoguard.hxx @@ -24,14 +24,10 @@ #include <com/sun/star/uno/XInterface.hpp> -#include <boost/scoped_ptr.hpp> - +#include <memory> namespace framework { - - - //= DocumentUndoGuard struct DocumentUndoGuard_Data; @@ -51,7 +47,7 @@ namespace framework ~DocumentUndoGuard(); private: - ::boost::scoped_ptr< DocumentUndoGuard_Data > m_pData; + std::unique_ptr< DocumentUndoGuard_Data > m_xData; }; diff --git a/include/framework/undomanagerhelper.hxx b/include/framework/undomanagerhelper.hxx index d4c12f3f23e8..1b94e3bf0251 100644 --- a/include/framework/undomanagerhelper.hxx +++ b/include/framework/undomanagerhelper.hxx @@ -26,7 +26,7 @@ #include <com/sun/star/document/XUndoManager.hpp> #include <com/sun/star/util/XModifyListener.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svl { @@ -150,7 +150,7 @@ namespace framework void removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& i_listener ); private: - ::boost::scoped_ptr< UndoManagerHelper_Impl > m_pImpl; + std::unique_ptr< UndoManagerHelper_Impl > m_xImpl; }; diff --git a/include/o3tl/cow_wrapper.hxx b/include/o3tl/cow_wrapper.hxx index 7f11c55c136e..e7ca302468e3 100644 --- a/include/o3tl/cow_wrapper.hxx +++ b/include/o3tl/cow_wrapper.hxx @@ -74,8 +74,8 @@ namespace o3tl that, despite the fact that this template provides access to the wrapped type via pointer-like methods (<code>operator->()</code> and <code>operator*()</code>), it does - <em>not</em> work like e.g. the boost pointer wrappers - (shared_ptr, scoped_ptr, etc.). Internally, the cow_wrapper + <em>not</em> work like e.g. the std smart pointer wrappers + (shared_ptr, unique_ptr, etc.). Internally, the cow_wrapper holds a by-value instance of the wrapped object. This is to avoid one additional heap allocation, and providing access via <code>operator->()</code>/<code>operator*()</code> is because diff --git a/include/oox/core/filterbase.hxx b/include/oox/core/filterbase.hxx index 5e91f600469c..3d10c08fbae6 100644 --- a/include/oox/core/filterbase.hxx +++ b/include/oox/core/filterbase.hxx @@ -36,8 +36,6 @@ #include <oox/helper/storagebase.hxx> #include <oox/dllapi.h> -#include <boost/scoped_ptr.hpp> - namespace com { namespace sun { namespace star { namespace awt { struct DeviceInfo; } namespace frame { class XFrame; } @@ -284,7 +282,7 @@ private: const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& rxOutStream ) const = 0; private: - boost::scoped_ptr< FilterBaseImpl > mxImpl; + std::unique_ptr< FilterBaseImpl > mxImpl; }; diff --git a/include/oox/core/xmlfilterbase.hxx b/include/oox/core/xmlfilterbase.hxx index a8c950e3ed59..b6bc9687b198 100644 --- a/include/oox/core/xmlfilterbase.hxx +++ b/include/oox/core/xmlfilterbase.hxx @@ -52,7 +52,7 @@ namespace oox { namespace sax_fastparser { class FastSerializerHelper; - typedef boost::shared_ptr< FastSerializerHelper > FSHelperPtr; + typedef std::shared_ptr< FastSerializerHelper > FSHelperPtr; } namespace oox { diff --git a/include/oox/crypto/DocumentDecryption.hxx b/include/oox/crypto/DocumentDecryption.hxx index 1f2d3bc5bc25..b9bf2d449260 100644 --- a/include/oox/crypto/DocumentDecryption.hxx +++ b/include/oox/crypto/DocumentDecryption.hxx @@ -25,7 +25,7 @@ #include <oox/crypto/AgileEngine.hxx> #include <oox/crypto/Standard2007Engine.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <vector> namespace oox { @@ -44,7 +44,7 @@ private: }; oox::ole::OleStorage& mrOleStorage; - boost::scoped_ptr<CryptoEngine> mEngine; + std::unique_ptr<CryptoEngine> mEngine; CryptoType mCryptoType; bool readAgileEncryptionInfo( com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& rStream ); diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx index 50248ce28ce6..293b0be4f4be 100644 --- a/include/sax/fshelper.hxx +++ b/include/sax/fshelper.hxx @@ -21,9 +21,9 @@ #define INCLUDED_SAX_FSHELPER_HXX #include <com/sun/star/io/XOutputStream.hpp> -#include <stdarg.h> -#include <boost/shared_ptr.hpp> #include <sax/fastattribs.hxx> +#include <stdarg.h> +#include <memory> #define FSNS(namespc, element) ((namespc << 16) | element) // Backwards compatibility for code that used FSEND to terminate the vararg. @@ -184,7 +184,7 @@ private: FastSaxSerializer* mpSerializer; }; -typedef boost::shared_ptr< FastSerializerHelper > FSHelperPtr; +typedef std::shared_ptr< FastSerializerHelper > FSHelperPtr; } diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx index 3b1476c3a0e2..c32ec1faf0a3 100644 --- a/include/sfx2/dispatch.hxx +++ b/include/sfx2/dispatch.hxx @@ -27,7 +27,6 @@ #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> -#include <boost/scoped_ptr.hpp> class SfxSlotServer; class SfxShell; @@ -72,7 +71,7 @@ enum SfxSlotFilterState class SFX2_DLLPUBLIC SfxDispatcher { - boost::scoped_ptr<SfxDispatcher_Impl> pImp; + std::unique_ptr<SfxDispatcher_Impl> xImp; private: // Search for temporary evaluated Todos diff --git a/include/sfx2/itemconnect.hxx b/include/sfx2/itemconnect.hxx index 3e49921ae659..7167075e098b 100644 --- a/include/sfx2/itemconnect.hxx +++ b/include/sfx2/itemconnect.hxx @@ -25,16 +25,11 @@ #include <memory> -#include <boost/scoped_ptr.hpp> #include <sfx2/itemwrapper.hxx> #include <sfx2/controlwrapper.hxx> - - namespace sfx { - - typedef int ItemConnFlags; /** No special state for the connection. */ @@ -513,7 +508,7 @@ bool ItemControlConnection< ItemWrpT, ControlWrpT >::FillItemSet( if( !pOldItem || !(maItemWrp.GetItemValue( *pOldItem ) == aNewValue) ) { sal_uInt16 nWhich = ItemWrapperHelper::GetWhichId( rDestSet, maItemWrp.GetSlotId() ); - boost::scoped_ptr< ItemType > xItem( + std::unique_ptr< ItemType > xItem( static_cast< ItemType* >( maItemWrp.GetDefaultItem( rDestSet ).Clone() ) ); xItem->SetWhich( nWhich ); maItemWrp.SetItemValue( *xItem, aNewValue ); diff --git a/include/sfx2/taskpane.hxx b/include/sfx2/taskpane.hxx index 5495c0b0bc6d..dadbdf1d300f 100644 --- a/include/sfx2/taskpane.hxx +++ b/include/sfx2/taskpane.hxx @@ -27,7 +27,6 @@ #include <svtools/toolpanel/tabalignment.hxx> #include <svtools/toolpanel/tabitemcontent.hxx> -#include <boost/scoped_ptr.hpp> #include <boost/optional.hpp> namespace svt @@ -126,7 +125,7 @@ namespace sfx2 virtual void GetFocus() SAL_OVERRIDE; private: - ::boost::scoped_ptr< ModuleTaskPane_Impl > m_pImpl; + std::unique_ptr<ModuleTaskPane_Impl> m_xImpl; }; @@ -152,7 +151,7 @@ namespace sfx2 void ActivateToolPanel( const OUString& i_rPanelURL ); private: - ::boost::scoped_ptr< TaskPaneController_Impl > m_pImpl; + std::unique_ptr<TaskPaneController_Impl> m_xImpl; }; diff --git a/include/svl/asiancfg.hxx b/include/svl/asiancfg.hxx index 0652a5dace12..127eb009a973 100644 --- a/include/svl/asiancfg.hxx +++ b/include/svl/asiancfg.hxx @@ -23,7 +23,7 @@ #include <sal/config.h> #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <com/sun/star/uno/Sequence.hxx> #include <sal/types.h> #include <svl/svldllapi.h> @@ -62,7 +62,7 @@ public: private: struct Impl; - boost::scoped_ptr< Impl > impl_; + std::unique_ptr< Impl > impl_; }; #endif diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx index d0132daf9d6c..d9b12274aae5 100644 --- a/include/svl/undo.hxx +++ b/include/svl/undo.hxx @@ -23,9 +23,8 @@ #include <rtl/ustring.hxx> #include <tools/rtti.hxx> -#include <boost/scoped_ptr.hpp> - #include <limits> +#include <memory> struct MarkedUndoAction; @@ -313,8 +312,8 @@ class SVL_DLLPUBLIC SfxUndoManager : public ::svl::IUndoManager { friend class SfxLinkUndoAction; - ::boost::scoped_ptr< SfxUndoManager_Data > - m_pData; + std::unique_ptr< SfxUndoManager_Data > + m_xData; public: SfxUndoManager( size_t nMaxUndoActionCount = 20 ); virtual ~SfxUndoManager(); diff --git a/include/svtools/DocumentInfoPreview.hxx b/include/svtools/DocumentInfoPreview.hxx index ee671b7a0f8a..e75877588029 100644 --- a/include/svtools/DocumentInfoPreview.hxx +++ b/include/svtools/DocumentInfoPreview.hxx @@ -22,7 +22,6 @@ #include <sal/config.h> -#include <boost/scoped_ptr.hpp> #include <i18nlangtag/languagetag.hxx> #include <com/sun/star/uno/Reference.hxx> #include <svtools/svmedit2.hxx> @@ -56,7 +55,7 @@ public: private: ExtMultiLineEdit m_pEditWin; - boost::scoped_ptr< SvtDocInfoTable_Impl > m_pInfoTable; + std::unique_ptr< SvtDocInfoTable_Impl > m_xInfoTable; LanguageTag m_aLanguageTag; void insertEntry(OUString const & title, OUString const & value); diff --git a/include/svtools/popupwindowcontroller.hxx b/include/svtools/popupwindowcontroller.hxx index 27fbf710ac2d..d505e2f04dc2 100644 --- a/include/svtools/popupwindowcontroller.hxx +++ b/include/svtools/popupwindowcontroller.hxx @@ -25,7 +25,6 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <svtools/toolboxcontroller.hxx> -#include <boost/scoped_ptr.hpp> namespace vcl { class Window; } @@ -69,7 +68,7 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: - boost::scoped_ptr< PopupWindowControllerImpl > mpImpl; + std::unique_ptr< PopupWindowControllerImpl > mxImpl; }; } // namespace svt diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 6c430dcc54e9..16d5d692594e 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -27,8 +27,6 @@ #include <vcl/virdev.hxx> #include <vcl/field.hxx> -#include <boost/scoped_ptr.hpp> - #include <svtools/accessibleruler.hxx> class MouseEvent; @@ -680,8 +678,8 @@ private: Link maDoubleClickHdl; Link maExtraDownHdl; - boost::scoped_ptr<RulerSelection> mpCurrentHitTest; - boost::scoped_ptr<RulerSelection> mpPreviousHitTest; + std::unique_ptr<RulerSelection> mxCurrentHitTest; + std::unique_ptr<RulerSelection> mxPreviousHitTest; SvtRulerAccessible* pAccContext; diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index acb7a4e92ad7..baebae42db8c 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -25,8 +25,8 @@ #include <vcl/ctrl.hxx> #include <vcl/virdev.hxx> #include <vcl/timer.hxx> +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> class MouseEvent; class TrackingEvent; @@ -177,7 +177,7 @@ to be set (before Show) with SetStyle(). *************************************************************************/ typedef std::vector<ValueSetItem*> ValueItemList; -typedef boost::scoped_ptr<ValueSetItem> ValueSetItemPtr; +typedef std::unique_ptr<ValueSetItem> ValueSetItemPtr; // - ValueSet types - #define WB_RADIOSEL ((WinBits)0x00008000) @@ -201,7 +201,7 @@ private: Timer maTimer; ValueItemList mItemList; ValueSetItemPtr mpNoneItem; - boost::scoped_ptr<ScrollBar> mpScrollBar; + std::unique_ptr<ScrollBar> mxScrollBar; Rectangle maNoneItemRect; Rectangle maItemListRect; long mnItemWidth; diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index b7daff733d68..38b60e3f6f4e 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -25,8 +25,6 @@ #include <sfx2/itemconnect.hxx> #include <svx/svxdllapi.h> -#include <boost/scoped_ptr.hpp> - class NumericField; namespace svx { @@ -128,9 +126,9 @@ public: protected: struct DialControl_Impl { - ::boost::scoped_ptr<DialControlBmp> mpBmpEnabled; - ::boost::scoped_ptr<DialControlBmp> mpBmpDisabled; - ::boost::scoped_ptr<DialControlBmp> mpBmpBuffered; + std::unique_ptr<DialControlBmp> mxBmpEnabled; + std::unique_ptr<DialControlBmp> mxBmpDisabled; + std::unique_ptr<DialControlBmp> mxBmpBuffered; Link maModifyHdl; NumericField* mpLinkField; sal_Int32 mnLinkedFieldValueMultiplyer; diff --git a/include/svx/framelinkarray.hxx b/include/svx/framelinkarray.hxx index f177215ed8c7..0fbaf43870c7 100644 --- a/include/svx/framelinkarray.hxx +++ b/include/svx/framelinkarray.hxx @@ -20,13 +20,11 @@ #ifndef INCLUDED_SVX_FRAMELINKARRAY_HXX #define INCLUDED_SVX_FRAMELINKARRAY_HXX -#include <svx/framelink.hxx> #include <drawinglayer/processor2d/baseprocessor2d.hxx> - -#include <vector> +#include <svx/framelink.hxx> #include <svx/svxdllapi.h> - -#include <boost/scoped_ptr.hpp> +#include <memory> +#include <vector> namespace svx { namespace frame { @@ -380,7 +378,7 @@ public: private: - typedef boost::scoped_ptr<ArrayImpl> ArrayImplPtr; + typedef std::unique_ptr<ArrayImpl> ArrayImplPtr; ArrayImplPtr mxImpl; }; diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx index 60bc63e0e786..ff44a6c45d64 100644 --- a/include/svx/ruler.hxx +++ b/include/svx/ruler.hxx @@ -24,8 +24,8 @@ #include <svl/lstner.hxx> #include <svx/svxdllapi.h> -#include <boost/scoped_ptr.hpp> #include <boost/scoped_array.hpp> +#include <memory> class SvxProtectItem; class SvxRulerItem; @@ -47,19 +47,19 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener using Window::Notify; SvxRulerItem** pCtrlItem; - boost::scoped_ptr<SvxLongLRSpaceItem> mpLRSpaceItem; // left and right edge - boost::scoped_ptr<SfxRectangleItem> mpMinMaxItem; // maxima for dragging - boost::scoped_ptr<SvxLongULSpaceItem> mpULSpaceItem; // upper and lower edge - boost::scoped_ptr<SvxTabStopItem> mpTabStopItem; // tab stops - boost::scoped_ptr<SvxLRSpaceItem> mpParaItem; // paragraphs - boost::scoped_ptr<SvxLRSpaceItem> mpParaBorderItem; // border distance - boost::scoped_ptr<SvxPagePosSizeItem> mpPagePosItem; // page distance to the rule - boost::scoped_ptr<SvxColumnItem> mpColumnItem; // columns - boost::scoped_ptr<SvxObjectItem> mpObjectItem; // object + std::unique_ptr<SvxLongLRSpaceItem> mxLRSpaceItem; // left and right edge + std::unique_ptr<SfxRectangleItem> mxMinMaxItem; // maxima for dragging + std::unique_ptr<SvxLongULSpaceItem> mxULSpaceItem; // upper and lower edge + std::unique_ptr<SvxTabStopItem> mxTabStopItem; // tab stops + std::unique_ptr<SvxLRSpaceItem> mxParaItem; // paragraphs + std::unique_ptr<SvxLRSpaceItem> mxParaBorderItem; // border distance + std::unique_ptr<SvxPagePosSizeItem> mxPagePosItem; // page distance to the rule + std::unique_ptr<SvxColumnItem> mxColumnItem; // columns + std::unique_ptr<SvxObjectItem> mxObjectItem; // object vcl::Window* pEditWin; - boost::scoped_ptr<SvxRuler_Impl> mpRulerImpl; + std::unique_ptr<SvxRuler_Impl> mxRulerImpl; bool bAppSetNullOffset :1; bool bHorz :1; diff --git a/include/svx/sidebar/Popup.hxx b/include/svx/sidebar/Popup.hxx index 2e5d7910fe81..e11e8c1ee6b0 100644 --- a/include/svx/sidebar/Popup.hxx +++ b/include/svx/sidebar/Popup.hxx @@ -24,7 +24,6 @@ #include <tools/link.hxx> #include <boost/function.hpp> -#include <boost/scoped_ptr.hpp> namespace vcl { class Window; } class ToolBox; @@ -77,7 +76,7 @@ public : void SetPopupModeEndHandler (const ::boost::function<void(void)>& rCallback); protected: - ::boost::scoped_ptr<PopupControl> mpControl; + std::unique_ptr<PopupControl> mxControl; /** Make sure that both PopupContainer and PopupControl objects exist. Calls the maControlCreator functor if necessary. @@ -94,7 +93,7 @@ private: ::boost::function<PopupControl*(PopupContainer*)> maControlCreator; ::boost::function<void(void)> maPopupModeEndCallback; const ::rtl::OUString msAccessibleName; - ::boost::scoped_ptr<PopupContainer> mpContainer; + std::unique_ptr<PopupContainer> mxContainer; DECL_LINK(PopupModeEndHandler, void*); }; diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx index 8a329347ddf9..b2a662dc78b9 100644 --- a/include/svx/svdomedia.hxx +++ b/include/svx/svdomedia.hxx @@ -81,7 +81,7 @@ protected: private: struct Impl; - ::boost::scoped_ptr<Impl> m_pImpl; + std::unique_ptr<Impl> m_xImpl; }; #endif // INCLUDED_SVX_SVDOMEDIA_HXX diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index 03387e2b79ad..868dc49ee801 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -29,7 +29,6 @@ #include <cppuhelper/weakref.hxx> #include <svx/svdtypes.hxx> #include <svx/svdlayer.hxx> -#include <vector> #include <svx/sdrpageuser.hxx> #include <svx/sdr/contact/viewobjectcontactredirector.hxx> #include <svx/sdrmasterpagedescriptor.hxx> @@ -37,11 +36,11 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> #include <svx/svdobj.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> +#include <vector> // predefines - namespace reportdesign { class OSection; } namespace sdr { namespace contact { class ViewContact; }} class SdrPage; @@ -213,7 +212,7 @@ public: const sal_uInt32 nNewNavigationPosition); /** Return the object for the given navigation position. When there is - a user defined navigation order, i.e. mpNavigationOrder is not NULL, + a user defined navigation order, i.e. mxNavigationOrder is not NULL, then that is used to look up the object. Otherwise the z-order is used by looking up the object in maList. @param nNavigationPosition @@ -229,7 +228,7 @@ public: void ClearObjectNavigationOrder (void); /** Set the navigation position of all SdrObjects to their position in - the mpNavigationOrder list. This method returns immediately when no + the mxNavigationOrder list. This method returns immediately when no update is necessary. @return This method returns <TRUE/> when the navigation positions stored @@ -258,7 +257,7 @@ private: class WeakSdrObjectContainerType; /// This list, if it exists, defines the navigation order. If it does /// not exist then maList defines the navigation order. - ::boost::scoped_ptr<WeakSdrObjectContainerType> mpNavigationOrder; + std::unique_ptr<WeakSdrObjectContainerType> mxNavigationOrder; /// This flag is <TRUE/> when the mpNavigation list has been changed but /// the indices of the referenced SdrObjects still have their old values. diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx index 2f90a130b6b6..8db6a02625d3 100644 --- a/include/svx/tbcontrl.hxx +++ b/include/svx/tbcontrl.hxx @@ -135,9 +135,9 @@ #include <sfx2/tbxctrl.hxx> #include <svx/strarray.hxx> #include <svx/svxdllapi.h> -#include <boost/scoped_ptr.hpp> #include <com/sun/star/awt/FontDescriptor.hpp> #include <svx/PaletteManager.hxx> +#include <memory> // important im tbxctrls.hxx created HeDaBu !!! class SvxLineItem; @@ -236,7 +236,7 @@ class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl { using SfxToolBoxControl::StateChanged; - ::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > pBtnUpdater; + std::unique_ptr< ::svx::ToolboxButtonColorUpdater > m_xBtnUpdater; PaletteManager mPaletteManager; BorderColorStatus maBorderColorStatus; bool bSidebarType; diff --git a/include/svx/zoomsliderctrl.hxx b/include/svx/zoomsliderctrl.hxx index f35f825383a4..e0eca276eebd 100644 --- a/include/svx/zoomsliderctrl.hxx +++ b/include/svx/zoomsliderctrl.hxx @@ -22,16 +22,15 @@ #include <sfx2/stbitem.hxx> #include <svx/svxdllapi.h> -#include <boost/scoped_ptr.hpp> +#include <memory> // class SvxZoomSliderControl ---------------------------------------- - class SVX_DLLPUBLIC SvxZoomSliderControl : public SfxStatusBarControl { private: struct SvxZoomSliderControl_Impl; - boost::scoped_ptr<SvxZoomSliderControl_Impl> mpImpl; + std::unique_ptr<SvxZoomSliderControl_Impl> mxImpl; sal_uInt16 Offset2Zoom( long nOffset ) const; long Zoom2Offset( sal_uInt16 nZoom ) const; diff --git a/include/toolkit/awt/animatedimagespeer.hxx b/include/toolkit/awt/animatedimagespeer.hxx index 4c9e63a797b0..15dcac26e7eb 100644 --- a/include/toolkit/awt/animatedimagespeer.hxx +++ b/include/toolkit/awt/animatedimagespeer.hxx @@ -27,9 +27,8 @@ #include <cppuhelper/implbase3.hxx> -#include <boost/scoped_ptr.hpp> #include <boost/noncopyable.hpp> - +#include <memory> namespace toolkit { @@ -87,7 +86,7 @@ namespace toolkit void impl_updateImages_nolck( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_animatedImages ); private: - ::boost::scoped_ptr< AnimatedImagesPeer_Data > m_pData; + std::unique_ptr< AnimatedImagesPeer_Data > m_xData; }; diff --git a/include/toolkit/controls/animatedimages.hxx b/include/toolkit/controls/animatedimages.hxx index 813f1919abd7..1a31b2aaa80c 100644 --- a/include/toolkit/controls/animatedimages.hxx +++ b/include/toolkit/controls/animatedimages.hxx @@ -22,15 +22,11 @@ #include <toolkit/controls/unocontrolbase.hxx> #include <toolkit/controls/unocontrolmodel.hxx> - #include <com/sun/star/awt/XAnimatedImages.hpp> #include <com/sun/star/container/XContainerListener.hpp> #include <com/sun/star/uno/XComponentContext.hpp> - #include <cppuhelper/implbase1.hxx> - -#include <boost/scoped_ptr.hpp> - +#include <memory> namespace toolkit { @@ -83,8 +79,7 @@ namespace toolkit void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE; private: - ::boost::scoped_ptr< AnimatedImagesControlModel_Data > - m_pData; + std::unique_ptr< AnimatedImagesControlModel_Data > m_xData; }; diff --git a/include/toolkit/controls/unocontrols.hxx b/include/toolkit/controls/unocontrols.hxx index 079f70671565..e87800bef0b4 100644 --- a/include/toolkit/controls/unocontrols.hxx +++ b/include/toolkit/controls/unocontrols.hxx @@ -55,9 +55,9 @@ #include <comphelper/uno3.hxx> #include <list> +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> #include <boost/optional.hpp> #define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:" @@ -825,8 +825,8 @@ private: void impl_setStringItemList_nolck( const ::std::vector< OUString >& i_rStringItems ); protected: - ::boost::scoped_ptr< UnoControlListBoxModel_Data > m_pData; - ::cppu::OInterfaceContainerHelper m_aItemListListeners; + std::unique_ptr<UnoControlListBoxModel_Data> m_xData; + ::cppu::OInterfaceContainerHelper m_aItemListListeners; }; diff --git a/include/unotools/atom.hxx b/include/unotools/atom.hxx index 96f1574ecae1..fdc656e5b69a 100644 --- a/include/unotools/atom.hxx +++ b/include/unotools/atom.hxx @@ -24,7 +24,6 @@ #include <osl/mutex.hxx> #include <com/sun/star/util/XAtomServer.hpp> #include <cppuhelper/implbase1.hxx> -#include <boost/functional/hash.hpp> #include <list> #include <unordered_map> @@ -40,9 +39,9 @@ namespace utl { class AtomProvider { - int m_nAtoms; - std::unordered_map< int, OUString, ::boost::hash< int > > m_aStringMap; - std::unordered_map< OUString, int, OUStringHash > m_aAtomMap; + int m_nAtoms; + std::unordered_map<int, OUString> m_aStringMap; + std::unordered_map<OUString, int, OUStringHash> m_aAtomMap; public: AtomProvider(); ~AtomProvider(); @@ -53,7 +52,7 @@ namespace utl { class UNOTOOLS_DLLPUBLIC MultiAtomProvider { - std::unordered_map< int, AtomProvider*, ::boost::hash< int > > m_aAtomLists; + std::unordered_map<int, AtomProvider*> m_aAtomLists; public: MultiAtomProvider(); ~MultiAtomProvider(); diff --git a/include/unotools/closeveto.hxx b/include/unotools/closeveto.hxx index 9beb0b55361e..1079c3597341 100644 --- a/include/unotools/closeveto.hxx +++ b/include/unotools/closeveto.hxx @@ -21,16 +21,13 @@ #define INCLUDED_UNOTOOLS_CLOSEVETO_HXX #include <unotools/unotoolsdllapi.h> - #include <com/sun/star/uno/XInterface.hpp> - -#include <boost/scoped_ptr.hpp> +#include <memory> namespace utl { //= CloseVeto - struct CloseVeto_Data; /** will add a XCloseListener to a given component, and veto its closing as long as the <code>CloseVeto</code> instance is alive. @@ -45,7 +42,7 @@ namespace utl ~CloseVeto(); private: - ::boost::scoped_ptr< CloseVeto_Data > m_pData; + std::unique_ptr< CloseVeto_Data > m_xData; }; } // namespace dbaui diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx index 77e580fb37da..219d5ebc52fd 100644 --- a/include/unotools/localedatawrapper.hxx +++ b/include/unotools/localedatawrapper.hxx @@ -21,7 +21,6 @@ #define INCLUDED_UNOTOOLS_LOCALEDATAWRAPPER_HXX #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <com/sun/star/i18n/XLocaleData4.hpp> #include <com/sun/star/i18n/LocaleItem.hpp> #include <com/sun/star/i18n/reservedWords.hpp> @@ -29,6 +28,7 @@ #include <i18nlangtag/languagetag.hxx> #include <unotools/readwritemutexguard.hxx> #include <unotools/unotoolsdllapi.h> +#include <memory> namespace com { namespace sun { namespace star { namespace uno { @@ -54,14 +54,14 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper : private boost::noncopyable { static sal_uInt8 nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XLocaleData4 > xLD; - LanguageTag maLanguageTag; - ::boost::shared_ptr< ::com::sun::star::i18n::Calendar2 > xDefaultCalendar; - ::com::sun::star::i18n::LocaleDataItem aLocaleDataItem; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XLocaleData4 > xLD; + LanguageTag maLanguageTag; + std::shared_ptr< ::com::sun::star::i18n::Calendar2 > xDefaultCalendar; + ::com::sun::star::i18n::LocaleDataItem aLocaleDataItem; ::com::sun::star::uno::Sequence< OUString > aReservedWordSeq; ::com::sun::star::uno::Sequence< OUString > aDateAcceptancePatterns; - ::com::sun::star::uno::Sequence< sal_Int32 > aGrouping; + ::com::sun::star::uno::Sequence< sal_Int32 > aGrouping; // cached items OUString aLocaleItem[::com::sun::star::i18n::LocaleItem::COUNT]; OUString aReservedWord[::com::sun::star::i18n::reservedWords::COUNT]; @@ -170,7 +170,7 @@ public: MeasurementSystem mapMeasurementStringToEnum( const OUString& rMS ) const; /// Convenience method to obtain the default calendar. - const ::boost::shared_ptr< ::com::sun::star::i18n::Calendar2 > getDefaultCalendar() const; + const std::shared_ptr< ::com::sun::star::i18n::Calendar2 > getDefaultCalendar() const; /// Convenience method to obtain the day names of the default calendar. const ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > getDefaultCalendarDays() const; diff --git a/include/unotools/sharedunocomponent.hxx b/include/unotools/sharedunocomponent.hxx index ff932b69bba9..9a39134f6d26 100644 --- a/include/unotools/sharedunocomponent.hxx +++ b/include/unotools/sharedunocomponent.hxx @@ -21,10 +21,9 @@ #define INCLUDED_UNOTOOLS_SHAREDUNOCOMPONENT_HXX #include <unotools/unotoolsdllapi.h> - -#include <boost/shared_ptr.hpp> #include <com/sun/star/uno/Reference.hxx> #include <rtl/ref.hxx> +#include <memory> namespace com { namespace sun { namespace star { namespace lang { @@ -139,10 +138,10 @@ namespace utl { private: typedef COMPONENT Component; - typedef ::boost::shared_ptr< Component > ComponentPointer; + typedef std::shared_ptr<Component> ComponentPointer; private: - ComponentPointer m_pComponent; + ComponentPointer m_xComponent; ::com::sun::star::uno::Reference< INTERFACE > m_xTypedComponent; public: @@ -208,24 +207,24 @@ namespace utl INTERFACE* SAL_CALL operator->() const; - inline operator const ::com::sun::star::uno::Reference< INTERFACE >&() const + operator const ::com::sun::star::uno::Reference< INTERFACE >&() const { return m_xTypedComponent; } - inline const ::com::sun::star::uno::Reference< INTERFACE >& getTyped() const + const ::com::sun::star::uno::Reference< INTERFACE >& getTyped() const { return m_xTypedComponent; } - inline bool is() const + bool is() const { return m_xTypedComponent.is(); } - inline void clear() + void clear() { - m_pComponent.reset(); + m_xComponent.reset(); m_xTypedComponent.clear(); } }; @@ -240,7 +239,7 @@ namespace utl template < class INTERFACE, class COMPONENT > void SharedUNOComponent< INTERFACE, COMPONENT >::reset( const ::com::sun::star::uno::Reference< INTERFACE >& _rxComponent, AssignmentMode _eMode ) { - m_pComponent.reset( _eMode == TakeOwnership ? new COMPONENT( _rxComponent ) : NULL ); + m_xComponent.reset(_eMode == TakeOwnership ? new COMPONENT( _rxComponent ) : NULL); m_xTypedComponent = _rxComponent; } diff --git a/include/unotools/useroptions.hxx b/include/unotools/useroptions.hxx index 7a9cee52e4e7..e518d9f2c0d9 100644 --- a/include/unotools/useroptions.hxx +++ b/include/unotools/useroptions.hxx @@ -23,8 +23,7 @@ #include <unotools/configitem.hxx> #include <osl/mutex.hxx> #include <unotools/options.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> +#include <memory> // define ---------------------------------------------------------------- @@ -81,8 +80,8 @@ public: private: class Impl; - boost::shared_ptr<Impl> pImpl; - static boost::weak_ptr<Impl> pSharedImpl; + std::shared_ptr<Impl> xImpl; + static std::weak_ptr<Impl> xSharedImpl; private: class ChangeListener; }; diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index ef8264bdd299..0622f0922adc 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -20,7 +20,6 @@ #include <set> #include <stack> #include <vector> -#include <boost/noncopyable.hpp> #ifdef check # //some problem with MacOSX and a check define # undef check @@ -40,7 +39,7 @@ class VclExpander; class VclMultiLineEdit; namespace xmlreader { class XmlReader; } -class VCL_DLLPUBLIC VclBuilder: private boost::noncopyable +class VCL_DLLPUBLIC VclBuilder { public: typedef std::map<OString, OString> stringmap; @@ -115,6 +114,9 @@ public: css::uno::Reference<css::frame::XFrame> getFrame() { return m_xFrame; } private: + VclBuilder(const VclBuilder&) SAL_DELETED_FUNCTION; + VclBuilder& operator=(const VclBuilder&) SAL_DELETED_FUNCTION; + typedef boost::ptr_map<OUString, osl::Module> ModuleMap; //We store these until the builder is deleted, that way we can use the diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 3ab556ddfe50..20f56710828b 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -273,12 +273,10 @@ public: // - RadioButton - - - class VCL_DLLPUBLIC RadioButton : public Button { private: - boost::shared_ptr< std::vector<RadioButton*> > m_xGroup; + std::shared_ptr< std::vector<RadioButton*> > m_xGroup; Rectangle maStateRect; Rectangle maMouseRect; Image maImage; diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 02769231db34..0e98da6a6878 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -52,7 +52,6 @@ class NSOpenGLView; #endif #include <vcl/vclopengl_dllapi.hxx> -#include <boost/scoped_ptr.hpp> #include <boost/ptr_container/ptr_map.hpp> #include <vcl/window.hxx> #include <tools/gen.hxx> @@ -250,10 +249,10 @@ private: #endif GLWindow m_aGLWin; - boost::scoped_ptr<vcl::Window> m_pWindow; - vcl::Window* mpWindow; //points to m_pWindow or the parent window, don't delete it + std::unique_ptr<vcl::Window> m_xWindow; + vcl::Window* mpWindow; //points to m_xWindow or the parent window, don't delete it SystemChildWindow* m_pChildWindow; - boost::scoped_ptr<SystemChildWindow> m_pChildWindowGC; + std::unique_ptr<SystemChildWindow> m_xChildWindowGC; bool mbInitialized; int mnRefCount; bool mbRequestLegacyContext; diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx index c95b02d5261a..9724eb3d9ffd 100644 --- a/include/vcl/openglwin.hxx +++ b/include/vcl/openglwin.hxx @@ -14,8 +14,6 @@ #include <vcl/syschild.hxx> #include <vcl/vclopengl_dllapi.hxx> -#include <boost/scoped_ptr.hpp> - class OpenGLContext; class OpenGLWindowImpl; @@ -49,7 +47,7 @@ public: virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE; private: - boost::scoped_ptr<OpenGLWindowImpl> mpImpl; + std::unique_ptr<OpenGLWindowImpl> mxImpl; IRenderer* mpRenderer; Point maStartPoint; diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 6a2aaa2ea85e..ec1063b6b717 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -43,8 +43,6 @@ #include <unotools/fontdefs.hxx> -#include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> #ifdef check # //some problem with MacOSX and a check define # undef check @@ -54,6 +52,7 @@ #include <com/sun/star/drawing/LineCap.hpp> #include <com/sun/star/uno/Reference.h> +#include <memory> #include <vector> #if defined UNX @@ -250,7 +249,7 @@ extern const sal_uLong nVCLBLut[ 6 ]; extern const sal_uLong nVCLDitherLut[ 256 ]; extern const sal_uLong nVCLLut[ 256 ]; -class VCL_DLLPUBLIC OutputDevice: private boost::noncopyable +class VCL_DLLPUBLIC OutputDevice { friend class Printer; friend class VirtualDevice; @@ -260,6 +259,9 @@ class VCL_DLLPUBLIC OutputDevice: private boost::noncopyable friend void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight ); private: + OutputDevice(const OutputDevice&) SAL_DELETED_FUNCTION; + OutputDevice& operator=(const OutputDevice&) SAL_DELETED_FUNCTION; + mutable SalGraphics* mpGraphics; ///< Graphics context to draw on mutable OutputDevice* mpPrevGraphics; ///< Previous output device in list mutable OutputDevice* mpNextGraphics; ///< Next output device in list @@ -316,7 +318,7 @@ private: TextAlign meTextAlign; RasterOp meRasterOp; Wallpaper maBackground; - boost::scoped_ptr<AllSettings> mxSettings; + std::unique_ptr<AllSettings> mxSettings; MapMode maMapMode; Point maRefPoint; sal_uInt16 mnAntialiasing; diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 5b4b35d0951e..f8c1ff55b479 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -35,8 +35,6 @@ #include <com/sun/star/security/XCertificate.hpp> #include <com/sun/star/lang/Locale.hpp> -#include <boost/scoped_ptr.hpp> - #include <list> #include <vector> #include <set> @@ -77,7 +75,7 @@ class VCL_DLLPUBLIC PDFOutputStream class VCL_DLLPUBLIC PDFWriter { - boost::scoped_ptr<PDFWriterImpl> pImplementation; + std::unique_ptr<PDFWriterImpl> xImplementation; public: // extended line info enum CapType { capButt, capRound, capSquare }; diff --git a/include/vcl/region.hxx b/include/vcl/region.hxx index b182d36b8848..60090cea5122 100644 --- a/include/vcl/region.hxx +++ b/include/vcl/region.hxx @@ -22,9 +22,8 @@ #include <tools/gen.hxx> #include <vcl/dllapi.h> - #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> class ImplRegionBand; class RegionBand; @@ -34,9 +33,9 @@ namespace vcl { class Window; } class OutputDevice; class Bitmap; -typedef boost::shared_ptr< RegionBand > RegionBandPtr; -typedef boost::shared_ptr< tools::PolyPolygon > PolyPolygonPtr; -typedef boost::shared_ptr< basegfx::B2DPolyPolygon > B2DPolyPolygonPtr; +typedef std::shared_ptr< RegionBand > RegionBandPtr; +typedef std::shared_ptr< tools::PolyPolygon > PolyPolygonPtr; +typedef std::shared_ptr< basegfx::B2DPolyPolygon > B2DPolyPolygonPtr; typedef std::vector< Rectangle > RectangleVector; namespace vcl { diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 9fc2d917f079..7de317f5eee6 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -1623,7 +1623,6 @@ namespace vcl /** guard class that uses tryToAcquire() and has isAcquired() to check */ class SolarMutexTryAndBuyGuard - : private boost::noncopyable { private: bool m_isAcquired; @@ -1632,6 +1631,9 @@ class SolarMutexTryAndBuyGuard #endif comphelper::SolarMutex& m_rSolarMutex; + SolarMutexTryAndBuyGuard(const SolarMutexTryAndBuyGuard&) SAL_DELETED_FUNCTION; + SolarMutexTryAndBuyGuard& operator=(const SolarMutexTryAndBuyGuard&) SAL_DELETED_FUNCTION; + public: SolarMutexTryAndBuyGuard() diff --git a/include/vcl/svgdata.hxx b/include/vcl/svgdata.hxx index d4173f9182d1..15d27565b670 100644 --- a/include/vcl/svgdata.hxx +++ b/include/vcl/svgdata.hxx @@ -22,14 +22,11 @@ #include <basegfx/range/b2drange.hxx> #include <boost/shared_array.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/utility.hpp> #include <com/sun/star/graphic/XPrimitive2D.hpp> #include <vcl/bitmapex.hxx> #include <rtl/ustring.hxx> - typedef boost::shared_array< sal_uInt8 > SvgDataArray; typedef ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > Primitive2DReference; typedef ::com::sun::star::uno::Sequence< Primitive2DReference > Primitive2DSequence; @@ -44,8 +41,7 @@ BitmapEx VCL_DLLPUBLIC convertPrimitive2DSequenceToBitmapEx( const sal_uInt32 nMaximumQuadraticPixels = 500000); - -class VCL_DLLPUBLIC SvgData : private boost::noncopyable +class VCL_DLLPUBLIC SvgData { private: // the file and length @@ -64,6 +60,9 @@ private: void ensureReplacement(); void ensureSequenceAndRange(); + SvgData(const SvgData&) SAL_DELETED_FUNCTION; + SvgData& operator=(const SvgData&) SAL_DELETED_FUNCTION; + public: SvgData(const SvgDataArray& rSvgDataArray, sal_uInt32 nSvgDataArrayLength, const OUString& rPath); SvgData(const OUString& rPath); @@ -79,7 +78,7 @@ public: const BitmapEx& getReplacement() const; }; -typedef boost::shared_ptr< SvgData > SvgDataPtr; +typedef std::shared_ptr< SvgData > SvgDataPtr; #endif // INCLUDED_VCL_SVGDATA_HXX diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index 592c8343bb51..43b9315bef54 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -25,9 +25,9 @@ #include <com/sun/star/uno/Reference.h> #include <map> +#include <memory> #include <boost/utility.hpp> #include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> #include <xmloff/xmltkmap.hxx> #include <rtl/ref.hxx> @@ -371,7 +371,7 @@ class XMLOFF_DLLPUBLIC XMLTextImportHelper : public salhelper::SimpleReferenceOb { private: struct Impl; - boost::scoped_ptr<Impl> m_pImpl; + std::unique_ptr<Impl> m_xImpl; /// ugly, but implementation of this is in XMLPropertyBackpatcher.cxx struct BackpatcherImpl; ::boost::shared_ptr<BackpatcherImpl> m_pBackpatcherImpl; diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index 376fe42e9487..ca0c3b43f3b7 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -30,8 +30,8 @@ #include <xmloff/styleexp.hxx> #include <xmloff/xmltoken.hxx> #include <xmloff/SinglePropertySetInfoCache.hxx> +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> class XMLTextListsHelper; class SvXMLExport; @@ -66,7 +66,7 @@ namespace xmloff class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport { struct Impl; - ::boost::scoped_ptr<Impl> m_pImpl; + std::unique_ptr<Impl> m_xImpl; // SvXMLExport& rExport; SvXMLAutoStylePoolP& rAutoStylePool; diff --git a/include/xmloff/xmlcnimp.hxx b/include/xmloff/xmlcnimp.hxx index 70825653f2b8..aefee1c7ecd4 100644 --- a/include/xmloff/xmlcnimp.hxx +++ b/include/xmloff/xmlcnimp.hxx @@ -22,14 +22,14 @@ #include <xmloff/dllapi.h> #include <sal/types.h> -#include <boost/scoped_ptr.hpp> +#include <memory> class SvXMLAttrCollection; class XMLOFF_DLLPUBLIC SvXMLAttrContainerData { private: - boost::scoped_ptr<SvXMLAttrCollection> pimpl; + std::unique_ptr<SvXMLAttrCollection> pimpl; public: SvXMLAttrContainerData(); diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 434c0b7dc5af..20f5cbef53c2 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -32,7 +32,7 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/plugin/TestPlugIn.h> -#include <boost/scoped_ptr.hpp> +#include <memory> #ifdef WNT #include <windows.h> @@ -1530,16 +1530,16 @@ namespace osl_FileStatus createTestFile( aTmpName3, aTmpName2 ); createTestDirectory( aTmpName3, aTmpName1 ); - boost::scoped_ptr<Directory> pDir( new Directory( aTmpName3 ) ); - nError1 = pDir->open(); + std::unique_ptr<Directory> xDir( new Directory( aTmpName3 ) ); + nError1 = xDir->open(); CPPUNIT_ASSERT_MESSAGE("open aTmpName3 failed!", ::osl::FileBase::E_None == nError1 ); //getNextItem can not assure which item retrieved - nError1 = pDir->getNextItem( m_aItem_1, 1 ); + nError1 = xDir->getNextItem( m_aItem_1, 1 ); CPPUNIT_ASSERT_MESSAGE("get first item failed!", ::osl::FileBase::E_None == nError1 ); - nError1 = pDir->getNextItem( m_aItem_2 ); + nError1 = xDir->getNextItem( m_aItem_2 ); CPPUNIT_ASSERT_MESSAGE("get second item failed!", ::osl::FileBase::E_None == nError1 ); - pDir->close(); + xDir->close(); //mindy: failed on my RH9,so removed temporaly //nError1 = ::osl::DirectoryItem::get( aVolURL2, m_aVolumeItem ); //CPPUNIT_ASSERT_MESSAGE("get volume item failed!", ::osl::FileBase::E_None == nError1 ); diff --git a/sc/source/ui/sidebar/CellLineStylePopup.cxx b/sc/source/ui/sidebar/CellLineStylePopup.cxx index fa56a7700824..1409037bb5b2 100644 --- a/sc/source/ui/sidebar/CellLineStylePopup.cxx +++ b/sc/source/ui/sidebar/CellLineStylePopup.cxx @@ -37,7 +37,7 @@ void CellLineStylePopup::SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal_u { ProvideContainerAndControl(); - CellLineStyleControl* pControl = dynamic_cast< CellLineStyleControl* >(mpControl.get()); + CellLineStyleControl* pControl = dynamic_cast< CellLineStyleControl* >(mxControl.get()); if(pControl) { diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index 9638e610656b..bd7f2faacf01 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -148,8 +148,8 @@ Clipboard::Clipboard (SlideSorter& rSlideSorter) maPagesToRemove(), maPagesToSelect(), mbUpdateSelectionPending(false), - mpUndoContext(), - mpSelectionObserverContext(), + mxUndoContext(), + mxSelectionObserverContext(), mnDragFinishedUserEventId(0) { } @@ -605,8 +605,8 @@ IMPL_LINK(Clipboard, ProcessDragFinished, void*, pUserData) } mrController.GetSelectionManager()->DeleteSelectedPages(); } - mpUndoContext.reset(); - mpSelectionObserverContext.reset(); + mxUndoContext.reset(); + mxSelectionObserverContext.reset(); return 1; } @@ -687,7 +687,7 @@ sal_Int8 Clipboard::ExecuteDrop ( sal_uInt16 nLayer) { sal_Int8 nResult = DND_ACTION_NONE; - mpUndoContext.reset(); + mxUndoContext.reset(); const Clipboard::DropType eDropType (IsDropAccepted(rTargetHelper)); switch (eDropType) @@ -728,10 +728,10 @@ sal_Int8 Clipboard::ExecuteDrop ( SlideSorterController::ModelChangeLock aModelChangeLock (mrController); // Handle a general drop operation. - mpUndoContext.reset(new UndoContext ( + mxUndoContext.reset(new UndoContext ( mrSlideSorter.GetModel().GetDocument(), mrSlideSorter.GetViewShell()->GetViewShellBase().GetMainViewShell())); - mpSelectionObserverContext.reset(new SelectionObserver::Context(mrSlideSorter)); + mxSelectionObserverContext.reset(new SelectionObserver::Context(mrSlideSorter)); HandlePageDrop(*pDragTransferable); nResult = rEvent.mnAction; @@ -797,10 +797,10 @@ bool Clipboard::IsInsertionTrivial ( void Clipboard::Abort (void) { - if (mpSelectionObserverContext) + if (mxSelectionObserverContext) { - mpSelectionObserverContext->Abort(); - mpSelectionObserverContext.reset(); + mxSelectionObserverContext->Abort(); + mxSelectionObserverContext.reset(); } } diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx index 1099a2b1d8ec..9421eef2c521 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx @@ -133,9 +133,9 @@ private: Typically created in ExecuteDrop() and released in DragFinish(). */ class UndoContext; - ::boost::scoped_ptr<UndoContext> mpUndoContext; + std::unique_ptr<UndoContext> mxUndoContext; - ::boost::scoped_ptr<SelectionObserver::Context> mpSelectionObserverContext; + std::unique_ptr<SelectionObserver::Context> mxSelectionObserverContext; ImplSVEvent * mnDragFinishedUserEventId; void CreateSlideTransferable ( diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index b42f32aba37f..46d1d3f7d330 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -144,7 +144,7 @@ struct SfxDispatcher_Impl */ bool SfxDispatcher::IsFlushed() const { - return pImp->bFlushed; + return xImp->bFlushed; } /** This method performs outstanding push- and pop- commands. For <SfxShell>s, @@ -154,7 +154,7 @@ bool SfxDispatcher::IsFlushed() const */ void SfxDispatcher::Flush() { - if (!pImp->bFlushed) FlushImpl(); + if (!xImp->bFlushed) FlushImpl(); } /** With this method, a <SfxShell> pushed on to the SfxDispatcher. @@ -195,7 +195,7 @@ bool SfxDispatcher::IsActive(const SfxShell& rShell) */ bool SfxDispatcher::IsLocked(sal_uInt16) const { - return pImp->bLocked; + return xImp->bLocked; } /** With this method it can be determined if the SfxDispacher is the @@ -205,7 +205,7 @@ bool SfxDispatcher::IsLocked(sal_uInt16) const */ bool SfxDispatcher::IsAppDispatcher() const { - return !pImp->pFrame; + return !xImp->pFrame; } /** Helper function to check whether a slot can be executed and @@ -250,15 +250,15 @@ int SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest { // 'this' must respond in the Destructor bool bThisDispatcherAlive = true; - bool *pOldInCallAliveFlag = pImp->pInCallAliveFlag; - pImp->pInCallAliveFlag = &bThisDispatcherAlive; + bool *pOldInCallAliveFlag = xImp->pInCallAliveFlag; + xImp->pInCallAliveFlag = &bThisDispatcherAlive; SfxExecFunc pFunc = rSlot.GetExecFnc(); rShell.CallExec( pFunc, rReq ); // If 'this' is still alive if ( bThisDispatcherAlive ) - pImp->pInCallAliveFlag = pOldInCallAliveFlag; + xImp->pInCallAliveFlag = pOldInCallAliveFlag; else { if ( pOldInCallAliveFlag ) @@ -305,45 +305,45 @@ int SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent ) { - pImp.reset(new SfxDispatcher_Impl); - pImp->bFlushed = true; - - pImp->pCachedServ1 = 0; - pImp->pCachedServ2 = 0; - pImp->bFlushing = false; - pImp->bUpdated = false; - pImp->bLocked = false; - pImp->bActive = false; - pImp->pParent = NULL; - pImp->bNoUI = false; - pImp->bReadOnly = false; - pImp->bQuiet = false; - pImp->bModal = false; - pImp->pInCallAliveFlag = 0; - pImp->nFilterEnabling = SFX_SLOT_FILTER_DISABLED; - pImp->nFilterCount = 0; - pImp->pFilterSIDs = 0; - pImp->nDisableFlags = 0; - - pImp->pParent = pParent; - - pImp->bInvalidateOnUnlock = false; + xImp.reset(new SfxDispatcher_Impl); + xImp->bFlushed = true; + + xImp->pCachedServ1 = 0; + xImp->pCachedServ2 = 0; + xImp->bFlushing = false; + xImp->bUpdated = false; + xImp->bLocked = false; + xImp->bActive = false; + xImp->pParent = NULL; + xImp->bNoUI = false; + xImp->bReadOnly = false; + xImp->bQuiet = false; + xImp->bModal = false; + xImp->pInCallAliveFlag = 0; + xImp->nFilterEnabling = SFX_SLOT_FILTER_DISABLED; + xImp->nFilterCount = 0; + xImp->pFilterSIDs = 0; + xImp->nDisableFlags = 0; + + xImp->pParent = pParent; + + xImp->bInvalidateOnUnlock = false; for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++) - pImp->aObjBars[n].nResId = 0; + xImp->aObjBars[n].nResId = 0; GenLink aGenLink( LINK(this, SfxDispatcher, PostMsgHandler) ); - pImp->xPoster = new SfxHintPoster(aGenLink); + xImp->xPoster = new SfxHintPoster(aGenLink); - pImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); - pImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); + xImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); + xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); } SfxDispatcher::SfxDispatcher( SfxDispatcher* pParent ) { Construct_Impl( pParent ); - pImp->pFrame = 0; + xImp->pFrame = 0; } /** The constructor of the SfxDispatcher class places a stack of empty @@ -361,7 +361,7 @@ SfxDispatcher::SfxDispatcher(SfxViewFrame *pViewFrame) } else Construct_Impl( 0 ); - pImp->pFrame = pViewFrame; + xImp->pFrame = pViewFrame; } /** The destructor of the SfxDispatcher class should not be called when the @@ -374,23 +374,23 @@ SfxDispatcher::~SfxDispatcher() OStringBuffer sTemp("Delete Dispatcher "); sTemp.append(reinterpret_cast<sal_Int64>(this)); OSL_TRACE("%s", sTemp.getStr()); - DBG_ASSERT( !pImp->bActive, "deleting active Dispatcher" ); + DBG_ASSERT( !xImp->bActive, "deleting active Dispatcher" ); #endif // So that no timer by Reschedule in PlugComm strikes the LeaveRegistrations - pImp->aIdle.Stop(); - pImp->xPoster->SetEventHdl( Link() ); + xImp->aIdle.Stop(); + xImp->xPoster->SetEventHdl( Link() ); // Notify the stack varialbles in Call_Impl - if ( pImp->pInCallAliveFlag ) - *pImp->pInCallAliveFlag = false; + if ( xImp->pInCallAliveFlag ) + *xImp->pInCallAliveFlag = false; // Get bindings and application SfxApplication *pSfxApp = SfxGetpApp(); SfxBindings* pBindings = GetBindings(); // When not flushed, revive the bindings - if (pBindings && !pSfxApp->IsDowning() && !pImp->bFlushed) + if (pBindings && !pSfxApp->IsDowning() && !xImp->bFlushed) pBindings->DLEAVEREGISTRATIONS(); // may unregister the bindings @@ -441,11 +441,11 @@ void SfxDispatcher::Pop(SfxShell& rShell, sal_uInt16 nMode) << (bUntil ? " (up to)" : "")); // same shell as on top of the to-do stack? - if(pImp->aToDoStack.size() && pImp->aToDoStack.front().pCluster == &rShell) + if(xImp->aToDoStack.size() && xImp->aToDoStack.front().pCluster == &rShell) { // cancel inverse actions - if ( pImp->aToDoStack.front().bPush != bPush ) - pImp->aToDoStack.pop_front(); + if ( xImp->aToDoStack.front().bPush != bPush ) + xImp->aToDoStack.pop_front(); else { DBG_ASSERT( bPush, "SfxInterface pushed more than once" ); @@ -455,12 +455,12 @@ void SfxDispatcher::Pop(SfxShell& rShell, sal_uInt16 nMode) else { // Remember Action - pImp->aToDoStack.push_front( SfxToDo_Impl(bPush, bDelete, bUntil, rShell) ); - if (pImp->bFlushed) + xImp->aToDoStack.push_front( SfxToDo_Impl(bPush, bDelete, bUntil, rShell) ); + if (xImp->bFlushed) { OSL_TRACE("Unflushed dispatcher!"); - pImp->bFlushed = false; - pImp->bUpdated = false; + xImp->bFlushed = false; + xImp->bUpdated = false; // Put bindings to sleep SfxBindings* pBindings = GetBindings(); @@ -469,20 +469,20 @@ void SfxDispatcher::Pop(SfxShell& rShell, sal_uInt16 nMode) } } - if(!pSfxApp->IsDowning() && !pImp->aToDoStack.empty()) + if(!pSfxApp->IsDowning() && !xImp->aToDoStack.empty()) { // No immediate update is requested - pImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); - pImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); - pImp->aIdle.Start(); + xImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); + xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); + xImp->aIdle.Start(); } else { // but to do nothing - pImp->aIdle.Stop(); + xImp->aIdle.Stop(); // Bindings may wake up again - if(pImp->aToDoStack.empty()) + if(xImp->aToDoStack.empty()) { SfxBindings* pBindings = GetBindings(); if ( pBindings ) @@ -522,8 +522,8 @@ bool SfxDispatcher::CheckVirtualStack(const SfxShell& rShell, bool bDeep) { SFX_STACK(SfxDispatcher::CheckVirtualStack); - SfxShellStack_Impl aStack( pImp->aStack ); - for(std::deque<SfxToDo_Impl>::reverse_iterator i = pImp->aToDoStack.rbegin(); i != pImp->aToDoStack.rend(); ++i) + SfxShellStack_Impl aStack( xImp->aStack ); + for(std::deque<SfxToDo_Impl>::reverse_iterator i = xImp->aToDoStack.rbegin(); i != xImp->aToDoStack.rend(); ++i) { if(i->bPush) aStack.push_back(i->pCluster); @@ -566,15 +566,15 @@ sal_uInt16 SfxDispatcher::GetShellLevel(const SfxShell& rShell) SFX_STACK(SfxDispatcher::GetShellLevel); Flush(); - for ( sal_uInt16 n = 0; n < pImp->aStack.size(); ++n ) - if ( *( pImp->aStack.rbegin() + n ) == &rShell ) + for ( sal_uInt16 n = 0; n < xImp->aStack.size(); ++n ) + if ( *( xImp->aStack.rbegin() + n ) == &rShell ) return n; - if ( pImp->pParent ) + if ( xImp->pParent ) { - sal_uInt16 nRet = pImp->pParent->GetShellLevel(rShell); + sal_uInt16 nRet = xImp->pParent->GetShellLevel(rShell); if ( nRet == USHRT_MAX ) return nRet; - return nRet + pImp->aStack.size(); + return nRet + xImp->aStack.size(); } return USHRT_MAX; @@ -589,11 +589,11 @@ sal_uInt16 SfxDispatcher::GetShellLevel(const SfxShell& rShell) */ SfxShell *SfxDispatcher::GetShell(sal_uInt16 nIdx) const { - sal_uInt16 nShellCount = pImp->aStack.size(); + sal_uInt16 nShellCount = xImp->aStack.size(); if ( nIdx < nShellCount ) - return *(pImp->aStack.rbegin() + nIdx); - else if ( pImp->pParent ) - return pImp->pParent->GetShell( nIdx - nShellCount ); + return *(xImp->aStack.rbegin() + nIdx); + else if ( xImp->pParent ) + return xImp->pParent->GetShell( nIdx - nShellCount ); return 0; } @@ -607,8 +607,8 @@ SfxShell *SfxDispatcher::GetShell(sal_uInt16 nIdx) const */ SfxBindings* SfxDispatcher::GetBindings() const { - if ( pImp->pFrame ) - return &pImp->pFrame->GetBindings(); + if ( xImp->pFrame ) + return &xImp->pFrame->GetBindings(); else return NULL; } @@ -619,7 +619,7 @@ SfxBindings* SfxDispatcher::GetBindings() const */ SfxViewFrame* SfxDispatcher::GetFrame() const { - return pImp->pFrame; + return xImp->pFrame; } /** This method controls the activation of a dispatcher. @@ -642,15 +642,15 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI, SfxViewFrame* /* pOld */) OStringBuffer sTemp("Activate Dispatcher "); sTemp.append(reinterpret_cast<sal_Int64>(this)); OSL_TRACE("%s", sTemp.getStr()); - DBG_ASSERT( !pImp->bActive, "Activation error" ); + DBG_ASSERT( !xImp->bActive, "Activation error" ); #endif - pImp->bActive = true; - pImp->bUpdated = false; + xImp->bActive = true; + xImp->bUpdated = false; SfxBindings* pBindings = GetBindings(); if ( pBindings ) { pBindings->SetDispatcher(this); - pBindings->SetActiveFrame( pImp->pFrame->GetFrame().GetFrameInterface() ); + pBindings->SetActiveFrame( xImp->pFrame->GetFrame().GetFrameInterface() ); } } else @@ -665,10 +665,10 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI, SfxViewFrame* /* pOld */) if ( IsAppDispatcher() ) return; - for ( int i = int(pImp->aStack.size()) - 1; i >= 0; --i ) - (*(pImp->aStack.rbegin() + i ))->DoActivate_Impl(pImp->pFrame, bMDI); + for ( int i = int(xImp->aStack.size()) - 1; i >= 0; --i ) + (*(xImp->aStack.rbegin() + i ))->DoActivate_Impl(xImp->pFrame, bMDI); - if ( bMDI && pImp->pFrame ) + if ( bMDI && xImp->pFrame ) { SfxBindings *pBind = GetBindings(); while ( pBind ) @@ -677,22 +677,22 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI, SfxViewFrame* /* pOld */) pBind = pBind->GetSubBindings_Impl(); } - pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( false, false, 1 ); + xImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( false, false, 1 ); } - if(!pImp->aToDoStack.empty()) + if(!xImp->aToDoStack.empty()) { // No immediate update is requested - pImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); - pImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); - pImp->aIdle.Start(); + xImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); + xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); + xImp->aIdle.Start(); } } void SfxDispatcher::DoParentActivate_Impl() { - for ( int i = int(pImp->aStack.size()) - 1; i >= 0; --i ) - (*(pImp->aStack.rbegin() + i ))->ParentActivate(); + for ( int i = int(xImp->aStack.size()) - 1; i >= 0; --i ) + (*(xImp->aStack.rbegin() + i ))->ParentActivate(); } /** This method controls the deactivation of a dispatcher. @@ -715,19 +715,19 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew) if ( bMDI ) { OSL_TRACE(OStringBuffer("Deactivate Dispatcher").append(reinterpret_cast<sal_Int64>(this)).getStr()); - DBG_ASSERT( pImp->bActive, "Deactivate error" ); - pImp->bActive = false; + DBG_ASSERT( xImp->bActive, "Deactivate error" ); + xImp->bActive = false; - if ( pImp->pFrame && !(pImp->pFrame->GetObjectShell()->IsInPlaceActive() ) ) + if ( xImp->pFrame && !(xImp->pFrame->GetObjectShell()->IsInPlaceActive() ) ) { - SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl(); + SfxWorkWindow *pWorkWin = xImp->pFrame->GetFrame().GetWorkWindow_Impl(); if ( pWorkWin ) { - for (size_t n=0; n<pImp->aChildWins.size();) + for (size_t n=0; n<xImp->aChildWins.size();) { - SfxChildWindow *pWin = pWorkWin->GetChildWindow_Impl( (sal_uInt16) ( pImp->aChildWins[n] & 0xFFFF ) ); + SfxChildWindow *pWin = pWorkWin->GetChildWindow_Impl( (sal_uInt16) ( xImp->aChildWins[n] & 0xFFFF ) ); if (!pWin || (pWin && pWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT)) - pImp->aChildWins.erase(pImp->aChildWins.begin()+n); + xImp->aChildWins.erase(xImp->aChildWins.begin()+n); else n++; } @@ -741,11 +741,11 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew) if ( IsAppDispatcher() && !pSfxApp->IsDowning() ) return; - for ( sal_uInt16 i = 0; i < pImp->aStack.size(); ++i ) - (*(pImp->aStack.rbegin() + i))->DoDeactivate_Impl(pImp->pFrame, bMDI); + for ( sal_uInt16 i = 0; i < xImp->aStack.size(); ++i ) + (*(xImp->aStack.rbegin() + i))->DoDeactivate_Impl(xImp->pFrame, bMDI); - bool bHidePopups = bMDI && pImp->pFrame; - if ( pNew && pImp->pFrame ) + bool bHidePopups = bMDI && xImp->pFrame; + if ( pNew && xImp->pFrame ) { com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xOldFrame( pNew->GetFrame().GetFrameInterface()->getCreator(), com::sun::star::uno::UNO_QUERY ); @@ -766,7 +766,7 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew) pBind = pBind->GetSubBindings_Impl(); } - pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( true, false, 1 ); + xImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( true, false, 1 ); } Flush(); @@ -774,8 +774,8 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew) void SfxDispatcher::DoParentDeactivate_Impl() { - for ( int i = int(pImp->aStack.size()) - 1; i >= 0; --i ) - (*(pImp->aStack.rbegin() + i))->ParentDeactivate(); + for ( int i = int(xImp->aStack.size()) - 1; i >= 0; --i ) + (*(xImp->aStack.rbegin() + i))->ParentDeactivate(); } /** This method searches in SfxDispatcher after <SfxShell> , from the Slot Id @@ -800,7 +800,7 @@ int SfxDispatcher::GetShellAndSlot_Impl(sal_uInt16 nSlot, SfxShell** ppShell, SfxSlotServer aSvr; if ( _FindServer(nSlot, aSvr, bModal) ) { - if ( bOwnShellsOnly && aSvr.GetShellLevel() >= pImp->aStack.size() ) + if ( bOwnShellsOnly && aSvr.GetShellLevel() >= xImp->aStack.size() ) return sal_False; *ppShell = GetShell(aSvr.GetShellLevel()); @@ -827,8 +827,8 @@ int SfxDispatcher::GetShellAndSlot_Impl(sal_uInt16 nSlot, SfxShell** ppShell, void SfxDispatcher::_Execute(SfxShell& rShell, const SfxSlot& rSlot, SfxRequest& rReq, SfxCallMode eCallMode) { - DBG_ASSERT( !pImp->bFlushing, "recursive call to dispatcher" ); - DBG_ASSERT( pImp->aToDoStack.empty(), "unprepared InPlace _Execute" ); + DBG_ASSERT( !xImp->bFlushing, "recursive call to dispatcher" ); + DBG_ASSERT( xImp->aToDoStack.empty(), "unprepared InPlace _Execute" ); if ( IsLocked( rSlot.GetSlotId() ) ) return; @@ -840,19 +840,19 @@ void SfxDispatcher::_Execute(SfxShell& rShell, const SfxSlot& rSlot, SfxDispatcher *pDispat = this; while ( pDispat ) { - sal_uInt16 nShellCount = pDispat->pImp->aStack.size(); + sal_uInt16 nShellCount = pDispat->xImp->aStack.size(); for ( sal_uInt16 n=0; n<nShellCount; n++ ) { - if ( &rShell == *(pDispat->pImp->aStack.rbegin() + n) ) + if ( &rShell == *(pDispat->xImp->aStack.rbegin() + n) ) { if ( bool(eCallMode & SfxCallMode::RECORD) ) rReq.AllowRecording( true ); - pDispat->pImp->xPoster->Post(new SfxRequest(rReq)); + pDispat->xImp->xPoster->Post(new SfxRequest(rReq)); return; } } - pDispat = pDispat->pImp->pParent; + pDispat = pDispat->xImp->pParent; } } else @@ -876,14 +876,14 @@ const SfxSlot* SfxDispatcher::GetSlot( const OUString& rCommand ) { // Count the number of Shells on the linked Dispatcher Flush(); - sal_uInt16 nTotCount = pImp->aStack.size(); - if ( pImp->pParent ) + sal_uInt16 nTotCount = xImp->aStack.size(); + if ( xImp->pParent ) { - SfxDispatcher *pParent = pImp->pParent; + SfxDispatcher *pParent = xImp->pParent; while ( pParent ) { - nTotCount = nTotCount + pParent->pImp->aStack.size(); - pParent = pParent->pImp->pParent; + nTotCount = nTotCount + pParent->xImp->aStack.size(); + pParent = pParent->xImp->pParent; } } @@ -1084,7 +1084,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, */ IMPL_LINK(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq) { - DBG_ASSERT( !pImp->bFlushing, "recursive call to dispatcher" ); + DBG_ASSERT( !xImp->bFlushing, "recursive call to dispatcher" ); SFX_STACK(SfxDispatcher::PostMsgHandler); // Has also the Pool not yet died? @@ -1107,10 +1107,10 @@ IMPL_LINK(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq) } else { - if ( pImp->bLocked ) - pImp->aReqArr.push_back(new SfxRequest(*pReq)); + if ( xImp->bLocked ) + xImp->aReqArr.push_back(new SfxRequest(*pReq)); else - pImp->xPoster->Post(new SfxRequest(*pReq)); + xImp->xPoster->Post(new SfxRequest(*pReq)); } } @@ -1121,9 +1121,9 @@ IMPL_LINK(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq) void SfxDispatcher::SetMenu_Impl() { #if HAVE_FEATURE_DESKTOP - if ( pImp->pFrame ) + if ( xImp->pFrame ) { - SfxViewFrame* pTop = pImp->pFrame->GetTopViewFrame(); + SfxViewFrame* pTop = xImp->pFrame->GetTopViewFrame(); if ( pTop && pTop->GetBindings().GetDispatcher() == this ) { SfxFrame& rFrame = pTop->GetFrame(); @@ -1154,37 +1154,37 @@ void SfxDispatcher::Update_Impl( bool bForce ) Flush(); - if ( !pImp->pFrame ) + if ( !xImp->pFrame ) return; SfxGetpApp(); // -Wall is this required??? SfxDispatcher *pDisp = this; bool bUpdate = bForce; - while ( pDisp && pDisp->pImp->pFrame ) + while ( pDisp && pDisp->xImp->pFrame ) { - SfxWorkWindow *pWork = pDisp->pImp->pFrame->GetFrame().GetWorkWindow_Impl(); + SfxWorkWindow *pWork = pDisp->xImp->pFrame->GetFrame().GetWorkWindow_Impl(); SfxDispatcher *pAct = pWork->GetBindings().GetDispatcher_Impl(); if ( pAct == pDisp || pAct == this ) { if ( !bUpdate ) - bUpdate = !pDisp->pImp->bUpdated; - pDisp->pImp->bUpdated = true; + bUpdate = !pDisp->xImp->bUpdated; + pDisp->xImp->bUpdated = true; } else break; - pDisp = pDisp->pImp->pParent; + pDisp = pDisp->xImp->pParent; } - if ( !bUpdate || pImp->pFrame->GetFrame().IsClosing_Impl() ) + if ( !bUpdate || xImp->pFrame->GetFrame().IsClosing_Impl() ) return; - SfxViewFrame* pTop = pImp->pFrame ? pImp->pFrame->GetTopViewFrame() : NULL; + SfxViewFrame* pTop = xImp->pFrame ? xImp->pFrame->GetTopViewFrame() : NULL; bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this; if ( !bUIActive && pTop && GetBindings() == &pTop->GetBindings() ) // keep own tools internally for collecting - GetBindings()->GetDispatcher()->pImp->bUpdated = false; + GetBindings()->GetDispatcher()->xImp->bUpdated = false; com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame; SfxBindings* pBindings = GetBindings(); @@ -1210,19 +1210,19 @@ void SfxDispatcher::Update_Impl( bool bForce ) if ( xLayoutManager.is() ) xLayoutManager->lock(); - bool bIsIPActive = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); - SfxInPlaceClient *pClient = pImp->pFrame ? pImp->pFrame->GetViewShell()->GetUIActiveClient() : NULL; + bool bIsIPActive = xImp->pFrame && xImp->pFrame->GetObjectShell()->IsInPlaceActive(); + SfxInPlaceClient *pClient = xImp->pFrame ? xImp->pFrame->GetViewShell()->GetUIActiveClient() : NULL; if ( bUIActive && /* !bIsIPActive && */ ( !pClient || !pClient->IsObjectUIActive() ) ) SetMenu_Impl(); - SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl(); - SfxWorkWindow *pTaskWin = pImp->pFrame->GetTopFrame().GetWorkWindow_Impl(); + SfxWorkWindow *pWorkWin = xImp->pFrame->GetFrame().GetWorkWindow_Impl(); + SfxWorkWindow *pTaskWin = xImp->pFrame->GetTopFrame().GetWorkWindow_Impl(); pTaskWin->ResetStatusBar_Impl(); SfxDispatcher *pDispat = this; while ( pDispat ) { - SfxWorkWindow *pWork = pDispat->pImp->pFrame->GetFrame().GetWorkWindow_Impl(); + SfxWorkWindow *pWork = pDispat->xImp->pFrame->GetFrame().GetWorkWindow_Impl(); SfxDispatcher *pAct = pWork->GetBindings().GetDispatcher_Impl(); if ( pAct == pDispat || pAct == this ) { @@ -1230,7 +1230,7 @@ void SfxDispatcher::Update_Impl( bool bForce ) pWork->ResetChildWindows_Impl(); } - pDispat = pDispat->pImp->pParent; + pDispat = pDispat->xImp->pParent; } bool bIsActive = false; @@ -1240,7 +1240,7 @@ void SfxDispatcher::Update_Impl( bool bForce ) { if ( pDispat == pActDispat ) bIsActive = true; - pActDispat = pActDispat->pImp->pParent; + pActDispat = pActDispat->xImp->pParent; } _Update_Impl( bUIActive, !bIsIPActive, bIsIPActive, pTaskWin ); @@ -1259,7 +1259,7 @@ void SfxDispatcher::Update_Impl( bool bForce ) void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwner, SfxWorkWindow *pTaskWin ) { SfxGetpApp(); - SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl(); + SfxWorkWindow *pWorkWin = xImp->pFrame->GetFrame().GetWorkWindow_Impl(); bool bIsActive = false; SfxDispatcher *pActDispat = pWorkWin->GetBindings().GetDispatcher_Impl(); SfxDispatcher *pDispat = this; @@ -1267,26 +1267,26 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne { if ( pDispat == pActDispat ) bIsActive = true; - pActDispat = pActDispat->pImp->pParent; + pActDispat = pActDispat->xImp->pParent; } - if ( pImp->pParent && !pImp->bQuiet /* && bUIActive */ ) - pImp->pParent->_Update_Impl( bUIActive, bIsMDIApp, bIsIPOwner, pTaskWin ); + if ( xImp->pParent && !xImp->bQuiet /* && bUIActive */ ) + xImp->pParent->_Update_Impl( bUIActive, bIsMDIApp, bIsIPOwner, pTaskWin ); for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++) - pImp->aObjBars[n].nResId = 0; - pImp->aChildWins.clear(); + xImp->aObjBars[n].nResId = 0; + xImp->aChildWins.clear(); // bQuiet : own shells aren't considered for UI and SlotServer // bNoUI: own Shells aren't considered fors UI - if ( pImp->bQuiet || pImp->bNoUI || (pImp->pFrame && pImp->pFrame->GetObjectShell()->IsPreview()) ) + if ( xImp->bQuiet || xImp->bNoUI || (xImp->pFrame && xImp->pFrame->GetObjectShell()->IsPreview()) ) return; sal_uInt32 nStatBarId=0; SfxShell *pStatusBarShell = NULL; SfxSlotPool* pSlotPool = &SfxSlotPool::GetSlotPool( GetFrame() ); - sal_uInt16 nTotCount = pImp->aStack.size(); + sal_uInt16 nTotCount = xImp->aStack.size(); for ( sal_uInt16 nShell = nTotCount; nShell > 0; --nShell ) { SfxShell *pShell = GetShell( nShell-1 ); @@ -1307,10 +1307,10 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne continue; // check for toolboxes that are exclusively for a viewer - if ( pImp->pFrame) + if ( xImp->pFrame) { bool bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER ); - SfxObjectShell* pSh = pImp->pFrame->GetObjectShell(); + SfxObjectShell* pSh = xImp->pFrame->GetObjectShell(); SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_VIEWONLY, false ); bool bIsViewer = pItem && pItem->GetValue(); if ( bIsViewer != bViewerTbx ) @@ -1322,7 +1322,7 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne if ( !bVisible ) nPos &= SFX_POSITION_MASK; - SfxObjectBars_Impl& rBar = pImp->aObjBars[nPos & SFX_POSITION_MASK]; + SfxObjectBars_Impl& rBar = xImp->aObjBars[nPos & SFX_POSITION_MASK]; rBar.nMode = nPos; rBar.nResId = pIFace->GetObjectBarId(nNo); rBar.pIFace = pIFace; @@ -1371,7 +1371,7 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne if ( bUIActive || bIsActive ) pWorkWin->SetChildWindowVisible_Impl( nId, true, nMode ); if ( bUIActive || bIsActive || !pWorkWin->IsFloating( (sal_uInt16) ( nId & 0xFFFF ) ) ) - pImp->aChildWins.push_back( nId ); + xImp->aChildWins.push_back( nId ); } if ( bIsMDIApp || bIsIPOwner ) @@ -1387,10 +1387,10 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne for ( sal_uInt16 nPos=0; nPos<SFX_OBJECTBAR_MAX; nPos++ ) { - SfxObjectBars_Impl& rFixed = pImp->aFixedObjBars[nPos]; + SfxObjectBars_Impl& rFixed = xImp->aFixedObjBars[nPos]; if ( rFixed.nResId ) { - SfxObjectBars_Impl& rBar = pImp->aObjBars[nPos]; + SfxObjectBars_Impl& rBar = xImp->aObjBars[nPos]; rBar = rFixed; pWorkWin->SetObjectBar_Impl(rFixed.nMode, rFixed.nResId, rFixed.pIFace); @@ -1407,14 +1407,14 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne { if ( pDispatcher == pActDispatcher ) bIsTaskActive = true; - pActDispatcher = pActDispatcher->pImp->pParent; + pActDispatcher = pActDispatcher->xImp->pParent; } - if ( bIsTaskActive && nStatBarId && pImp->pFrame ) + if ( bIsTaskActive && nStatBarId && xImp->pFrame ) { // internal frames also may control statusbar - SfxBindings& rBindings = pImp->pFrame->GetBindings(); - pImp->pFrame->GetFrame().GetWorkWindow_Impl()->SetStatusBar_Impl( nStatBarId, pStatusBarShell, rBindings ); + SfxBindings& rBindings = xImp->pFrame->GetBindings(); + xImp->pFrame->GetFrame().GetWorkWindow_Impl()->SetStatusBar_Impl( nStatBarId, pStatusBarShell, rBindings ); } } } @@ -1427,15 +1427,15 @@ void SfxDispatcher::FlushImpl() OSL_TRACE("Flushing dispatcher!"); - pImp->aIdle.Stop(); + xImp->aIdle.Stop(); - if ( pImp->pParent ) - pImp->pParent->Flush(); + if ( xImp->pParent ) + xImp->pParent->Flush(); - pImp->bFlushing = !pImp->bFlushing; - if ( !pImp->bFlushing ) + xImp->bFlushing = !xImp->bFlushing; + if ( !xImp->bFlushing ) { - pImp->bFlushing = true; + xImp->bFlushing = true; return; } @@ -1444,17 +1444,17 @@ void SfxDispatcher::FlushImpl() // Re-build the true stack in the first round std::deque<SfxToDo_Impl> aToDoCopy; bool bModify = false; - for(std::deque<SfxToDo_Impl>::reverse_iterator i = pImp->aToDoStack.rbegin(); i != pImp->aToDoStack.rend(); ++i) + for(std::deque<SfxToDo_Impl>::reverse_iterator i = xImp->aToDoStack.rbegin(); i != xImp->aToDoStack.rend(); ++i) { bModify = true; if(i->bPush) { // Actually push - DBG_ASSERT( std::find(pImp->aStack.begin(), pImp->aStack.end(), i->pCluster) == pImp->aStack.end(), + DBG_ASSERT( std::find(xImp->aStack.begin(), xImp->aStack.end(), i->pCluster) == xImp->aStack.end(), "pushed SfxShell already on stack" ); - pImp->aStack.push_back(i->pCluster); - i->pCluster->SetDisableFlags(pImp->nDisableFlags); + xImp->aStack.push_back(i->pCluster); + i->pCluster->SetDisableFlags(xImp->nDisableFlags); // Mark the moved shell aToDoCopy.push_front(*i); @@ -1466,9 +1466,9 @@ void SfxDispatcher::FlushImpl() bool bFound = false; do { - DBG_ASSERT( !pImp->aStack.empty(), "popping from empty stack" ); - pPopped = pImp->aStack.back(); - pImp->aStack.pop_back(); + DBG_ASSERT( !xImp->aStack.empty(), "popping from empty stack" ); + pPopped = xImp->aStack.back(); + xImp->aStack.pop_back(); pPopped->SetDisableFlags( 0 ); bFound = (pPopped == i->pCluster); @@ -1479,57 +1479,57 @@ void SfxDispatcher::FlushImpl() DBG_ASSERT( bFound, "wrong SfxShell popped" ); } } - pImp->aToDoStack.clear(); + xImp->aToDoStack.clear(); // Invalidate bindings, if possible if ( !pSfxApp->IsDowning() ) { if ( bModify ) { - pImp->pCachedServ1 = 0; - pImp->pCachedServ2 = 0; + xImp->pCachedServ1 = 0; + xImp->pCachedServ2 = 0; } InvalidateBindings_Impl( bModify ); } - pImp->bFlushing = false; - pImp->bUpdated = false; // not only when bModify, if Doc/Template-Config - pImp->bFlushed = true; + xImp->bFlushing = false; + xImp->bUpdated = false; // not only when bModify, if Doc/Template-Config + xImp->bFlushed = true; OSL_TRACE("Successfully flushed dispatcher!"); //fdo#70703 FlushImpl may call back into itself so use aToDoCopyStack to talk //to outer levels of ourself. If DoActivate_Impl/DoDeactivate_Impl deletes //an entry, then they will walk back up aToDoCopyStack and set outer //levels's entries to bDeleted - pImp->aToDoCopyStack.push_back(aToDoCopy); - std::deque<SfxToDo_Impl>& rToDoCopy = pImp->aToDoCopyStack.back(); + xImp->aToDoCopyStack.push_back(aToDoCopy); + std::deque<SfxToDo_Impl>& rToDoCopy = xImp->aToDoCopyStack.back(); // Activate the Shells and possible delete them in the 2nd round for(std::deque<SfxToDo_Impl>::reverse_iterator i = rToDoCopy.rbegin(); i != rToDoCopy.rend(); ++i) { if (i->bDeleted) continue; - if (!pImp->bActive) + if (!xImp->bActive) continue; if (i->bPush) - i->pCluster->DoActivate_Impl(pImp->pFrame, true); + i->pCluster->DoActivate_Impl(xImp->pFrame, true); else - i->pCluster->DoDeactivate_Impl(pImp->pFrame, true); + i->pCluster->DoDeactivate_Impl(xImp->pFrame, true); } - aToDoCopy = pImp->aToDoCopyStack.back(); - pImp->aToDoCopyStack.pop_back(); + aToDoCopy = xImp->aToDoCopyStack.back(); + xImp->aToDoCopyStack.pop_back(); for(std::deque<SfxToDo_Impl>::reverse_iterator i = aToDoCopy.rbegin(); i != aToDoCopy.rend(); ++i) { if (i->bDelete && !i->bDeleted) { - if (!pImp->aToDoCopyStack.empty()) + if (!xImp->aToDoCopyStack.empty()) { //fdo#70703 if there is an outer FlushImpl then inform it that //we have deleted this cluster - for (std::deque< std::deque<SfxToDo_Impl> >::iterator aI = pImp->aToDoCopyStack.begin(); - aI != pImp->aToDoCopyStack.end(); ++aI) + for (std::deque< std::deque<SfxToDo_Impl> >::iterator aI = xImp->aToDoCopyStack.begin(); + aI != xImp->aToDoCopyStack.end(); ++aI) { std::deque<SfxToDo_Impl> &v = *aI; for(std::deque<SfxToDo_Impl>::iterator aJ = v.begin(); aJ != v.end(); ++aJ) @@ -1548,7 +1548,7 @@ void SfxDispatcher::FlushImpl() // If more changes have occurred on the stach when // Activate/Deactivate/Delete: - if (!pImp->bFlushed) + if (!xImp->bFlushed) // If Push/Pop hs been called by someone, theb also EnterReg was called! FlushImpl(); @@ -1556,7 +1556,7 @@ void SfxDispatcher::FlushImpl() GetBindings()->DLEAVEREGISTRATIONS(); for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++) - pImp->aFixedObjBars[n].nResId = 0; + xImp->aFixedObjBars[n].nResId = 0; SAL_INFO("sfx.control", "SfxDispatcher(" << this << ")::Flush() done"); } @@ -1601,12 +1601,12 @@ void SfxDispatcher::SetSlotFilter(SfxSlotFilterState nEnable, DBG_ASSERT( pSIDs[n] > pSIDs[n-1], "SetSlotFilter: SIDs not sorted" ); #endif - if ( pImp->pFilterSIDs ) - pImp->pFilterSIDs = 0; + if ( xImp->pFilterSIDs ) + xImp->pFilterSIDs = 0; - pImp->nFilterEnabling = nEnable; - pImp->nFilterCount = nCount; - pImp->pFilterSIDs = pSIDs; + xImp->nFilterEnabling = nEnable; + xImp->nFilterCount = nCount; + xImp->pFilterSIDs = pSIDs; GetBindings()->InvalidateAll(true); } @@ -1627,19 +1627,19 @@ extern "C" int SAL_CALL SfxCompareSIDs_Impl(const void* pSmaller, const void* pB SfxSlotFilterState SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) const { // no filter? - if ( 0 == pImp->nFilterCount ) + if ( 0 == xImp->nFilterCount ) // => all SIDs allowed return SFX_SLOT_FILTER_ENABLED; // search - bool bFound = 0 != bsearch( &nSID, pImp->pFilterSIDs, pImp->nFilterCount, + bool bFound = 0 != bsearch( &nSID, xImp->pFilterSIDs, xImp->nFilterCount, sizeof(sal_uInt16), SfxCompareSIDs_Impl ); // even if ReadOnlyDoc - if ( SFX_SLOT_FILTER_ENABLED_READONLY == pImp->nFilterEnabling ) + if ( SFX_SLOT_FILTER_ENABLED_READONLY == xImp->nFilterEnabling ) return bFound ? SFX_SLOT_FILTER_ENABLED_READONLY : SFX_SLOT_FILTER_ENABLED; // Otherwise after Negative/Positive Filter - else if ( SFX_SLOT_FILTER_ENABLED == pImp->nFilterEnabling ) + else if ( SFX_SLOT_FILTER_ENABLED == xImp->nFilterEnabling ) return bFound ? SFX_SLOT_FILTER_ENABLED : SFX_SLOT_FILTER_DISABLED; else return bFound ? SFX_SLOT_FILTER_DISABLED : SFX_SLOT_FILTER_ENABLED; @@ -1653,11 +1653,11 @@ bool SfxDispatcher::_TryIntercept_Impl ) { // Maybe the parent is also belongs to a component - SfxDispatcher *pParent = pImp->pParent; - sal_uInt16 nLevels = pImp->aStack.size(); - while ( pParent && pParent->pImp->pFrame ) + SfxDispatcher *pParent = xImp->pParent; + sal_uInt16 nLevels = xImp->aStack.size(); + while ( pParent && pParent->xImp->pFrame ) { - if ( pParent->pImp->pFrame->GetFrame().HasComponent() ) + if ( pParent->xImp->pFrame->GetFrame().HasComponent() ) { // Components may be intercepted if ( pParent->_TryIntercept_Impl( nSlot, rServer, true ) ) @@ -1671,9 +1671,9 @@ bool SfxDispatcher::_TryIntercept_Impl break; } else - nLevels = nLevels + pParent->pImp->aStack.size(); + nLevels = nLevels + pParent->xImp->aStack.size(); - pParent = pParent->pImp->pParent; + pParent = pParent->xImp->pParent; } if ( bSelf ) @@ -1720,20 +1720,20 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b // Dispatcher locked? (nevertheless let SID_HELP_PI through) if ( IsLocked(nSlot) ) { - pImp->bInvalidateOnUnlock = true; + xImp->bInvalidateOnUnlock = true; return false; } // Count the number of Shells in the linked dispatchers. Flush(); - sal_uInt16 nTotCount = pImp->aStack.size(); - if ( pImp->pParent ) + sal_uInt16 nTotCount = xImp->aStack.size(); + if ( xImp->pParent ) { - SfxDispatcher *pParent = pImp->pParent; + SfxDispatcher *pParent = xImp->pParent; while ( pParent ) { - nTotCount = nTotCount + pParent->pImp->aStack.size(); - pParent = pParent->pImp->pParent; + nTotCount = nTotCount + pParent->xImp->aStack.size(); + pParent = pParent->xImp->pParent; } } @@ -1760,7 +1760,7 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b // SID check against set filter SfxSlotFilterState nSlotEnableMode = SFX_SLOT_FILTER_DISABLED; - if ( pImp->pFrame ) + if ( xImp->pFrame ) { nSlotEnableMode = IsSlotEnabledByFilter_Impl( nSlot ); if ( SFX_SLOT_FILTER_DISABLED == nSlotEnableMode ) @@ -1768,24 +1768,24 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b } // In Quiet-Mode only Parent-Dispatcher - if ( pImp->bQuiet ) + if ( xImp->bQuiet ) { - if ( pImp->pParent ) + if ( xImp->pParent ) { - bool bRet = pImp->pParent->_FindServer( nSlot, rServer, bModal ); + bool bRet = xImp->pParent->_FindServer( nSlot, rServer, bModal ); rServer.SetShellLevel - ( rServer.GetShellLevel() + pImp->aStack.size() ); + ( rServer.GetShellLevel() + xImp->aStack.size() ); return bRet; } else return false; } - bool bReadOnly = ( SFX_SLOT_FILTER_ENABLED_READONLY != nSlotEnableMode && pImp->bReadOnly ); + bool bReadOnly = ( SFX_SLOT_FILTER_ENABLED_READONLY != nSlotEnableMode && xImp->bReadOnly ); // search through all the shells of the chained dispatchers // from top to bottom - sal_uInt16 nFirstShell = pImp->bModal && !bModal ? pImp->aStack.size() : 0; + sal_uInt16 nFirstShell = xImp->bModal && !bModal ? xImp->aStack.size() : 0; for ( sal_uInt16 i = nFirstShell; i < nTotCount; ++i ) { SfxShell *pObjShell = GetShell(i); @@ -1802,23 +1802,23 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b { // Slot belongs to Container? bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER); - bool bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); + bool bIsInPlace = xImp->pFrame && xImp->pFrame->GetObjectShell()->IsInPlaceActive(); // Shell belongs to Server? // AppDispatcher or IPFrame-Dispatcher - bool bIsServerShell = !pImp->pFrame || bIsInPlace; + bool bIsServerShell = !xImp->pFrame || bIsInPlace; // Of course ShellServer-Slots are also executable even when it is // executed on a container dispatcher without a IPClient. if ( !bIsServerShell ) { - SfxViewShell *pViewSh = pImp->pFrame->GetViewShell(); + SfxViewShell *pViewSh = xImp->pFrame->GetViewShell(); bIsServerShell = !pViewSh || !pViewSh->GetUIActiveClient(); } // Shell belongs to Container? // AppDispatcher or no IPFrameDispatcher - bool bIsContainerShell = !pImp->pFrame || !bIsInPlace; + bool bIsContainerShell = !xImp->pFrame || !bIsInPlace; // Shell and Slot match if ( !( ( bIsContainerSlot && bIsContainerShell ) || ( !bIsContainerSlot && bIsServerShell ) ) ) @@ -1854,15 +1854,15 @@ bool SfxDispatcher::_FillState(const SfxSlotServer& rSvr, SfxItemSet& rState, const SfxSlot *pSlot = rSvr.GetSlot(); if ( pSlot && IsLocked( pSlot->GetSlotId() ) ) { - pImp->bInvalidateOnUnlock = true; + xImp->bInvalidateOnUnlock = true; return false; } if ( pSlot ) { - DBG_ASSERT(pImp->bFlushed, + DBG_ASSERT(xImp->bFlushed, "Dispatcher not flushed after retrieving slot servers!"); - if (!pImp->bFlushed) + if (!xImp->bFlushed) return false; // Determine the object and call the Message of this object @@ -1912,13 +1912,13 @@ SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 nConfigId, vcl::Window *pW sal_uInt16 nShLevel = 0; SfxShell *pSh; - if ( rDisp.pImp->bQuiet ) + if ( rDisp.xImp->bQuiet ) { nConfigId = 0; - nShLevel = rDisp.pImp->aStack.size(); + nShLevel = rDisp.xImp->aStack.size(); } - vcl::Window *pWindow = pWin ? pWin : rDisp.pImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow(); + vcl::Window *pWindow = pWin ? pWin : rDisp.xImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow(); for ( pSh = rDisp.GetShell(nShLevel); pSh; ++nShLevel, pSh = rDisp.GetShell(nShLevel) ) { const ResId& rResId = pSh->GetInterface()->GetPopupMenuResId(); @@ -1936,13 +1936,13 @@ void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, vcl::Window *pWin, const sal_uInt16 nShLevel = 0; SfxShell *pSh; - if ( rDisp.pImp->bQuiet ) + if ( rDisp.xImp->bQuiet ) { nConfigId = 0; - nShLevel = rDisp.pImp->aStack.size(); + nShLevel = rDisp.xImp->aStack.size(); } - vcl::Window *pWindow = pWin ? pWin : rDisp.pImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow(); + vcl::Window *pWindow = pWin ? pWin : rDisp.xImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow(); for ( pSh = rDisp.GetShell(nShLevel); pSh; ++nShLevel, pSh = rDisp.GetShell(nShLevel) ) { const ResId& rResId = pSh->GetInterface()->GetPopupMenuResId(); @@ -1956,7 +1956,7 @@ void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, vcl::Window *pWin, const void SfxDispatcher::ExecutePopup( const ResId &rId, vcl::Window *pWin, const Point *pPos ) { - vcl::Window *pWindow = pWin ? pWin : pImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow(); + vcl::Window *pWindow = pWin ? pWin : xImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow(); SfxPopupMenuManager::ExecutePopup( rId, GetFrame(), pPos ? *pPos : pWindow->GetPointerPosPixel(), pWindow ); } @@ -1967,35 +1967,35 @@ void SfxDispatcher::ExecutePopup( const ResId &rId, vcl::Window *pWin, const Poi void SfxDispatcher::Lock( bool bLock ) { SfxBindings* pBindings = GetBindings(); - if ( !bLock && pImp->bLocked && pImp->bInvalidateOnUnlock ) + if ( !bLock && xImp->bLocked && xImp->bInvalidateOnUnlock ) { if ( pBindings ) pBindings->InvalidateAll(true); - pImp->bInvalidateOnUnlock = false; + xImp->bInvalidateOnUnlock = false; } else if ( pBindings ) pBindings->InvalidateAll(false); - pImp->bLocked = bLock; + xImp->bLocked = bLock; if ( !bLock ) { - for(size_t i = 0; i < pImp->aReqArr.size(); ++i) - pImp->xPoster->Post(pImp->aReqArr[i]); - pImp->aReqArr.clear(); + for(size_t i = 0; i < xImp->aReqArr.size(); ++i) + xImp->xPoster->Post(xImp->aReqArr[i]); + xImp->aReqArr.clear(); } } sal_uInt32 SfxDispatcher::GetObjectBarId( sal_uInt16 nPos ) const { - return pImp->aObjBars[nPos].nResId; + return xImp->aObjBars[nPos].nResId; } void SfxDispatcher::HideUI( bool bHide ) { - bool bWasHidden = pImp->bNoUI; - pImp->bNoUI = bHide; - if ( pImp->pFrame ) + bool bWasHidden = xImp->bNoUI; + xImp->bNoUI = bHide; + if ( xImp->pFrame ) { - SfxViewFrame* pTop = pImp->pFrame->GetTopViewFrame(); + SfxViewFrame* pTop = xImp->pFrame->GetTopViewFrame(); if ( pTop && pTop->GetBindings().GetDispatcher() == this ) { SfxFrame& rFrame = pTop->GetFrame(); @@ -2020,12 +2020,12 @@ void SfxDispatcher::HideUI( bool bHide ) void SfxDispatcher::SetReadOnly_Impl( bool bOn ) { - pImp->bReadOnly = bOn; + xImp->bReadOnly = bOn; } bool SfxDispatcher::GetReadOnly_Impl() const { - return pImp->bReadOnly; + return xImp->bReadOnly; } /** With 'bOn' the Dispatcher is quasi dead and transfers everything to the @@ -2033,7 +2033,7 @@ bool SfxDispatcher::GetReadOnly_Impl() const */ void SfxDispatcher::SetQuietMode_Impl( bool bOn ) { - pImp->bQuiet = bOn; + xImp->bQuiet = bOn; SfxBindings* pBindings = GetBindings(); if ( pBindings ) pBindings->InvalidateAll(true); @@ -2089,17 +2089,17 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno:: bool SfxDispatcher::IsReadOnlyShell_Impl( sal_uInt16 nShell ) const { - sal_uInt16 nShellCount = pImp->aStack.size(); + sal_uInt16 nShellCount = xImp->aStack.size(); if ( nShell < nShellCount ) { - SfxShell* pShell = *( pImp->aStack.rbegin() + nShell ); + SfxShell* pShell = *( xImp->aStack.rbegin() + nShell ); if( pShell->ISA( SfxModule ) || pShell->ISA( SfxApplication ) || pShell->ISA( SfxViewFrame ) ) return false; else - return pImp->bReadOnly; + return xImp->bReadOnly; } - else if ( pImp->pParent ) - return pImp->pParent->IsReadOnlyShell_Impl( nShell - nShellCount ); + else if ( xImp->pParent ) + return xImp->pParent->IsReadOnlyShell_Impl( nShell - nShellCount ); return true; } @@ -2107,23 +2107,23 @@ void SfxDispatcher::RemoveShell_Impl( SfxShell& rShell ) { Flush(); - sal_uInt16 nCount = pImp->aStack.size(); + sal_uInt16 nCount = xImp->aStack.size(); for ( sal_uInt16 n=0; n<nCount; ++n ) { - if ( pImp->aStack[n] == &rShell ) + if ( xImp->aStack[n] == &rShell ) { - pImp->aStack.erase( pImp->aStack.begin() + n ); + xImp->aStack.erase( xImp->aStack.begin() + n ); rShell.SetDisableFlags( 0 ); - rShell.DoDeactivate_Impl(pImp->pFrame, true); + rShell.DoDeactivate_Impl(xImp->pFrame, true); break; } } if ( !SfxGetpApp()->IsDowning() ) { - pImp->bUpdated = false; - pImp->pCachedServ1 = 0; - pImp->pCachedServ2 = 0; + xImp->bUpdated = false; + xImp->pCachedServ1 = 0; + xImp->pCachedServ2 = 0; InvalidateBindings_Impl(true); } } @@ -2149,26 +2149,26 @@ void SfxDispatcher::InvalidateBindings_Impl( bool bModify ) break; } - pDisp = pDisp->pImp->pParent; + pDisp = pDisp->xImp->pParent; } } } bool SfxDispatcher::IsUpdated_Impl() const { - return pImp->bUpdated; + return xImp->bUpdated; } void SfxDispatcher::SetDisableFlags( sal_uInt32 nFlags ) { - pImp->nDisableFlags = nFlags; - for ( SfxShellStack_Impl::reverse_iterator it = pImp->aStack.rbegin(); it != pImp->aStack.rend(); ++it ) + xImp->nDisableFlags = nFlags; + for ( SfxShellStack_Impl::reverse_iterator it = xImp->aStack.rbegin(); it != xImp->aStack.rend(); ++it ) (*it)->SetDisableFlags( nFlags ); } sal_uInt32 SfxDispatcher::GetDisableFlags() const { - return pImp->nDisableFlags; + return xImp->nDisableFlags; } SfxModule* SfxDispatcher::GetModule() const diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index 9c7f3218f82a..c0f2d2ec4999 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -695,7 +695,7 @@ namespace sfx2 ModuleTaskPane::ModuleTaskPane( vcl::Window& i_rParentWindow, const Reference< XFrame >& i_rDocumentFrame ) :Window( &i_rParentWindow, WB_DIALOGCONTROL ) - ,m_pImpl( new ModuleTaskPane_Impl( *this, i_rDocumentFrame ) ) + ,m_xImpl( new ModuleTaskPane_Impl( *this, i_rDocumentFrame ) ) { } @@ -714,44 +714,44 @@ namespace sfx2 void ModuleTaskPane::Resize() { Window::Resize(); - m_pImpl->OnResize(); + m_xImpl->OnResize(); } void ModuleTaskPane::GetFocus() { Window::GetFocus(); - m_pImpl->OnGetFocus(); + m_xImpl->OnGetFocus(); } ::svt::ToolPanelDeck& ModuleTaskPane::GetPanelDeck() { - return m_pImpl->GetPanelDeck(); + return m_xImpl->GetPanelDeck(); } const ::svt::ToolPanelDeck& ModuleTaskPane::GetPanelDeck() const { - return m_pImpl->GetPanelDeck(); + return m_xImpl->GetPanelDeck(); } ::boost::optional< size_t > ModuleTaskPane::GetPanelPos( const OUString& i_rResourceURL ) { - return m_pImpl->GetPanelPos( i_rResourceURL ); + return m_xImpl->GetPanelPos( i_rResourceURL ); } void ModuleTaskPane::SetDrawersLayout() { - m_pImpl->SetDrawersLayout(); + m_xImpl->SetDrawersLayout(); } void ModuleTaskPane::SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent ) { - m_pImpl->SetTabsLayout( i_eTabAlignment, i_eTabContent ); + m_xImpl->SetTabsLayout( i_eTabAlignment, i_eTabContent ); } @@ -1214,7 +1214,7 @@ namespace sfx2 TaskPaneController::TaskPaneController( ModuleTaskPane& i_rTaskPane, TitledDockingWindow& i_rDockingWindow ) - :m_pImpl( new TaskPaneController_Impl( i_rTaskPane, i_rDockingWindow ) ) + :m_xImpl( new TaskPaneController_Impl( i_rTaskPane, i_rDockingWindow ) ) { } @@ -1226,7 +1226,7 @@ namespace sfx2 void TaskPaneController::ActivateToolPanel( const OUString& i_rPanelURL ) { - m_pImpl->ActivateToolPanel( i_rPanelURL ); + m_xImpl->ActivateToolPanel( i_rPanelURL ); } diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index a8f7c1dbffbc..41e2c6a10054 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -421,7 +421,7 @@ using namespace ::svl::undo::impl; SfxUndoManager::SfxUndoManager( size_t nMaxUndoActionCount ) - :m_pData( new SfxUndoManager_Data( nMaxUndoActionCount ) ) + :m_xData( new SfxUndoManager_Data( nMaxUndoActionCount ) ) { } @@ -430,8 +430,8 @@ SfxUndoManager::~SfxUndoManager() { UndoListeners aListenersCopy; { - UndoManagerGuard aGuard( *m_pData ); - aListenersCopy = m_pData->aListeners; + UndoManagerGuard aGuard( *m_xData ); + aListenersCopy = m_xData->aListeners; } ::std::for_each( aListenersCopy.begin(), aListenersCopy.end(), @@ -441,7 +441,7 @@ SfxUndoManager::~SfxUndoManager() void SfxUndoManager::EnableUndo( bool i_enable ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); ImplEnableUndo_Lock( i_enable ); } @@ -449,91 +449,91 @@ void SfxUndoManager::EnableUndo( bool i_enable ) void SfxUndoManager::ImplEnableUndo_Lock( bool const i_enable ) { - if ( m_pData->mbUndoEnabled == i_enable ) + if ( m_xData->mbUndoEnabled == i_enable ) return; - m_pData->mbUndoEnabled = i_enable; + m_xData->mbUndoEnabled = i_enable; } bool SfxUndoManager::IsUndoEnabled() const { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); return ImplIsUndoEnabled_Lock(); } bool SfxUndoManager::ImplIsUndoEnabled_Lock() const { - return m_pData->mbUndoEnabled; + return m_xData->mbUndoEnabled; } void SfxUndoManager::SetMaxUndoActionCount( size_t nMaxUndoActionCount ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); // Remove entries from the pActUndoArray when we have to reduce // the number of entries due to a lower nMaxUndoActionCount. // Both redo and undo action entries will be removed until we reached the // new nMaxUndoActionCount. - long nNumToDelete = m_pData->pActUndoArray->aUndoActions.size() - nMaxUndoActionCount; + long nNumToDelete = m_xData->pActUndoArray->aUndoActions.size() - nMaxUndoActionCount; while ( nNumToDelete > 0 ) { - size_t nPos = m_pData->pActUndoArray->aUndoActions.size(); - if ( nPos > m_pData->pActUndoArray->nCurUndoAction ) + size_t nPos = m_xData->pActUndoArray->aUndoActions.size(); + if ( nPos > m_xData->pActUndoArray->nCurUndoAction ) { - SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[nPos-1].pAction; + SfxUndoAction* pAction = m_xData->pActUndoArray->aUndoActions[nPos-1].pAction; aGuard.markForDeletion( pAction ); - m_pData->pActUndoArray->aUndoActions.Remove( nPos-1 ); + m_xData->pActUndoArray->aUndoActions.Remove( nPos-1 ); --nNumToDelete; } - if ( nNumToDelete > 0 && m_pData->pActUndoArray->nCurUndoAction > 0 ) + if ( nNumToDelete > 0 && m_xData->pActUndoArray->nCurUndoAction > 0 ) { - SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[0].pAction; + SfxUndoAction* pAction = m_xData->pActUndoArray->aUndoActions[0].pAction; aGuard.markForDeletion( pAction ); - m_pData->pActUndoArray->aUndoActions.Remove(0); - --m_pData->pActUndoArray->nCurUndoAction; + m_xData->pActUndoArray->aUndoActions.Remove(0); + --m_xData->pActUndoArray->nCurUndoAction; --nNumToDelete; } - if ( nPos == m_pData->pActUndoArray->aUndoActions.size() ) + if ( nPos == m_xData->pActUndoArray->aUndoActions.size() ) break; // Cannot delete more entries } - m_pData->pActUndoArray->nMaxUndoActions = nMaxUndoActionCount; + m_xData->pActUndoArray->nMaxUndoActions = nMaxUndoActionCount; } size_t SfxUndoManager::GetMaxUndoActionCount() const { - UndoManagerGuard aGuard( *m_pData ); - return m_pData->pActUndoArray->nMaxUndoActions; + UndoManagerGuard aGuard( *m_xData ); + return m_xData->pActUndoArray->nMaxUndoActions; } void SfxUndoManager::ImplClearCurrentLevel_NoNotify( UndoManagerGuard& i_guard ) { // clear array - while ( !m_pData->pActUndoArray->aUndoActions.empty() ) + while ( !m_xData->pActUndoArray->aUndoActions.empty() ) { - size_t deletePos = m_pData->pActUndoArray->aUndoActions.size() - 1; - SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ deletePos ].pAction; + size_t deletePos = m_xData->pActUndoArray->aUndoActions.size() - 1; + SfxUndoAction* pAction = m_xData->pActUndoArray->aUndoActions[ deletePos ].pAction; i_guard.markForDeletion( pAction ); - m_pData->pActUndoArray->aUndoActions.Remove( deletePos ); + m_xData->pActUndoArray->aUndoActions.Remove( deletePos ); } - m_pData->pActUndoArray->nCurUndoAction = 0; + m_xData->pActUndoArray->nCurUndoAction = 0; - m_pData->mnMarks = 0; - m_pData->mnEmptyMark = MARK_INVALID; + m_xData->mnMarks = 0; + m_xData->mnEmptyMark = MARK_INVALID; } void SfxUndoManager::Clear() { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); SAL_WARN_IF( ImplIsInListAction_Lock(), "svl", "SfxUndoManager::Clear: suspicious call - do you really wish to clear the current level?" ); @@ -546,12 +546,12 @@ void SfxUndoManager::Clear() void SfxUndoManager::ClearAllLevels() { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); ImplClearCurrentLevel_NoNotify( aGuard ); if ( ImplIsInListAction_Lock() ) { - m_pData->mbClearUntilTopLevel = true; + m_xData->mbClearUntilTopLevel = true; } else { @@ -562,7 +562,7 @@ void SfxUndoManager::ClearAllLevels() void SfxUndoManager::ImplClearRedo_NoLock( bool const i_currentLevel ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); ImplClearRedo( aGuard, i_currentLevel ); } @@ -577,7 +577,7 @@ void SfxUndoManager::ClearRedo() void SfxUndoManager::Reset() { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); // clear all locks while ( !ImplIsUndoEnabled_Lock() ) @@ -601,12 +601,12 @@ void SfxUndoManager::Reset() void SfxUndoManager::ImplClearUndo( UndoManagerGuard& i_guard ) { - while ( m_pData->pActUndoArray->nCurUndoAction > 0 ) + while ( m_xData->pActUndoArray->nCurUndoAction > 0 ) { - SfxUndoAction* pUndoAction = m_pData->pActUndoArray->aUndoActions[0].pAction; - m_pData->pActUndoArray->aUndoActions.Remove( 0 ); + SfxUndoAction* pUndoAction = m_xData->pActUndoArray->aUndoActions[0].pAction; + m_xData->pActUndoArray->aUndoActions.Remove( 0 ); i_guard.markForDeletion( pUndoAction ); - --m_pData->pActUndoArray->nCurUndoAction; + --m_xData->pActUndoArray->nCurUndoAction; } // TODO: notifications? We don't have clearedUndo, only cleared and clearedRedo at the SfxUndoListener } @@ -614,7 +614,7 @@ void SfxUndoManager::ImplClearUndo( UndoManagerGuard& i_guard ) void SfxUndoManager::ImplClearRedo( UndoManagerGuard& i_guard, bool const i_currentLevel ) { - SfxUndoArray* pUndoArray = ( i_currentLevel == IUndoManager::CurrentLevel ) ? m_pData->pActUndoArray : m_pData->pUndoArray; + SfxUndoArray* pUndoArray = ( i_currentLevel == IUndoManager::CurrentLevel ) ? m_xData->pActUndoArray : m_xData->pUndoArray; // clearance while ( pUndoArray->aUndoActions.size() > pUndoArray->nCurUndoAction ) @@ -633,15 +633,15 @@ void SfxUndoManager::ImplClearRedo( UndoManagerGuard& i_guard, bool const i_curr bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bTryMerge, bool bClearRedo, UndoManagerGuard& i_guard ) { - if ( !ImplIsUndoEnabled_Lock() || ( m_pData->pActUndoArray->nMaxUndoActions == 0 ) ) + if ( !ImplIsUndoEnabled_Lock() || ( m_xData->pActUndoArray->nMaxUndoActions == 0 ) ) { i_guard.markForDeletion( pAction ); return false; } // merge, if required - SfxUndoAction* pMergeWithAction = m_pData->pActUndoArray->nCurUndoAction ? - m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction : NULL; + SfxUndoAction* pMergeWithAction = m_xData->pActUndoArray->nCurUndoAction ? + m_xData->pActUndoArray->aUndoActions[m_xData->pActUndoArray->nCurUndoAction-1].pAction : NULL; if ( bTryMerge && pMergeWithAction ) { bool bMerged = pMergeWithAction->Merge( pAction ); @@ -657,34 +657,34 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT ImplClearRedo( i_guard, IUndoManager::CurrentLevel ); // respect max number - if( m_pData->pActUndoArray == m_pData->pUndoArray ) + if( m_xData->pActUndoArray == m_xData->pUndoArray ) { - while(m_pData->pActUndoArray->aUndoActions.size() >= m_pData->pActUndoArray->nMaxUndoActions) + while(m_xData->pActUndoArray->aUndoActions.size() >= m_xData->pActUndoArray->nMaxUndoActions) { - i_guard.markForDeletion( m_pData->pActUndoArray->aUndoActions[0].pAction ); - m_pData->pActUndoArray->aUndoActions.Remove(0); - if (m_pData->pActUndoArray->nCurUndoAction > 0) + i_guard.markForDeletion( m_xData->pActUndoArray->aUndoActions[0].pAction ); + m_xData->pActUndoArray->aUndoActions.Remove(0); + if (m_xData->pActUndoArray->nCurUndoAction > 0) { - --m_pData->pActUndoArray->nCurUndoAction; + --m_xData->pActUndoArray->nCurUndoAction; } else { assert(!"CurrentUndoAction going negative (!)"); } // fdo#66071 invalidate the current empty mark when removing - --m_pData->mnEmptyMark; + --m_xData->mnEmptyMark; } } // append new action - m_pData->pActUndoArray->aUndoActions.Insert( pAction, m_pData->pActUndoArray->nCurUndoAction++ ); + m_xData->pActUndoArray->aUndoActions.Insert( pAction, m_xData->pActUndoArray->nCurUndoAction++ ); return true; } void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, bool bTryMerge ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); // add if ( ImplAddUndoAction_NoNotify( pAction, bTryMerge, true, aGuard ) ) @@ -697,18 +697,18 @@ void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, bool bTryMerge ) size_t SfxUndoManager::GetUndoActionCount( bool const i_currentLevel ) const { - UndoManagerGuard aGuard( *m_pData ); - const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; + UndoManagerGuard aGuard( *m_xData ); + const SfxUndoArray* pUndoArray = i_currentLevel ? m_xData->pActUndoArray : m_xData->pUndoArray; return pUndoArray->nCurUndoAction; } OUString SfxUndoManager::GetUndoActionComment( size_t nNo, bool const i_currentLevel ) const { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); OUString sComment; - const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; + const SfxUndoArray* pUndoArray = i_currentLevel ? m_xData->pActUndoArray : m_xData->pUndoArray; assert(nNo < pUndoArray->nCurUndoAction); if( nNo < pUndoArray->nCurUndoAction ) sComment = pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction - 1 - nNo ].pAction->GetComment(); @@ -718,51 +718,51 @@ OUString SfxUndoManager::GetUndoActionComment( size_t nNo, bool const i_currentL sal_uInt16 SfxUndoManager::GetUndoActionId() const { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); - assert(m_pData->pActUndoArray->nCurUndoAction > 0); - if ( m_pData->pActUndoArray->nCurUndoAction == 0 ) + assert(m_xData->pActUndoArray->nCurUndoAction > 0); + if ( m_xData->pActUndoArray->nCurUndoAction == 0 ) return 0; - return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction->GetId(); + return m_xData->pActUndoArray->aUndoActions[m_xData->pActUndoArray->nCurUndoAction-1].pAction->GetId(); } SfxUndoAction* SfxUndoManager::GetUndoAction( size_t nNo ) const { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); - assert(nNo < m_pData->pActUndoArray->nCurUndoAction); - if( nNo >= m_pData->pActUndoArray->nCurUndoAction ) + assert(nNo < m_xData->pActUndoArray->nCurUndoAction); + if( nNo >= m_xData->pActUndoArray->nCurUndoAction ) return NULL; - return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1-nNo].pAction; + return m_xData->pActUndoArray->aUndoActions[m_xData->pActUndoArray->nCurUndoAction-1-nNo].pAction; } /** clears the redo stack and removes the top undo action */ void SfxUndoManager::RemoveLastUndoAction() { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); - ENSURE_OR_RETURN_VOID( m_pData->pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::RemoveLastUndoAction(), no action to remove?!" ); + ENSURE_OR_RETURN_VOID( m_xData->pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::RemoveLastUndoAction(), no action to remove?!" ); - m_pData->pActUndoArray->nCurUndoAction--; + m_xData->pActUndoArray->nCurUndoAction--; // delete redo-actions and top action - for ( size_t nPos = m_pData->pActUndoArray->aUndoActions.size(); nPos > m_pData->pActUndoArray->nCurUndoAction; --nPos ) + for ( size_t nPos = m_xData->pActUndoArray->aUndoActions.size(); nPos > m_xData->pActUndoArray->nCurUndoAction; --nPos ) { - aGuard.markForDeletion( m_pData->pActUndoArray->aUndoActions[nPos-1].pAction ); + aGuard.markForDeletion( m_xData->pActUndoArray->aUndoActions[nPos-1].pAction ); } - m_pData->pActUndoArray->aUndoActions.Remove( - m_pData->pActUndoArray->nCurUndoAction, - m_pData->pActUndoArray->aUndoActions.size() - m_pData->pActUndoArray->nCurUndoAction ); + m_xData->pActUndoArray->aUndoActions.Remove( + m_xData->pActUndoArray->nCurUndoAction, + m_xData->pActUndoArray->aUndoActions.size() - m_xData->pActUndoArray->nCurUndoAction ); } bool SfxUndoManager::IsDoing() const { - UndoManagerGuard aGuard( *m_pData ); - return m_pData->mbDoing; + UndoManagerGuard aGuard( *m_xData ); + return m_xData->mbDoing; } @@ -780,10 +780,10 @@ bool SfxUndoManager::UndoWithContext( SfxUndoContext& i_context ) bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); assert( !IsDoing() && "SfxUndoManager::Undo: *nested* Undo/Redo actions? How this?" ); - ::comphelper::FlagGuard aDoingGuard( m_pData->mbDoing ); + ::comphelper::FlagGuard aDoingGuard( m_xData->mbDoing ); LockGuard aLockGuard( *this ); if ( ImplIsInListAction_Lock() ) @@ -792,13 +792,13 @@ bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull ) return false; } - if ( m_pData->pActUndoArray->nCurUndoAction == 0 ) + if ( m_xData->pActUndoArray->nCurUndoAction == 0 ) { SAL_WARN("svl", "SfxUndoManager::Undo: undo stack is empty!" ); return false; } - SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ --m_pData->pActUndoArray->nCurUndoAction ].pAction; + SfxUndoAction* pAction = m_xData->pActUndoArray->aUndoActions[ --m_xData->pActUndoArray->nCurUndoAction ].pAction; const OUString sActionComment = pAction->GetComment(); try { @@ -815,12 +815,12 @@ bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull ) { aGuard.reset(); - // in theory, somebody might have tampered with all of *m_pData while the mutex was unlocked. So, see if + // in theory, somebody might have tampered with all of *m_xData while the mutex was unlocked. So, see if // we still find pAction in our current Undo array size_t nCurAction = 0; - while ( nCurAction < m_pData->pActUndoArray->aUndoActions.size() ) + while ( nCurAction < m_xData->pActUndoArray->aUndoActions.size() ) { - if ( m_pData->pActUndoArray->aUndoActions[ nCurAction++ ].pAction == pAction ) + if ( m_xData->pActUndoArray->aUndoActions[ nCurAction++ ].pAction == pAction ) { // the Undo action is still there ... // assume the error is a permanent failure, and clear the Undo stack @@ -840,23 +840,23 @@ bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull ) size_t SfxUndoManager::GetRedoActionCount( bool const i_currentLevel ) const { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); return ImplGetRedoActionCount_Lock( i_currentLevel ); } size_t SfxUndoManager::ImplGetRedoActionCount_Lock( bool const i_currentLevel ) const { - const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; + const SfxUndoArray* pUndoArray = i_currentLevel ? m_xData->pActUndoArray : m_xData->pUndoArray; return pUndoArray->aUndoActions.size() - pUndoArray->nCurUndoAction; } SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo, bool const i_currentLevel ) const { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); - const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; + const SfxUndoArray* pUndoArray = i_currentLevel ? m_xData->pActUndoArray : m_xData->pUndoArray; if ( (pUndoArray->nCurUndoAction + nNo) > pUndoArray->aUndoActions.size() ) { return NULL; @@ -868,8 +868,8 @@ SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo, bool const i_currentLe OUString SfxUndoManager::GetRedoActionComment( size_t nNo, bool const i_currentLevel ) const { OUString sComment; - UndoManagerGuard aGuard( *m_pData ); - const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray; + UndoManagerGuard aGuard( *m_xData ); + const SfxUndoArray* pUndoArray = i_currentLevel ? m_xData->pActUndoArray : m_xData->pUndoArray; if ( (pUndoArray->nCurUndoAction + nNo) < pUndoArray->aUndoActions.size() ) { sComment = pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction + nNo ].pAction->GetComment(); @@ -892,10 +892,10 @@ bool SfxUndoManager::RedoWithContext( SfxUndoContext& i_context ) bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); assert( !IsDoing() && "SfxUndoManager::Redo: *nested* Undo/Redo actions? How this?" ); - ::comphelper::FlagGuard aDoingGuard( m_pData->mbDoing ); + ::comphelper::FlagGuard aDoingGuard( m_xData->mbDoing ); LockGuard aLockGuard( *this ); if ( ImplIsInListAction_Lock() ) @@ -904,13 +904,13 @@ bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull ) return false; } - if ( m_pData->pActUndoArray->nCurUndoAction >= m_pData->pActUndoArray->aUndoActions.size() ) + if ( m_xData->pActUndoArray->nCurUndoAction >= m_xData->pActUndoArray->aUndoActions.size() ) { SAL_WARN("svl", "SfxUndoManager::Redo: redo stack is empty!"); return false; } - SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction++ ].pAction; + SfxUndoAction* pAction = m_xData->pActUndoArray->aUndoActions[ m_xData->pActUndoArray->nCurUndoAction++ ].pAction; const OUString sActionComment = pAction->GetComment(); try { @@ -927,12 +927,12 @@ bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull ) { aGuard.reset(); - // in theory, somebody might have tampered with all of *m_pData while the mutex was unlocked. So, see if + // in theory, somebody might have tampered with all of *m_xData while the mutex was unlocked. So, see if // we still find pAction in our current Undo array size_t nCurAction = 0; - while ( nCurAction < m_pData->pActUndoArray->aUndoActions.size() ) + while ( nCurAction < m_xData->pActUndoArray->aUndoActions.size() ) { - if ( m_pData->pActUndoArray->aUndoActions[ nCurAction ].pAction == pAction ) + if ( m_xData->pActUndoArray->aUndoActions[ nCurAction ].pAction == pAction ) { // the Undo action is still there ... // assume the error is a permanent failure, and clear the Undo stack @@ -953,25 +953,25 @@ bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull ) size_t SfxUndoManager::GetRepeatActionCount() const { - UndoManagerGuard aGuard( *m_pData ); - return m_pData->pActUndoArray->aUndoActions.size(); + UndoManagerGuard aGuard( *m_xData ); + return m_xData->pActUndoArray->aUndoActions.size(); } OUString SfxUndoManager::GetRepeatActionComment(SfxRepeatTarget &rTarget) const { - UndoManagerGuard aGuard( *m_pData ); - return m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->aUndoActions.size() - 1 ].pAction + UndoManagerGuard aGuard( *m_xData ); + return m_xData->pActUndoArray->aUndoActions[ m_xData->pActUndoArray->aUndoActions.size() - 1 ].pAction ->GetRepeatComment(rTarget); } bool SfxUndoManager::Repeat( SfxRepeatTarget &rTarget ) { - UndoManagerGuard aGuard( *m_pData ); - if ( !m_pData->pActUndoArray->aUndoActions.empty() ) + UndoManagerGuard aGuard( *m_xData ); + if ( !m_xData->pActUndoArray->aUndoActions.empty() ) { - SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->aUndoActions.size() - 1 ].pAction; + SfxUndoAction* pAction = m_xData->pActUndoArray->aUndoActions[ m_xData->pActUndoArray->aUndoActions.size() - 1 ].pAction; aGuard.clear(); if ( pAction->CanRepeat( rTarget ) ) pAction->Repeat( rTarget ); @@ -984,11 +984,11 @@ bool SfxUndoManager::Repeat( SfxRepeatTarget &rTarget ) bool SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget ) const { - UndoManagerGuard aGuard( *m_pData ); - if ( !m_pData->pActUndoArray->aUndoActions.empty() ) + UndoManagerGuard aGuard( *m_xData ); + if ( !m_xData->pActUndoArray->aUndoActions.empty() ) { - size_t nActionNo = m_pData->pActUndoArray->aUndoActions.size() - 1; - return m_pData->pActUndoArray->aUndoActions[nActionNo].pAction->CanRepeat(rTarget); + size_t nActionNo = m_xData->pActUndoArray->aUndoActions.size() - 1; + return m_xData->pActUndoArray->aUndoActions[nActionNo].pAction->CanRepeat(rTarget); } return false; } @@ -996,22 +996,22 @@ bool SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget ) const void SfxUndoManager::AddUndoListener( SfxUndoListener& i_listener ) { - UndoManagerGuard aGuard( *m_pData ); - m_pData->aListeners.push_back( &i_listener ); + UndoManagerGuard aGuard( *m_xData ); + m_xData->aListeners.push_back( &i_listener ); } void SfxUndoManager::RemoveUndoListener( SfxUndoListener& i_listener ) { - UndoManagerGuard aGuard( *m_pData ); - for ( UndoListeners::iterator lookup = m_pData->aListeners.begin(); - lookup != m_pData->aListeners.end(); + UndoManagerGuard aGuard( *m_xData ); + for ( UndoListeners::iterator lookup = m_xData->aListeners.begin(); + lookup != m_xData->aListeners.end(); ++lookup ) { if ( (*lookup) == &i_listener ) { - m_pData->aListeners.erase( lookup ); + m_xData->aListeners.erase( lookup ); break; } } @@ -1023,19 +1023,19 @@ void SfxUndoManager::RemoveUndoListener( SfxUndoListener& i_listener ) void SfxUndoManager::EnterListAction( const OUString& rComment, const OUString &rRepeatComment, sal_uInt16 nId ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); if( !ImplIsUndoEnabled_Lock() ) return; - if ( !m_pData->pUndoArray->nMaxUndoActions ) + if ( !m_xData->pUndoArray->nMaxUndoActions ) return; - m_pData->pFatherUndoArray = m_pData->pActUndoArray; - SfxListUndoAction* pAction = new SfxListUndoAction( rComment, rRepeatComment, nId, m_pData->pActUndoArray ); + m_xData->pFatherUndoArray = m_xData->pActUndoArray; + SfxListUndoAction* pAction = new SfxListUndoAction( rComment, rRepeatComment, nId, m_xData->pActUndoArray ); OSL_VERIFY( ImplAddUndoAction_NoNotify( pAction, false, false, aGuard ) ); // expected to succeed: all conditions under which it could fail should have been checked already - m_pData->pActUndoArray = pAction; + m_xData->pActUndoArray = pAction; // notification aGuard.scheduleNotification( &SfxUndoListener::listActionEntered, rComment ); @@ -1044,24 +1044,24 @@ void SfxUndoManager::EnterListAction( const OUString& rComment, bool SfxUndoManager::IsInListAction() const { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); return ImplIsInListAction_Lock(); } bool SfxUndoManager::ImplIsInListAction_Lock() const { - return ( m_pData->pActUndoArray != m_pData->pUndoArray ); + return ( m_xData->pActUndoArray != m_xData->pUndoArray ); } size_t SfxUndoManager::GetListActionDepth() const { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); size_t nDepth(0); - SfxUndoArray* pLookup( m_pData->pActUndoArray ); - while ( pLookup != m_pData->pUndoArray ) + SfxUndoArray* pLookup( m_xData->pActUndoArray ); + while ( pLookup != m_xData->pUndoArray ) { pLookup = pLookup->pFatherUndoArray; ++nDepth; @@ -1073,15 +1073,15 @@ size_t SfxUndoManager::GetListActionDepth() const size_t SfxUndoManager::LeaveListAction() { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); size_t nCount = ImplLeaveListAction( false, aGuard ); - if ( m_pData->mbClearUntilTopLevel ) + if ( m_xData->mbClearUntilTopLevel ) { ImplClearCurrentLevel_NoNotify( aGuard ); if ( !ImplIsInListAction_Lock() ) { - m_pData->mbClearUntilTopLevel = false; + m_xData->mbClearUntilTopLevel = false; aGuard.scheduleNotification( &SfxUndoListener::cleared ); } nCount = 0; @@ -1093,7 +1093,7 @@ size_t SfxUndoManager::LeaveListAction() size_t SfxUndoManager::LeaveAndMergeListAction() { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); return ImplLeaveListAction( true, aGuard ); } @@ -1103,7 +1103,7 @@ size_t SfxUndoManager::ImplLeaveListAction( const bool i_merge, UndoManagerGuard if ( !ImplIsUndoEnabled_Lock() ) return 0; - if ( !m_pData->pUndoArray->nMaxUndoActions ) + if ( !m_xData->pUndoArray->nMaxUndoActions ) return 0; if( !ImplIsInListAction_Lock() ) @@ -1112,19 +1112,19 @@ size_t SfxUndoManager::ImplLeaveListAction( const bool i_merge, UndoManagerGuard return 0; } - assert(m_pData->pActUndoArray->pFatherUndoArray); + assert(m_xData->pActUndoArray->pFatherUndoArray); // the array/level which we're about to leave - SfxUndoArray* pArrayToLeave = m_pData->pActUndoArray; + SfxUndoArray* pArrayToLeave = m_xData->pActUndoArray; // one step up - m_pData->pActUndoArray = m_pData->pActUndoArray->pFatherUndoArray; + m_xData->pActUndoArray = m_xData->pActUndoArray->pFatherUndoArray; // If no undo actions were added to the list, delete the list action const size_t nListActionElements = pArrayToLeave->nCurUndoAction; if ( nListActionElements == 0 ) { - SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction-1 ].pAction; - m_pData->pActUndoArray->aUndoActions.Remove( --m_pData->pActUndoArray->nCurUndoAction ); + SfxUndoAction* pCurrentAction= m_xData->pActUndoArray->aUndoActions[ m_xData->pActUndoArray->nCurUndoAction-1 ].pAction; + m_xData->pActUndoArray->aUndoActions.Remove( --m_xData->pActUndoArray->nCurUndoAction ); i_guard.markForDeletion( pCurrentAction ); i_guard.scheduleNotification( &SfxUndoListener::listActionCancelled ); @@ -1135,20 +1135,20 @@ size_t SfxUndoManager::ImplLeaveListAction( const bool i_merge, UndoManagerGuard // the redo stack ImplClearRedo( i_guard, IUndoManager::CurrentLevel ); - SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction-1 ].pAction; + SfxUndoAction* pCurrentAction= m_xData->pActUndoArray->aUndoActions[ m_xData->pActUndoArray->nCurUndoAction-1 ].pAction; SfxListUndoAction* pListAction = dynamic_cast< SfxListUndoAction * >( pCurrentAction ); ENSURE_OR_RETURN( pListAction, "SfxUndoManager::ImplLeaveListAction: list action expected at this position!", nListActionElements ); if ( i_merge ) { // merge the list action with its predecessor on the same level - SAL_WARN_IF( m_pData->pActUndoArray->nCurUndoAction <= 1, "svl", + SAL_WARN_IF( m_xData->pActUndoArray->nCurUndoAction <= 1, "svl", "SfxUndoManager::ImplLeaveListAction: cannot merge the list action if there's no other action on the same level - check this beforehand!" ); - if ( m_pData->pActUndoArray->nCurUndoAction > 1 ) + if ( m_xData->pActUndoArray->nCurUndoAction > 1 ) { - SfxUndoAction* pPreviousAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction - 2 ].pAction; - m_pData->pActUndoArray->aUndoActions.Remove( m_pData->pActUndoArray->nCurUndoAction - 2 ); - --m_pData->pActUndoArray->nCurUndoAction; + SfxUndoAction* pPreviousAction = m_xData->pActUndoArray->aUndoActions[ m_xData->pActUndoArray->nCurUndoAction - 2 ].pAction; + m_xData->pActUndoArray->aUndoActions.Remove( m_xData->pActUndoArray->nCurUndoAction - 2 ); + --m_xData->pActUndoArray->nCurUndoAction; pListAction->aUndoActions.Insert( pPreviousAction, 0 ); ++pListAction->nCurUndoAction; @@ -1178,42 +1178,42 @@ size_t SfxUndoManager::ImplLeaveListAction( const bool i_merge, UndoManagerGuard UndoStackMark SfxUndoManager::MarkTopUndoAction() { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); SAL_WARN_IF( IsInListAction(), "svl", "SfxUndoManager::MarkTopUndoAction(): suspicious call!" ); - assert((m_pData->mnMarks + 1) < (m_pData->mnEmptyMark - 1) && + assert((m_xData->mnMarks + 1) < (m_xData->mnEmptyMark - 1) && "SfxUndoManager::MarkTopUndoAction(): mark overflow!"); - size_t const nActionPos = m_pData->pUndoArray->nCurUndoAction; + size_t const nActionPos = m_xData->pUndoArray->nCurUndoAction; if (0 == nActionPos) { - --m_pData->mnEmptyMark; - return m_pData->mnEmptyMark; + --m_xData->mnEmptyMark; + return m_xData->mnEmptyMark; } - m_pData->pUndoArray->aUndoActions[ nActionPos-1 ].aMarks.push_back( - ++m_pData->mnMarks ); - return m_pData->mnMarks; + m_xData->pUndoArray->aUndoActions[ nActionPos-1 ].aMarks.push_back( + ++m_xData->mnMarks ); + return m_xData->mnMarks; } void SfxUndoManager::RemoveMark( UndoStackMark const i_mark ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); - if ((m_pData->mnEmptyMark < i_mark) || (MARK_INVALID == i_mark)) + if ((m_xData->mnEmptyMark < i_mark) || (MARK_INVALID == i_mark)) { return; // nothing to remove } - else if (i_mark == m_pData->mnEmptyMark) + else if (i_mark == m_xData->mnEmptyMark) { - --m_pData->mnEmptyMark; // never returned from MarkTop => invalid + --m_xData->mnEmptyMark; // never returned from MarkTop => invalid return; } - for ( size_t i=0; i<m_pData->pUndoArray->aUndoActions.size(); ++i ) + for ( size_t i=0; i<m_xData->pUndoArray->aUndoActions.size(); ++i ) { - MarkedUndoAction& rAction = m_pData->pUndoArray->aUndoActions[i]; + MarkedUndoAction& rAction = m_xData->pUndoArray->aUndoActions[i]; for ( ::std::vector< UndoStackMark >::iterator markPos = rAction.aMarks.begin(); markPos != rAction.aMarks.end(); ++markPos @@ -1234,16 +1234,16 @@ void SfxUndoManager::RemoveMark( UndoStackMark const i_mark ) bool SfxUndoManager::HasTopUndoActionMark( UndoStackMark const i_mark ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); - size_t nActionPos = m_pData->pUndoArray->nCurUndoAction; + size_t nActionPos = m_xData->pUndoArray->nCurUndoAction; if ( nActionPos == 0 ) { - return (i_mark == m_pData->mnEmptyMark); + return (i_mark == m_xData->mnEmptyMark); } const MarkedUndoAction& rAction = - m_pData->pUndoArray->aUndoActions[ nActionPos-1 ]; + m_xData->pUndoArray->aUndoActions[ nActionPos-1 ]; for ( ::std::vector< UndoStackMark >::const_iterator markPos = rAction.aMarks.begin(); markPos != rAction.aMarks.end(); ++markPos @@ -1259,22 +1259,22 @@ bool SfxUndoManager::HasTopUndoActionMark( UndoStackMark const i_mark ) void SfxUndoManager::RemoveOldestUndoActions( size_t const i_count ) { - UndoManagerGuard aGuard( *m_pData ); + UndoManagerGuard aGuard( *m_xData ); size_t nActionsToRemove = i_count; while ( nActionsToRemove ) { - SfxUndoAction* pActionToRemove = m_pData->pUndoArray->aUndoActions[0].pAction; + SfxUndoAction* pActionToRemove = m_xData->pUndoArray->aUndoActions[0].pAction; - if ( IsInListAction() && ( m_pData->pUndoArray->nCurUndoAction == 1 ) ) + if ( IsInListAction() && ( m_xData->pUndoArray->nCurUndoAction == 1 ) ) { assert(!"SfxUndoManager::RemoveOldestUndoActions: cannot remove a not-yet-closed list action!"); return; } aGuard.markForDeletion( pActionToRemove ); - m_pData->pUndoArray->aUndoActions.Remove( 0 ); - --m_pData->pUndoArray->nCurUndoAction; + m_xData->pUndoArray->aUndoActions.Remove( 0 ); + --m_xData->pUndoArray->nCurUndoAction; --nActionsToRemove; } } @@ -1421,7 +1421,7 @@ SfxLinkUndoAction::SfxLinkUndoAction(::svl::IUndoManager *pManager) if ( pManager->GetMaxUndoActionCount() ) { size_t nPos = pManager->GetUndoActionCount()-1; - pAction = pUndoManagerImplementation->m_pData->pActUndoArray->aUndoActions[nPos].pAction; + pAction = pUndoManagerImplementation->m_xData->pActUndoArray->aUndoActions[nPos].pAction; pAction->SetLinkToSfxLinkUndoAction(this); } else diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx index acf89b5f4fb4..b5adc8962ec4 100644 --- a/svtools/source/contnr/DocumentInfoPreview.cxx +++ b/svtools/source/contnr/DocumentInfoPreview.cxx @@ -45,7 +45,7 @@ namespace svtools { ODocumentInfoPreview::ODocumentInfoPreview(vcl::Window * pParent, WinBits nBits): Window(pParent, WB_DIALOGCONTROL), m_pEditWin(this, nBits), - m_pInfoTable(new SvtDocInfoTable_Impl), + m_xInfoTable(new SvtDocInfoTable_Impl), m_aLanguageTag(SvtPathOptions().GetLanguageTag()) // detect application language { m_pEditWin.SetLeftMargin(10); @@ -147,7 +147,7 @@ void ODocumentInfoPreview::insertEntry( void ODocumentInfoPreview::insertNonempty(long id, OUString const & value) { if (!value.isEmpty()) { - insertEntry(m_pInfoTable->GetString(id), value); + insertEntry(m_xInfoTable->GetString(id), value); } } @@ -163,7 +163,7 @@ void ODocumentInfoPreview::insertDateTime( OUStringBuffer buf(rLocaleWrapper.getDate(aToolsDT)); buf.append(", "); buf.append(rLocaleWrapper.getTime(aToolsDT)); - insertEntry(m_pInfoTable->GetString(id), buf.makeStringAndClear()); + insertEntry(m_xInfoTable->GetString(id), buf.makeStringAndClear()); } } diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index c599a3985520..9a448e458df1 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -569,8 +569,8 @@ typedef std::map<sal_uInt16, SvxIconChoiceCtrlEntryPtrVec> IconChoiceMap; class IcnCursor_Impl { SvxIconChoiceCtrl_Impl* pView; - boost::scoped_ptr<IconChoiceMap> pColumns; - boost::scoped_ptr<IconChoiceMap> pRows; + std::unique_ptr<IconChoiceMap> xColumns; + std::unique_ptr<IconChoiceMap> xRows; long nCols; long nRows; short nDeltaWidth; @@ -578,7 +578,7 @@ class IcnCursor_Impl SvxIconChoiceCtrlEntry* pCurEntry; void SetDeltas(); void ImplCreate(); - void Create() { if( !pColumns ) ImplCreate(); } + void Create() { if( !xColumns ) ImplCreate(); } sal_uInt16 GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList, diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index badf45c83df5..88d6f0ad7714 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -62,12 +62,12 @@ sal_uInt16 IcnCursor_Impl::GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList, void IcnCursor_Impl::ImplCreate() { pView->CheckBoundingRects(); - DBG_ASSERT(pColumns==0&&pRows==0,"ImplCreate: Not cleared"); + DBG_ASSERT(xColumns==0&&xRows==0,"ImplCreate: Not cleared"); SetDeltas(); - pColumns.reset(new IconChoiceMap); - pRows.reset(new IconChoiceMap); + xColumns.reset(new IconChoiceMap); + xRows.reset(new IconChoiceMap); size_t nCount = pView->aEntries.size(); for( size_t nCur = 0; nCur < nCount; nCur++ ) @@ -84,11 +84,11 @@ void IcnCursor_Impl::ImplCreate() if( nX >= nCols ) nX = sal::static_int_cast< short >(nCols - 1); - SvxIconChoiceCtrlEntryPtrVec& rColEntry = (*pColumns)[nX]; + SvxIconChoiceCtrlEntryPtrVec& rColEntry = (*xColumns)[nX]; sal_uInt16 nIns = GetSortListPos( rColEntry, rRect.Top(), sal_True ); rColEntry.insert( rColEntry.begin() + nIns, pEntry ); - SvxIconChoiceCtrlEntryPtrVec& rRowEntry = (*pRows)[nY]; + SvxIconChoiceCtrlEntryPtrVec& rRowEntry = (*xRows)[nY]; nIns = GetSortListPos( rRowEntry, rRect.Left(), sal_False ); rRowEntry.insert( rRowEntry.begin() + nIns, pEntry ); @@ -102,10 +102,10 @@ void IcnCursor_Impl::ImplCreate() void IcnCursor_Impl::Clear() { - if( pColumns ) + if( xColumns ) { - pColumns.reset(); - pRows.reset(); + xColumns.reset(); + xRows.reset(); pCurEntry = 0; nDeltaWidth = 0; nDeltaHeight = 0; @@ -116,8 +116,8 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT sal_uInt16, bool bDown, bool bSimple ) { DBG_ASSERT(pCurEntry, "SearchCol: No reference entry"); - IconChoiceMap::iterator mapIt = pColumns->find( nCol ); - if ( mapIt == pColumns->end() ) + IconChoiceMap::iterator mapIt = xColumns->find( nCol ); + if ( mapIt == xColumns->end() ) return 0; SvxIconChoiceCtrlEntryPtrVec const & rList = mapIt->second; const sal_uInt16 nCount = rList.size(); @@ -195,8 +195,8 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL sal_uInt16, bool bRight, bool bSimple ) { DBG_ASSERT(pCurEntry,"SearchRow: No reference entry"); - IconChoiceMap::iterator mapIt = pRows->find( nRow ); - if ( mapIt == pRows->end() ) + IconChoiceMap::iterator mapIt = xRows->find( nRow ); + if ( mapIt == xRows->end() ) return 0; SvxIconChoiceCtrlEntryPtrVec const & rList = mapIt->second; const sal_uInt16 nCount = rList.size(); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index e97386c17822..44d507cd9d5a 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -857,9 +857,9 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom if (RULER_INDENT_BORDER != nIndentStyle) { bool bIsHit = false; - if(mpCurrentHitTest.get() != NULL && mpCurrentHitTest->eType == RULER_TYPE_INDENT) + if(mxCurrentHitTest.get() != NULL && mxCurrentHitTest->eType == RULER_TYPE_INDENT) { - bIsHit = mpCurrentHitTest->nAryPos == j; + bIsHit = mxCurrentHitTest->nAryPos == j; } else if(mbDrag && meDragType == RULER_TYPE_INDENT) { @@ -2083,36 +2083,36 @@ void Ruler::MouseMove( const MouseEvent& rMEvt ) { PointerStyle ePtrStyle = POINTER_ARROW; - mpCurrentHitTest.reset(new RulerSelection); + mxCurrentHitTest.reset(new RulerSelection); maHoverSelection.eType = RULER_TYPE_DONTKNOW; - if (ImplHitTest( rMEvt.GetPosPixel(), mpCurrentHitTest.get() )) + if (ImplHitTest( rMEvt.GetPosPixel(), mxCurrentHitTest.get() )) { - maHoverSelection = *mpCurrentHitTest.get(); + maHoverSelection = *mxCurrentHitTest.get(); - if (mpCurrentHitTest->bSize) + if (mxCurrentHitTest->bSize) { if (mnWinStyle & WB_HORZ) { - if (mpCurrentHitTest->mnDragSize == RULER_DRAGSIZE_1) + if (mxCurrentHitTest->mnDragSize == RULER_DRAGSIZE_1) ePtrStyle = POINTER_TAB_SELECT_W; - else if (mpCurrentHitTest->mnDragSize == RULER_DRAGSIZE_2) + else if (mxCurrentHitTest->mnDragSize == RULER_DRAGSIZE_2) ePtrStyle = POINTER_TAB_SELECT_E; else ePtrStyle = POINTER_ESIZE; } else { - if (mpCurrentHitTest->mnDragSize == RULER_DRAGSIZE_1) + if (mxCurrentHitTest->mnDragSize == RULER_DRAGSIZE_1) ePtrStyle = POINTER_WINDOW_NSIZE; - else if (mpCurrentHitTest->mnDragSize == RULER_DRAGSIZE_2) + else if (mxCurrentHitTest->mnDragSize == RULER_DRAGSIZE_2) ePtrStyle = POINTER_WINDOW_SSIZE; else ePtrStyle = POINTER_SSIZE; } } - else if (mpCurrentHitTest->bSizeBar) + else if (mxCurrentHitTest->bSizeBar) { if (mnWinStyle & WB_HORZ) ePtrStyle = POINTER_HSIZEBAR; @@ -2121,7 +2121,7 @@ void Ruler::MouseMove( const MouseEvent& rMEvt ) } } - if(mpPreviousHitTest.get() != NULL && mpPreviousHitTest->eType != mpCurrentHitTest->eType) + if(mxPreviousHitTest.get() != NULL && mxPreviousHitTest->eType != mxCurrentHitTest->eType) { mbFormat = true; } @@ -2133,7 +2133,7 @@ void Ruler::MouseMove( const MouseEvent& rMEvt ) Paint(Rectangle()); mnUpdateFlags &= ~RULER_UPDATE_DRAW; } - mpPreviousHitTest.swap(mpCurrentHitTest); + mxPreviousHitTest.swap(mxCurrentHitTest); } void Ruler::Tracking( const TrackingEvent& rTEvt ) diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 6a41e0b7e14e..67d28733fb80 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -58,7 +58,7 @@ enum void ValueSet::ImplInit() { mpNoneItem.reset(NULL); - mpScrollBar.reset(NULL); + mxScrollBar.reset(NULL); mnItemWidth = 0; mnItemHeight = 0; @@ -197,16 +197,16 @@ void ValueSet::ImplInitScrollBar() { if ( GetStyle() & WB_VSCROLL ) { - if ( !mpScrollBar.get() ) + if ( !mxScrollBar.get() ) { - mpScrollBar.reset(new ScrollBar( this, WB_VSCROLL | WB_DRAG )); - mpScrollBar->SetScrollHdl( LINK( this, ValueSet, ImplScrollHdl ) ); + mxScrollBar.reset(new ScrollBar( this, WB_VSCROLL | WB_DRAG )); + mxScrollBar->SetScrollHdl( LINK( this, ValueSet, ImplScrollHdl ) ); } else { // adapt the width because of the changed settings long nScrBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); - mpScrollBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, WINDOW_POSSIZE_WIDTH ); + mxScrollBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, WINDOW_POSSIZE_WIDTH ); } } } @@ -344,17 +344,17 @@ void ValueSet::Format() long nOff; long nNoneHeight; long nNoneSpace; - boost::scoped_ptr<ScrollBar> pDeletedScrollBar(NULL); + std::unique_ptr<ScrollBar> xDeletedScrollBar; // consider the scrolling if ( nStyle & WB_VSCROLL ) ImplInitScrollBar(); else { - if ( mpScrollBar.get() ) + if ( mxScrollBar.get() ) { // delete ScrollBar not until later, to prevent recursive calls - pDeletedScrollBar.swap(mpScrollBar); + xDeletedScrollBar.swap(mxScrollBar); } } @@ -403,8 +403,8 @@ void ValueSet::Format() // calculate ScrollBar width long nScrBarWidth = 0; - if (mpScrollBar.get()) - nScrBarWidth = mpScrollBar->GetSizePixel().Width()+SCRBAR_OFFSET; + if (mxScrollBar.get()) + nScrBarWidth = mxScrollBar->GetSizePixel().Width()+SCRBAR_OFFSET; // calculate number of columns if (!mnUserCols) @@ -511,8 +511,8 @@ void ValueSet::Format() mItemList[i]->mbVisible = false; } - if ( mpScrollBar.get() ) - mpScrollBar->Hide(); + if ( mxScrollBar.get() ) + mxScrollBar->Hide(); } else { @@ -644,7 +644,7 @@ void ValueSet::Format() } // arrange ScrollBar, set values and show it - if ( mpScrollBar.get() ) + if ( mxScrollBar.get() ) { Point aPos( aWinSize.Width() - nScrBarWidth + SCRBAR_OFFSET, 0 ); Size aSize( nScrBarWidth - SCRBAR_OFFSET, aWinSize.Height() ); @@ -654,15 +654,15 @@ void ValueSet::Format() aPos.Y() = nStartY + nNoneHeight + 1; aSize.Height() = ((mnItemHeight + mnSpacing) * mnVisLines) - 2 - mnSpacing; } - mpScrollBar->SetPosSizePixel( aPos, aSize ); - mpScrollBar->SetRangeMax( mnLines ); - mpScrollBar->SetVisibleSize( mnVisLines ); - mpScrollBar->SetThumbPos( (long)mnFirstLine ); + mxScrollBar->SetPosSizePixel( aPos, aSize ); + mxScrollBar->SetRangeMax( mnLines ); + mxScrollBar->SetVisibleSize( mnVisLines ); + mxScrollBar->SetThumbPos( (long)mnFirstLine ); long nPageSize = mnVisLines; if ( nPageSize < 1 ) nPageSize = 1; - mpScrollBar->SetPageSize( nPageSize ); - mpScrollBar->Show(); + mxScrollBar->SetPageSize( nPageSize ); + mxScrollBar->Show(); } } @@ -933,10 +933,10 @@ void ValueSet::ImplDraw() Point aDefPos; Size aSize = maVirDev.GetOutputSizePixel(); - if ( mpScrollBar.get() && mpScrollBar->IsVisible() ) + if ( mxScrollBar.get() && mxScrollBar->IsVisible() ) { - Point aScrPos = mpScrollBar->GetPosPixel(); - Size aScrSize = mpScrollBar->GetSizePixel(); + Point aScrPos = mxScrollBar->GetPosPixel(); + Size aScrSize = mxScrollBar->GetSizePixel(); Point aTempPos( 0, aScrPos.Y() ); Size aTempSize( aSize.Width(), aScrPos.Y() ); @@ -1402,7 +1402,7 @@ void ValueSet::Command( const CommandEvent& rCommandEvent ) rCommandEvent.GetCommand() == COMMAND_STARTAUTOSCROLL || rCommandEvent.GetCommand() == COMMAND_AUTOSCROLL ) { - if ( HandleScrollCommand( rCommandEvent, NULL, mpScrollBar.get() ) ) + if ( HandleScrollCommand( rCommandEvent, NULL, mxScrollBar.get() ) ) return; } @@ -2252,7 +2252,7 @@ long ValueSet::GetScrollWidth() const if ( GetStyle() & WB_VSCROLL ) { const_cast<ValueSet*>(this)->ImplInitScrollBar(); - return mpScrollBar->GetSizePixel().Width() + SCRBAR_OFFSET; + return mxScrollBar->GetSizePixel().Width() + SCRBAR_OFFSET; } else return 0; diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx index 566bc59da172..aa6277a81c07 100644 --- a/svtools/source/uno/popupwindowcontroller.cxx +++ b/svtools/source/uno/popupwindowcontroller.cxx @@ -138,7 +138,7 @@ PopupWindowController::PopupWindowController( const Reference< uno::XComponentCo const Reference< frame::XFrame >& xFrame, const OUString& aCommandURL ) : svt::ToolboxController( rxContext, xFrame, aCommandURL ) -, mpImpl( new PopupWindowControllerImpl() ) +, mxImpl( new PopupWindowControllerImpl() ) { } @@ -223,8 +223,8 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() th vcl::Window* pWin = createPopupWindow( pItemWindow ? pItemWindow : pToolBox ); if( pWin ) { - pWin->EnableDocking(true); - mpImpl->SetPopupWindow(pWin,pToolBox); + pWin->EnableDocking(true); + mxImpl->SetPopupWindow(pWin,pToolBox); vcl::Window::GetDockingManager()->StartPopupMode( pToolBox, pWin, FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_NOFOCUSCLOSE | diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index d317c872f0dc..55016d24cc10 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -32,12 +32,8 @@ namespace svx { - - const long DIAL_OUTER_WIDTH = 8; - - DialControlBmp::DialControlBmp( vcl::Window& rParent ) : VirtualDevice( rParent, 0, 0 ), mbEnabled( true ), @@ -224,9 +220,9 @@ void DialControlBmp::DrawBackground() DialControl::DialControl_Impl::DialControl_Impl ( vcl::Window& rParent ) : - mpBmpEnabled(new DialControlBmp(rParent)), - mpBmpDisabled(new DialControlBmp(rParent)), - mpBmpBuffered(new DialControlBmp(rParent)), + mxBmpEnabled(new DialControlBmp(rParent)), + mxBmpDisabled(new DialControlBmp(rParent)), + mxBmpBuffered(new DialControlBmp(rParent)), mpLinkField( 0 ), mnLinkedFieldValueMultiplyer( 0 ), mnAngle( 0 ), @@ -242,7 +238,7 @@ void DialControl::DialControl_Impl::Init( const Size& rWinSize, const vcl::Font& { maWinFont = rWinFont; maWinFont.SetTransparent(true); - mpBmpBuffered->InitBitmap(maWinFont); + mxBmpBuffered->InitBitmap(maWinFont); SetSize(rWinSize); } @@ -257,9 +253,9 @@ void DialControl::DialControl_Impl::SetSize( const Size& rWinSize ) mnCenterX = maWinSize.Width() / 2; mnCenterY = maWinSize.Height() / 2; - mpBmpEnabled->DrawBackground( maWinSize, true ); - mpBmpDisabled->DrawBackground( maWinSize, false ); - mpBmpBuffered->SetSize( maWinSize ); + mxBmpEnabled->DrawBackground( maWinSize, true ); + mxBmpDisabled->DrawBackground( maWinSize, false ); + mxBmpBuffered->SetSize( maWinSize ); } @@ -289,7 +285,7 @@ void DialControl::Resize() void DialControl::Paint( const Rectangle& ) { Point aPos; - DrawBitmapEx( aPos, mpImpl->mpBmpBuffered->GetBitmapEx( aPos, mpImpl->maWinSize ) ); + DrawBitmapEx( aPos, mpImpl->mxBmpBuffered->GetBitmapEx( aPos, mpImpl->maWinSize ) ); } void DialControl::StateChanged( StateChangedType nStateChange ) @@ -448,9 +444,9 @@ void DialControl::Init( const Size& rWinSize ) void DialControl::InvalidateControl() { - mpImpl->mpBmpBuffered->CopyBackground( IsEnabled() ? *mpImpl->mpBmpEnabled : *mpImpl->mpBmpDisabled ); + mpImpl->mxBmpBuffered->CopyBackground( IsEnabled() ? *mpImpl->mxBmpEnabled : *mpImpl->mxBmpDisabled ); if( !mpImpl->mbNoRot ) - mpImpl->mpBmpBuffered->DrawElements( GetText(), mpImpl->mnAngle ); + mpImpl->mxBmpBuffered->DrawElements( GetText(), mpImpl->mnAngle ); Invalidate(); } diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 39ae343f30d8..6afcf3d33372 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -132,7 +132,7 @@ struct SvxRuler_Impl { // For columns; buffered to prevent // recalculation errors // May be has to be widen for future values - bool bIsTableRows : 1; // mpColumnItem contains table rows instead of columns + bool bIsTableRows : 1; // mxColumnItem contains table rows instead of columns //#i24363# tab stops relative to indent bool bIsTabsRelativeToIndent : 1; // Tab stops relative to paragraph indent? @@ -225,7 +225,7 @@ SvxRuler::SvxRuler( Ruler(pParent, nWinStyle), pCtrlItem(new SvxRulerItem* [CTRL_ITEM_COUNT]), pEditWin(pWin), - mpRulerImpl(new SvxRuler_Impl), + mxRulerImpl(new SvxRuler_Impl), bAppSetNullOffset(false), // Is the 0-offset of the ruler set by the application? lLogicNullOffset(0), lAppNullOffset(LONG_MAX), @@ -326,7 +326,7 @@ SvxRuler::SvxRuler( pCtrlItem[i++] = new SvxRulerItem(SID_RULER_PROTECT, *this, rBindings ); pCtrlItem[i++] = new SvxRulerItem(SID_RULER_BORDER_DISTANCE, *this, rBindings); - mpRulerImpl->nControlerItems=i; + mxRulerImpl->nControlerItems=i; if( (nFlags & SVXRULER_SUPPORT_SET_NULLOFFSET) == SVXRULER_SUPPORT_SET_NULLOFFSET ) SetExtraType(RULER_EXTRA_NULLOFFSET, 0); @@ -491,15 +491,15 @@ inline sal_uInt16 SvxRuler::GetObjectBordersOff(sal_uInt16 nIdx) const void SvxRuler::UpdateFrame() { const sal_uInt16 nMarginStyle = - ( mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected() ) ? + ( mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected() ) ? 0 : RULER_MARGIN_SIZEABLE; - if(mpLRSpaceItem.get() && mpPagePosItem.get()) + if(mxLRSpaceItem.get() && mxPagePosItem.get()) { // if no initialization by default app behavior const long nOld = lLogicNullOffset; - lLogicNullOffset = mpColumnItem.get() ? mpColumnItem->GetLeft(): mpLRSpaceItem->GetLeft(); + lLogicNullOffset = mxColumnItem.get() ? mxColumnItem->GetLeft(): mxLRSpaceItem->GetLeft(); if(bAppSetNullOffset) lAppNullOffset += lLogicNullOffset - nOld; @@ -518,21 +518,21 @@ void SvxRuler::UpdateFrame() long lRight = 0; // evaluate the table right edge of the table - if(mpColumnItem.get() && mpColumnItem->IsTable()) - lRight = mpColumnItem->GetRight(); + if(mxColumnItem.get() && mxColumnItem->IsTable()) + lRight = mxColumnItem->GetRight(); else - lRight = mpLRSpaceItem->GetRight(); + lRight = mxLRSpaceItem->GetRight(); - long aWidth = mpPagePosItem->GetWidth() - lRight - lLogicNullOffset + lAppNullOffset; + long aWidth = mxPagePosItem->GetWidth() - lRight - lLogicNullOffset + lAppNullOffset; long aWidthPixel = ConvertHPosPixel(aWidth); SetMargin2(aWidthPixel, nMarginStyle); } - else if(mpULSpaceItem.get() && mpPagePosItem.get()) + else if(mxULSpaceItem.get() && mxPagePosItem.get()) { // relative the upper edge of the surrounding frame const long nOld = lLogicNullOffset; - lLogicNullOffset = mpColumnItem.get() ? mpColumnItem->GetLeft() : mpULSpaceItem->GetUpper(); + lLogicNullOffset = mxColumnItem.get() ? mxColumnItem->GetLeft() : mxULSpaceItem->GetUpper(); if(bAppSetNullOffset) lAppNullOffset += lLogicNullOffset - nOld; @@ -548,8 +548,8 @@ void SvxRuler::UpdateFrame() SetMargin1(ConvertVPosPixel(lAppNullOffset), nMarginStyle); } - long lLower = mpColumnItem.get() ? mpColumnItem->GetRight() : mpULSpaceItem->GetLower(); - long nMargin2 = mpPagePosItem->GetHeight() - lLower - lLogicNullOffset + lAppNullOffset; + long lLower = mxColumnItem.get() ? mxColumnItem->GetRight() : mxULSpaceItem->GetLower(); + long nMargin2 = mxPagePosItem->GetHeight() - lLower - lLogicNullOffset + lAppNullOffset; long nMargin2Pixel = ConvertVPosPixel(nMargin2); SetMargin2(nMargin2Pixel, nMarginStyle); @@ -561,10 +561,10 @@ void SvxRuler::UpdateFrame() SetMargin2(); } - if(mpColumnItem.get()) + if(mxColumnItem.get()) { - mpRulerImpl->nColLeftPix = (sal_uInt16) ConvertSizePixel(mpColumnItem->GetLeft()); - mpRulerImpl->nColRightPix = (sal_uInt16) ConvertSizePixel(mpColumnItem->GetRight()); + mxRulerImpl->nColLeftPix = (sal_uInt16) ConvertSizePixel(mxColumnItem->GetLeft()); + mxRulerImpl->nColRightPix = (sal_uInt16) ConvertSizePixel(mxColumnItem->GetRight()); } } @@ -603,18 +603,18 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) { case RULER_TYPE_INDENT: { - if (!mpParaItem.get()) + if (!mxParaItem.get()) break; long nIndex = aSelection.nAryPos + INDENT_GAP; long nIndentValue = 0.0; if (nIndex == INDENT_LEFT_MARGIN) - nIndentValue = mpParaItem->GetTxtLeft(); + nIndentValue = mxParaItem->GetTxtLeft(); else if (nIndex == INDENT_FIRST_LINE) - nIndentValue = mpParaItem->GetTxtFirstLineOfst(); + nIndentValue = mxParaItem->GetTxtFirstLineOfst(); else if (nIndex == INDENT_RIGHT_MARGIN) - nIndentValue = mpParaItem->GetRight(); + nIndentValue = mxParaItem->GetRight(); double fValue = OutputDevice::LogicToLogic(Size(nIndentValue, 0), pEditWin->GetMapMode(), GetCurrentMapMode()).Width(); fValue = rtl::math::round(fValue / aUnitData.nTickUnit, aNoDecimalPlaces); @@ -624,10 +624,10 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) } case RULER_TYPE_BORDER: { - if (mpColumnItem.get() == NULL) + if (mxColumnItem.get() == NULL) break; - SvxColumnItem& aColumnItem = *mpColumnItem.get(); + SvxColumnItem& aColumnItem = *mxColumnItem.get(); if (aSelection.nAryPos + 1 >= aColumnItem.Count()) break; @@ -645,10 +645,10 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) case RULER_TYPE_MARGIN1: { long nLeft = 0.0; - if (mpLRSpaceItem.get()) - nLeft = mpLRSpaceItem->GetLeft(); - else if (mpULSpaceItem.get()) - nLeft = mpULSpaceItem->GetUpper(); + if (mxLRSpaceItem.get()) + nLeft = mxLRSpaceItem->GetLeft(); + else if (mxULSpaceItem.get()) + nLeft = mxULSpaceItem->GetUpper(); else break; @@ -661,10 +661,10 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) case RULER_TYPE_MARGIN2: { long nRight = 0.0; - if (mpLRSpaceItem.get()) - nRight = mpLRSpaceItem->GetRight(); - else if (mpULSpaceItem.get()) - nRight = mpULSpaceItem->GetLower(); + if (mxLRSpaceItem.get()) + nRight = mxLRSpaceItem->GetRight(); + else if (mxULSpaceItem.get()) + nRight = mxULSpaceItem->GetLower(); else break; @@ -698,9 +698,9 @@ void SvxRuler::UpdateFrame(const SvxLongLRSpaceItem *pItem) // new value LRSpace if(bActive) { if(pItem) - mpLRSpaceItem.reset(new SvxLongLRSpaceItem(*pItem)); + mxLRSpaceItem.reset(new SvxLongLRSpaceItem(*pItem)); else - mpLRSpaceItem.reset(); + mxLRSpaceItem.reset(); StartListening_Impl(); } } @@ -711,9 +711,9 @@ void SvxRuler::UpdateFrameMinMax(const SfxRectangleItem *pItem) // value for Min if(bActive) { if(pItem) - mpMinMaxItem.reset(new SfxRectangleItem(*pItem)); + mxMinMaxItem.reset(new SfxRectangleItem(*pItem)); else - mpMinMaxItem.reset(); + mxMinMaxItem.reset(); } } @@ -724,9 +724,9 @@ void SvxRuler::UpdateFrame(const SvxLongULSpaceItem *pItem) // new value if(bActive && !bHorz) { if(pItem) - mpULSpaceItem.reset(new SvxLongULSpaceItem(*pItem)); + mxULSpaceItem.reset(new SvxLongULSpaceItem(*pItem)); else - mpULSpaceItem.reset(); + mxULSpaceItem.reset(); StartListening_Impl(); } } @@ -734,18 +734,18 @@ void SvxRuler::UpdateFrame(const SvxLongULSpaceItem *pItem) // new value void SvxRuler::Update( const SvxProtectItem* pItem ) { if( pItem ) - mpRulerImpl->aProtectItem = *pItem; + mxRulerImpl->aProtectItem = *pItem; } void SvxRuler::UpdateTextRTL(const SfxBoolItem* pItem) { if(bActive && bHorz) { - delete mpRulerImpl->pTextRTLItem; - mpRulerImpl->pTextRTLItem = 0; + delete mxRulerImpl->pTextRTLItem; + mxRulerImpl->pTextRTLItem = 0; if(pItem) - mpRulerImpl->pTextRTLItem = new SfxBoolItem(*pItem); - SetTextRTL(mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue()); + mxRulerImpl->pTextRTLItem = new SfxBoolItem(*pItem); + SetTextRTL(mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue()); StartListening_Impl(); } } @@ -759,21 +759,21 @@ void SvxRuler::Update( { if(pItem) { - mpColumnItem.reset(new SvxColumnItem(*pItem)); - mpRulerImpl->bIsTableRows = (pItem->Which() == SID_RULER_ROWS || pItem->Which() == SID_RULER_ROWS_VERTICAL); - if(!bHorz && !mpRulerImpl->bIsTableRows) - mpColumnItem->SetWhich(SID_RULER_BORDERS_VERTICAL); + mxColumnItem.reset(new SvxColumnItem(*pItem)); + mxRulerImpl->bIsTableRows = (pItem->Which() == SID_RULER_ROWS || pItem->Which() == SID_RULER_ROWS_VERTICAL); + if(!bHorz && !mxRulerImpl->bIsTableRows) + mxColumnItem->SetWhich(SID_RULER_BORDERS_VERTICAL); } - else if(mpColumnItem.get() && mpColumnItem->Which() == nSID) + else if(mxColumnItem.get() && mxColumnItem->Which() == nSID) //there are two groups of column items table/frame columns and table rows //both can occur in vertical or horizontal mode //the horizontal ruler handles the SID_RULER_BORDERS and SID_RULER_ROWS_VERTICAL //and the vertical handles SID_RULER_BORDERS_VERTICAL and SID_RULER_ROWS - //if mpColumnItem is already set with one of the ids then a NULL pItem argument + //if mxColumnItem is already set with one of the ids then a NULL pItem argument //must not delete it { - mpColumnItem.reset(); - mpRulerImpl->bIsTableRows = false; + mxColumnItem.reset(); + mxRulerImpl->bIsTableRows = false; } StartListening_Impl(); } @@ -783,38 +783,38 @@ void SvxRuler::Update( void SvxRuler::UpdateColumns() { /* Update column view */ - if(mpColumnItem.get() && mpColumnItem->Count() > 1) + if(mxColumnItem.get() && mxColumnItem->Count() > 1) { - mpBorders.resize(mpColumnItem->Count()); + mpBorders.resize(mxColumnItem->Count()); sal_uInt16 nStyleFlags = RULER_BORDER_VARIABLE; bool bProtectColumns = - mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected(); + mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected(); if( !bProtectColumns ) nStyleFlags |= RULER_BORDER_MOVEABLE; - if( mpColumnItem->IsTable() ) + if( mxColumnItem->IsTable() ) nStyleFlags |= RULER_BORDER_TABLE; else if ( !bProtectColumns ) nStyleFlags |= RULER_BORDER_SIZEABLE; - sal_uInt16 nBorders = mpColumnItem->Count(); + sal_uInt16 nBorders = mxColumnItem->Count(); - if(!mpRulerImpl->bIsTableRows) + if(!mxRulerImpl->bIsTableRows) --nBorders; for(sal_uInt16 i = 0; i < nBorders; ++i) { mpBorders[i].nStyle = nStyleFlags; - if(!mpColumnItem->At(i).bVisible) + if(!mxColumnItem->At(i).bVisible) mpBorders[i].nStyle |= RULER_STYLE_INVISIBLE; - mpBorders[i].nPos = ConvertPosPixel(mpColumnItem->At(i).nEnd + lAppNullOffset); + mpBorders[i].nPos = ConvertPosPixel(mxColumnItem->At(i).nEnd + lAppNullOffset); - if(mpColumnItem->Count() == i + 1) + if(mxColumnItem->Count() == i + 1) { //with table rows the end of the table is contained in the //column item but it has no width! @@ -822,12 +822,12 @@ void SvxRuler::UpdateColumns() } else { - mpBorders[i].nWidth = ConvertSizePixel(mpColumnItem->At(i + 1).nStart - mpColumnItem->At(i).nEnd); + mpBorders[i].nWidth = ConvertSizePixel(mxColumnItem->At(i + 1).nStart - mxColumnItem->At(i).nEnd); } - mpBorders[i].nMinPos = ConvertPosPixel(mpColumnItem->At(i).nEndMin + lAppNullOffset); - mpBorders[i].nMaxPos = ConvertPosPixel(mpColumnItem->At(i).nEndMax + lAppNullOffset); + mpBorders[i].nMinPos = ConvertPosPixel(mxColumnItem->At(i).nEndMin + lAppNullOffset); + mpBorders[i].nMaxPos = ConvertPosPixel(mxColumnItem->At(i).nEndMax + lAppNullOffset); } - SetBorders(mpColumnItem->Count() - 1, &mpBorders[0]); + SetBorders(mxColumnItem->Count() - 1, &mpBorders[0]); } else { @@ -838,22 +838,22 @@ void SvxRuler::UpdateColumns() void SvxRuler::UpdateObject() { /* Update view of object representation */ - if(mpObjectItem.get()) + if(mxObjectItem.get()) { DBG_ASSERT(!mpObjectBorders.empty(), "no Buffer"); // !! to the page margin - long nMargin = mpLRSpaceItem.get() ? mpLRSpaceItem->GetLeft() : 0; + long nMargin = mxLRSpaceItem.get() ? mxLRSpaceItem->GetLeft() : 0; mpObjectBorders[0].nPos = - ConvertPosPixel(mpObjectItem->GetStartX() - + ConvertPosPixel(mxObjectItem->GetStartX() - nMargin + lAppNullOffset); mpObjectBorders[1].nPos = - ConvertPosPixel(mpObjectItem->GetEndX() - nMargin + lAppNullOffset); - nMargin = mpULSpaceItem.get() ? mpULSpaceItem->GetUpper() : 0; + ConvertPosPixel(mxObjectItem->GetEndX() - nMargin + lAppNullOffset); + nMargin = mxULSpaceItem.get() ? mxULSpaceItem->GetUpper() : 0; mpObjectBorders[2].nPos = - ConvertPosPixel(mpObjectItem->GetStartY() - + ConvertPosPixel(mxObjectItem->GetStartY() - nMargin + lAppNullOffset); mpObjectBorders[3].nPos = - ConvertPosPixel(mpObjectItem->GetEndY() - nMargin + lAppNullOffset); + ConvertPosPixel(mxObjectItem->GetEndY() - nMargin + lAppNullOffset); const sal_uInt16 nOffset = GetObjectBordersOff(0); SetBorders(2, &mpObjectBorders[0] + nOffset); @@ -877,9 +877,9 @@ void SvxRuler::UpdatePara() */ // Dependence on PagePosItem - if(mpParaItem.get() && mpPagePosItem.get() && !mpObjectItem.get()) + if(mxParaItem.get() && mxPagePosItem.get() && !mxObjectItem.get()) { - bool bRTLText = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTLText = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); // First-line indent is negative to the left paragraph margin long nLeftFrameMargin = GetLeftFrameMargin(); long nRightFrameMargin = GetRightFrameMargin(); @@ -892,22 +892,22 @@ void SvxRuler::UpdatePara() if(bRTLText) { - leftMargin = nRightFrameMargin - mpParaItem->GetTxtLeft() + lAppNullOffset; - leftFirstLine = leftMargin - mpParaItem->GetTxtFirstLineOfst(); - rightMargin = nLeftFrameMargin + mpParaItem->GetRight() + lAppNullOffset; + leftMargin = nRightFrameMargin - mxParaItem->GetTxtLeft() + lAppNullOffset; + leftFirstLine = leftMargin - mxParaItem->GetTxtFirstLineOfst(); + rightMargin = nLeftFrameMargin + mxParaItem->GetRight() + lAppNullOffset; } else { - leftMargin = nLeftFrameMargin + mpParaItem->GetTxtLeft() + lAppNullOffset; - leftFirstLine = leftMargin + mpParaItem->GetTxtFirstLineOfst(); - rightMargin = nRightFrameMargin - mpParaItem->GetRight() + lAppNullOffset; + leftMargin = nLeftFrameMargin + mxParaItem->GetTxtLeft() + lAppNullOffset; + leftFirstLine = leftMargin + mxParaItem->GetTxtFirstLineOfst(); + rightMargin = nRightFrameMargin - mxParaItem->GetRight() + lAppNullOffset; } mpIndents[INDENT_LEFT_MARGIN].nPos = ConvertHPosPixel(leftMargin); mpIndents[INDENT_FIRST_LINE].nPos = ConvertHPosPixel(leftFirstLine); mpIndents[INDENT_RIGHT_MARGIN].nPos = ConvertHPosPixel(rightMargin); - if( mpParaItem->IsAutoFirst() ) + if( mxParaItem->IsAutoFirst() ) mpIndents[INDENT_FIRST_LINE].nStyle |= RULER_STYLE_INVISIBLE; else mpIndents[INDENT_FIRST_LINE].nStyle &= ~RULER_STYLE_INVISIBLE; @@ -932,9 +932,9 @@ void SvxRuler::UpdatePara(const SvxLRSpaceItem *pItem) // new value of paragraph if(bActive) { if(pItem) - mpParaItem.reset(new SvxLRSpaceItem(*pItem)); + mxParaItem.reset(new SvxLRSpaceItem(*pItem)); else - mpParaItem.reset(); + mxParaItem.reset(); StartListening_Impl(); } } @@ -945,9 +945,9 @@ void SvxRuler::UpdateParaBorder(const SvxLRSpaceItem * pItem ) if(bActive) { if(pItem) - mpParaBorderItem.reset(new SvxLRSpaceItem(*pItem)); + mxParaBorderItem.reset(new SvxLRSpaceItem(*pItem)); else - mpParaBorderItem.reset(); + mxParaBorderItem.reset(); StartListening_Impl(); } } @@ -955,21 +955,21 @@ void SvxRuler::UpdateParaBorder(const SvxLRSpaceItem * pItem ) void SvxRuler::UpdatePage() { /* Update view of position and width of page */ - if(mpPagePosItem.get()) + if(mxPagePosItem.get()) { // all objects are automatically adjusted if(bHorz) { SetPagePos( - pEditWin->LogicToPixel(mpPagePosItem->GetPos()).X(), - pEditWin->LogicToPixel(Size(mpPagePosItem->GetWidth(), 0)). + pEditWin->LogicToPixel(mxPagePosItem->GetPos()).X(), + pEditWin->LogicToPixel(Size(mxPagePosItem->GetWidth(), 0)). Width()); } else { SetPagePos( - pEditWin->LogicToPixel(mpPagePosItem->GetPos()).Y(), - pEditWin->LogicToPixel(Size(0, mpPagePosItem->GetHeight())). + pEditWin->LogicToPixel(mxPagePosItem->GetPos()).Y(), + pEditWin->LogicToPixel(Size(0, mxPagePosItem->GetHeight())). Height()); } if(bAppSetNullOffset) @@ -1000,9 +1000,9 @@ void SvxRuler::UpdatePage() // Unfortunately, we get the offset of the edit window to the ruler never // through a status message. So we set it ourselves if necessary. - if(lPos != mpRulerImpl->lOldWinPos) + if(lPos != mxRulerImpl->lOldWinPos) { - mpRulerImpl->lOldWinPos=lPos; + mxRulerImpl->lOldWinPos=lPos; SetWinPos(lPos); } } @@ -1013,9 +1013,9 @@ void SvxRuler::Update(const SvxPagePosSizeItem *pItem) // new value of page attr if(bActive) { if(pItem) - mpPagePosItem.reset(new SvxPagePosSizeItem(*pItem)); + mxPagePosItem.reset(new SvxPagePosSizeItem(*pItem)); else - mpPagePosItem.reset(); + mxPagePosItem.reset(); StartListening_Impl(); } } @@ -1058,28 +1058,28 @@ void SvxRuler::UpdateTabs() if(IsDrag()) return; - if( mpPagePosItem.get() && - mpParaItem.get() && - mpTabStopItem.get() && - !mpObjectItem.get() ) + if( mxPagePosItem.get() && + mxParaItem.get() && + mxTabStopItem.get() && + !mxObjectItem.get() ) { // buffer for DefaultTabStop // Distance last Tab <-> Right paragraph margin / DefaultTabDist - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); long nLeftFrameMargin = GetLeftFrameMargin(); long nRightFrameMargin = GetRightFrameMargin(); //#i24363# tab stops relative to indent - const long nParaItemTxtLeft = mpParaItem->GetTxtLeft(); + const long nParaItemTxtLeft = mxParaItem->GetTxtLeft(); const long lParaIndent = nLeftFrameMargin + nParaItemTxtLeft; - const long lLastTab = mpTabStopItem->Count() - ? ConvertHPosPixel(mpTabStopItem->At(mpTabStopItem->Count() - 1).GetTabPos()) + const long lLastTab = mxTabStopItem->Count() + ? ConvertHPosPixel(mxTabStopItem->At(mxTabStopItem->Count() - 1).GetTabPos()) : 0; const long lPosPixel = ConvertHPosPixel(lParaIndent) + lLastTab; - const long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mpParaItem->GetRight()); + const long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mxParaItem->GetRight()); long nDefTabDist = ConvertHPosPixel(lDefTabDist); @@ -1090,10 +1090,10 @@ void SvxRuler::UpdateTabs() ? 0 : (sal_uInt16)( (lRightIndent - lPosPixel) / nDefTabDist ); - if(mpTabStopItem->Count() + TAB_GAP + nDefTabBuf > nTabBufSize) + if(mxTabStopItem->Count() + TAB_GAP + nDefTabBuf > nTabBufSize) { // 10 (GAP) in stock - nTabBufSize = mpTabStopItem->Count() + TAB_GAP + nDefTabBuf + GAP; + nTabBufSize = mxTabStopItem->Count() + TAB_GAP + nDefTabBuf + GAP; mpTabs.resize(nTabBufSize); } @@ -1104,10 +1104,10 @@ void SvxRuler::UpdateTabs() const long lRightPixMargin = ConvertSizePixel(nRightFrameMargin - nParaItemTxtLeft ); const long lParaIndentPix = ConvertSizePixel(lParaIndent); - for(j = 0; j < mpTabStopItem->Count(); ++j) + for(j = 0; j < mxTabStopItem->Count(); ++j) { - const SvxTabStop* pTab = &mpTabStopItem->At(j); - if (mpRulerImpl->bIsTabsRelativeToIndent) + const SvxTabStop* pTab = &mxTabStopItem->At(j); + if (mxRulerImpl->bIsTabsRelativeToIndent) { long nTabPosition = ConvertHPosPixel(lParaIndent + pTab->GetTabPos() + lAppNullOffset); mpTabs[nTabCount + TAB_GAP].nPos = nTabPosition; @@ -1126,7 +1126,7 @@ void SvxRuler::UpdateTabs() ++nTabCount; } - if(!mpTabStopItem->Count()) + if(!mxTabStopItem->Count()) mpTabs[0].nPos = bRTL ? lRightPixMargin : lParaIndentPix; // fill the rest with default Tabs @@ -1159,7 +1159,7 @@ void SvxRuler::UpdateTabs() if( j == 0 ) { //set the first default tab stop - if(mpRulerImpl->bIsTabsRelativeToIndent) + if(mxRulerImpl->bIsTabsRelativeToIndent) { mpTabs[nTabCount + TAB_GAP].nPos = (mpTabs[nTabCount].nPos + nDefTabDist); @@ -1205,13 +1205,13 @@ void SvxRuler::Update(const SvxTabStopItem *pItem) // new value for tabs { if(pItem) { - mpTabStopItem.reset(new SvxTabStopItem(*pItem)); + mxTabStopItem.reset(new SvxTabStopItem(*pItem)); if(!bHorz) - mpTabStopItem->SetWhich(SID_ATTR_TABSTOP_VERTICAL); + mxTabStopItem->SetWhich(SID_ATTR_TABSTOP_VERTICAL); } else { - mpTabStopItem.reset(); + mxTabStopItem.reset(); } StartListening_Impl(); } @@ -1223,9 +1223,9 @@ void SvxRuler::Update(const SvxObjectItem *pItem) // new value for objects if(bActive) { if(pItem) - mpObjectItem.reset(new SvxObjectItem(*pItem)); + mxObjectItem.reset(new SvxObjectItem(*pItem)); else - mpObjectItem.reset(); + mxObjectItem.reset(); StartListening_Impl(); } } @@ -1260,9 +1260,9 @@ void SvxRuler::Update() long SvxRuler::GetPageWidth() const { - if (!mpPagePosItem.get()) + if (!mxPagePosItem.get()) return 0; - return bHorz ? mpPagePosItem->GetWidth() : mpPagePosItem->GetHeight(); + return bHorz ? mxPagePosItem->GetWidth() : mxPagePosItem->GetHeight(); } inline long SvxRuler::GetFrameLeft() const @@ -1277,8 +1277,8 @@ inline void SvxRuler::SetFrameLeft(long lFrameLeft) { /* Set Left margin in Pixels */ bool bProtectColumns = - mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected(); + mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected(); if(bAppSetNullOffset) { SetMargin1(lFrameLeft - ConvertSizePixel(lLogicNullOffset), @@ -1293,25 +1293,25 @@ inline void SvxRuler::SetFrameLeft(long lFrameLeft) long SvxRuler::GetFirstLineIndent() const { /* Get First-line indent in pixels */ - return mpParaItem.get() ? mpIndents[INDENT_FIRST_LINE].nPos : GetMargin1(); + return mxParaItem.get() ? mpIndents[INDENT_FIRST_LINE].nPos : GetMargin1(); } long SvxRuler::GetLeftIndent() const { /* Get Left paragraph margin in Pixels */ - return mpParaItem.get() ? mpIndents[INDENT_LEFT_MARGIN].nPos : GetMargin1(); + return mxParaItem.get() ? mpIndents[INDENT_LEFT_MARGIN].nPos : GetMargin1(); } long SvxRuler::GetRightIndent() const { /* Get Right paragraph margin in Pixels */ - return mpParaItem.get() ? mpIndents[INDENT_RIGHT_MARGIN].nPos : GetMargin2(); + return mxParaItem.get() ? mpIndents[INDENT_RIGHT_MARGIN].nPos : GetMargin2(); } long SvxRuler::GetLogicRightIndent() const { /* Get Right paragraph margin in Logic */ - return mpParaItem.get() ? GetRightFrameMargin() - mpParaItem->GetRight() : GetRightFrameMargin(); + return mxParaItem.get() ? GetRightFrameMargin() - mxParaItem->GetRight() : GetRightFrameMargin(); } // Left margin in App values, is either the margin (= 0) or the left edge of @@ -1319,14 +1319,14 @@ long SvxRuler::GetLogicRightIndent() const long SvxRuler::GetLeftFrameMargin() const { // #126721# for some unknown reason the current column is set to 0xffff - DBG_ASSERT(!mpColumnItem.get() || mpColumnItem->GetActColumn() < mpColumnItem->Count(), + DBG_ASSERT(!mxColumnItem.get() || mxColumnItem->GetActColumn() < mxColumnItem->Count(), "issue #126721# - invalid current column!"); long nLeft = 0; - if (mpColumnItem.get() && - mpColumnItem->Count() && - mpColumnItem->IsConsistent()) + if (mxColumnItem.get() && + mxColumnItem->Count() && + mxColumnItem->IsConsistent()) { - nLeft = mpColumnItem->GetActiveColumnDescription().nStart; + nLeft = mxColumnItem->GetActiveColumnDescription().nStart; } return nLeft; @@ -1334,26 +1334,26 @@ long SvxRuler::GetLeftFrameMargin() const inline long SvxRuler::GetLeftMin() const { - DBG_ASSERT(mpMinMaxItem.get(), "no MinMax value set"); - if (mpMinMaxItem.get()) + DBG_ASSERT(mxMinMaxItem.get(), "no MinMax value set"); + if (mxMinMaxItem.get()) { if (bHorz) - return mpMinMaxItem->GetValue().Left(); + return mxMinMaxItem->GetValue().Left(); else - return mpMinMaxItem->GetValue().Top(); + return mxMinMaxItem->GetValue().Top(); } return 0; } inline long SvxRuler::GetRightMax() const { - DBG_ASSERT(mpMinMaxItem.get(), "no MinMax value set"); - if (mpMinMaxItem.get()) + DBG_ASSERT(mxMinMaxItem.get(), "no MinMax value set"); + if (mxMinMaxItem.get()) { if (bHorz) - return mpMinMaxItem->GetValue().Right(); + return mxMinMaxItem->GetValue().Right(); else - return mpMinMaxItem->GetValue().Bottom(); + return mxMinMaxItem->GetValue().Bottom(); } return 0; } @@ -1362,35 +1362,35 @@ inline long SvxRuler::GetRightMax() const long SvxRuler::GetRightFrameMargin() const { /* Get right frame margin (in logical units) */ - if (mpColumnItem.get()) + if (mxColumnItem.get()) { if (!IsActLastColumn(true)) { - return mpColumnItem->At(GetActRightColumn(true)).nEnd; + return mxColumnItem->At(GetActRightColumn(true)).nEnd; } } long lResult = lLogicNullOffset; // If possible deduct right table entry - if(mpColumnItem.get() && mpColumnItem->IsTable()) - lResult += mpColumnItem->GetRight(); - else if(bHorz && mpLRSpaceItem.get()) - lResult += mpLRSpaceItem->GetRight(); - else if(!bHorz && mpULSpaceItem.get()) - lResult += mpULSpaceItem->GetLower(); + if(mxColumnItem.get() && mxColumnItem->IsTable()) + lResult += mxColumnItem->GetRight(); + else if(bHorz && mxLRSpaceItem.get()) + lResult += mxLRSpaceItem->GetRight(); + else if(!bHorz && mxULSpaceItem.get()) + lResult += mxULSpaceItem->GetLower(); if(bHorz) - lResult = mpPagePosItem->GetWidth() - lResult; + lResult = mxPagePosItem->GetWidth() - lResult; else - lResult = mpPagePosItem->GetHeight() - lResult; + lResult = mxPagePosItem->GetHeight() - lResult; return lResult; } #define NEG_FLAG ( (nFlags & SVXRULER_SUPPORT_NEGATIVE_MARGINS) == \ SVXRULER_SUPPORT_NEGATIVE_MARGINS ) -#define TAB_FLAG ( mpColumnItem.get() && mpColumnItem->IsTable() ) +#define TAB_FLAG ( mxColumnItem.get() && mxColumnItem->IsTable() ) long SvxRuler::GetCorrectedDragPos( bool bLeft, bool bRight ) { @@ -1402,7 +1402,7 @@ long SvxRuler::GetCorrectedDragPos( bool bLeft, bool bRight ) const long lNullPix = Ruler::GetNullOffset(); long lDragPos = GetDragPos() + lNullPix; ADD_DEBUG_TEXT("lDragPos: ", OUString::number(lDragPos)) - bool bHoriRows = bHorz && mpRulerImpl->bIsTableRows; + bool bHoriRows = bHorz && mxRulerImpl->bIsTableRows; if((bLeft || (bHoriRows)) && lDragPos < nMaxLeft) lDragPos = nMaxLeft; else if((bRight||bHoriRows) && lDragPos > nMaxRight) @@ -1436,7 +1436,7 @@ void SvxRuler::DragMargin1() return; DrawLine_Impl(lTabPos, ( TAB_FLAG && NEG_FLAG ) ? 3 : 7, bHorz); - if (mpColumnItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)) + if (mxColumnItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)) DragBorders(); AdjustMargin1(aDragPosition); } @@ -1447,8 +1447,8 @@ void SvxRuler::AdjustMargin1(long lInputDiff) const long lDragPos = lInputDiff; bool bProtectColumns = - mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected(); + mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected(); const sal_uInt16 nMarginStyle = bProtectColumns ? 0 : RULER_MARGIN_SIZEABLE; @@ -1457,31 +1457,31 @@ void SvxRuler::AdjustMargin1(long lInputDiff) { long lDiff = lDragPos; SetNullOffset(nOld + lDiff); - if (!mpColumnItem.get() || !(nDragType & DRAG_OBJECT_SIZE_LINEAR)) + if (!mxColumnItem.get() || !(nDragType & DRAG_OBJECT_SIZE_LINEAR)) { SetMargin2( GetMargin2() - lDiff, nMarginStyle ); - if (!mpColumnItem.get() && !mpObjectItem.get() && mpParaItem.get()) + if (!mxColumnItem.get() && !mxObjectItem.get() && mxParaItem.get()) { // Right indent of the old position mpIndents[INDENT_RIGHT_MARGIN].nPos -= lDiff; SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); } - if(mpObjectItem.get()) + if(mxObjectItem.get()) { mpObjectBorders[GetObjectBordersOff(0)].nPos -= lDiff; mpObjectBorders[GetObjectBordersOff(1)].nPos -= lDiff; SetBorders(2, &mpObjectBorders[0] + GetObjectBordersOff(0)); } - if(mpColumnItem.get()) + if(mxColumnItem.get()) { - for(sal_uInt16 i = 0; i < mpColumnItem->Count()-1; ++i) + for(sal_uInt16 i = 0; i < mxColumnItem->Count()-1; ++i) mpBorders[i].nPos -= lDiff; - SetBorders(mpColumnItem->Count()-1, &mpBorders[0]); - if(mpColumnItem->IsFirstAct()) + SetBorders(mxColumnItem->Count()-1, &mpBorders[0]); + if(mxColumnItem->IsFirstAct()) { // Right indent of the old position - if(mpParaItem.get()) + if(mxParaItem.get()) { mpIndents[INDENT_RIGHT_MARGIN].nPos -= lDiff; SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); @@ -1489,7 +1489,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff) } else { - if(mpParaItem.get()) + if(mxParaItem.get()) { mpIndents[INDENT_FIRST_LINE].nPos -= lDiff; mpIndents[INDENT_LEFT_MARGIN].nPos -= lDiff; @@ -1497,7 +1497,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff) SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); } } - if(mpTabStopItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) + if(mxTabStopItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) &&!IsActFirstColumn()) { ModifyTabs_Impl(nTabCount + TAB_GAP, &mpTabs[0], -lDiff); @@ -1511,9 +1511,9 @@ void SvxRuler::AdjustMargin1(long lInputDiff) long lDiff = lDragPos - nOld; SetMargin1(nOld + lDiff, nMarginStyle); - if (!mpColumnItem.get() || !(nDragType & (DRAG_OBJECT_SIZE_LINEAR | DRAG_OBJECT_SIZE_PROPORTIONAL))) + if (!mxColumnItem.get() || !(nDragType & (DRAG_OBJECT_SIZE_LINEAR | DRAG_OBJECT_SIZE_PROPORTIONAL))) { - if (!mpColumnItem.get() && !mpObjectItem.get() && mpParaItem.get()) + if (!mxColumnItem.get() && !mxObjectItem.get() && mxParaItem.get()) { // Left indent of the old position mpIndents[INDENT_FIRST_LINE].nPos += lDiff; @@ -1521,15 +1521,15 @@ void SvxRuler::AdjustMargin1(long lInputDiff) SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); } - if (mpColumnItem.get()) + if (mxColumnItem.get()) { - for(sal_uInt16 i = 0; i < mpColumnItem->Count() - 1; ++i) + for(sal_uInt16 i = 0; i < mxColumnItem->Count() - 1; ++i) mpBorders[i].nPos += lDiff; - SetBorders(mpColumnItem->Count() - 1, &mpBorders[0]); - if (mpColumnItem->IsFirstAct()) + SetBorders(mxColumnItem->Count() - 1, &mpBorders[0]); + if (mxColumnItem->IsFirstAct()) { // Left indent of the old position - if(mpParaItem.get()) + if(mxParaItem.get()) { mpIndents[INDENT_FIRST_LINE].nPos += lDiff; mpIndents[INDENT_LEFT_MARGIN].nPos += lDiff; @@ -1538,7 +1538,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff) } else { - if(mpParaItem.get()) + if(mxParaItem.get()) { mpIndents[INDENT_FIRST_LINE].nPos += lDiff; mpIndents[INDENT_LEFT_MARGIN].nPos += lDiff; @@ -1547,7 +1547,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff) } } } - if(mpTabStopItem.get()) + if(mxTabStopItem.get()) { ModifyTabs_Impl(nTabCount + TAB_GAP, &mpTabs[0], lDiff); SetTabs(nTabCount, &mpTabs[0] + TAB_GAP); @@ -1567,24 +1567,24 @@ void SvxRuler::DragMargin2() if (lDiff == 0) return; - if( mpRulerImpl->bIsTableRows && + if( mxRulerImpl->bIsTableRows && !bHorz && - mpColumnItem.get() && + mxColumnItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)) { DragBorders(); } bool bProtectColumns = - mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected(); + mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected(); const sal_uInt16 nMarginStyle = bProtectColumns ? 0 : RULER_MARGIN_SIZEABLE; SetMargin2( aDragPosition, nMarginStyle ); // Right indent of the old position - if((!mpColumnItem.get() || IsActLastColumn()) && mpParaItem.get()) + if((!mxColumnItem.get() || IsActLastColumn()) && mxParaItem.get()) { mpIndents[INDENT_FIRST_LINE].nPos += lDiff; SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); @@ -1599,7 +1599,7 @@ void SvxRuler::DragIndents() long aDragPosition = NEG_FLAG ? GetDragPos() : GetCorrectedDragPos(); const sal_uInt16 nIndex = GetDragAryPos() + INDENT_GAP; - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); if(nIndex == INDENT_RIGHT_MARGIN) aDragPosition = MakePositionSticky(aDragPosition, bRTL ? GetLeftFrameMargin() : GetRightFrameMargin()); @@ -1646,8 +1646,8 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) long nDrapPosition = GetCorrectedDragPos( ( nNew & 4 ) != 0, ( nNew & 2 ) != 0 ); nDrapPosition = MakePositionSticky(nDrapPosition, GetLeftFrameMargin()); lTabPosition = ConvertHSizeLogic( nDrapPosition + GetNullOffset() ); - if(mpPagePosItem.get()) - lTabPosition += mpPagePosItem->GetPos().X(); + if(mxPagePosItem.get()) + lTabPosition += mxPagePosItem->GetPos().X(); pEditWin->InvertTracking( Rectangle( Point(lTabPosition, -aZero.Y()), Point(lTabPosition, -aZero.Y() + nHeight) ), @@ -1671,8 +1671,8 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) long nDrapPosition = GetCorrectedDragPos(); nDrapPosition = MakePositionSticky(nDrapPosition, GetLeftFrameMargin()); lTabPosition = ConvertVSizeLogic(nDrapPosition + GetNullOffset()); - if(mpPagePosItem.get()) - lTabPosition += mpPagePosItem->GetPos().Y(); + if(mxPagePosItem.get()) + lTabPosition += mxPagePosItem->GetPos().Y(); pEditWin->InvertTracking( Rectangle( Point(-aZero.X(), lTabPosition), Point(-aZero.X()+nWidth, lTabPosition)), @@ -1709,14 +1709,14 @@ void SvxRuler::DragTabs() } else if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) { - mpRulerImpl->nTotalDist -= nDiff; + mxRulerImpl->nTotalDist -= nDiff; mpTabs[nIdx].nPos = aDragPosition; for(sal_uInt16 i = nIdx+1; i < nTabCount; ++i) { if(mpTabs[i].nStyle & RULER_TAB_DEFAULT) // can be canceled at the DefaultTabs break; - long nDelta = mpRulerImpl->nTotalDist * mpRulerImpl->pPercBuf[i]; + long nDelta = mxRulerImpl->nTotalDist * mxRulerImpl->pPercBuf[i]; nDelta /= 1000; mpTabs[i].nPos = mpTabs[nIdx].nPos + nDelta; if(mpTabs[i].nPos + GetNullOffset() > nMaxRight) @@ -1749,10 +1749,10 @@ void SvxRuler::SetActive(bool bOn) { pBindings->EnterRegistrations(); if(bOn) - for(sal_uInt16 i=0;i<mpRulerImpl->nControlerItems;i++) + for(sal_uInt16 i=0;i<mxRulerImpl->nControlerItems;i++) pCtrlItem[i]->ReBind(); else - for(sal_uInt16 j=0;j<mpRulerImpl->nControlerItems;j++) + for(sal_uInt16 j=0;j<mxRulerImpl->nControlerItems;j++) pCtrlItem[j]->UnBind(); pBindings->LeaveRegistrations(); } @@ -1817,11 +1817,11 @@ void SvxRuler::DragBorders() { case RULER_DRAGSIZE_MOVE: { -ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) +ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin)) if(GetDragType() == RULER_TYPE_BORDER) lDiff = lPos - nDragOffset - mpBorders[nIndex].nPos; else - lDiff = GetDragType() == RULER_TYPE_MARGIN1 ? lPos - mpRulerImpl->lLastLMargin : lPos - mpRulerImpl->lLastRMargin; + lDiff = GetDragType() == RULER_TYPE_MARGIN1 ? lPos - mxRulerImpl->lLastLMargin : lPos - mxRulerImpl->lLastRMargin; if(nDragType & DRAG_OBJECT_SIZE_LINEAR) { @@ -1857,20 +1857,20 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) OSL_FAIL("svx::SvxRuler::DragBorders(), unknown drag type!" ); //fall-through case RULER_TYPE_BORDER: - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) { mpBorders[nIndex].nPos += lDiff; if(bHorz) { lLeft = mpBorders[nIndex].nPos; - mpRulerImpl->nTotalDist -= lDiff; + mxRulerImpl->nTotalDist -= lDiff; nLimit = nIndex + 1; } else { lLeft = 0; nStartLimit = nIndex - 1; - mpRulerImpl->nTotalDist += lDiff; + mxRulerImpl->nTotalDist += lDiff; nLimit = 0; } } @@ -1879,19 +1879,19 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) nLimit = nIndex + 1; mpBorders[nIndex].nPos += lDiff; lLeft = mpBorders[nIndex].nPos; - mpRulerImpl->nTotalDist -= lDiff; + mxRulerImpl->nTotalDist -= lDiff; } break; case RULER_TYPE_MARGIN1: nLimit = 0; - lLeft = mpRulerImpl->lLastLMargin + lDiff; - mpRulerImpl->nTotalDist -= lDiff; + lLeft = mxRulerImpl->lLastLMargin + lDiff; + mxRulerImpl->nTotalDist -= lDiff; break; case RULER_TYPE_MARGIN2: nLimit = 0; lLeft= 0; nStartLimit = mpBorders.size() - 2; - mpRulerImpl->nTotalDist += lDiff; + mxRulerImpl->nTotalDist += lDiff; break; } @@ -1901,11 +1901,11 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) long l = mpBorders[i].nPos; mpBorders[i].nPos = lLeft + - (mpRulerImpl->nTotalDist * mpRulerImpl->pPercBuf[i]) / 1000 + - mpRulerImpl->pBlockBuf[i]; + (mxRulerImpl->nTotalDist * mxRulerImpl->pPercBuf[i]) / 1000 + + mxRulerImpl->pBlockBuf[i]; // RR update the column - if(!mpRulerImpl->bIsTableRows) + if(!mxRulerImpl->bIsTableRows) { if(i == GetActRightColumn()) { @@ -1920,7 +1920,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) } } } - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) { //in vertical tables the left borders have to be moved if(bHorz) @@ -1932,13 +1932,13 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) else { //otherwise the right borders are moved - for(int i = mpColumnItem->Count() - 1; i > nIndex; --i) + for(int i = mxColumnItem->Count() - 1; i > nIndex; --i) mpBorders[i].nPos += lDiff; SetMargin2( GetMargin2() + lDiff, 0 ); } } } - else if(mpRulerImpl->bIsTableRows) + else if(mxRulerImpl->bIsTableRows) { //moving rows: if a row is resized all following rows //have to be moved by the same amount. @@ -1996,7 +1996,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) GetActRightColumn() == nIndex && nDragSize != RULER_DRAGSIZE_2 && !mpIndents.empty() && - !mpRulerImpl->bIsTableRows) + !mxRulerImpl->bIsTableRows) { UpdateParaContents_Impl(lDiff, MOVE_RIGHT); } @@ -2007,7 +2007,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) { UpdateParaContents_Impl(lDiff, MOVE_LEFT); } - SetBorders(mpColumnItem->Count() - 1, &mpBorders[0]); + SetBorders(mxColumnItem->Count() - 1, &mpBorders[0]); } void SvxRuler::DragObjectBorder() @@ -2034,69 +2034,69 @@ void SvxRuler::ApplyMargins() if(bHorz) { const long lOldNull = lLogicNullOffset; - if(mpRulerImpl->lMaxLeftLogic != -1 && nMaxLeft == GetMargin1() + Ruler::GetNullOffset()) + if(mxRulerImpl->lMaxLeftLogic != -1 && nMaxLeft == GetMargin1() + Ruler::GetNullOffset()) { - lLogicNullOffset = mpRulerImpl->lMaxLeftLogic; - mpLRSpaceItem->SetLeft(lLogicNullOffset); + lLogicNullOffset = mxRulerImpl->lMaxLeftLogic; + mxLRSpaceItem->SetLeft(lLogicNullOffset); } else { lLogicNullOffset = ConvertHPosLogic(GetFrameLeft()) - lAppNullOffset; - mpLRSpaceItem->SetLeft(PixelHAdjust(lLogicNullOffset, mpLRSpaceItem->GetLeft())); + mxLRSpaceItem->SetLeft(PixelHAdjust(lLogicNullOffset, mxLRSpaceItem->GetLeft())); } if(bAppSetNullOffset) lAppNullOffset += lLogicNullOffset - lOldNull; long nRight; - if(mpRulerImpl->lMaxRightLogic != -1 + if(mxRulerImpl->lMaxRightLogic != -1 && nMaxRight == GetMargin2() + Ruler::GetNullOffset()) { - nRight = GetPageWidth() - mpRulerImpl->lMaxRightLogic; + nRight = GetPageWidth() - mxRulerImpl->lMaxRightLogic; } else { nRight = std::max((long)0, - mpPagePosItem->GetWidth() - mpLRSpaceItem->GetLeft() - + mxPagePosItem->GetWidth() - mxLRSpaceItem->GetLeft() - (ConvertHPosLogic(GetMargin2()) - lAppNullOffset)); - nRight = PixelHAdjust( nRight, mpLRSpaceItem->GetRight()); + nRight = PixelHAdjust( nRight, mxLRSpaceItem->GetRight()); } - mpLRSpaceItem->SetRight(nRight); + mxLRSpaceItem->SetRight(nRight); - pItem = mpLRSpaceItem.get(); + pItem = mxLRSpaceItem.get(); #ifdef DEBUGLIN - Debug_Impl(pEditWin, *mpLRSpaceItem); + Debug_Impl(pEditWin, *mxLRSpaceItem); #endif // DEBUGLIN } else { const long lOldNull = lLogicNullOffset; - mpULSpaceItem->SetUpper( + mxULSpaceItem->SetUpper( PixelVAdjust( lLogicNullOffset = ConvertVPosLogic(GetFrameLeft()) - - lAppNullOffset, mpULSpaceItem->GetUpper())); + lAppNullOffset, mxULSpaceItem->GetUpper())); if(bAppSetNullOffset) lAppNullOffset += lLogicNullOffset - lOldNull; - mpULSpaceItem->SetLower( + mxULSpaceItem->SetLower( PixelVAdjust( - std::max((long)0, mpPagePosItem->GetHeight() - - mpULSpaceItem->GetUpper() - + std::max((long)0, mxPagePosItem->GetHeight() - + mxULSpaceItem->GetUpper() - (ConvertVPosLogic(GetMargin2()) - - lAppNullOffset)), mpULSpaceItem->GetLower())); - pItem = mpULSpaceItem.get(); + lAppNullOffset)), mxULSpaceItem->GetLower())); + pItem = mxULSpaceItem.get(); nId = SID_ATTR_LONG_ULSPACE; #ifdef DEBUGLIN - Debug_Impl(pEditWin,*mpULSpaceItem.get()); + Debug_Impl(pEditWin,*mxULSpaceItem.get()); #endif // DEBUGLIN } pBindings->GetDispatcher()->Execute( nId, SfxCallMode::RECORD, pItem, 0L ); - if(mpTabStopItem.get()) + if(mxTabStopItem.get()) UpdateTabs(); } @@ -2116,7 +2116,7 @@ void SvxRuler::ApplyIndents() long nLeftFrameMargin = GetLeftFrameMargin(); - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); long nNewTxtLeft; long nNewFirstLineOffset; @@ -2126,7 +2126,7 @@ void SvxRuler::ApplyIndents() long nLeftMargin = ConvertPosLogic(mpIndents[INDENT_LEFT_MARGIN].nPos); long nRightMargin = ConvertPosLogic(mpIndents[INDENT_RIGHT_MARGIN].nPos); - if(mpColumnItem.get() && ((bRTL && !IsActLastColumn(true)) || (!bRTL && !IsActFirstColumn(true)))) + if(mxColumnItem.get() && ((bRTL && !IsActLastColumn(true)) || (!bRTL && !IsActFirstColumn(true)))) { if(bRTL) { @@ -2160,7 +2160,7 @@ void SvxRuler::ApplyIndents() else nNewFirstLineOffset = nFirstLine - nLeftMargin - lAppNullOffset; - if(mpColumnItem.get() && ((!bRTL && !IsActLastColumn(true)) || (bRTL && !IsActFirstColumn(true)))) + if(mxColumnItem.get() && ((!bRTL && !IsActLastColumn(true)) || (bRTL && !IsActFirstColumn(true)))) { if(bRTL) { @@ -2196,28 +2196,28 @@ void SvxRuler::ApplyIndents() nNewRight = RoundToCurrentMapMode(nNewRight); } - mpParaItem->SetTxtFirstLineOfst(sal::static_int_cast<short>(nNewFirstLineOffset)); - mpParaItem->SetTxtLeft(nNewTxtLeft); - mpParaItem->SetRight(nNewRight); + mxParaItem->SetTxtFirstLineOfst(sal::static_int_cast<short>(nNewFirstLineOffset)); + mxParaItem->SetTxtLeft(nNewTxtLeft); + mxParaItem->SetRight(nNewRight); sal_uInt16 nParagraphId = bHorz ? SID_ATTR_PARA_LRSPACE : SID_ATTR_PARA_LRSPACE_VERTICAL; - pBindings->GetDispatcher()->Execute( nParagraphId, SfxCallMode::RECORD, mpParaItem.get(), 0L ); + pBindings->GetDispatcher()->Execute( nParagraphId, SfxCallMode::RECORD, mxParaItem.get(), 0L ); UpdateTabs(); } void SvxRuler::ApplyTabs() { /* Apply tab settings, changed by dragging. */ - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); const sal_uInt16 nCoreIdx = GetDragAryPos(); if(IsDragDelete()) { - mpTabStopItem->Remove(nCoreIdx); + mxTabStopItem->Remove(nCoreIdx); } else if(DRAG_OBJECT_SIZE_LINEAR & nDragType || DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType) { - SvxTabStopItem *pItem = new SvxTabStopItem(mpTabStopItem->Which()); + SvxTabStopItem *pItem = new SvxTabStopItem(mxTabStopItem->Which()); //remove default tab stops for ( sal_uInt16 i = 0; i < pItem->Count(); ) { @@ -2232,35 +2232,35 @@ void SvxRuler::ApplyTabs() sal_uInt16 j; for(j = 0; j < nCoreIdx; ++j) { - pItem->Insert(mpTabStopItem->At(j)); + pItem->Insert(mxTabStopItem->At(j)); } - for(; j < mpTabStopItem->Count(); ++j) + for(; j < mxTabStopItem->Count(); ++j) { - SvxTabStop aTabStop = mpTabStopItem->At(j); + SvxTabStop aTabStop = mxTabStopItem->At(j); aTabStop.GetTabPos() = PixelHAdjust( ConvertHPosLogic( mpTabs[j + TAB_GAP].nPos - GetLeftIndent()) - lAppNullOffset, aTabStop.GetTabPos()); pItem->Insert(aTabStop); } - mpTabStopItem.reset(pItem); + mxTabStopItem.reset(pItem); } - else if( mpTabStopItem->Count() == 0 ) + else if( mxTabStopItem->Count() == 0 ) return; else { - SvxTabStop aTabStop = mpTabStopItem->At(nCoreIdx); - if( mpRulerImpl->lMaxRightLogic != -1 && + SvxTabStop aTabStop = mxTabStopItem->At(nCoreIdx); + if( mxRulerImpl->lMaxRightLogic != -1 && mpTabs[nCoreIdx + TAB_GAP].nPos + Ruler::GetNullOffset() == nMaxRight ) { - aTabStop.GetTabPos() = mpRulerImpl->lMaxRightLogic - lLogicNullOffset; + aTabStop.GetTabPos() = mxRulerImpl->lMaxRightLogic - lLogicNullOffset; } else { if(bRTL) { //#i24363# tab stops relative to indent - const long nTmpLeftIndent = mpRulerImpl->bIsTabsRelativeToIndent ? + const long nTmpLeftIndent = mxRulerImpl->bIsTabsRelativeToIndent ? GetLeftIndent() : ConvertHPosPixel( GetRightFrameMargin() + lAppNullOffset ); @@ -2270,63 +2270,63 @@ void SvxRuler::ApplyTabs() else { //#i24363# tab stops relative to indent - const long nTmpLeftIndent = mpRulerImpl->bIsTabsRelativeToIndent ? + const long nTmpLeftIndent = mxRulerImpl->bIsTabsRelativeToIndent ? GetLeftIndent() : 0; long nNewPosition = ConvertHPosLogic(mpTabs[nCoreIdx + TAB_GAP].nPos - nTmpLeftIndent); aTabStop.GetTabPos() = PixelHAdjust(nNewPosition - lAppNullOffset, aTabStop.GetTabPos()); } } - mpTabStopItem->Remove(nCoreIdx); - mpTabStopItem->Insert(aTabStop); + mxTabStopItem->Remove(nCoreIdx); + mxTabStopItem->Insert(aTabStop); } sal_uInt16 nTabStopId = bHorz ? SID_ATTR_TABSTOP : SID_ATTR_TABSTOP_VERTICAL; - pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mpTabStopItem.get(), 0L ); + pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mxTabStopItem.get(), 0L ); UpdateTabs(); } void SvxRuler::ApplyBorders() { /* Applying (table) column settings; changed by dragging. */ - if(mpColumnItem->IsTable()) + if(mxColumnItem->IsTable()) { long lValue = GetFrameLeft(); - if(lValue != mpRulerImpl->nColLeftPix) + if(lValue != mxRulerImpl->nColLeftPix) { long nLeft = PixelHAdjust( ConvertHPosLogic(lValue) - lAppNullOffset, - mpColumnItem->GetLeft()); - mpColumnItem->SetLeft(nLeft); + mxColumnItem->GetLeft()); + mxColumnItem->SetLeft(nLeft); } lValue = GetMargin2(); - if(lValue != mpRulerImpl->nColRightPix) + if(lValue != mxRulerImpl->nColRightPix) { - long nWidthOrHeight = bHorz ? mpPagePosItem->GetWidth() : mpPagePosItem->GetHeight(); + long nWidthOrHeight = bHorz ? mxPagePosItem->GetWidth() : mxPagePosItem->GetHeight(); long nRight = PixelHAdjust( nWidthOrHeight - - mpColumnItem->GetLeft() - + mxColumnItem->GetLeft() - ConvertHPosLogic(lValue) - lAppNullOffset, - mpColumnItem->GetRight() ); - mpColumnItem->SetRight(nRight); + mxColumnItem->GetRight() ); + mxColumnItem->SetRight(nRight); } } - for(sal_uInt16 i = 0; i < mpColumnItem->Count() - 1; ++i) + for(sal_uInt16 i = 0; i < mxColumnItem->Count() - 1; ++i) { - long& nEnd = mpColumnItem->At(i).nEnd; + long& nEnd = mxColumnItem->At(i).nEnd; nEnd = PixelHAdjust( ConvertPosLogic(mpBorders[i].nPos), - mpColumnItem->At(i).nEnd); - long& nStart = mpColumnItem->At(i + 1).nStart; + mxColumnItem->At(i).nEnd); + long& nStart = mxColumnItem->At(i + 1).nStart; nStart = PixelHAdjust( ConvertSizeLogic(mpBorders[i].nPos + mpBorders[i].nWidth) - lAppNullOffset, - mpColumnItem->At(i + 1).nStart); + mxColumnItem->At(i + 1).nStart); // It may be that, due to the PixelHAdjust readjustment to old values, // the width becomes < 0. This we readjust. if( nEnd > nStart ) @@ -2334,16 +2334,16 @@ void SvxRuler::ApplyBorders() } #ifdef DEBUGLIN - Debug_Impl(pEditWin,*mpColumnItem.get()); + Debug_Impl(pEditWin,*mxColumnItem.get()); #endif // DEBUGLIN SfxBoolItem aFlag(SID_RULER_ACT_LINE_ONLY, nDragType & DRAG_OBJECT_ACTLINE_ONLY ? sal_True : sal_False); - sal_uInt16 nColId = mpRulerImpl->bIsTableRows ? (bHorz ? SID_RULER_ROWS : SID_RULER_ROWS_VERTICAL) : + sal_uInt16 nColId = mxRulerImpl->bIsTableRows ? (bHorz ? SID_RULER_ROWS : SID_RULER_ROWS_VERTICAL) : (bHorz ? SID_RULER_BORDERS : SID_RULER_BORDERS_VERTICAL); - pBindings->GetDispatcher()->Execute( nColId, SfxCallMode::RECORD, mpColumnItem.get(), &aFlag, 0L ); + pBindings->GetDispatcher()->Execute( nColId, SfxCallMode::RECORD, mxColumnItem.get(), &aFlag, 0L ); } void SvxRuler::ApplyObject() @@ -2351,37 +2351,37 @@ void SvxRuler::ApplyObject() /* Applying object settings, changed by dragging. */ // to the page margin - long nMargin = mpLRSpaceItem.get() ? mpLRSpaceItem->GetLeft() : 0; + long nMargin = mxLRSpaceItem.get() ? mxLRSpaceItem->GetLeft() : 0; long nStartX = PixelAdjust( ConvertPosLogic(mpObjectBorders[0].nPos) + nMargin - lAppNullOffset, - mpObjectItem->GetStartX()); - mpObjectItem->SetStartX(nStartX); + mxObjectItem->GetStartX()); + mxObjectItem->SetStartX(nStartX); long nEndX = PixelAdjust( ConvertPosLogic(mpObjectBorders[1].nPos) + nMargin - lAppNullOffset, - mpObjectItem->GetEndX()); - mpObjectItem->SetEndX(nEndX); + mxObjectItem->GetEndX()); + mxObjectItem->SetEndX(nEndX); - nMargin = mpULSpaceItem.get() ? mpULSpaceItem->GetUpper() : 0; + nMargin = mxULSpaceItem.get() ? mxULSpaceItem->GetUpper() : 0; long nStartY = PixelAdjust( ConvertPosLogic(mpObjectBorders[2].nPos) + nMargin - lAppNullOffset, - mpObjectItem->GetStartY()); - mpObjectItem->SetStartY(nStartY); + mxObjectItem->GetStartY()); + mxObjectItem->SetStartY(nStartY); long nEndY = PixelAdjust( ConvertPosLogic(mpObjectBorders[3].nPos) + nMargin - lAppNullOffset, - mpObjectItem->GetEndY()); - mpObjectItem->SetEndY(nEndY); + mxObjectItem->GetEndY()); + mxObjectItem->SetEndY(nEndY); - pBindings->GetDispatcher()->Execute(SID_RULER_OBJECT, SfxCallMode::RECORD, mpObjectItem.get(), 0L); + pBindings->GetDispatcher()->Execute(SID_RULER_OBJECT, SfxCallMode::RECORD, mxObjectItem.get(), 0L); } void SvxRuler::PrepareProportional_Impl(RulerType eType) @@ -2390,16 +2390,16 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) Preparation proportional dragging, and it is calculated based on the proportional share of the total width in parts per thousand. */ - mpRulerImpl->nTotalDist = GetMargin2(); + mxRulerImpl->nTotalDist = GetMargin2(); switch((int)eType) { case RULER_TYPE_MARGIN2: case RULER_TYPE_MARGIN1: case RULER_TYPE_BORDER: { - DBG_ASSERT(mpColumnItem.get(), "no ColumnItem"); + DBG_ASSERT(mxColumnItem.get(), "no ColumnItem"); - mpRulerImpl->SetPercSize(mpColumnItem->Count()); + mxRulerImpl->SetPercSize(mxColumnItem->Count()); long lPos; long lWidth=0; @@ -2417,7 +2417,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) } else { - if(mpRulerImpl->bIsTableRows &&!bHorz) + if(mxRulerImpl->bIsTableRows &&!bHorz) { lOrigLPos = GetMargin1(); nStart = 0; @@ -2433,14 +2433,14 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) //in horizontal mode the percentage value has to be //calculated on a "current change" position base //because the height of the table changes while dragging - if(mpRulerImpl->bIsTableRows && RULER_TYPE_BORDER == eType) + if(mxRulerImpl->bIsTableRows && RULER_TYPE_BORDER == eType) { sal_uInt16 nStartBorder; sal_uInt16 nEndBorder; if(bHorz) { nStartBorder = nIdx + 1; - nEndBorder = mpColumnItem->Count() - 1; + nEndBorder = mxColumnItem->Count() - 1; } else { @@ -2451,7 +2451,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) lWidth = mpBorders[nIdx].nPos; if(bHorz) lWidth = GetMargin2() - lWidth; - mpRulerImpl->nTotalDist = lWidth; + mxRulerImpl->nTotalDist = lWidth; lPos = lOrigLPos = mpBorders[nIdx].nPos; for(sal_uInt16 i = nStartBorder; i < nEndBorder; ++i) @@ -2463,32 +2463,32 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) } else lActWidth = mpBorders[i].nPos; - mpRulerImpl->pPercBuf[i] = (sal_uInt16)((lActWidth * 1000) - / mpRulerImpl->nTotalDist); - mpRulerImpl->pBlockBuf[i] = (sal_uInt16)lActBorderSum; + mxRulerImpl->pPercBuf[i] = (sal_uInt16)((lActWidth * 1000) + / mxRulerImpl->nTotalDist); + mxRulerImpl->pBlockBuf[i] = (sal_uInt16)lActBorderSum; lActBorderSum += mpBorders[i].nWidth; } } else { lPos = lOrigLPos; - for(sal_uInt16 ii = nStart; ii < mpColumnItem->Count() - 1; ++ii) + for(sal_uInt16 ii = nStart; ii < mxColumnItem->Count() - 1; ++ii) { lWidth += mpBorders[ii].nPos - lPos; lPos = mpBorders[ii].nPos + mpBorders[ii].nWidth; } lWidth += GetMargin2() - lPos; - mpRulerImpl->nTotalDist = lWidth; + mxRulerImpl->nTotalDist = lWidth; lPos = lOrigLPos; - for(sal_uInt16 i = nStart; i < mpColumnItem->Count() - 1; ++i) + for(sal_uInt16 i = nStart; i < mxColumnItem->Count() - 1; ++i) { lActWidth += mpBorders[i].nPos - lPos; lPos = mpBorders[i].nPos + mpBorders[i].nWidth; - mpRulerImpl->pPercBuf[i] = (sal_uInt16)((lActWidth * 1000) - / mpRulerImpl->nTotalDist); - mpRulerImpl->pBlockBuf[i] = (sal_uInt16)lActBorderSum; + mxRulerImpl->pPercBuf[i] = (sal_uInt16)((lActWidth * 1000) + / mxRulerImpl->nTotalDist); + mxRulerImpl->pBlockBuf[i] = (sal_uInt16)lActBorderSum; lActBorderSum += mpBorders[i].nWidth; } } @@ -2497,13 +2497,13 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) case RULER_TYPE_TAB: { const sal_uInt16 nIdx = GetDragAryPos()+TAB_GAP; - mpRulerImpl->nTotalDist -= mpTabs[nIdx].nPos; - mpRulerImpl->SetPercSize(nTabCount); - for(sal_uInt16 n=0;n<=nIdx;mpRulerImpl->pPercBuf[n++]=0) ; + mxRulerImpl->nTotalDist -= mpTabs[nIdx].nPos; + mxRulerImpl->SetPercSize(nTabCount); + for(sal_uInt16 n=0;n<=nIdx;mxRulerImpl->pPercBuf[n++]=0) ; for(sal_uInt16 i = nIdx+1; i < nTabCount; ++i) { const long nDelta = mpTabs[i].nPos - mpTabs[nIdx].nPos; - mpRulerImpl->pPercBuf[i] = (sal_uInt16)((nDelta * 1000) / mpRulerImpl->nTotalDist); + mxRulerImpl->pPercBuf[i] = (sal_uInt16)((nDelta * 1000) / mxRulerImpl->nTotalDist); } break; } @@ -2522,7 +2522,7 @@ void SvxRuler::EvalModifier() */ sal_uInt16 nModifier = GetDragModifier(); - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) { //rows can only be moved in one way, additionally current column is possible if(nModifier == KEY_SHIFT) @@ -2548,7 +2548,7 @@ void SvxRuler::EvalModifier() ( ( RULER_TYPE_BORDER == eType || RULER_TYPE_MARGIN1 == eType || RULER_TYPE_MARGIN2 == eType ) && - mpColumnItem.get() ) ) + mxColumnItem.get() ) ) { PrepareProportional_Impl(eType); } @@ -2582,11 +2582,11 @@ void SvxRuler::Click() pBindings->Update( SID_RULER_PROTECT ); pBindings->Update( SID_ATTR_PARA_LRSPACE_VERTICAL ); } - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); - if(mpTabStopItem.get() && + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); + if(mxTabStopItem.get() && (nFlags & SVXRULER_SUPPORT_TABS) == SVXRULER_SUPPORT_TABS) { - bool bContentProtected = mpRulerImpl->aProtectItem.IsCntntProtected(); + bool bContentProtected = mxRulerImpl->aProtectItem.IsCntntProtected(); if( bContentProtected ) return; const long lPos = GetClickPos(); if((bRTL && lPos < std::min(GetFirstLineIndent(), GetLeftIndent()) && lPos > GetRightIndent()) || @@ -2596,19 +2596,19 @@ void SvxRuler::Click() long nTabPos; //#i24363# tab stops relative to indent if(bRTL) - nTabPos = ( mpRulerImpl->bIsTabsRelativeToIndent ? + nTabPos = ( mxRulerImpl->bIsTabsRelativeToIndent ? GetLeftIndent() : ConvertHPosPixel( GetRightFrameMargin() + lAppNullOffset ) ) - lPos; else nTabPos = lPos - - ( mpRulerImpl->bIsTabsRelativeToIndent ? + ( mxRulerImpl->bIsTabsRelativeToIndent ? GetLeftIndent() : 0 ); SvxTabStop aTabStop(ConvertHPosLogic(nTabPos), ToAttrTab_Impl(nDefTabType)); - mpTabStopItem->Insert(aTabStop); + mxTabStopItem->Insert(aTabStop); UpdateTabs(); } } @@ -2633,18 +2633,18 @@ void SvxRuler::CalcMinMax() Calculates the limits for dragging; which are in pixels relative to the page edge */ - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); const long lNullPix = ConvertPosPixel(lLogicNullOffset); - mpRulerImpl->lMaxLeftLogic=mpRulerImpl->lMaxRightLogic=-1; + mxRulerImpl->lMaxLeftLogic=mxRulerImpl->lMaxRightLogic=-1; switch(GetDragType()) { case RULER_TYPE_MARGIN1: { // left edge of the surrounding Frame // DragPos - NOf between left - right - mpRulerImpl->lMaxLeftLogic = GetLeftMin(); - nMaxLeft=ConvertSizePixel(mpRulerImpl->lMaxLeftLogic); + mxRulerImpl->lMaxLeftLogic = GetLeftMin(); + nMaxLeft=ConvertSizePixel(mxRulerImpl->lMaxLeftLogic); - if (!mpColumnItem.get() || mpColumnItem->Count() == 1 ) + if (!mxColumnItem.get() || mxColumnItem->Count() == 1 ) { if(bRTL) { @@ -2659,17 +2659,17 @@ void SvxRuler::CalcMinMax() lMinFrame; } } - else if(mpRulerImpl->bIsTableRows) + else if(mxRulerImpl->bIsTableRows) { //top border is not moveable when table rows are displayed // protection of content means the margin is not moveable // - it's just a page break inside of a cell - if(bHorz && !mpRulerImpl->aProtectItem.IsCntntProtected()) + if(bHorz && !mxRulerImpl->aProtectItem.IsCntntProtected()) { nMaxLeft = mpBorders[0].nMinPos + lNullPix; if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) nMaxRight = GetRightIndent() + lNullPix - - (mpColumnItem->Count() - 1 ) * lMinFrame; + (mxColumnItem->Count() - 1 ) * lMinFrame; else nMaxRight = mpBorders[0].nPos - lMinFrame + lNullPix; } @@ -2686,14 +2686,14 @@ void SvxRuler::CalcMinMax() { nMaxRight = ConvertPosPixel( GetPageWidth() - ( - (mpColumnItem->IsTable() && mpLRSpaceItem.get()) - ? mpLRSpaceItem->GetRight() : 0)) + (mxColumnItem->IsTable() && mxLRSpaceItem.get()) + ? mxLRSpaceItem->GetRight() : 0)) - GetMargin2() + GetMargin1(); } else { nMaxRight = lNullPix - lMinFrame; - if (mpColumnItem->IsFirstAct()) + if (mxColumnItem->IsFirstAct()) { if(bRTL) { @@ -2708,7 +2708,7 @@ void SvxRuler::CalcMinMax() std::max(GetFirstLineIndent(), GetLeftIndent())); } } - else if ( mpColumnItem->Count() > 1 ) + else if ( mxColumnItem->Count() > 1 ) { nMaxRight += mpBorders[0].nPos; } @@ -2717,9 +2717,9 @@ void SvxRuler::CalcMinMax() nMaxRight += GetRightIndent() - std::max(GetFirstLineIndent(), GetLeftIndent()); } // Do not drag the left table edge over the edge of the page - if(mpLRSpaceItem.get() && mpColumnItem->IsTable()) + if(mxLRSpaceItem.get() && mxColumnItem->IsTable()) { - long nTmp=ConvertSizePixel(mpLRSpaceItem->GetLeft()); + long nTmp=ConvertSizePixel(mxLRSpaceItem->GetLeft()); if(nTmp>nMaxLeft) nMaxLeft=nTmp; } @@ -2729,14 +2729,14 @@ void SvxRuler::CalcMinMax() } case RULER_TYPE_MARGIN2: { // right edge of the surrounding Frame - mpRulerImpl->lMaxRightLogic = - mpMinMaxItem.get() ? + mxRulerImpl->lMaxRightLogic = + mxMinMaxItem.get() ? GetPageWidth() - GetRightMax() : GetPageWidth(); - nMaxRight = ConvertSizePixel(mpRulerImpl->lMaxRightLogic); + nMaxRight = ConvertSizePixel(mxRulerImpl->lMaxRightLogic); - if(!mpColumnItem.get()) + if(!mxColumnItem.get()) { if(bRTL) { @@ -2751,29 +2751,29 @@ void SvxRuler::CalcMinMax() lMinFrame + lNullPix; } } - else if(mpRulerImpl->bIsTableRows) + else if(mxRulerImpl->bIsTableRows) { // get the bottom move range from the last border position - only available for rows! // protection of content means the margin is not moveable - it's just a page break inside of a cell - if(bHorz || mpRulerImpl->aProtectItem.IsCntntProtected()) + if(bHorz || mxRulerImpl->aProtectItem.IsCntntProtected()) { - nMaxLeft = nMaxRight = mpBorders[mpColumnItem->Count() - 1].nMaxPos + lNullPix; + nMaxLeft = nMaxRight = mpBorders[mxColumnItem->Count() - 1].nMaxPos + lNullPix; } else { if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) { - nMaxLeft = (mpColumnItem->Count()) * lMinFrame + lNullPix; + nMaxLeft = (mxColumnItem->Count()) * lMinFrame + lNullPix; } else { - if(mpColumnItem->Count() > 1) - nMaxLeft = mpBorders[mpColumnItem->Count() - 2].nPos + lMinFrame + lNullPix; + if(mxColumnItem->Count() > 1) + nMaxLeft = mpBorders[mxColumnItem->Count() - 2].nPos + lMinFrame + lNullPix; else nMaxLeft = lMinFrame + lNullPix; } - if(mpColumnItem->Count() > 1) - nMaxRight = mpBorders[mpColumnItem->Count() - 2].nMaxPos + lNullPix; + if(mxColumnItem->Count() > 1) + nMaxRight = mpBorders[mxColumnItem->Count() - 2].nMaxPos + lNullPix; else nMaxRight -= GetRightIndent() - lNullPix; } @@ -2781,7 +2781,7 @@ void SvxRuler::CalcMinMax() else { nMaxLeft = lMinFrame + lNullPix; - if(IsActLastColumn() || mpColumnItem->Count() < 2 ) //If last active column + if(IsActLastColumn() || mxColumnItem->Count() < 2 ) //If last active column { if(bRTL) { @@ -2796,12 +2796,12 @@ void SvxRuler::CalcMinMax() GetLeftIndent()); } } - if( mpColumnItem->Count() >= 2 ) + if( mxColumnItem->Count() >= 2 ) { long nNewMaxLeft = lMinFrame + lNullPix + - mpBorders[mpColumnItem->Count() - 2].nPos + - mpBorders[mpColumnItem->Count() - 2].nWidth; + mpBorders[mxColumnItem->Count() - 2].nPos + + mpBorders[mxColumnItem->Count() - 2].nWidth; nMaxLeft = std::max(nMaxLeft, nNewMaxLeft); } @@ -2822,7 +2822,7 @@ void SvxRuler::CalcMinMax() nMaxLeft = lNullPix; else nMaxLeft = mpBorders[nIdx - 1].nPos + mpBorders[nIdx - 1].nWidth + lNullPix; - if(nIdx == mpColumnItem->GetActColumn()) + if(nIdx == mxColumnItem->GetActColumn()) { if(bRTL) { @@ -2846,7 +2846,7 @@ void SvxRuler::CalcMinMax() } case RULER_DRAGSIZE_MOVE: { - if(mpColumnItem.get()) + if(mxColumnItem.get()) { //nIdx contains the position of the currently moved item //next visible separator on the left @@ -2857,7 +2857,7 @@ void SvxRuler::CalcMinMax() sal_uInt16 nActLeftCol=GetActLeftColumn(); //next separator on the right - regardless if visible or not sal_uInt16 nActRightCol=GetActRightColumn(); - if(mpColumnItem->IsTable()) + if(mxColumnItem->IsTable()) { if(nDragType & DRAG_OBJECT_ACTLINE_ONLY) { @@ -2868,7 +2868,7 @@ void SvxRuler::CalcMinMax() 0 : mpBorders[nLeftCol].nPos; //rows can always be increased without a limit - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) nMaxRight = mpBorders[nIdx].nMaxPos; else nMaxRight = nRightCol == USHRT_MAX ? @@ -2879,18 +2879,18 @@ void SvxRuler::CalcMinMax() } else { - if(DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType && !bHorz && mpRulerImpl->bIsTableRows) + if(DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType && !bHorz && mxRulerImpl->bIsTableRows) nMaxLeft = (nIdx + 1) * lMinFrame + lNullPix; else nMaxLeft = mpBorders[nIdx].nMinPos + lNullPix; if(DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType|| (DRAG_OBJECT_SIZE_LINEAR & nDragType) ) { - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) { if(bHorz) nMaxRight = GetRightIndent() + lNullPix - - (mpColumnItem->Count() - nIdx - 1) * lMinFrame; + (mxColumnItem->Count() - nIdx - 1) * lMinFrame; else nMaxRight = mpBorders[nIdx].nMaxPos + lNullPix; } @@ -3009,7 +3009,7 @@ void SvxRuler::CalcMinMax() // ObjectItem else { - if(mpObjectItem->HasLimits()) + if(mxObjectItem->HasLimits()) { if(CalcLimits(nMaxLeft, nMaxRight, nIdx & 1? sal_False : sal_True)) { @@ -3028,9 +3028,9 @@ void SvxRuler::CalcMinMax() case RULER_DRAGSIZE_2: { nMaxLeft = lNullPix + mpBorders[nIdx].nPos; - if(nIdx == mpColumnItem->Count()-2) { // last column + if(nIdx == mxColumnItem->Count()-2) { // last column nMaxRight = GetMargin2() + lNullPix; - if(mpColumnItem->IsLastAct()) { + if(mxColumnItem->IsLastAct()) { nMaxRight -= GetMargin2() - GetRightIndent() + std::max(GetFirstLineIndent(), @@ -3041,7 +3041,7 @@ void SvxRuler::CalcMinMax() } else { nMaxRight = lNullPix + mpBorders[nIdx+1].nPos; - if(mpColumnItem->GetActColumn()-1 == nIdx) { + if(mxColumnItem->GetActColumn()-1 == nIdx) { nMaxRight -= mpBorders[nIdx+1].nPos - GetRightIndent() + std::max(GetFirstLineIndent(), GetLeftIndent()); @@ -3068,9 +3068,9 @@ void SvxRuler::CalcMinMax() { nMaxLeft = lNullPix + GetRightIndent(); - if(mpColumnItem.get() && !mpColumnItem->IsFirstAct()) - nMaxLeft += mpBorders[mpColumnItem->GetActColumn()-1].nPos + - mpBorders[mpColumnItem->GetActColumn()-1].nWidth; + if(mxColumnItem.get() && !mxColumnItem->IsFirstAct()) + nMaxLeft += mpBorders[mxColumnItem->GetActColumn()-1].nPos + + mpBorders[mxColumnItem->GetActColumn()-1].nWidth; nMaxRight = lNullPix + GetMargin2(); // Dragging along @@ -3088,9 +3088,9 @@ void SvxRuler::CalcMinMax() { nMaxLeft = lNullPix; - if(mpColumnItem.get() && !mpColumnItem->IsFirstAct()) - nMaxLeft += mpBorders[mpColumnItem->GetActColumn()-1].nPos + - mpBorders[mpColumnItem->GetActColumn()-1].nWidth; + if(mxColumnItem.get() && !mxColumnItem->IsFirstAct()) + nMaxLeft += mpBorders[mxColumnItem->GetActColumn()-1].nPos + + mpBorders[mxColumnItem->GetActColumn()-1].nWidth; nMaxRight = lNullPix + GetRightIndent() - lMinFrame; // Dragging along @@ -3112,7 +3112,7 @@ void SvxRuler::CalcMinMax() { nMaxLeft = lNullPix; nMaxRight = lNullPix + std::min(GetFirstLineIndent(), GetLeftIndent()) - lMinFrame; - if(mpColumnItem.get()) + if(mxColumnItem.get()) { sal_uInt16 nRightCol=GetActRightColumn( true ); if(!IsActLastColumn( true )) @@ -3131,7 +3131,7 @@ void SvxRuler::CalcMinMax() nMaxLeft = lNullPix + std::max(GetFirstLineIndent(), GetLeftIndent()); nMaxRight = lNullPix; - if(mpColumnItem.get()) + if(mxColumnItem.get()) { sal_uInt16 nRightCol=GetActRightColumn( true ); if(!IsActLastColumn( true )) @@ -3157,8 +3157,8 @@ void SvxRuler::CalcMinMax() else nMaxLeft = lNullPix + std::min(GetFirstLineIndent(), GetLeftIndent()); - mpRulerImpl->lMaxRightLogic = GetLogicRightIndent() + lLogicNullOffset; - nMaxRight = ConvertSizePixel(mpRulerImpl->lMaxRightLogic); + mxRulerImpl->lMaxRightLogic = GetLogicRightIndent() + lLogicNullOffset; + nMaxRight = ConvertSizePixel(mxRulerImpl->lMaxRightLogic); break; default: ; //prevent warning } @@ -3176,13 +3176,13 @@ long SvxRuler::StartDrag() <SvxRuler::CalcMinMax()> <SvxRuler::EndDrag()> */ - bool bContentProtected = mpRulerImpl->aProtectItem.IsCntntProtected(); + bool bContentProtected = mxRulerImpl->aProtectItem.IsCntntProtected(); if(!bValid) return sal_False; - mpRulerImpl->lLastLMargin = GetMargin1(); - mpRulerImpl->lLastRMargin = GetMargin2(); + mxRulerImpl->lLastLMargin = GetMargin1(); + mxRulerImpl->lLastRMargin = GetMargin2(); long bOk = 1; @@ -3196,9 +3196,9 @@ long SvxRuler::StartDrag() { case RULER_TYPE_MARGIN1: // left edge of the surrounding Frame case RULER_TYPE_MARGIN2: // right edge of the surrounding Frame - if((bHorz && mpLRSpaceItem.get()) || (!bHorz && mpULSpaceItem.get())) + if((bHorz && mxLRSpaceItem.get()) || (!bHorz && mxULSpaceItem.get())) { - if(!mpColumnItem.get()) + if(!mxColumnItem.get()) EvalModifier(); else nDragType = DRAG_OBJECT; @@ -3209,10 +3209,10 @@ long SvxRuler::StartDrag() } break; case RULER_TYPE_BORDER: // Table, column (Modifier) - if(mpColumnItem.get()) + if(mxColumnItem.get()) { nDragOffset = 0; - if (!mpColumnItem->IsTable()) + if (!mxColumnItem->IsTable()) nDragOffset = GetDragPos() - mpBorders[GetDragAryPos()].nPos; EvalModifier(); } @@ -3270,19 +3270,19 @@ void SvxRuler::Drag() switch(GetDragType()) { case RULER_TYPE_MARGIN1: // left edge of the surrounding Frame DragMargin1(); - mpRulerImpl->lLastLMargin = GetMargin1(); + mxRulerImpl->lLastLMargin = GetMargin1(); break; case RULER_TYPE_MARGIN2: // right edge of the surrounding Frame DragMargin2(); - mpRulerImpl->lLastRMargin = GetMargin2(); + mxRulerImpl->lLastRMargin = GetMargin2(); break; case RULER_TYPE_INDENT: // Paragraph indents DragIndents(); break; case RULER_TYPE_BORDER: // Table, columns - if(mpColumnItem.get()) + if(mxColumnItem.get()) DragBorders(); - else if(mpObjectItem.get()) + else if(mxObjectItem.get()) DragObjectBorder(); break; case RULER_TYPE_TAB: // Tabs @@ -3313,11 +3313,11 @@ void SvxRuler::EndDrag() case RULER_TYPE_MARGIN1: // upper left edge of the surrounding Frame case RULER_TYPE_MARGIN2: // lower right edge of the surrounding Frame { - if(!mpColumnItem.get() || !mpColumnItem->IsTable()) + if(!mxColumnItem.get() || !mxColumnItem->IsTable()) ApplyMargins(); - if(mpColumnItem.get() && - (mpColumnItem->IsTable() || + if(mxColumnItem.get() && + (mxColumnItem->IsTable() || (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL))) ApplyBorders(); @@ -3325,15 +3325,15 @@ void SvxRuler::EndDrag() break; case RULER_TYPE_BORDER: // Table, columns if(lInitialDragPos != lPos || - (mpRulerImpl->bIsTableRows && bHorz)) //special case - the null offset is changed here + (mxRulerImpl->bIsTableRows && bHorz)) //special case - the null offset is changed here { - if(mpColumnItem.get()) + if(mxColumnItem.get()) { ApplyBorders(); if(bHorz) UpdateTabs(); } - else if(mpObjectItem.get()) + else if(mxObjectItem.get()) ApplyObject(); } break; @@ -3361,7 +3361,7 @@ void SvxRuler::EndDrag() Ruler::EndDrag(); if(bUndo) { - for(sal_uInt16 i = 0; i < mpRulerImpl->nControlerItems; i++) + for(sal_uInt16 i = 0; i < mxRulerImpl->nControlerItems; i++) { pCtrlItem[i]->ClearCache(); pCtrlItem[i]->GetBindings().Invalidate(pCtrlItem[i]->GetId()); @@ -3374,7 +3374,7 @@ void SvxRuler::ExtraDown() /* Override SV method, sets the new type for the Default tab. */ // Switch Tab Type - if(mpTabStopItem.get() && + if(mxTabStopItem.get() && (nFlags & SVXRULER_SUPPORT_TABS) == SVXRULER_SUPPORT_TABS) { ++nDefTabType; @@ -3417,16 +3417,16 @@ IMPL_LINK_INLINE_END( SvxRuler, MenuSelect, Menu *, pMenu ) IMPL_LINK( SvxRuler, TabMenuSelect, Menu *, pMenu ) { /* Handler of the tab menu for setting the type */ - if(mpTabStopItem.get() && mpTabStopItem->Count() > mpRulerImpl->nIdx) + if(mxTabStopItem.get() && mxTabStopItem->Count() > mxRulerImpl->nIdx) { - SvxTabStop aTabStop = mpTabStopItem->At(mpRulerImpl->nIdx); + SvxTabStop aTabStop = mxTabStopItem->At(mxRulerImpl->nIdx); aTabStop.GetAdjustment() = ToAttrTab_Impl(pMenu->GetCurItemId() - 1); - mpTabStopItem->Remove(mpRulerImpl->nIdx); - mpTabStopItem->Insert(aTabStop); + mxTabStopItem->Remove(mxRulerImpl->nIdx); + mxTabStopItem->Insert(aTabStop); sal_uInt16 nTabStopId = bHorz ? SID_ATTR_TABSTOP : SID_ATTR_TABSTOP_VERTICAL; - pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mpTabStopItem.get(), 0L ); + pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mxTabStopItem.get(), 0L ); UpdateTabs(); - mpRulerImpl->nIdx = 0; + mxRulerImpl->nIdx = 0; } return 0; } @@ -3437,11 +3437,11 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) if ( COMMAND_CONTEXTMENU == rCommandEvent.GetCommand() ) { CancelDrag(); - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); if ( !mpTabs.empty() && RULER_TYPE_TAB == - GetType( rCommandEvent.GetMousePosPixel(), &mpRulerImpl->nIdx ) && - mpTabs[mpRulerImpl->nIdx + TAB_GAP].nStyle < RULER_TAB_DEFAULT ) + GetType( rCommandEvent.GetMousePosPixel(), &mxRulerImpl->nIdx ) && + mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle < RULER_TAB_DEFAULT ) { PopupMenu aMenu; aMenu.SetSelectHdl(LINK(this, SvxRuler, TabMenuSelect)); @@ -3460,7 +3460,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) aMenu.InsertItem(i + 1, ResId(RID_SVXSTR_RULER_START + i, DIALOG_MGR()).toString(), Image(aDev.GetBitmap(Point(), aSz), Color(COL_WHITE))); - aMenu.CheckItem(i + 1, i == mpTabs[mpRulerImpl->nIdx + TAB_GAP].nStyle); + aMenu.CheckItem(i + 1, i == mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle); aDev.SetOutputSize(aSz); // delete device } aMenu.Execute( this, rCommandEvent.GetMousePosPixel() ); @@ -3510,16 +3510,16 @@ sal_uInt16 SvxRuler::GetActRightColumn( sal_uInt16 nAct ) const { if( nAct == USHRT_MAX ) - nAct = mpColumnItem->GetActColumn(); + nAct = mxColumnItem->GetActColumn(); else nAct++; //To be able to pass on the ActDrag bool bConsiderHidden = !bForceDontConsiderHidden && !(nDragType & DRAG_OBJECT_ACTLINE_ONLY); - while( nAct < mpColumnItem->Count() - 1 ) + while( nAct < mxColumnItem->Count() - 1 ) { - if (mpColumnItem->At(nAct).bVisible || bConsiderHidden) + if (mxColumnItem->At(nAct).bVisible || bConsiderHidden) return nAct; else nAct++; @@ -3532,7 +3532,7 @@ sal_uInt16 SvxRuler::GetActLeftColumn( sal_uInt16 nAct ) const { if(nAct == USHRT_MAX) - nAct = mpColumnItem->GetActColumn(); + nAct = mxColumnItem->GetActColumn(); sal_uInt16 nLeftOffset = 1; @@ -3541,7 +3541,7 @@ sal_uInt16 SvxRuler::GetActLeftColumn( while(nAct >= nLeftOffset) { - if (mpColumnItem->At(nAct - nLeftOffset).bVisible || bConsiderHidden) + if (mxColumnItem->At(nAct - nLeftOffset).bVisible || bConsiderHidden) return nAct - nLeftOffset; else nLeftOffset++; @@ -3578,7 +3578,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const long lColumns = 0; sal_uInt16 nStart; - if(!mpColumnItem->IsTable()) + if(!mxColumnItem->IsTable()) { if(nCol == USHRT_MAX) { @@ -3626,7 +3626,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const if(nActCol == USHRT_MAX) { nRight = 0; - while(!(*mpColumnItem.get())[nRight].bVisible) + while(!(*mxColumnItem.get())[nRight].bVisible) { nRight++; } @@ -3659,12 +3659,12 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const } else { - if(mpColumnItem->IsTable()) + if(mxColumnItem->IsTable()) { sal_uInt16 nVisCols = 0; for(sal_uInt16 i = GetActRightColumn(false, nCol); i < mpBorders.size();) { - if((*mpColumnItem.get())[i].bVisible) + if((*mxColumnItem.get())[i].bVisible) nVisCols++; i = GetActRightColumn(false, i); } @@ -3685,7 +3685,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const // Tab stops relative to indent (#i24363#) void SvxRuler::SetTabsRelativeToIndent( bool bRel ) { - mpRulerImpl->bIsTabsRelativeToIndent = bRel; + mxRulerImpl->bIsTabsRelativeToIndent = bRel; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx index f2d1390580a2..5a1971ad4e68 100644 --- a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx +++ b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx @@ -32,21 +32,15 @@ AreaTransparencyGradientPopup::AreaTransparencyGradientPopup ( { } - - - AreaTransparencyGradientPopup::~AreaTransparencyGradientPopup (void) { } - - - void AreaTransparencyGradientPopup::Rearrange (XFillFloatTransparenceItem* pItem) { ProvideContainerAndControl(); - AreaTransparencyGradientControl* pControl = dynamic_cast<AreaTransparencyGradientControl*>(mpControl.get()); + AreaTransparencyGradientControl* pControl = dynamic_cast<AreaTransparencyGradientControl*>(mxControl.get()); if (pControl != NULL) pControl->Rearrange(pItem); } diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index fe464a415700..5e587821b21a 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -38,31 +38,22 @@ LineWidthPopup::LineWidthPopup ( SetPopupModeEndHandler(::boost::bind(&LineWidthPopup::PopupModeEndCallback, this)); } - - - LineWidthPopup::~LineWidthPopup (void) { } - - - void LineWidthPopup::SetWidthSelect (long lValue, bool bValuable, SfxMapUnit eMapUnit) { ProvideContainerAndControl(); - LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mpControl.get()); + LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mxControl.get()); if (pControl != NULL) pControl->SetWidthSelect(lValue, bValuable, eMapUnit); } - - - void LineWidthPopup::PopupModeEndCallback (void) { - LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mpControl.get()); + LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mxControl.get()); if (pControl != NULL) { if (pControl->IsCloseByEdit()) diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx index 7a4fe17f94db..57ea21ad0c52 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx @@ -34,21 +34,15 @@ TextCharacterSpacingPopup::TextCharacterSpacingPopup ( SetPopupModeEndHandler(::boost::bind(&TextCharacterSpacingPopup::PopupModeEndCallback, this)); } - - - TextCharacterSpacingPopup::~TextCharacterSpacingPopup (void) { } - - - void TextCharacterSpacingPopup::Rearrange (bool bLBAvailable,bool bAvailable, long nKerning) { ProvideContainerAndControl(); - TextCharacterSpacingControl* pControl = dynamic_cast<TextCharacterSpacingControl*>(mpControl.get()); + TextCharacterSpacingControl* pControl = dynamic_cast<TextCharacterSpacingControl*>(mxControl.get()); if (pControl != NULL) pControl->Rearrange(bLBAvailable,bAvailable,nKerning); } @@ -56,7 +50,7 @@ void TextCharacterSpacingPopup::Rearrange (bool bLBAvailable,bool bAvailable, lo void TextCharacterSpacingPopup::PopupModeEndCallback (void) { ProvideContainerAndControl(); - TextCharacterSpacingControl* pControl = dynamic_cast<TextCharacterSpacingControl*>(mpControl.get()); + TextCharacterSpacingControl* pControl = dynamic_cast<TextCharacterSpacingControl*>(mxControl.get()); if (pControl == NULL) return; diff --git a/svx/source/sidebar/text/TextUnderlinePopup.cxx b/svx/source/sidebar/text/TextUnderlinePopup.cxx index b71e33b4303c..0aab2b4e58a9 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.cxx +++ b/svx/source/sidebar/text/TextUnderlinePopup.cxx @@ -32,21 +32,15 @@ TextUnderlinePopup::TextUnderlinePopup ( { } - - - TextUnderlinePopup::~TextUnderlinePopup (void) { } - - - void TextUnderlinePopup::Rearrange (FontUnderline eLine) { ProvideContainerAndControl(); - TextUnderlineControl* pControl = dynamic_cast<TextUnderlineControl*>(mpControl.get()); + TextUnderlineControl* pControl = dynamic_cast<TextUnderlineControl*>(mxControl.get()); if (pControl != NULL) pControl->Rearrange(eLine); } diff --git a/svx/source/sidebar/tools/Popup.cxx b/svx/source/sidebar/tools/Popup.cxx index 2744547cbec3..18109ec39f9d 100644 --- a/svx/source/sidebar/tools/Popup.cxx +++ b/svx/source/sidebar/tools/Popup.cxx @@ -29,86 +29,71 @@ Popup::Popup ( vcl::Window* pParent, const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator, const ::rtl::OUString& rsAccessibleName) - : mpControl(), + : mxControl(), mpParent(pParent), maControlCreator(rControlCreator), maPopupModeEndCallback(), msAccessibleName(rsAccessibleName), - mpContainer() + mxContainer() { OSL_ASSERT(mpParent!=NULL); OSL_ASSERT(maControlCreator); } - - - Popup::~Popup (void) { - mpControl.reset(); - mpContainer.reset(); + mxControl.reset(); + mxContainer.reset(); } - - - void Popup::Show (ToolBox& rToolBox) { rToolBox.SetItemDown(rToolBox.GetCurItemId(), true); ProvideContainerAndControl(); - if ( ! (mpContainer && mpControl)) + if ( ! (mxContainer && mxControl)) { - OSL_ASSERT(mpContainer); - OSL_ASSERT(mpControl); + OSL_ASSERT(mxContainer); + OSL_ASSERT(mxControl); return; } - if ( !mpContainer->IsInPopupMode() ) + if ( !mxContainer->IsInPopupMode() ) { - mpContainer->SetSizePixel(mpControl->GetOutputSizePixel()); + mxContainer->SetSizePixel(mxControl->GetOutputSizePixel()); const Point aPos (rToolBox.GetParent()->OutputToScreenPixel(rToolBox.GetPosPixel())); const Size aSize (rToolBox.GetSizePixel()); const Rectangle aRect (aPos, aSize); - mpContainer->StartPopupMode( + mxContainer->StartPopupMode( aRect, FLOATWIN_POPUPMODE_NOFOCUSCLOSE|FLOATWIN_POPUPMODE_DOWN); - mpContainer->SetPopupModeFlags( - mpContainer->GetPopupModeFlags() + mxContainer->SetPopupModeFlags( + mxContainer->GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE); - mpControl->GetFocus(); + mxControl->GetFocus(); } } - - - void Popup::Hide (void) { - if (mpContainer) - if (mpContainer->IsInPopupMode()) - mpContainer->EndPopupMode(); + if (mxContainer) + if (mxContainer->IsInPopupMode()) + mxContainer->EndPopupMode(); } - - - void Popup::SetPopupModeEndHandler (const ::boost::function<void(void)>& rCallback) { maPopupModeEndCallback = rCallback; - if (mpContainer) - mpContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler)); + if (mxContainer) + mxContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler)); } - - - void Popup::ProvideContainerAndControl (void) { - if ( ! (mpContainer && mpControl) + if ( ! (mxContainer && mxControl) && mpParent!=NULL && maControlCreator) { @@ -116,30 +101,24 @@ void Popup::ProvideContainerAndControl (void) } } - - - void Popup::CreateContainerAndControl (void) { - mpContainer.reset(new PopupContainer(mpParent)); - mpContainer->SetAccessibleName(msAccessibleName); - mpContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler)); - mpContainer->SetBorderStyle(mpContainer->GetBorderStyle() | WindowBorderStyle::MENU); + mxContainer.reset(new PopupContainer(mpParent)); + mxContainer->SetAccessibleName(msAccessibleName); + mxContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler)); + mxContainer->SetBorderStyle(mxContainer->GetBorderStyle() | WindowBorderStyle::MENU); - mpControl.reset(maControlCreator(mpContainer.get())); + mxControl.reset(maControlCreator(mxContainer.get())); } - - - IMPL_LINK(Popup, PopupModeEndHandler, void*, EMPTYARG) { if (maPopupModeEndCallback) maPopupModeEndCallback(); // Popup control is no longer needed and can be destroyed. - mpControl.reset(); - mpContainer.reset(); + mxControl.reset(); + mxContainer.reset(); return 0; } diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index c2e0f218c6e9..52ef58c81f30 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -74,23 +74,23 @@ sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const sal_uInt16 nRet = 0; if ( nOffset < nSliderXOffset ) - return mpImpl->mnMinZoom; + return mxImpl->mnMinZoom; if ( nOffset > nControlWidth - nSliderXOffset ) - return mpImpl->mnMaxZoom; + return mxImpl->mnMaxZoom; // check for snapping points: sal_uInt16 nCount = 0; std::vector< long >::iterator aSnappingPointIter; - for ( aSnappingPointIter = mpImpl->maSnappingPointOffsets.begin(); - aSnappingPointIter != mpImpl->maSnappingPointOffsets.end(); + for ( aSnappingPointIter = mxImpl->maSnappingPointOffsets.begin(); + aSnappingPointIter != mxImpl->maSnappingPointOffsets.end(); ++aSnappingPointIter ) { const long nCurrent = *aSnappingPointIter; if ( std::abs(nCurrent - nOffset) < nSnappingEpsilon ) { nOffset = nCurrent; - nRet = mpImpl->maSnappingPointZooms[ nCount ]; + nRet = mxImpl->maSnappingPointZooms[ nCount ]; break; } ++nCount; @@ -101,27 +101,27 @@ sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const if ( nOffset < nControlWidth / 2 ) { // first half of slider - const long nFirstHalfRange = mpImpl->mnSliderCenter - mpImpl->mnMinZoom; + const long nFirstHalfRange = mxImpl->mnSliderCenter - mxImpl->mnMinZoom; const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth; const long nOffsetToSliderLeft = nOffset - nSliderXOffset; - nRet = mpImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 ); + nRet = mxImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 ); } else { // second half of slider - const long nSecondHalfRange = mpImpl->mnMaxZoom - mpImpl->mnSliderCenter; + const long nSecondHalfRange = mxImpl->mnMaxZoom - mxImpl->mnSliderCenter; const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth; const long nOffsetToSliderCenter = nOffset - nControlWidth/2; - nRet = mpImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); + nRet = mxImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); } } - if ( nRet < mpImpl->mnMinZoom ) - nRet = mpImpl->mnMinZoom; - else if ( nRet > mpImpl->mnMaxZoom ) - nRet = mpImpl->mnMaxZoom; + if ( nRet < mxImpl->mnMinZoom ) + nRet = mxImpl->mnMinZoom; + else if ( nRet > mxImpl->mnMaxZoom ) + nRet = mxImpl->mnMaxZoom; return nRet; } @@ -134,18 +134,18 @@ long SvxZoomSliderControl::Zoom2Offset( sal_uInt16 nCurrentZoom ) const const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; - if ( nCurrentZoom <= mpImpl->mnSliderCenter ) + if ( nCurrentZoom <= mxImpl->mnSliderCenter ) { - nCurrentZoom = nCurrentZoom - mpImpl->mnMinZoom; - const long nFirstHalfRange = mpImpl->mnSliderCenter - mpImpl->mnMinZoom; + nCurrentZoom = nCurrentZoom - mxImpl->mnMinZoom; + const long nFirstHalfRange = mxImpl->mnSliderCenter - mxImpl->mnMinZoom; const long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nFirstHalfRange; const long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000; nRet += nOffset; } else { - nCurrentZoom = nCurrentZoom - mpImpl->mnSliderCenter; - const long nSecondHalfRange = mpImpl->mnMaxZoom - mpImpl->mnSliderCenter; + nCurrentZoom = nCurrentZoom - mxImpl->mnSliderCenter; + const long nSecondHalfRange = mxImpl->mnMaxZoom - mxImpl->mnSliderCenter; const long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nSecondHalfRange; const long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000; nRet += nHalfSliderWidth + nOffset; @@ -156,17 +156,17 @@ long SvxZoomSliderControl::Zoom2Offset( sal_uInt16 nCurrentZoom ) const SvxZoomSliderControl::SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStatusBar ) : SfxStatusBarControl( _nSlotId, _nId, rStatusBar ), - mpImpl( new SvxZoomSliderControl_Impl ) + mxImpl( new SvxZoomSliderControl_Impl ) { - mpImpl->maSliderButton = Image( SVX_RES( RID_SVXBMP_SLIDERBUTTON ) ); - mpImpl->maIncreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERINCREASE ) ); - mpImpl->maDecreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERDECREASE ) ); + mxImpl->maSliderButton = Image( SVX_RES( RID_SVXBMP_SLIDERBUTTON ) ); + mxImpl->maIncreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERINCREASE ) ); + mxImpl->maDecreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERDECREASE ) ); //#ifndef MACOSX sal_Int32 nScaleFactor = rStatusBar.GetDPIScaleFactor(); if (nScaleFactor != 1) { - Image arr[3] = {mpImpl->maSliderButton, mpImpl->maIncreaseButton, mpImpl->maDecreaseButton}; + Image arr[3] = {mxImpl->maSliderButton, mxImpl->maIncreaseButton, mxImpl->maDecreaseButton}; for (int i = 0; i < 3; i++) { @@ -175,9 +175,9 @@ SvxZoomSliderControl::SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nI aBitmap.Scale(nScaleFactor, nScaleFactor, i == 0 ? BMP_SCALE_LANCZOS : BMP_SCALE_FAST); arr[i] = Image(aBitmap); } - mpImpl->maSliderButton = arr[0]; - mpImpl->maIncreaseButton = arr[1]; - mpImpl->maDecreaseButton = arr[2]; + mxImpl->maSliderButton = arr[0]; + mxImpl->maIncreaseButton = arr[1]; + mxImpl->maDecreaseButton = arr[2]; } //#endif } @@ -191,30 +191,30 @@ void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eStat if ( (SfxItemState::DEFAULT != eState) || pState->ISA( SfxVoidItem ) ) { GetStatusBar().SetItemText( GetId(), "" ); - mpImpl->mbValuesSet = false; + mxImpl->mbValuesSet = false; } else { OSL_ENSURE( pState->ISA( SvxZoomSliderItem ), "invalid item type: should be a SvxZoomSliderItem" ); - mpImpl->mnCurrentZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetValue(); - mpImpl->mnMinZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetMinZoom(); - mpImpl->mnMaxZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetMaxZoom(); - mpImpl->mnSliderCenter= 100; - mpImpl->mbValuesSet = true; + mxImpl->mnCurrentZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetValue(); + mxImpl->mnMinZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetMinZoom(); + mxImpl->mnMaxZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetMaxZoom(); + mxImpl->mnSliderCenter= 100; + mxImpl->mbValuesSet = true; - if ( mpImpl->mnSliderCenter == mpImpl->mnMaxZoom ) - mpImpl->mnSliderCenter = mpImpl->mnMinZoom + (sal_uInt16)((mpImpl->mnMaxZoom - mpImpl->mnMinZoom) * 0.5); + if ( mxImpl->mnSliderCenter == mxImpl->mnMaxZoom ) + mxImpl->mnSliderCenter = mxImpl->mnMinZoom + (sal_uInt16)((mxImpl->mnMaxZoom - mxImpl->mnMinZoom) * 0.5); - DBG_ASSERT( mpImpl->mnMinZoom <= mpImpl->mnCurrentZoom && - mpImpl->mnMinZoom < mpImpl->mnSliderCenter && - mpImpl->mnMaxZoom >= mpImpl->mnCurrentZoom && - mpImpl->mnMaxZoom > mpImpl->mnSliderCenter, + DBG_ASSERT( mxImpl->mnMinZoom <= mxImpl->mnCurrentZoom && + mxImpl->mnMinZoom < mxImpl->mnSliderCenter && + mxImpl->mnMaxZoom >= mxImpl->mnCurrentZoom && + mxImpl->mnMaxZoom > mxImpl->mnSliderCenter, "Looks like the zoom slider item is corrupted" ); const com::sun::star::uno::Sequence < sal_Int32 > rSnappingPoints = static_cast<const SvxZoomSliderItem*>( pState )->GetSnappingPoints(); - mpImpl->maSnappingPointOffsets.clear(); - mpImpl->maSnappingPointZooms.clear(); + mxImpl->maSnappingPointOffsets.clear(); + mxImpl->maSnappingPointZooms.clear(); // get all snapping points: std::set< sal_uInt16 > aTmpSnappingPoints; @@ -235,20 +235,20 @@ void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eStat if ( nCurrentOffset - nLastOffset >= nSnappingPointsMinDist ) { - mpImpl->maSnappingPointOffsets.push_back( nCurrentOffset ); - mpImpl->maSnappingPointZooms.push_back( nCurrent ); + mxImpl->maSnappingPointOffsets.push_back( nCurrentOffset ); + mxImpl->maSnappingPointZooms.push_back( nCurrent ); nLastOffset = nCurrentOffset; } } } - if (!mpImpl->mbOmitPaint) + if (!mxImpl->mbOmitPaint) forceRepaint(); } void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) { - if ( !mpImpl->mbValuesSet || mpImpl->mbOmitPaint ) + if ( !mxImpl->mbValuesSet || mxImpl->mbOmitPaint ) return; const Rectangle aControlRect = getControlRect(); @@ -274,8 +274,8 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) // draw snapping points: std::vector< long >::iterator aSnappingPointIter; - for ( aSnappingPointIter = mpImpl->maSnappingPointOffsets.begin(); - aSnappingPointIter != mpImpl->maSnappingPointOffsets.end(); + for ( aSnappingPointIter = mxImpl->maSnappingPointOffsets.begin(); + aSnappingPointIter != mxImpl->maSnappingPointOffsets.end(); ++aSnappingPointIter ) { long nSnapPosX = aRect.Left() + *aSnappingPointIter; @@ -289,20 +289,20 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) // draw slider button Point aImagePoint = aRect.TopLeft(); - aImagePoint.X() += Zoom2Offset( mpImpl->mnCurrentZoom ); - aImagePoint.X() -= mpImpl->maSliderButton.GetSizePixel().Width()/2; - aImagePoint.Y() += (aControlRect.GetHeight() - mpImpl->maSliderButton.GetSizePixel().Height())/2; - pDev->DrawImage( aImagePoint, mpImpl->maSliderButton ); + aImagePoint.X() += Zoom2Offset( mxImpl->mnCurrentZoom ); + aImagePoint.X() -= mxImpl->maSliderButton.GetSizePixel().Width()/2; + aImagePoint.Y() += (aControlRect.GetHeight() - mxImpl->maSliderButton.GetSizePixel().Height())/2; + pDev->DrawImage( aImagePoint, mxImpl->maSliderButton ); // draw decrease button aImagePoint = aRect.TopLeft(); - aImagePoint.X() += (nSliderXOffset - mpImpl->maDecreaseButton.GetSizePixel().Width())/2; - aImagePoint.Y() += (aControlRect.GetHeight() - mpImpl->maDecreaseButton.GetSizePixel().Height())/2; - pDev->DrawImage( aImagePoint, mpImpl->maDecreaseButton ); + aImagePoint.X() += (nSliderXOffset - mxImpl->maDecreaseButton.GetSizePixel().Width())/2; + aImagePoint.Y() += (aControlRect.GetHeight() - mxImpl->maDecreaseButton.GetSizePixel().Height())/2; + pDev->DrawImage( aImagePoint, mxImpl->maDecreaseButton ); // draw increase button - aImagePoint.X() = aRect.TopLeft().X() + aControlRect.GetWidth() - mpImpl->maIncreaseButton.GetSizePixel().Width() - (nSliderXOffset - mpImpl->maIncreaseButton.GetSizePixel().Height())/2; - pDev->DrawImage( aImagePoint, mpImpl->maIncreaseButton ); + aImagePoint.X() = aRect.TopLeft().X() + aControlRect.GetWidth() - mxImpl->maIncreaseButton.GetSizePixel().Width() - (nSliderXOffset - mxImpl->maIncreaseButton.GetSizePixel().Height())/2; + pDev->DrawImage( aImagePoint, mxImpl->maIncreaseButton ); pDev->SetLineColor( aOldLineColor ); pDev->SetFillColor( aOldFillColor ); @@ -310,40 +310,40 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) bool SvxZoomSliderControl::MouseButtonDown( const MouseEvent & rEvt ) { - if ( !mpImpl->mbValuesSet ) + if ( !mxImpl->mbValuesSet ) return true; const Rectangle aControlRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left(); - long nIncDecWidth = mpImpl->maIncreaseButton.GetSizePixel().Width(); + long nIncDecWidth = mxImpl->maIncreaseButton.GetSizePixel().Width(); const long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2; const long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2; - const long nOldZoom = mpImpl->mnCurrentZoom; + const long nOldZoom = mxImpl->mnCurrentZoom; // click to - button if ( nXDiff >= nButtonLeftOffset && nXDiff <= nButtonRightOffset ) - mpImpl->mnCurrentZoom = basegfx::zoomtools::zoomOut( static_cast<int>(mpImpl->mnCurrentZoom) ); + mxImpl->mnCurrentZoom = basegfx::zoomtools::zoomOut( static_cast<int>(mxImpl->mnCurrentZoom) ); // click to + button else if ( nXDiff >= aControlRect.GetWidth() - nSliderXOffset + nButtonLeftOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset + nButtonRightOffset ) - mpImpl->mnCurrentZoom = basegfx::zoomtools::zoomIn( static_cast<int>(mpImpl->mnCurrentZoom) ); + mxImpl->mnCurrentZoom = basegfx::zoomtools::zoomIn( static_cast<int>(mxImpl->mnCurrentZoom) ); // click to slider else if( nXDiff >= nSliderXOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset ) { - mpImpl->mnCurrentZoom = Offset2Zoom( nXDiff ); - mpImpl->mbDraggingStarted = true; + mxImpl->mnCurrentZoom = Offset2Zoom( nXDiff ); + mxImpl->mbDraggingStarted = true; } - if ( mpImpl->mnCurrentZoom < mpImpl->mnMinZoom ) - mpImpl->mnCurrentZoom = mpImpl->mnMinZoom; - else if ( mpImpl->mnCurrentZoom > mpImpl->mnMaxZoom ) - mpImpl->mnCurrentZoom = mpImpl->mnMaxZoom; + if ( mxImpl->mnCurrentZoom < mxImpl->mnMinZoom ) + mxImpl->mnCurrentZoom = mxImpl->mnMinZoom; + else if ( mxImpl->mnCurrentZoom > mxImpl->mnMaxZoom ) + mxImpl->mnCurrentZoom = mxImpl->mnMaxZoom; - if ( nOldZoom == mpImpl->mnCurrentZoom ) + if ( nOldZoom == mxImpl->mnCurrentZoom ) return true; repaintAndExecute(); @@ -353,13 +353,13 @@ bool SvxZoomSliderControl::MouseButtonDown( const MouseEvent & rEvt ) bool SvxZoomSliderControl::MouseButtonUp( const MouseEvent & ) { - mpImpl->mbDraggingStarted = false; + mxImpl->mbDraggingStarted = false; return true; } bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) { - if ( !mpImpl->mbValuesSet ) + if ( !mxImpl->mbValuesSet ) return true; const short nButtons = rEvt.GetButtons(); @@ -368,11 +368,11 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left(); // check mouse move with button pressed - if ( 1 == nButtons && mpImpl->mbDraggingStarted ) + if ( 1 == nButtons && mxImpl->mbDraggingStarted ) { if ( nXDiff >= nSliderXOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset ) { - mpImpl->mnCurrentZoom = Offset2Zoom( nXDiff ); + mxImpl->mnCurrentZoom = Offset2Zoom( nXDiff ); repaintAndExecute(); } @@ -380,7 +380,7 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) // Tooltips - long nIncDecWidth = mpImpl->maIncreaseButton.GetSizePixel().Width(); + long nIncDecWidth = mxImpl->maIncreaseButton.GetSizePixel().Width(); const long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2; const long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2; @@ -408,11 +408,11 @@ void SvxZoomSliderControl::repaintAndExecute() { forceRepaint(); - mpImpl->mbOmitPaint = true; // optimization: paint before executing command, + mxImpl->mbOmitPaint = true; // optimization: paint before executing command, // then omit painting which is triggered by the execute function // commit state change - SvxZoomSliderItem aZoomSliderItem(mpImpl->mnCurrentZoom); + SvxZoomSliderItem aZoomSliderItem(mxImpl->mnCurrentZoom); css::uno::Any any; aZoomSliderItem.QueryValue(any); @@ -423,7 +423,7 @@ void SvxZoomSliderControl::repaintAndExecute() execute(aArgs); - mpImpl->mbOmitPaint = false; + mxImpl->mbOmitPaint = false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 9d21a5eb6eab..2bead84706f1 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -83,13 +83,13 @@ TYPEINIT1( SdrMediaObj, SdrRectObj ); SdrMediaObj::SdrMediaObj() : SdrRectObj() - , m_pImpl( new Impl() ) + , m_xImpl( new Impl() ) { } SdrMediaObj::SdrMediaObj( const Rectangle& rRect ) : SdrRectObj( rRect ) - , m_pImpl( new Impl() ) + , m_xImpl( new Impl() ) { } @@ -169,22 +169,22 @@ SdrMediaObj& SdrMediaObj::operator=(const SdrMediaObj& rObj) return *this; SdrRectObj::operator=( rObj ); - m_pImpl->m_pTempFile = rObj.m_pImpl->m_pTempFile; // before props + m_xImpl->m_pTempFile = rObj.m_xImpl->m_pTempFile; // before props setMediaProperties( rObj.getMediaProperties() ); - m_pImpl->m_xCachedSnapshot = rObj.m_pImpl->m_xCachedSnapshot; + m_xImpl->m_xCachedSnapshot = rObj.m_xImpl->m_xCachedSnapshot; return *this; } const uno::Reference< graphic::XGraphic > SdrMediaObj::getSnapshot() const { - if( !m_pImpl->m_xCachedSnapshot.is() ) + if( !m_xImpl->m_xCachedSnapshot.is() ) { - OUString aRealURL = m_pImpl->m_MediaProperties.getTempURL(); + OUString aRealURL = m_xImpl->m_MediaProperties.getTempURL(); if( aRealURL.isEmpty() ) - aRealURL = m_pImpl->m_MediaProperties.getURL(); - m_pImpl->m_xCachedSnapshot = avmedia::MediaWindow::grabFrame( aRealURL, m_pImpl->m_MediaProperties.getReferer(), m_pImpl->m_MediaProperties.getMimeType()); + aRealURL = m_xImpl->m_MediaProperties.getURL(); + m_xImpl->m_xCachedSnapshot = avmedia::MediaWindow::grabFrame( aRealURL, m_xImpl->m_MediaProperties.getReferer(), m_xImpl->m_MediaProperties.getMimeType()); } - return m_pImpl->m_xCachedSnapshot; + return m_xImpl->m_xCachedSnapshot; } void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /* = false */ ) @@ -235,14 +235,14 @@ void SdrMediaObj::setURL( const OUString& rURL, const OUString& rReferer, const { ::avmedia::MediaItem aURLItem; if( !rMimeType.isEmpty() ) - m_pImpl->m_MediaProperties.setMimeType(rMimeType); + m_xImpl->m_MediaProperties.setMimeType(rMimeType); aURLItem.setURL( rURL, "", rReferer ); setMediaProperties( aURLItem ); } const OUString& SdrMediaObj::getURL() const { - return m_pImpl->m_MediaProperties.getURL(); + return m_xImpl->m_MediaProperties.getURL(); } void SdrMediaObj::setMediaProperties( const ::avmedia::MediaItem& rState ) @@ -253,7 +253,7 @@ void SdrMediaObj::setMediaProperties( const ::avmedia::MediaItem& rState ) const ::avmedia::MediaItem& SdrMediaObj::getMediaProperties() const { - return m_pImpl->m_MediaProperties; + return m_xImpl->m_MediaProperties; } Size SdrMediaObj::getPreferredSize() const @@ -263,12 +263,12 @@ Size SdrMediaObj::getPreferredSize() const uno::Reference<io::XInputStream> SdrMediaObj::GetInputStream() { - if (!m_pImpl->m_pTempFile) + if (!m_xImpl->m_pTempFile) { SAL_WARN("svx", "this is only intended for embedded media"); return 0; } - ucbhelper::Content tempFile(m_pImpl->m_pTempFile->m_TempFileURL, + ucbhelper::Content tempFile(m_xImpl->m_pTempFile->m_TempFileURL, uno::Reference<ucb::XCommandEnvironment>(), comphelper::getProcessComponentContext()); return tempFile.openStream(); @@ -367,7 +367,7 @@ static bool lcl_CopyToTempFile( void SdrMediaObj::SetInputStream(uno::Reference<io::XInputStream> const& xStream) { - if (m_pImpl->m_pTempFile || m_pImpl->m_LastFailedPkgURL.isEmpty()) + if (m_xImpl->m_pTempFile || m_xImpl->m_LastFailedPkgURL.isEmpty()) { SAL_WARN("svx", "this is only intended for embedded media"); return; @@ -376,11 +376,11 @@ void SdrMediaObj::SetInputStream(uno::Reference<io::XInputStream> const& xStream bool const bSuccess = lcl_CopyToTempFile(xStream, tempFileURL); if (bSuccess) { - m_pImpl->m_pTempFile.reset(new MediaTempFile(tempFileURL, "")); - m_pImpl->m_MediaProperties.setURL( - m_pImpl->m_LastFailedPkgURL, tempFileURL, ""); + m_xImpl->m_pTempFile.reset(new MediaTempFile(tempFileURL, "")); + m_xImpl->m_MediaProperties.setURL( + m_xImpl->m_LastFailedPkgURL, tempFileURL, ""); } - m_pImpl->m_LastFailedPkgURL.clear(); // once only + m_xImpl->m_LastFailedPkgURL.clear(); // once only } /// copy a stream from XStorage to temp file @@ -424,17 +424,17 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper // use only a subset of MediaItem properties for own own properties if( AVMEDIA_SETMASK_MIME_TYPE & nMaskSet ) - m_pImpl->m_MediaProperties.setMimeType( rNewProperties.getMimeType() ); + m_xImpl->m_MediaProperties.setMimeType( rNewProperties.getMimeType() ); if( ( AVMEDIA_SETMASK_URL & nMaskSet ) && ( rNewProperties.getURL() != getURL() )) { - m_pImpl->m_xCachedSnapshot.clear(); + m_xImpl->m_xCachedSnapshot.clear(); OUString const url(rNewProperties.getURL()); if (url.startsWithIgnoreAsciiCase("vnd.sun.star.Package:")) { - if ( !m_pImpl->m_pTempFile - || (m_pImpl->m_pTempFile->m_TempFileURL != + if ( !m_xImpl->m_pTempFile + || (m_xImpl->m_pTempFile->m_TempFileURL != rNewProperties.getTempURL())) { OUString tempFileURL; @@ -448,44 +448,44 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper bSuccess = lcl_HandlePackageURL(url, GetModel(), tempFileURL); if (bSuccess) { - m_pImpl->m_pTempFile.reset( + m_xImpl->m_pTempFile.reset( new MediaTempFile(tempFileURL, tempDirURL)); - m_pImpl->m_MediaProperties.setURL(url, tempFileURL, ""); + m_xImpl->m_MediaProperties.setURL(url, tempFileURL, ""); } else // this case is for Clone via operator= { - m_pImpl->m_pTempFile.reset(); - m_pImpl->m_MediaProperties.setURL("", "", ""); + m_xImpl->m_pTempFile.reset(); + m_xImpl->m_MediaProperties.setURL("", "", ""); // UGLY: oox import also gets here, because unlike ODF // getDocumentStorage() is not the imported file... - m_pImpl->m_LastFailedPkgURL = url; + m_xImpl->m_LastFailedPkgURL = url; } } else { - m_pImpl->m_MediaProperties.setURL(url, + m_xImpl->m_MediaProperties.setURL(url, rNewProperties.getTempURL(), ""); } } else { - m_pImpl->m_pTempFile.reset(); - m_pImpl->m_MediaProperties.setURL(url, "", rNewProperties.getReferer()); + m_xImpl->m_pTempFile.reset(); + m_xImpl->m_MediaProperties.setURL(url, "", rNewProperties.getReferer()); } bBroadcastChanged = true; } if( AVMEDIA_SETMASK_LOOP & nMaskSet ) - m_pImpl->m_MediaProperties.setLoop( rNewProperties.isLoop() ); + m_xImpl->m_MediaProperties.setLoop( rNewProperties.isLoop() ); if( AVMEDIA_SETMASK_MUTE & nMaskSet ) - m_pImpl->m_MediaProperties.setMute( rNewProperties.isMute() ); + m_xImpl->m_MediaProperties.setMute( rNewProperties.isMute() ); if( AVMEDIA_SETMASK_VOLUMEDB & nMaskSet ) - m_pImpl->m_MediaProperties.setVolumeDB( rNewProperties.getVolumeDB() ); + m_xImpl->m_MediaProperties.setVolumeDB( rNewProperties.getVolumeDB() ); if( AVMEDIA_SETMASK_ZOOM & nMaskSet ) - m_pImpl->m_MediaProperties.setZoom( rNewProperties.getZoom() ); + m_xImpl->m_MediaProperties.setZoom( rNewProperties.getZoom() ); if( bBroadcastChanged ) { diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index fedc9de7b736..51204177543e 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -75,7 +75,7 @@ TYPEINIT0(SdrObjList); SdrObjList::SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewUpList): maList(), - mpNavigationOrder(), + mxNavigationOrder(), mbIsNavigationOrderDirty(false) { maList.reserve(InitialObjectContainerCapacity); @@ -90,7 +90,7 @@ SdrObjList::SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewU SdrObjList::SdrObjList(): maList(), - mpNavigationOrder(), + mxNavigationOrder(), mbIsNavigationOrderDirty(false) { maList.reserve(InitialObjectContainerCapacity); @@ -766,7 +766,7 @@ void SdrObjList::UnGroupObj( size_t nObjNum ) bool SdrObjList::HasObjectNavigationOrder (void) const { - return mpNavigationOrder.get() != NULL; + return mxNavigationOrder.get() != NULL; } @@ -779,43 +779,43 @@ void SdrObjList::SetObjectNavigationPosition ( // When the navigation order container has not yet been created then // create one now. It is initialized with the z-order taken from // maList. - if (mpNavigationOrder.get() == NULL) + if (mxNavigationOrder.get() == NULL) { - mpNavigationOrder.reset(new WeakSdrObjectContainerType(maList.size())); + mxNavigationOrder.reset(new WeakSdrObjectContainerType(maList.size())); ::std::copy( maList.begin(), maList.end(), - mpNavigationOrder->begin()); + mxNavigationOrder->begin()); } - OSL_ASSERT(mpNavigationOrder.get()!=NULL); - OSL_ASSERT( mpNavigationOrder->size() == maList.size()); + OSL_ASSERT(mxNavigationOrder.get()!=NULL); + OSL_ASSERT( mxNavigationOrder->size() == maList.size()); SdrObjectWeakRef aReference (&rObject); // Look up the object whose navigation position is to be changed. WeakSdrObjectContainerType::iterator iObject (::std::find( - mpNavigationOrder->begin(), - mpNavigationOrder->end(), + mxNavigationOrder->begin(), + mxNavigationOrder->end(), aReference)); - if (iObject == mpNavigationOrder->end()) + if (iObject == mxNavigationOrder->end()) { // The given object is not a member of the navigation order. return; } // Move the object to its new position. - const sal_uInt32 nOldPosition = ::std::distance(mpNavigationOrder->begin(), iObject); + const sal_uInt32 nOldPosition = ::std::distance(mxNavigationOrder->begin(), iObject); if (nOldPosition != nNewPosition) { - mpNavigationOrder->erase(iObject); + mxNavigationOrder->erase(iObject); sal_uInt32 nInsertPosition (nNewPosition); // Adapt insertion position for the just erased object. if (nNewPosition >= nOldPosition) nInsertPosition -= 1; - if (nInsertPosition >= mpNavigationOrder->size()) - mpNavigationOrder->push_back(aReference); + if (nInsertPosition >= mxNavigationOrder->size()) + mxNavigationOrder->push_back(aReference); else - mpNavigationOrder->insert(mpNavigationOrder->begin()+nInsertPosition, aReference); + mxNavigationOrder->insert(mxNavigationOrder->begin()+nInsertPosition, aReference); mbIsNavigationOrderDirty = true; @@ -833,13 +833,13 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat if (HasObjectNavigationOrder()) { // There is a user defined navigation order. Make sure the object - // index is correct and look up the object in mpNavigationOrder. - if (nNavigationPosition >= mpNavigationOrder->size()) + // index is correct and look up the object in mxNavigationOrder. + if (nNavigationPosition >= mxNavigationOrder->size()) { - OSL_ASSERT(nNavigationPosition < mpNavigationOrder->size()); + OSL_ASSERT(nNavigationPosition < mxNavigationOrder->size()); } else - return (*mpNavigationOrder)[nNavigationPosition].get(); + return (*mxNavigationOrder)[nNavigationPosition].get(); } else { @@ -860,7 +860,7 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat void SdrObjList::ClearObjectNavigationOrder (void) { - mpNavigationOrder.reset(); + mxNavigationOrder.reset(); mbIsNavigationOrderDirty = true; } @@ -871,19 +871,19 @@ bool SdrObjList::RecalcNavigationPositions (void) { if (mbIsNavigationOrderDirty) { - if (mpNavigationOrder.get() != NULL) + if (mxNavigationOrder.get() != NULL) { mbIsNavigationOrderDirty = false; WeakSdrObjectContainerType::iterator iObject; - WeakSdrObjectContainerType::const_iterator iEnd (mpNavigationOrder->end()); + WeakSdrObjectContainerType::const_iterator iEnd (mxNavigationOrder->end()); sal_uInt32 nIndex (0); - for (iObject=mpNavigationOrder->begin(); iObject!=iEnd; ++iObject,++nIndex) + for (iObject=mxNavigationOrder->begin(); iObject!=iEnd; ++iObject,++nIndex) (*iObject)->SetNavigationPosition(nIndex); } } - return mpNavigationOrder.get() != NULL; + return mxNavigationOrder.get() != NULL; } @@ -897,8 +897,8 @@ void SdrObjList::SetNavigationOrder (const uno::Reference<container::XIndexAcces if ((sal_uInt32)nCount != maList.size()) return; - if (mpNavigationOrder.get() == NULL) - mpNavigationOrder.reset(new WeakSdrObjectContainerType(nCount)); + if (mxNavigationOrder.get() == NULL) + mxNavigationOrder.reset(new WeakSdrObjectContainerType(nCount)); for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex) { @@ -906,7 +906,7 @@ void SdrObjList::SetNavigationOrder (const uno::Reference<container::XIndexAcces SdrObject* pObject = SdrObject::getSdrObjectFromXShape(xShape); if (pObject == NULL) break; - (*mpNavigationOrder)[nIndex] = pObject; + (*mxNavigationOrder)[nIndex] = pObject; } mbIsNavigationOrderDirty = true; @@ -929,8 +929,8 @@ void SdrObjList::InsertObjectIntoContainer ( { // The new object does not have a user defined position so append it // to the list. - rObject.SetNavigationPosition(mpNavigationOrder->size()); - mpNavigationOrder->push_back(&rObject); + rObject.SetNavigationPosition(mxNavigationOrder->size()); + mxNavigationOrder->push_back(&rObject); } // Insert object into object list. Because the insert() method requires @@ -965,13 +965,13 @@ void SdrObjList::ReplaceObjectInContainer ( OSL_ASSERT(nObjectPosition < maList.size()); SdrObjectWeakRef aReference (maList[nObjectPosition]); WeakSdrObjectContainerType::iterator iObject (::std::find( - mpNavigationOrder->begin(), - mpNavigationOrder->end(), + mxNavigationOrder->begin(), + mxNavigationOrder->end(), aReference)); - if (iObject != mpNavigationOrder->end()) - mpNavigationOrder->erase(iObject); + if (iObject != mxNavigationOrder->end()) + mxNavigationOrder->erase(iObject); - mpNavigationOrder->push_back(&rNewObject); + mxNavigationOrder->push_back(&rNewObject); mbIsNavigationOrderDirty = true; } @@ -997,11 +997,11 @@ void SdrObjList::RemoveObjectFromContainer ( { SdrObjectWeakRef aReference (maList[nObjectPosition]); WeakSdrObjectContainerType::iterator iObject (::std::find( - mpNavigationOrder->begin(), - mpNavigationOrder->end(), + mxNavigationOrder->begin(), + mxNavigationOrder->end(), aReference)); - if (iObject != mpNavigationOrder->end()) - mpNavigationOrder->erase(iObject); + if (iObject != mxNavigationOrder->end()) + mxNavigationOrder->erase(iObject); mbIsNavigationOrderDirty = true; } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 57a960290645..ff96a359b0cd 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2482,8 +2482,8 @@ SvxColorToolBoxControl::SvxColorToolBoxControl( else rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) ); - pBtnUpdater.reset( new ::svx::ToolboxButtonColorUpdater( nSlotId, nId, &GetToolBox() ) ); - mPaletteManager.SetBtnUpdater( pBtnUpdater.get() ); + m_xBtnUpdater.reset( new ::svx::ToolboxButtonColorUpdater( nSlotId, nId, &GetToolBox() ) ); + mPaletteManager.SetBtnUpdater( m_xBtnUpdater.get() ); } SvxColorToolBoxControl::~SvxColorToolBoxControl() @@ -2545,7 +2545,7 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow() IMPL_LINK(SvxColorToolBoxControl, SelectedHdl, Color*, pColor) { - pBtnUpdater->Update( *pColor ); + m_xBtnUpdater->Update( *pColor ); mPaletteManager.SetLastColor( *pColor ); return 0; } @@ -2575,7 +2575,7 @@ void SvxColorToolBoxControl::StateChanged( else if ( pState->ISA( XFillColorItem ) ) aColor = static_cast< const XFillColorItem* >(pState)->GetColorValue(); } - pBtnUpdater->Update( aColor ); + m_xBtnUpdater->Update( aColor ); } } diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index 2b544919ea98..3c77117e6116 100644 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -298,7 +298,7 @@ namespace toolkit AnimatedImagesPeer::AnimatedImagesPeer() :AnimatedImagesPeer_Base() - ,m_pData( new AnimatedImagesPeer_Data( *this ) ) + ,m_xData( new AnimatedImagesPeer_Data( *this ) ) { } @@ -425,7 +425,7 @@ namespace toolkit switch ( i_windowEvent.GetId() ) { case VCLEVENT_WINDOW_RESIZE: - lcl_updateImageList_nothrow( *m_pData ); + lcl_updateImageList_nothrow( *m_xData ); break; } @@ -437,7 +437,7 @@ namespace toolkit { SolarMutexGuard aGuard; - lcl_updateImageList_nothrow( *m_pData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) ); + lcl_updateImageList_nothrow( *m_xData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) ); } @@ -449,18 +449,18 @@ namespace toolkit sal_Int32 nPosition(0); OSL_VERIFY( i_event.Accessor >>= nPosition ); size_t position = size_t( nPosition ); - if ( position > m_pData->aCachedImageSets.size() ) + if ( position > m_xData->aCachedImageSets.size() ) { OSL_ENSURE( false, "AnimatedImagesPeer::elementInserted: illegal accessor/index!" ); - lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + lcl_updateImageList_nothrow( *m_xData, xAnimatedImages ); } Sequence< OUString > aImageURLs; OSL_VERIFY( i_event.Element >>= aImageURLs ); ::std::vector< CachedImage > aImages; lcl_init( aImageURLs, aImages ); - m_pData->aCachedImageSets.insert( m_pData->aCachedImageSets.begin() + position, aImages ); - lcl_updateImageList_nothrow( *m_pData ); + m_xData->aCachedImageSets.insert( m_xData->aCachedImageSets.begin() + position, aImages ); + lcl_updateImageList_nothrow( *m_xData ); } @@ -472,14 +472,14 @@ namespace toolkit sal_Int32 nPosition(0); OSL_VERIFY( i_event.Accessor >>= nPosition ); size_t position = size_t( nPosition ); - if ( position >= m_pData->aCachedImageSets.size() ) + if ( position >= m_xData->aCachedImageSets.size() ) { OSL_ENSURE( false, "AnimatedImagesPeer::elementRemoved: illegal accessor/index!" ); - lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + lcl_updateImageList_nothrow( *m_xData, xAnimatedImages ); } - m_pData->aCachedImageSets.erase( m_pData->aCachedImageSets.begin() + position ); - lcl_updateImageList_nothrow( *m_pData ); + m_xData->aCachedImageSets.erase( m_xData->aCachedImageSets.begin() + position ); + lcl_updateImageList_nothrow( *m_xData ); } @@ -491,18 +491,18 @@ namespace toolkit sal_Int32 nPosition(0); OSL_VERIFY( i_event.Accessor >>= nPosition ); size_t position = size_t( nPosition ); - if ( position >= m_pData->aCachedImageSets.size() ) + if ( position >= m_xData->aCachedImageSets.size() ) { OSL_ENSURE( false, "AnimatedImagesPeer::elementReplaced: illegal accessor/index!" ); - lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + lcl_updateImageList_nothrow( *m_xData, xAnimatedImages ); } Sequence< OUString > aImageURLs; OSL_VERIFY( i_event.Element >>= aImageURLs ); ::std::vector< CachedImage > aImages; lcl_init( aImageURLs, aImages ); - m_pData->aCachedImageSets[ position ] = aImages; - lcl_updateImageList_nothrow( *m_pData ); + m_xData->aCachedImageSets[ position ] = aImages; + lcl_updateImageList_nothrow( *m_xData ); } @@ -522,7 +522,7 @@ namespace toolkit { AnimatedImagesPeer_Base::dispose(); SolarMutexGuard aGuard; - m_pData->aCachedImageSets.resize(0); + m_xData->aCachedImageSets.resize(0); } diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx index 60a10c66cbe4..97fd0166a32c 100644 --- a/toolkit/source/controls/animatedimages.cxx +++ b/toolkit/source/controls/animatedimages.cxx @@ -37,8 +37,6 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase2.hxx> -#include <boost/scoped_ptr.hpp> - #include "helper/unopropertyarrayhelper.hxx" using namespace css::awt; @@ -245,7 +243,7 @@ namespace toolkit { AnimatedImagesControlModel::AnimatedImagesControlModel( Reference< com::sun::star::uno::XComponentContext > const & i_factory ) :AnimatedImagesControlModel_Base( i_factory ) - ,m_pData( new AnimatedImagesControlModel_Data ) + ,m_xData( new AnimatedImagesControlModel_Data ) { ImplRegisterProperty( BASEPROPERTY_AUTO_REPEAT ); ImplRegisterProperty( BASEPROPERTY_BORDER ); @@ -262,7 +260,7 @@ namespace toolkit { AnimatedImagesControlModel::AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource ) :AnimatedImagesControlModel_Base( i_copySource ) - ,m_pData( new AnimatedImagesControlModel_Data( *i_copySource.m_pData ) ) + ,m_xData( new AnimatedImagesControlModel_Data( *i_copySource.m_xData ) ) { } @@ -412,7 +410,7 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - return m_pData->aImageSets.size(); + return m_xData->aImageSets.size(); } @@ -422,9 +420,9 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - lcl_checkIndex( *m_pData, i_index, *this ); + lcl_checkIndex( *m_xData, i_index, *this ); - return m_pData->aImageSets[ i_index ]; + return m_xData->aImageSets[ i_index ]; } @@ -435,10 +433,10 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - lcl_checkIndex( *m_pData, i_index, *this, true ); + lcl_checkIndex( *m_xData, i_index, *this, true ); // actaul insertion - m_pData->aImageSets.insert( m_pData->aImageSets.begin() + i_index, i_imageURLs ); + m_xData->aImageSets.insert( m_xData->aImageSets.begin() + i_index, i_imageURLs ); // listener notification lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementInserted, i_index, i_imageURLs, *this ); @@ -452,10 +450,10 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - lcl_checkIndex( *m_pData, i_index, *this ); + lcl_checkIndex( *m_xData, i_index, *this ); // actaul insertion - m_pData->aImageSets[ i_index ] = i_imageURLs; + m_xData->aImageSets[ i_index ] = i_imageURLs; // listener notification lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementReplaced, i_index, i_imageURLs, *this ); @@ -469,12 +467,12 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - lcl_checkIndex( *m_pData, i_index, *this ); + lcl_checkIndex( *m_xData, i_index, *this ); // actual removal - ::std::vector< Sequence< OUString > >::iterator removalPos = m_pData->aImageSets.begin() + i_index; + ::std::vector< Sequence< OUString > >::iterator removalPos = m_xData->aImageSets.begin() + i_index; Sequence< OUString > aRemovedElement( *removalPos ); - m_pData->aImageSets.erase( removalPos ); + m_xData->aImageSets.erase( removalPos ); // listener notification lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementRemoved, i_index, aRemovedElement, *this ); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 4d5636e115c9..8c8ec5f51553 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1990,7 +1990,7 @@ private: UnoControlListBoxModel::UnoControlListBoxModel( const Reference< XComponentContext >& rxContext, ConstructorMode const i_mode ) :UnoControlListBoxModel_Base( rxContext ) - ,m_pData( new UnoControlListBoxModel_Data( *this ) ) + ,m_xData( new UnoControlListBoxModel_Data( *this ) ) ,m_aItemListListeners( GetMutex() ) { if ( i_mode == ConstructDefault ) @@ -2001,10 +2001,10 @@ UnoControlListBoxModel::UnoControlListBoxModel( const Reference< XComponentConte UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource ) :UnoControlListBoxModel_Base( i_rSource ) - ,m_pData( new UnoControlListBoxModel_Data( *this ) ) + ,m_xData( new UnoControlListBoxModel_Data( *this ) ) ,m_aItemListListeners( GetMutex() ) { - m_pData->copyItems( *i_rSource.m_pData ); + m_xData->copyItems( *i_rSource.m_xData ); } UnoControlListBoxModel::~UnoControlListBoxModel() { @@ -2073,7 +2073,7 @@ void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int3 aAny <<= aSeq; setDependentFastPropertyValue( BASEPROPERTY_SELECTEDITEMS, aAny ); - if ( !m_pData->m_bSettingLegacyProperty ) + if ( !m_xData->m_bSettingLegacyProperty ) { // synchronize the legacy StringItemList property with our list items Sequence< OUString > aStringItemList; @@ -2088,7 +2088,7 @@ void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int3 aItems.begin(), CreateListItem() ); - m_pData->setAllItems( aItems ); + m_xData->setAllItems( aItems ); // since an XItemListListener does not have a "all items modified" or some such method, // we simulate this by notifying removal of all items, followed by insertion of all new @@ -2117,7 +2117,7 @@ void UnoControlListBoxModel::ImplNormalizePropertySequence( const sal_Int32 _nCo ::sal_Int32 SAL_CALL UnoControlListBoxModel::getItemCount() throw (RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - return m_pData->getItemCount(); + return m_xData->getItemCount(); } @@ -2125,7 +2125,7 @@ void SAL_CALL UnoControlListBoxModel::insertItem( ::sal_Int32 i_nPosition, const { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + ListItem& rItem( m_xData->insertItem( i_nPosition ) ); rItem.ItemText = i_rItemText; rItem.ItemImageURL = i_rItemImageURL; @@ -2138,7 +2138,7 @@ void SAL_CALL UnoControlListBoxModel::insertItemText( ::sal_Int32 i_nPosition, c { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + ListItem& rItem( m_xData->insertItem( i_nPosition ) ); rItem.ItemText = i_rItemText; impl_handleInsert( i_nPosition, i_rItemText, ::boost::optional< OUString >(), aGuard ); @@ -2150,7 +2150,7 @@ void SAL_CALL UnoControlListBoxModel::insertItemImage( ::sal_Int32 i_nPosition, { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + ListItem& rItem( m_xData->insertItem( i_nPosition ) ); rItem.ItemImageURL = i_rItemImageURL; impl_handleInsert( i_nPosition, ::boost::optional< OUString >(), i_rItemImageURL, aGuard ); @@ -2162,7 +2162,7 @@ void SAL_CALL UnoControlListBoxModel::removeItem( ::sal_Int32 i_nPosition ) thro { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - m_pData->removeItem( i_nPosition ); + m_xData->removeItem( i_nPosition ); impl_handleRemove( i_nPosition, aGuard ); // <----- SYNCHRONIZED @@ -2173,7 +2173,7 @@ void SAL_CALL UnoControlListBoxModel::removeAllItems( ) throw (::com::sun::star { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - m_pData->removeAllItems(); + m_xData->removeAllItems(); impl_handleRemove( -1, aGuard ); // <----- SYNCHRONIZED @@ -2184,7 +2184,7 @@ void SAL_CALL UnoControlListBoxModel::setItemText( ::sal_Int32 i_nPosition, cons { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->getItem( i_nPosition ) ); + ListItem& rItem( m_xData->getItem( i_nPosition ) ); rItem.ItemText = i_rItemText; impl_handleModify( i_nPosition, i_rItemText, ::boost::optional< OUString >(), aGuard ); @@ -2196,7 +2196,7 @@ void SAL_CALL UnoControlListBoxModel::setItemImage( ::sal_Int32 i_nPosition, con { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->getItem( i_nPosition ) ); + ListItem& rItem( m_xData->getItem( i_nPosition ) ); rItem.ItemImageURL = i_rItemImageURL; impl_handleModify( i_nPosition, ::boost::optional< OUString >(), i_rItemImageURL, aGuard ); @@ -2208,7 +2208,7 @@ void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPositi { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->getItem( i_nPosition ) ); + ListItem& rItem( m_xData->getItem( i_nPosition ) ); rItem.ItemText = i_rItemText; rItem.ItemImageURL = i_rItemImageURL; @@ -2220,7 +2220,7 @@ void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPositi void SAL_CALL UnoControlListBoxModel::setItemData( ::sal_Int32 i_nPosition, const Any& i_rDataValue ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); - ListItem& rItem( m_pData->getItem( i_nPosition ) ); + ListItem& rItem( m_xData->getItem( i_nPosition ) ); rItem.ItemData = i_rDataValue; } @@ -2228,7 +2228,7 @@ void SAL_CALL UnoControlListBoxModel::setItemData( ::sal_Int32 i_nPosition, cons OUString SAL_CALL UnoControlListBoxModel::getItemText( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + const ListItem& rItem( m_xData->getItem( i_nPosition ) ); return rItem.ItemText; } @@ -2236,7 +2236,7 @@ OUString SAL_CALL UnoControlListBoxModel::getItemText( ::sal_Int32 i_nPosition ) OUString SAL_CALL UnoControlListBoxModel::getItemImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + const ListItem& rItem( m_xData->getItem( i_nPosition ) ); return rItem.ItemImageURL; } @@ -2244,7 +2244,7 @@ OUString SAL_CALL UnoControlListBoxModel::getItemImage( ::sal_Int32 i_nPosition beans::Pair< OUString, OUString > SAL_CALL UnoControlListBoxModel::getItemTextAndImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + const ListItem& rItem( m_xData->getItem( i_nPosition ) ); return beans::Pair< OUString, OUString >( rItem.ItemText, rItem.ItemImageURL ); } @@ -2252,7 +2252,7 @@ beans::Pair< OUString, OUString > SAL_CALL UnoControlListBoxModel::getItemTextAn Any SAL_CALL UnoControlListBoxModel::getItemData( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); - const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + const ListItem& rItem( m_xData->getItem( i_nPosition ) ); return rItem.ItemData; } @@ -2260,7 +2260,7 @@ Any SAL_CALL UnoControlListBoxModel::getItemData( ::sal_Int32 i_nPosition ) thro Sequence< beans::Pair< OUString, OUString > > SAL_CALL UnoControlListBoxModel::getAllItems( ) throw (RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - return m_pData->getAllItems(); + return m_xData->getAllItems(); } @@ -2302,17 +2302,17 @@ void UnoControlListBoxModel::impl_setStringItemList_nolck( const ::std::vector< i_rStringItems.end(), aStringItems.getArray() ); - m_pData->m_bSettingLegacyProperty = true; + m_xData->m_bSettingLegacyProperty = true; try { setFastPropertyValue( BASEPROPERTY_STRINGITEMLIST, uno::makeAny( aStringItems ) ); } catch( const Exception& ) { - m_pData->m_bSettingLegacyProperty = false; + m_xData->m_bSettingLegacyProperty = false; throw; } - m_pData->m_bSettingLegacyProperty = false; + m_xData->m_bSettingLegacyProperty = false; } @@ -2905,7 +2905,7 @@ void SAL_CALL UnoControlComboBoxModel::setFastPropertyValue_NoBroadcast( sal_Int { UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue ); - if ( nHandle == BASEPROPERTY_STRINGITEMLIST && !m_pData->m_bSettingLegacyProperty) + if ( nHandle == BASEPROPERTY_STRINGITEMLIST && !m_xData->m_bSettingLegacyProperty) { // synchronize the legacy StringItemList property with our list items Sequence< OUString > aStringItemList; @@ -2920,7 +2920,7 @@ void SAL_CALL UnoControlComboBoxModel::setFastPropertyValue_NoBroadcast( sal_Int aItems.begin(), CreateListItem() ); - m_pData->setAllItems( aItems ); + m_xData->setAllItems( aItems ); // since an XItemListListener does not have a "all items modified" or some such method, // we simulate this by notifying removal of all items, followed by insertion of all new diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx index fd1f65749fea..fca529632017 100644 --- a/unotools/source/config/useroptions.cxx +++ b/unotools/source/config/useroptions.cxx @@ -70,7 +70,7 @@ const sal_uInt16 nOptionNameCount = SAL_N_ELEMENTS(vOptionNames); } // namespace -boost::weak_ptr<SvtUserOptions::Impl> SvtUserOptions::pSharedImpl; +std::weak_ptr<SvtUserOptions::Impl> SvtUserOptions::xSharedImpl; class SvtUserOptions::ChangeListener : public cppu::WeakImplHelper1<util::XChangesListener> { @@ -254,21 +254,21 @@ SvtUserOptions::SvtUserOptions () // Global access, must be guarded (multithreading) osl::MutexGuard aGuard(GetInitMutex()); - if (pSharedImpl.expired()) + if (xSharedImpl.expired()) { - pImpl.reset(new Impl); - pSharedImpl = pImpl; + xImpl.reset(new Impl); + xSharedImpl = xImpl; ItemHolder1::holdConfigItem(E_USEROPTIONS); } - pImpl = pSharedImpl.lock(); - pImpl->AddListener(this); + xImpl = xSharedImpl.lock(); + xImpl->AddListener(this); } SvtUserOptions::~SvtUserOptions() { // Global access, must be guarded (multithreading) osl::MutexGuard aGuard( GetInitMutex() ); - pImpl->RemoveListener(this); + xImpl->RemoveListener(this); } namespace @@ -300,25 +300,25 @@ OUString SvtUserOptions::GetEmail () const { return GetToken(USER_OPT_E bool SvtUserOptions::IsTokenReadonly (sal_uInt16 nToken) const { osl::MutexGuard aGuard(GetInitMutex()); - return pImpl->IsTokenReadonly(nToken); + return xImpl->IsTokenReadonly(nToken); } OUString SvtUserOptions::GetToken (sal_uInt16 nToken) const { osl::MutexGuard aGuard(GetInitMutex()); - return pImpl->GetToken(nToken); + return xImpl->GetToken(nToken); } void SvtUserOptions::SetToken (sal_uInt16 nToken, OUString const& rNewToken) { osl::MutexGuard aGuard(GetInitMutex()); - pImpl->SetToken(nToken, rNewToken); + xImpl->SetToken(nToken, rNewToken); } OUString SvtUserOptions::GetFullName () const { osl::MutexGuard aGuard(GetInitMutex()); - return pImpl->GetFullName(); + return xImpl->GetFullName(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 26a3b31b5487..e1239e837d01 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -468,7 +468,7 @@ void LocaleDataWrapper::getDefaultCalendarImpl() } } -const ::boost::shared_ptr< ::com::sun::star::i18n::Calendar2 > LocaleDataWrapper::getDefaultCalendar() const +const std::shared_ptr< ::com::sun::star::i18n::Calendar2 > LocaleDataWrapper::getDefaultCalendar() const { ::utl::ReadWriteGuard aGuard( aMutex ); if (!xDefaultCalendar) diff --git a/unotools/source/misc/atom.cxx b/unotools/source/misc/atom.cxx index 5adcbdcea009..85ddad4d23a9 100644 --- a/unotools/source/misc/atom.cxx +++ b/unotools/source/misc/atom.cxx @@ -48,7 +48,7 @@ int AtomProvider::getAtom( const OUString& rString, bool bCreate ) const OUString& AtomProvider::getString( int nAtom ) const { static OUString aEmpty; - std::unordered_map< int, OUString, ::boost::hash< int > >::const_iterator it = m_aStringMap.find( nAtom ); + std::unordered_map<int, OUString>::const_iterator it = m_aStringMap.find( nAtom ); return it == m_aStringMap.end() ? aEmpty : it->second; } @@ -59,13 +59,13 @@ MultiAtomProvider::MultiAtomProvider() MultiAtomProvider::~MultiAtomProvider() { - for( std::unordered_map< int, AtomProvider*, ::boost::hash< int > >::iterator it = m_aAtomLists.begin(); it != m_aAtomLists.end(); ++it ) + for( std::unordered_map<int, AtomProvider*>::iterator it = m_aAtomLists.begin(); it != m_aAtomLists.end(); ++it ) delete it->second; } int MultiAtomProvider::getAtom( int atomClass, const OUString& rString, bool bCreate ) { - std::unordered_map< int, AtomProvider*, ::boost::hash< int > >::iterator it = + std::unordered_map<int, AtomProvider*>::iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) return it->second->getAtom( rString, bCreate ); @@ -81,7 +81,7 @@ int MultiAtomProvider::getAtom( int atomClass, const OUString& rString, bool bCr const OUString& MultiAtomProvider::getString( int atomClass, int atom ) const { - std::unordered_map< int, AtomProvider*, ::boost::hash< int > >::const_iterator it = + std::unordered_map<int, AtomProvider*>::const_iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) return it->second->getString( atom ); diff --git a/unotools/source/misc/closeveto.cxx b/unotools/source/misc/closeveto.cxx index 4044fa775e4b..290a18cb715f 100644 --- a/unotools/source/misc/closeveto.cxx +++ b/unotools/source/misc/closeveto.cxx @@ -138,16 +138,15 @@ namespace utl } //= CloseVeto - CloseVeto::CloseVeto( const Reference< XInterface >& i_closeable ) - :m_pData( new CloseVeto_Data ) + : m_xData(new CloseVeto_Data) { - lcl_init( *m_pData, i_closeable ); + lcl_init(*m_xData, i_closeable); } CloseVeto::~CloseVeto() { - lcl_deinit( *m_pData ); + lcl_deinit(*m_xData); } } // namespace utl diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx index edc6035bf0af..8504ef083c39 100644 --- a/vcl/generic/fontmanager/fontconfig.cxx +++ b/vcl/generic/fontmanager/fontconfig.cxx @@ -782,7 +782,7 @@ namespace OString mapToFontConfigLangTag(const LanguageTag &rLangTag) { #if defined(FC_VERSION) && (FC_VERSION >= 20492) - boost::shared_ptr<FcStrSet> xLangSet(FcGetLangs(), FcStrSetDestroy); + std::shared_ptr<FcStrSet> xLangSet(FcGetLangs(), FcStrSetDestroy); OString sLangAttrib; sLangAttrib = OUStringToOString(rLangTag.getBcp47(), RTL_TEXTENCODING_UTF8).toAsciiLowerCase(); diff --git a/vcl/generic/print/bitmap_gfx.cxx b/vcl/generic/print/bitmap_gfx.cxx index dc6997de92a2..2811da8a2d8e 100644 --- a/vcl/generic/print/bitmap_gfx.cxx +++ b/vcl/generic/print/bitmap_gfx.cxx @@ -22,8 +22,6 @@ #include "generic/printergfx.hxx" #include "vcl/strhelper.hxx" -#include <boost/scoped_ptr.hpp> - namespace psp { const sal_uInt32 nLineLength = 80; @@ -492,18 +490,18 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) WritePS (mpPageBody, pGrayImage); // image body - boost::scoped_ptr<HexEncoder> pEncoder(new HexEncoder (mpPageBody)); + std::unique_ptr<HexEncoder> xEncoder(new HexEncoder (mpPageBody)); for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) { for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { unsigned char nByte = rBitmap.GetPixelGray (nRow, nColumn); - pEncoder->EncodeByte (nByte); + xEncoder->EncodeByte (nByte); } } - pEncoder.reset(); + xEncoder.reset(); WritePS (mpPageBody, "\n"); } @@ -575,17 +573,17 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType) nChar += psp::appendStr ("\npsp_ascii85string\n", pImage + nChar); WritePS (mpPageBody, pImage); - boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) + std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) : new Ascii85Encoder(mpPageBody)); for (sal_uInt32 i = 0; i < nSize; i++) { PrinterColor aColor = rBitmap.GetPaletteColor(i); - pEncoder->EncodeByte (aColor.GetRed()); - pEncoder->EncodeByte (aColor.GetGreen()); - pEncoder->EncodeByte (aColor.GetBlue()); + xEncoder->EncodeByte (aColor.GetRed()); + xEncoder->EncodeByte (aColor.GetGreen()); + xEncoder->EncodeByte (aColor.GetBlue()); } - pEncoder.reset(); + xEncoder.reset(); WritePS (mpPageBody, "pop ] setcolorspace\n"); } @@ -600,7 +598,7 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) writePS2Colorspace(rBitmap, psp::GrayScaleImage); writePS2ImageHeader(rArea, psp::GrayScaleImage); - boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) + std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) : new Ascii85Encoder(mpPageBody)); for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) @@ -608,7 +606,7 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { unsigned char nByte = rBitmap.GetPixelGray (nRow, nColumn); - pEncoder->EncodeByte (nByte); + xEncoder->EncodeByte (nByte); } } } @@ -619,7 +617,7 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea) writePS2Colorspace(rBitmap, psp::MonochromeImage); writePS2ImageHeader(rArea, psp::MonochromeImage); - boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) + std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) : new Ascii85Encoder(mpPageBody)); for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) @@ -634,14 +632,14 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea) if (++nBitPos == 8) { - pEncoder->EncodeByte (nByte); + xEncoder->EncodeByte (nByte); nBitPos = 0; nByte = 0; } } // keep the row byte aligned if (nBitPos != 0) - pEncoder->EncodeByte (nByte); + xEncoder->EncodeByte (nByte); } } @@ -651,7 +649,7 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rAr writePS2Colorspace(rBitmap, psp::PaletteImage); writePS2ImageHeader(rArea, psp::PaletteImage); - boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) + std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) : new Ascii85Encoder(mpPageBody)); for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) @@ -659,7 +657,7 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rAr for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { unsigned char nByte = rBitmap.GetPixelIdx (nRow, nColumn); - pEncoder->EncodeByte (nByte); + xEncoder->EncodeByte (nByte); } } } @@ -670,7 +668,7 @@ PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& r writePS2Colorspace(rBitmap, psp::TrueColorImage); writePS2ImageHeader(rArea, psp::TrueColorImage); - boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) + std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody) : new Ascii85Encoder(mpPageBody)); for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) @@ -678,9 +676,9 @@ PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& r for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { PrinterColor aColor = rBitmap.GetPixelRGB (nRow, nColumn); - pEncoder->EncodeByte (aColor.GetRed()); - pEncoder->EncodeByte (aColor.GetGreen()); - pEncoder->EncodeByte (aColor.GetBlue()); + xEncoder->EncodeByte (aColor.GetRed()); + xEncoder->EncodeByte (aColor.GetGreen()); + xEncoder->EncodeByte (aColor.GetBlue()); } } } diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 02de54681adc..093590443375 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -1068,7 +1068,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo vcl::PDFWriter::PlayMetafileContext aMtfContext; aMtfContext.m_bOnlyLosslessCompression = true; - boost::shared_ptr<vcl::PDFWriter> pWriter; + std::shared_ptr<vcl::PDFWriter> xWriter; std::vector< PDFPrintFile > aPDFFiles; std::shared_ptr<Printer> xPrinter(i_rController.getPrinter()); int nAllPages = i_rController.getFilteredPageCount(); @@ -1107,12 +1107,12 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo // or on paper format change - cups does not support multiple paper formats per job (yet?) // so we need to start a new job to get a new paper format from the printer // orientation switches (that is switch of height and width) is handled transparently by CUPS - if( ! pWriter || + if( ! xWriter || (aNewParm != aLastParm && ! i_pFileName ) ) { - if( pWriter ) + if( xWriter ) { - pWriter->Emit(); + xWriter->Emit(); } // produce PDF file OUString aPDFUrl; @@ -1136,20 +1136,20 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo aContext.URL = aPDFUrl; // create and initialize PDFWriter - pWriter.reset( new vcl::PDFWriter( aContext, uno::Reference< beans::XMaterialHolder >() ) ); + xWriter.reset( new vcl::PDFWriter( aContext, uno::Reference< beans::XMaterialHolder >() ) ); } - pWriter->NewPage( TenMuToPt( aNewParm.maPageSize.Width() ), + xWriter->NewPage( TenMuToPt( aNewParm.maPageSize.Width() ), TenMuToPt( aNewParm.maPageSize.Height() ), vcl::PDFWriter::Portrait ); - pWriter->PlayMetafile( aPageFile, aMtfContext, NULL ); + xWriter->PlayMetafile( aPageFile, aMtfContext, NULL ); } } // emit the last file - if( pWriter ) - pWriter->Emit(); + if( xWriter ) + xWriter->Emit(); // handle collate, copy count and multiple jobs correctly int nOuterJobs = 1; diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx index ef5d36718dba..c2b8c9c72e6a 100644 --- a/vcl/inc/pch/precompiled_vcl.hxx +++ b/vcl/inc/pch/precompiled_vcl.hxx @@ -140,7 +140,6 @@ #include <boost/optional.hpp> #include <boost/ptr_container/ptr_vector.hpp> #include <boost/scoped_array.hpp> -#include <boost/scoped_ptr.hpp> #include <boost/shared_ptr.hpp> #include <cassert> #include <cmath> diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index e8fb76c374f4..642038056630 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX #define INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX -#include <boost/shared_ptr.hpp> - #include <unx/salinst.h> #include <generic/gensys.h> #include <headless/svpinst.hxx> @@ -102,14 +100,14 @@ public: void addEvent( sal_uInt16 nMask ); void subtractEvent( sal_uInt16 nMask ); - boost::shared_ptr<vcl::unx::GtkPrintWrapper> getPrintWrapper() const; + std::shared_ptr<vcl::unx::GtkPrintWrapper> getPrintWrapper() const; private: std::vector<GtkSalTimer *> m_aTimers; bool IsTimerExpired(); bool bNeedsInit; - mutable boost::shared_ptr<vcl::unx::GtkPrintWrapper> m_pPrintWrapper; + mutable std::shared_ptr<vcl::unx::GtkPrintWrapper> m_xPrintWrapper; }; #endif // INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX diff --git a/vcl/inc/unx/gtk/gtkprn.hxx b/vcl/inc/unx/gtk/gtkprn.hxx index 1e9cddc7cd9a..478048a22fe0 100644 --- a/vcl/inc/unx/gtk/gtkprn.hxx +++ b/vcl/inc/unx/gtk/gtkprn.hxx @@ -12,7 +12,7 @@ #include "generic/genprn.h" -#include <boost/scoped_ptr.hpp> +#include <memory> struct GtkSalPrinter_Impl; @@ -35,7 +35,7 @@ private: int i_nCopies, bool i_bCollate, vcl::PrinterController& io_rController); private: - boost::scoped_ptr<GtkSalPrinter_Impl> m_pImpl; + std::unique_ptr<GtkSalPrinter_Impl> m_xImpl; }; class VCL_DLLPUBLIC GtkSalInfoPrinter : public PspSalInfoPrinter diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index baa7de7c4286..40e1cd65b449 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -33,9 +33,8 @@ #include "sallayout.hxx" #include "vclpluginapi.h" -#include <boost/scoped_ptr.hpp> - #include <deque> +#include <memory> class ImplFontMetricData; class FontSelectPattern; @@ -345,8 +344,8 @@ protected: bool bFontGC_ : 1; // is Font GC valid private: - boost::scoped_ptr<SalGraphicsImpl> mpImpl; - boost::scoped_ptr<TextRenderImpl> mpTextRenderImpl; + std::unique_ptr<SalGraphicsImpl> mxImpl; + std::unique_ptr<TextRenderImpl> mxTextRenderImpl; }; diff --git a/vcl/inc/unx/sm.hxx b/vcl/inc/unx/sm.hxx index 3aee67a02d9a..48d202c6a7e4 100644 --- a/vcl/inc/unx/sm.hxx +++ b/vcl/inc/unx/sm.hxx @@ -23,9 +23,9 @@ #include <X11/SM/SMlib.h> -#include "boost/scoped_ptr.hpp" #include "tools/link.hxx" #include <rtl/ustring.hxx> +#include <memory> #include "vclpluginapi.h" @@ -35,7 +35,7 @@ class SalSession; class SessionManagerClient { static SalSession * m_pSession; - static boost::scoped_ptr< ICEConnectionObserver > m_pICEConnectionObserver; + static std::unique_ptr< ICEConnectionObserver > m_xICEConnectionObserver; static SmcConn m_pSmcConnection; static OString m_aClientID; static bool m_bDocSaveDone; diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 66a92011ae80..b6036f5331a0 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -28,7 +28,7 @@ #include "impfont.hxx" #include <vcl/fontcapabilities.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <unordered_set> #include <config_graphite.h> @@ -188,7 +188,7 @@ class WinSalGraphics : public SalGraphics friend class WinLayout; protected: - boost::scoped_ptr<SalGraphicsImpl> mpImpl; + std::unique_ptr<SalGraphicsImpl> mpImpl; private: HDC mhLocalDC; // HDC diff --git a/vcl/opengl/x11/salvd.cxx b/vcl/opengl/x11/salvd.cxx index a8b18f9a7861..0ade87d066a4 100644 --- a/vcl/opengl/x11/salvd.cxx +++ b/vcl/opengl/x11/salvd.cxx @@ -30,7 +30,7 @@ void X11SalGraphics::Init( X11OpenGLSalVirtualDevice *pDevice ) bWindow_ = pDisplay->IsDisplay(); bVirDev_ = true; - mpImpl->Init(); + mxImpl->Init(); } X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics* pGraphics, diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 523b2f7674b7..1c643f241176 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -58,7 +58,6 @@ #include <algorithm> #include <boost/scoped_array.hpp> -#include <boost/scoped_ptr.hpp> using namespace ::com::sun::star; @@ -809,11 +808,11 @@ void DbgGUIStart() if ( pData ) { - boost::scoped_ptr<DbgDialog> pDialog(new DbgDialog); + std::unique_ptr<DbgDialog> xDialog(new DbgDialog); // we switch off dialog tests for the debug dialog sal_uLong nOldFlags = pData->nTestFlags; pData->nTestFlags &= ~DBG_TEST_DIALOG; - if ( !pDialog->Execute() ) + if (!xDialog->Execute()) pData->nTestFlags |= (nOldFlags & DBG_TEST_DIALOG); } else diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index 145eafb66e83..294a58172689 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -19,7 +19,6 @@ #include "sal/config.h" -#include <boost/scoped_ptr.hpp> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase1.hxx> @@ -66,7 +65,7 @@ class VCLSession: }; std::list< Listener > m_aListeners; - boost::scoped_ptr< SalSession > m_pSession; + std::unique_ptr< SalSession > m_xSession; bool m_bInteractionRequested; bool m_bInteractionGranted; bool m_bInteractionDone; @@ -94,14 +93,14 @@ public: VCLSession::VCLSession() : cppu::WeakComponentImplHelper1< XSessionManagerClient >( m_aMutex ), - m_pSession( ImplGetSVData()->mpDefInst->CreateSalSession() ), + m_xSession( ImplGetSVData()->mpDefInst->CreateSalSession() ), m_bInteractionRequested( false ), m_bInteractionGranted( false ), m_bInteractionDone( false ), m_bSaveDone( false ) { - if( m_pSession ) - m_pSession->SetCallback( SalSessionEventProc, this ); + if (m_xSession) + m_xSession->SetCallback( SalSessionEventProc, this ); } void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable ) @@ -123,14 +122,14 @@ void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable ) m_bInteractionDone = false; // without session we assume UI is always possible, // so it was reqeusted and granted - m_bInteractionRequested = m_bInteractionGranted = !m_pSession; + m_bInteractionRequested = m_bInteractionGranted = !m_xSession; // answer the session manager even if no listeners available anymore DBG_ASSERT( ! aListeners.empty(), "saveRequested but no listeners !" ); if( aListeners.empty() ) { - if( m_pSession ) - m_pSession->saveDone(); + if (m_xSession) + m_xSession->saveDone(); return; } } @@ -157,8 +156,8 @@ void VCLSession::callInteractionGranted( bool bInteractionGranted ) DBG_ASSERT( ! aListeners.empty(), "interactionGranted but no listeners !" ); if( aListeners.empty() ) { - if( m_pSession ) - m_pSession->interactionDone(); + if (m_xSession) + m_xSession->interactionDone(); return; } } @@ -271,7 +270,7 @@ void SAL_CALL VCLSession::queryInteraction( const css::uno::Reference<XSessionMa osl::MutexGuard aGuard( m_aMutex ); if( ! m_bInteractionRequested ) { - m_pSession->queryInteraction(); + m_xSession->queryInteraction(); m_bInteractionRequested = true; } for( std::list< Listener >::iterator it = m_aListeners.begin(); it != m_aListeners.end(); ++it ) @@ -302,8 +301,8 @@ void SAL_CALL VCLSession::interactionDone( const css::uno::Reference< XSessionMa if( nDone == nRequested && nDone > 0 ) { m_bInteractionDone = true; - if( m_pSession ) - m_pSession->interactionDone(); + if (m_xSession) + m_xSession->interactionDone(); } } @@ -323,14 +322,14 @@ void SAL_CALL VCLSession::saveDone( const css::uno::Reference< XSessionManagerLi if( bSaveDone ) { m_bSaveDone = true; - if( m_pSession ) - m_pSession->saveDone(); + if (m_xSession) + m_xSession->saveDone(); } } sal_Bool SAL_CALL VCLSession::cancelShutdown() throw( RuntimeException, std::exception ) { - return m_pSession && m_pSession->cancelShutdown(); + return m_xSession && m_xSession->cancelShutdown(); } // service implementation diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 201eb16dfb2b..1897b676e4c1 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -54,9 +54,9 @@ #include <unicode/ubidi.h> #include <cstdlib> +#include <memory> #include <set> #include <vector> -#include <boost/scoped_ptr.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -608,7 +608,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel ) void TextEngine::ImpRemoveParagraph( sal_uLong nPara ) { TextNode* pNode = mpDoc->GetNodes()[ nPara ]; - boost::scoped_ptr<TEParaPortion> pPortion(mpTEParaPortions->GetObject( nPara )); + std::unique_ptr<TEParaPortion> xPortion(mpTEParaPortions->GetObject( nPara )); // the Node is handled by Undo and is deleted if appropriate mpDoc->GetNodes().erase( mpDoc->GetNodes().begin() + nPara ); @@ -618,7 +618,7 @@ void TextEngine::ImpRemoveParagraph( sal_uLong nPara ) delete pNode; mpTEParaPortions->Remove( nPara ); - pPortion.reset(); + xPortion.reset(); ImpParagraphRemoved( nPara ); } diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index d27d72328780..e176657002fb 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -31,7 +31,6 @@ #include <svids.hrc> #include <vcl/scrbar.hxx> #include <vcl/settings.hxx> -#include <boost/scoped_ptr.hpp> class TextWindow : public vcl::Window { @@ -939,7 +938,7 @@ VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle ) VclMultiLineEdit::~VclMultiLineEdit() { { - boost::scoped_ptr< ImpVclMEdit > pDelete( pImpVclMEdit ); + std::unique_ptr< ImpVclMEdit > xDelete(pImpVclMEdit); pImpVclMEdit = NULL; } delete pUpdateDataTimer; diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index ebcb074358e2..fbb4e64f206c 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -65,7 +65,7 @@ #include <vcl/metaact.hxx> #include <vector> #include <boost/scoped_array.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #include "FilterConfigCache.hxx" #include "graphicfilter_internal.hxx" @@ -828,7 +828,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r { Graphic aGraphic; - boost::scoped_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() )); + std::unique_ptr<ResMgr> xResMgr(ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() )); sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( "LogicalWidth", 0 ); sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( "LogicalHeight", 0 ); @@ -1285,10 +1285,10 @@ sal_uInt16 GraphicFilter::CanImportGraphic( const INetURLObject& rPath, DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE )); - if ( pStream ) + std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE )); + if (xStream) { - nRetValue = CanImportGraphic( aMainUrl, *pStream, nFormat, pDeterminedFormat ); + nRetValue = CanImportGraphic( aMainUrl, *xStream, nFormat, pDeterminedFormat ); } return nRetValue; } @@ -1315,10 +1315,10 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE )); - if ( pStream ) + std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE )); + if (xStream) { - nRetValue = ImportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pDeterminedFormat, nImportFlags ); + nRetValue = ImportGraphic( rGraphic, aMainUrl, *xStream, nFormat, pDeterminedFormat, nImportFlags ); } return nRetValue; } @@ -1808,11 +1808,11 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLO bool bAlreadyExists = DirEntryExists( rPath ); OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::WRITE | StreamMode::TRUNC )); - if ( pStream ) + std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::WRITE | StreamMode::TRUNC )); + if (xStream) { - nRetValue = ExportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pFilterData ); - pStream.reset(); + nRetValue = ExportGraphic( rGraphic, aMainUrl, *xStream, nFormat, pFilterData ); + xStream.reset(); if( ( GRFILTER_OK != nRetValue ) && !bAlreadyExists ) KillDirEntry( aMainUrl ); diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index 7f7e781db917..c9a8f2d69ea3 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -21,7 +21,6 @@ #define INCLUDED_VCL_SOURCE_FILTER_WMF_WINMTF_HXX #include <sot/object.hxx> -#include <boost/shared_ptr.hpp> #include <vcl/graph.hxx> #include <basegfx/tools/b2dclipstate.hxx> #include <vcl/font.hxx> @@ -454,7 +453,7 @@ struct SaveStruct bool bFillStyleSelected; }; -typedef boost::shared_ptr<SaveStruct> SaveStructPtr; +typedef std::shared_ptr<SaveStruct> SaveStructPtr; struct BSaveStruct { diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index ca40b4a46e4a..a95466d4cf33 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -44,7 +44,8 @@ #include <salinst.hxx> #include <svdata.hxx> #include <com/sun/star/beans/XFastPropertySet.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> + using namespace ::com::sun::star; BitmapEx::BitmapEx() : @@ -800,10 +801,10 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference< { // 0 means get BitmapEx uno::Any aAny = xFastPropertySet->getFastPropertyValue( 0 ); - boost::scoped_ptr<BitmapEx> pBitmapEx(reinterpret_cast<BitmapEx*>( *reinterpret_cast<const sal_Int64*>(aAny.getValue()))); - if( pBitmapEx ) + std::unique_ptr<BitmapEx> xBitmapEx(reinterpret_cast<BitmapEx*>( *reinterpret_cast<const sal_Int64*>(aAny.getValue()))); + if( xBitmapEx ) { - *this = *pBitmapEx; + *this = *xBitmapEx; return true; } } @@ -843,14 +844,13 @@ namespace bool bSmooth) { Bitmap aDestination(aDestinationSize, 24); - boost::scoped_ptr<BitmapWriteAccess> pWrite(aDestination.AcquireWriteAccess()); + std::unique_ptr<BitmapWriteAccess> xWrite(aDestination.AcquireWriteAccess()); - if(pWrite) + if(xWrite) { - //const Size aContentSizePixel(rSource.GetSizePixel()); - boost::scoped_ptr<BitmapReadAccess> pRead((const_cast< Bitmap& >(rSource)).AcquireReadAccess()); + std::unique_ptr<BitmapReadAccess> xRead((const_cast< Bitmap& >(rSource)).AcquireReadAccess()); - if(pRead) + if (xRead) { const Size aDestinationSizePixel(aDestination.GetSizePixel()); const BitmapColor aOutside(BitmapColor(0xff, 0xff, 0xff)); @@ -863,10 +863,10 @@ namespace if(bSmooth) { - pWrite->SetPixel( + xWrite->SetPixel( y, x, - pRead->GetInterpolatedColorWithFallback( + xRead->GetInterpolatedColorWithFallback( aSourceCoor.getY(), aSourceCoor.getX(), aOutside)); @@ -875,10 +875,10 @@ namespace { // this version does the correct <= 0.0 checks, so no need // to do the static_cast< sal_Int32 > self and make an error - pWrite->SetPixel( + xWrite->SetPixel( y, x, - pRead->GetColorWithFallback( + xRead->GetColorWithFallback( aSourceCoor.getY(), aSourceCoor.getX(), aOutside)); @@ -1028,12 +1028,12 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod // do NOT use erase; for e.g. 8bit Bitmaps, the nearest color to the given // erase color is determined and used -> this may be different from what is // wanted here. Better create a new bitmap with the needed color explicitely - boost::scoped_ptr<BitmapReadAccess> pReadAccess(aChangedBitmap.AcquireReadAccess()); - OSL_ENSURE(pReadAccess, "Got no Bitmap ReadAccess ?!?"); + std::unique_ptr<BitmapReadAccess> xReadAccess(aChangedBitmap.AcquireReadAccess()); + OSL_ENSURE(xReadAccess, "Got no Bitmap ReadAccess ?!?"); - if(pReadAccess) + if(xReadAccess) { - BitmapPalette aNewPalette(pReadAccess->GetPalette()); + BitmapPalette aNewPalette(xReadAccess->GetPalette()); aNewPalette[0] = BitmapColor(Color(pReplace->getBColor())); aChangedBitmap = Bitmap( aChangedBitmap.GetSizePixel(), @@ -1056,34 +1056,34 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod } else { - boost::scoped_ptr<BitmapWriteAccess> pContent(aChangedBitmap.AcquireWriteAccess()); + std::unique_ptr<BitmapWriteAccess> xContent(aChangedBitmap.AcquireWriteAccess()); - if(pContent) + if(xContent) { const double fConvertColor(1.0 / 255.0); - if(pContent->HasPalette()) + if(xContent->HasPalette()) { - const sal_uInt16 nCount(pContent->GetPaletteEntryCount()); + const sal_uInt16 nCount(xContent->GetPaletteEntryCount()); for(sal_uInt16 b(0); b < nCount; b++) { - const BitmapColor& rCol = pContent->GetPaletteColor(b); + const BitmapColor& rCol = xContent->GetPaletteColor(b); const basegfx::BColor aBSource( rCol.GetRed() * fConvertColor, rCol.GetGreen() * fConvertColor, rCol.GetBlue() * fConvertColor); const basegfx::BColor aBDest(rModifier->getModifiedColor(aBSource)); - pContent->SetPaletteColor(b, BitmapColor(Color(aBDest))); + xContent->SetPaletteColor(b, BitmapColor(Color(aBDest))); } } - else if(BMP_FORMAT_24BIT_TC_BGR == pContent->GetScanlineFormat()) + else if(BMP_FORMAT_24BIT_TC_BGR == xContent->GetScanlineFormat()) { - for(sal_uInt32 y(0L); y < (sal_uInt32)pContent->Height(); y++) + for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++) { - Scanline pScan = pContent->GetScanline(y); + Scanline pScan = xContent->GetScanline(y); - for(sal_uInt32 x(0L); x < (sal_uInt32)pContent->Width(); x++) + for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++) { const basegfx::BColor aBSource( *(pScan + 2)* fConvertColor, @@ -1096,13 +1096,13 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod } } } - else if(BMP_FORMAT_24BIT_TC_RGB == pContent->GetScanlineFormat()) + else if(BMP_FORMAT_24BIT_TC_RGB == xContent->GetScanlineFormat()) { - for(sal_uInt32 y(0L); y < (sal_uInt32)pContent->Height(); y++) + for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++) { - Scanline pScan = pContent->GetScanline(y); + Scanline pScan = xContent->GetScanline(y); - for(sal_uInt32 x(0L); x < (sal_uInt32)pContent->Width(); x++) + for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++) { const basegfx::BColor aBSource( *pScan * fConvertColor, @@ -1117,18 +1117,18 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod } else { - for(sal_uInt32 y(0L); y < (sal_uInt32)pContent->Height(); y++) + for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++) { - for(sal_uInt32 x(0L); x < (sal_uInt32)pContent->Width(); x++) + for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++) { - const BitmapColor aBMCol(pContent->GetColor(y, x)); + const BitmapColor aBMCol(xContent->GetColor(y, x)); const basegfx::BColor aBSource( (double)aBMCol.GetRed() * fConvertColor, (double)aBMCol.GetGreen() * fConvertColor, (double)aBMCol.GetBlue() * fConvertColor); const basegfx::BColor aBDest(rModifier->getModifiedColor(aBSource)); - pContent->SetPixel(y, x, BitmapColor(Color(aBDest))); + xContent->SetPixel(y, x, BitmapColor(Color(aBDest))); } } } @@ -1223,16 +1223,16 @@ BitmapEx createBlendFrame( aContent.Erase(COL_BLACK); - BitmapWriteAccess* pContent = aContent.AcquireWriteAccess(); + BitmapWriteAccess* xContent = aContent.AcquireWriteAccess(); BitmapWriteAccess* pAlpha = aAlpha.AcquireWriteAccess(); - if(pContent && pAlpha) + if(xContent && pAlpha) { long x(0); long y(0); // x == 0, y == 0, top-left corner - pContent->SetPixel(0, 0, aColorTopLeft); + xContent->SetPixel(0, 0, aColorTopLeft); pAlpha->SetPixelIndex(0, 0, nAlpha); // y == 0, top line left to right @@ -1241,7 +1241,7 @@ BitmapEx createBlendFrame( Color aMix(aColorTopLeft); aMix.Merge(aColorTopRight, 255 - sal_uInt8((x * 255) / nW)); - pContent->SetPixel(0, x, aMix); + xContent->SetPixel(0, x, aMix); pAlpha->SetPixelIndex(0, x, nAlpha); } @@ -1249,7 +1249,7 @@ BitmapEx createBlendFrame( // #i123690# Caution! When nW is 1, x == nW is possible (!) if(x < nW) { - pContent->SetPixel(0, x, aColorTopRight); + xContent->SetPixel(0, x, aColorTopRight); pAlpha->SetPixelIndex(0, x, nAlpha); } @@ -1259,7 +1259,7 @@ BitmapEx createBlendFrame( Color aMixA(aColorTopLeft); aMixA.Merge(aColorBottomLeft, 255 - sal_uInt8((y * 255) / nH)); - pContent->SetPixel(y, 0, aMixA); + xContent->SetPixel(y, 0, aMixA); pAlpha->SetPixelIndex(y, 0, nAlpha); // #i123690# Caution! When nW is 1, x == nW is possible (!) @@ -1268,7 +1268,7 @@ BitmapEx createBlendFrame( Color aMixB(aColorTopRight); aMixB.Merge(aColorBottomRight, 255 - sal_uInt8((y * 255) / nH)); - pContent->SetPixel(y, x, aMixB); + xContent->SetPixel(y, x, aMixB); pAlpha->SetPixelIndex(y, x, nAlpha); } } @@ -1277,7 +1277,7 @@ BitmapEx createBlendFrame( if(y < nH) { // x == 0, y == nH - 1, bottom-left corner - pContent->SetPixel(y, 0, aColorBottomLeft); + xContent->SetPixel(y, 0, aColorBottomLeft); pAlpha->SetPixelIndex(y, 0, nAlpha); // y == nH - 1, bottom line left to right @@ -1286,7 +1286,7 @@ BitmapEx createBlendFrame( Color aMix(aColorBottomLeft); aMix.Merge(aColorBottomRight, 255 - sal_uInt8(((x - 0)* 255) / nW)); - pContent->SetPixel(y, x, aMix); + xContent->SetPixel(y, x, aMix); pAlpha->SetPixelIndex(y, x, nAlpha); } @@ -1294,21 +1294,21 @@ BitmapEx createBlendFrame( // #i123690# Caution! When nW is 1, x == nW is possible (!) if(x < nW) { - pContent->SetPixel(y, x, aColorBottomRight); + xContent->SetPixel(y, x, aColorBottomRight); pAlpha->SetPixelIndex(y, x, nAlpha); } } - aContent.ReleaseAccess(pContent); + aContent.ReleaseAccess(xContent); aAlpha.ReleaseAccess(pAlpha); pBlendFrameCache->m_aLastResult = BitmapEx(aContent, aAlpha); } else { - if(pContent) + if(xContent) { - aContent.ReleaseAccess(pContent); + aContent.ReleaseAccess(xContent); } if(pAlpha) diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index ba67e76f8c64..6a4f79260d99 100644 --- a/vcl/source/gdi/embeddedfontshelper.cxx +++ b/vcl/source/gdi/embeddedfontshelper.cxx @@ -10,8 +10,6 @@ #include <config_folders.h> #include <config_eot.h> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> #include <osl/file.hxx> #include <rtl/bootstrap.hxx> #include <vcl/outdev.hxx> @@ -115,7 +113,7 @@ bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< io::XInputStream > st libeot::EOTMetadata eotMetadata; libeot::EOTError uncompressError = libeot::EOT2ttf_buffer( reinterpret_cast<unsigned char *>(&fontData[0]), fontData.size(), &eotMetadata, &nakedPointerToUncompressedFont, &uncompressedFontSize ); - boost::shared_ptr<unsigned char> uncompressedFont( nakedPointerToUncompressedFont, libeot::EOTfreeBuffer ); + std::shared_ptr<unsigned char> uncompressedFont( nakedPointerToUncompressedFont, libeot::EOTfreeBuffer ); if( uncompressError != libeot::EOT_SUCCESS ) { SAL_WARN( "vcl.fonts", "Failed to uncompress font" ); @@ -232,7 +230,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil SalGraphics* graphics = Application::GetDefaultDevice()->GetGraphics(); PhysicalFontCollection fonts; graphics->GetDevFontList( &fonts ); - boost::scoped_ptr< ImplGetDevFontList > fontInfo( fonts.GetDevFontList()); + std::unique_ptr< ImplGetDevFontList > fontInfo( fonts.GetDevFontList()); PhysicalFontFace* selected = NULL; for( int i = 0; i < fontInfo->Count(); diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index c352b81dfeb7..2d569659d987 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -27,7 +27,7 @@ #include <vcl/gfxlink.hxx> #include <vcl/cvtgrf.hxx> #include <com/sun/star/ucb/CommandAbortedException.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> GfxLink::GfxLink() : meType ( GFX_LINK_TYPE_NONE ), @@ -322,12 +322,12 @@ ImpSwap::ImpSwap( sal_uInt8* pData, sal_uLong nDataSize ) : maURL = aTempFile.GetURL(); if( !maURL.isEmpty() ) { - boost::scoped_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE )); - if( pOStm ) + std::unique_ptr<SvStream> xOStm(::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE )); + if( xOStm ) { - pOStm->Write( pData, mnDataSize ); - bool bError = ( ERRCODE_NONE != pOStm->GetError() ); - pOStm.reset(); + xOStm->Write( pData, mnDataSize ); + bool bError = ( ERRCODE_NONE != xOStm->GetError() ); + xOStm.reset(); if( bError ) { @@ -351,18 +351,18 @@ sal_uInt8* ImpSwap::GetData() const if( IsSwapped() ) { - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE )); - if( pIStm ) + std::unique_ptr<SvStream> xIStm(::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE )); + if( xIStm ) { pData = new sal_uInt8[ mnDataSize ]; - pIStm->Read( pData, mnDataSize ); - bool bError = ( ERRCODE_NONE != pIStm->GetError() ); - sal_Size nActReadSize = pIStm->Tell(); + xIStm->Read( pData, mnDataSize ); + bool bError = ( ERRCODE_NONE != xIStm->GetError() ); + sal_Size nActReadSize = xIStm->Tell(); if (nActReadSize != mnDataSize) { bError = true; } - pIStm.reset(); + xIStm.reset(); if( bError ) delete[] pData, pData = NULL; diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx index 478f04979a75..5c0b0dcb4610 100644 --- a/vcl/source/gdi/image.cxx +++ b/vcl/source/gdi/image.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <boost/scoped_ptr.hpp> #include <boost/scoped_array.hpp> #include <osl/file.hxx> @@ -301,10 +300,10 @@ ImageList::ImageList( const ResId& rResId ) : sal_uLong nObjMask = pResMgr->ReadLong(); pResMgr->ReadString(); //skip string - ::boost::scoped_ptr< Color > spMaskColor; + std::unique_ptr< Color > xMaskColor; if( nObjMask & RSC_IMAGE_MASKCOLOR ) - spMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) ) ); + xMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) ) ); pResMgr->Increment( ResMgr::GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) ); diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx index 6fac2e802ae5..c3e7b793580c 100644 --- a/vcl/source/gdi/impanmvw.cxx +++ b/vcl/source/gdi/impanmvw.cxx @@ -21,7 +21,6 @@ #include <vcl/virdev.hxx> #include <vcl/window.hxx> #include <tools/helpers.hxx> -#include <boost/scoped_ptr.hpp> ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -155,7 +154,7 @@ void ImplAnimView::getPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size void ImplAnimView::drawToPos( sal_uLong nPos ) { VirtualDevice aVDev; - boost::scoped_ptr<vcl::Region> pOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL); + std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL); aVDev.SetOutputSizePixel( maSzPix, false ); nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL ); @@ -163,13 +162,13 @@ void ImplAnimView::drawToPos( sal_uLong nPos ) for( sal_uLong i = 0UL; i <= nPos; i++ ) draw( i, &aVDev ); - if( pOldClip ) + if (xOldClip) mpOut->SetClipRegion( maClip ); mpOut->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, aVDev ); - if( pOldClip ) - mpOut->SetClipRegion( *pOldClip ); + if (xOldClip) + mpOut->SetClipRegion(*xOldClip); } void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev ) @@ -261,17 +260,17 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev ) if( !pVDev ) { - boost::scoped_ptr<vcl::Region> pOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL); + std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL); - if( pOldClip ) + if (xOldClip) mpOut->SetClipRegion( maClip ); mpOut->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, *pDev ); - if( pOldClip ) + if( xOldClip) { - mpOut->SetClipRegion( *pOldClip ); - pOldClip.reset(); + mpOut->SetClipRegion(*xOldClip); + xOldClip.reset(); } delete pDev; diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 2a66b164ce36..457f50b3fa27 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -38,7 +38,7 @@ #include <impgraph.hxx> #include <com/sun/star/ucb/CommandAbortedException.hpp> #include <vcl/dibtools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #define GRAPHIC_MTFTOBMP_MAXEXT 2048 #define GRAPHIC_STREAMBUFSIZE 8192UL @@ -1161,20 +1161,20 @@ bool ImpGraphic::ImplSwapOut() if( !aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).isEmpty() ) { - boost::scoped_ptr<SvStream> pOStm; + std::unique_ptr<SvStream> xOStm; try { - pOStm.reset(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READWRITE | StreamMode::SHARE_DENYWRITE )); + xOStm.reset(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READWRITE | StreamMode::SHARE_DENYWRITE )); } catch( const ::com::sun::star::uno::Exception& ) { } - if( pOStm ) + if( xOStm ) { - pOStm->SetVersion( SOFFICE_FILEFORMAT_50 ); - pOStm->SetCompressMode( SvStreamCompressFlags::NATIVE ); + xOStm->SetVersion( SOFFICE_FILEFORMAT_50 ); + xOStm->SetCompressMode( SvStreamCompressFlags::NATIVE ); - if( ( bRet = ImplSwapOut( pOStm.get() ) ) ) + if( ( bRet = ImplSwapOut( xOStm.get() ) ) ) { mpSwapFile = new ImpSwapFile; mpSwapFile->nRefCount = 1; @@ -1182,7 +1182,7 @@ bool ImpGraphic::ImplSwapOut() } else { - pOStm.reset(); + xOStm.reset(); try { @@ -1219,19 +1219,19 @@ void ImpGraphic::ImplSwapOutAsLink() mbSwapOut = true; } -bool ImpGraphic::ImplSwapOut( SvStream* pOStm ) +bool ImpGraphic::ImplSwapOut( SvStream* xOStm ) { bool bRet = false; - if( pOStm ) + if( xOStm ) { - pOStm->SetBufferSize( GRAPHIC_STREAMBUFSIZE ); + xOStm->SetBufferSize( GRAPHIC_STREAMBUFSIZE ); - if( !pOStm->GetError() && ImplWriteEmbedded( *pOStm ) ) + if( !xOStm->GetError() && ImplWriteEmbedded( *xOStm ) ) { - pOStm->Flush(); + xOStm->Flush(); - if( !pOStm->GetError() ) + if( !xOStm->GetError() ) { ImplClearGraphics( true ); bRet = mbSwapOut = true; @@ -1259,22 +1259,22 @@ bool ImpGraphic::ImplSwapIn() if( !aSwapURL.isEmpty() ) { - boost::scoped_ptr<SvStream> pIStm; + std::unique_ptr<SvStream> xIStm; try { - pIStm.reset(::utl::UcbStreamHelper::CreateStream( aSwapURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE )); + xIStm.reset(::utl::UcbStreamHelper::CreateStream( aSwapURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE )); } catch( const ::com::sun::star::uno::Exception& ) { } - if( pIStm ) + if( xIStm ) { - pIStm->SetVersion( SOFFICE_FILEFORMAT_50 ); - pIStm->SetCompressMode( SvStreamCompressFlags::NATIVE ); + xIStm->SetVersion( SOFFICE_FILEFORMAT_50 ); + xIStm->SetCompressMode( SvStreamCompressFlags::NATIVE ); - bRet = ImplSwapIn( pIStm.get() ); - pIStm.reset(); + bRet = ImplSwapIn( xIStm.get() ); + xIStm.reset(); if( mpSwapFile ) { @@ -1316,18 +1316,18 @@ bool ImpGraphic::ImplSwapIn() return bRet; } -bool ImpGraphic::ImplSwapIn( SvStream* pIStm ) +bool ImpGraphic::ImplSwapIn( SvStream* xIStm ) { bool bRet = false; - if( pIStm ) + if( xIStm ) { - pIStm->SetBufferSize( GRAPHIC_STREAMBUFSIZE ); + xIStm->SetBufferSize( GRAPHIC_STREAMBUFSIZE ); - if( !pIStm->GetError() ) + if( !xIStm->GetError() ) { mbSwapUnderway = true; - bRet = ImplReadEmbedded( *pIStm ); + bRet = ImplReadEmbedded( *xIStm ); mbSwapUnderway = false; if( !bRet ) diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index b547380a78d0..61ef2ea3971c 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -27,7 +27,7 @@ #include <vcl/virdev.hxx> #include <impvect.hxx> #include <boost/scoped_array.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #define VECT_POLY_MAX 8192 @@ -634,8 +634,8 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, VECT_PROGRESS( pProgress, 0 ); - boost::scoped_ptr<Bitmap> pBmp(new Bitmap( rColorBmp )); - BitmapReadAccess* pRAcc = pBmp->AcquireReadAccess(); + std::unique_ptr<Bitmap> xBmp(new Bitmap( rColorBmp )); + BitmapReadAccess* pRAcc = xBmp->AcquireReadAccess(); if( pRAcc ) { @@ -677,16 +677,15 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, { const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) ); const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() ); -// const sal_uInt8 cLum = aFindColor.GetLuminance(); - boost::scoped_ptr<ImplVectMap> pMap(ImplExpand( pRAcc, aFindColor )); + std::unique_ptr<ImplVectMap> xMap(ImplExpand( pRAcc, aFindColor )); VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) ); - if( pMap ) + if( xMap ) { aPolyPoly.Clear(); - ImplCalculate( pMap.get(), aPolyPoly, cReduce, nFlags ); - pMap.reset(); + ImplCalculate( xMap.get(), aPolyPoly, cReduce, nFlags ); + xMap.reset(); if( aPolyPoly.Count() ) { @@ -723,8 +722,8 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, } } - pBmp->ReleaseAccess( pRAcc ); - pBmp.reset(); + xBmp->ReleaseAccess( pRAcc ); + xBmp.reset(); VECT_PROGRESS( pProgress, 100 ); return bRet; @@ -734,29 +733,29 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) { - boost::scoped_ptr<Bitmap> pBmp(new Bitmap( rMonoBmp )); + std::unique_ptr<Bitmap> xBmp(new Bitmap( rMonoBmp )); BitmapReadAccess* pRAcc; bool bRet = false; VECT_PROGRESS( pProgress, 10 ); - if( pBmp->GetBitCount() > 1 ) - pBmp->Convert( BMP_CONVERSION_1BIT_THRESHOLD ); + if( xBmp->GetBitCount() > 1 ) + xBmp->Convert( BMP_CONVERSION_1BIT_THRESHOLD ); VECT_PROGRESS( pProgress, 30 ); - pRAcc = pBmp->AcquireReadAccess(); - boost::scoped_ptr<ImplVectMap> pMap(ImplExpand( pRAcc, COL_BLACK )); - pBmp->ReleaseAccess( pRAcc ); - pBmp.reset(); + pRAcc = xBmp->AcquireReadAccess(); + std::unique_ptr <ImplVectMap> xMap(ImplExpand( pRAcc, COL_BLACK )); + xBmp->ReleaseAccess( pRAcc ); + xBmp.reset(); VECT_PROGRESS( pProgress, 60 ); - if( pMap ) + if( xMap ) { rPolyPoly.Clear(); - ImplCalculate( pMap.get(), rPolyPoly, 0, nFlags ); - pMap.reset(); + ImplCalculate( xMap.get(), rPolyPoly, 0, nFlags ); + xMap.reset(); ImplLimitPolyPoly( rPolyPoly ); if( nFlags & BMP_VECTORIZE_REDUCE_EDGES ) @@ -860,7 +859,7 @@ ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& r { ImplVectMap* pMap = NULL; - if( pRAcc && pRAcc->Width() && pRAcc->Height() ) + if( pRAcc && pRAcc->Width() && pRAcc->Height() ) { const long nOldWidth = pRAcc->Width(); const long nOldHeight = pRAcc->Height(); diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index ec0a4162202b..3cab7d14dc76 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -25,8 +25,8 @@ #include "basegfx/polygon/b2dpolygon.hxx" #include "basegfx/polygon/b2dpolygontools.hxx" -#include <boost/shared_ptr.hpp> #include <set> +#include <memory> #include <map> namespace vcl @@ -294,7 +294,7 @@ struct PageSyncData std::deque< PDFWriter::StructAttribute > mParaStructAttributes; std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues; std::deque< Graphic > mGraphics; - std::deque< ::boost::shared_ptr< PDFWriter::AnyWidget > > + std::deque< std::shared_ptr< PDFWriter::AnyWidget > > mControls; GlobalSyncData* mpGlobalData; @@ -381,7 +381,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc break; case PDFExtOutDevDataSync::CreateControl: { - ::boost::shared_ptr< PDFWriter::AnyWidget > pControl( mControls.front() ); + std::shared_ptr< PDFWriter::AnyWidget > pControl( mControls.front() ); DBG_ASSERT( pControl.get(), "PageSyncData::PlaySyncPageAct: invalid widget!" ); if ( pControl.get() ) rWriter.CreateControl( *pControl ); @@ -739,7 +739,7 @@ void PDFExtOutDevData::CreateControl( const PDFWriter::AnyWidget& rControlType, { mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::CreateControl ); - ::boost::shared_ptr< PDFWriter::AnyWidget > pClone( rControlType.Clone() ); + std::shared_ptr< PDFWriter::AnyWidget > pClone( rControlType.Clone() ); mpPageSyncData->mControls.push_back( pClone ); } diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index 81ad0f5cb2f0..4701eded681f 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -29,7 +29,7 @@ PDFWriter::AnyWidget::~AnyWidget() PDFWriter::PDFWriter( const PDFWriter::PDFWriterContext& rContext, const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >& xEnc ) : - pImplementation( new PDFWriterImpl( rContext, xEnc, *this ) ) + xImplementation( new PDFWriterImpl( rContext, xEnc, *this ) ) { } @@ -39,32 +39,32 @@ PDFWriter::~PDFWriter() OutputDevice* PDFWriter::GetReferenceDevice() { - return pImplementation->getReferenceDevice(); + return xImplementation->getReferenceDevice(); } sal_Int32 PDFWriter::NewPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, Orientation eOrientation ) { - return pImplementation->newPage( nPageWidth, nPageHeight, eOrientation ); + return xImplementation->newPage( nPageWidth, nPageHeight, eOrientation ); } bool PDFWriter::Emit() { - return pImplementation->emit(); + return xImplementation->emit(); } void PDFWriter::SetDocumentLocale( const com::sun::star::lang::Locale& rLoc ) { - pImplementation->setDocumentLocale( rLoc ); + xImplementation->setDocumentLocale( rLoc ); } void PDFWriter::SetFont( const vcl::Font& rFont ) { - pImplementation->setFont( rFont ); + xImplementation->setFont( rFont ); } void PDFWriter::DrawText( const Point& rPos, const OUString& rText ) { - pImplementation->drawText( rPos, rText, 0, rText.getLength() ); + xImplementation->drawText( rPos, rText, 0, rText.getLength() ); } void PDFWriter::DrawTextLine( @@ -75,7 +75,7 @@ void PDFWriter::DrawTextLine( FontUnderline eOverline, bool bUnderlineAbove ) { - pImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); + xImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); } void PDFWriter::DrawTextArray( @@ -85,7 +85,7 @@ void PDFWriter::DrawTextArray( sal_Int32 nIndex, sal_Int32 nLen ) { - pImplementation->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen ); + xImplementation->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen ); } void PDFWriter::DrawStretchText( @@ -95,7 +95,7 @@ void PDFWriter::DrawStretchText( sal_Int32 nIndex, sal_Int32 nLen ) { - pImplementation->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen ); + xImplementation->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen ); } void PDFWriter::DrawText( @@ -103,343 +103,343 @@ void PDFWriter::DrawText( const OUString& rStr, sal_uInt16 nStyle ) { - pImplementation->drawText( rRect, rStr, nStyle ); + xImplementation->drawText( rRect, rStr, nStyle ); } void PDFWriter::DrawLine( const Point& rStart, const Point& rStop ) { - pImplementation->drawLine( rStart, rStop ); + xImplementation->drawLine( rStart, rStop ); } void PDFWriter::DrawLine( const Point& rStart, const Point& rStop, const LineInfo& rInfo ) { - pImplementation->drawLine( rStart, rStop, rInfo ); + xImplementation->drawLine( rStart, rStop, rInfo ); } void PDFWriter::DrawPolygon( const Polygon& rPoly ) { - pImplementation->drawPolygon( rPoly ); + xImplementation->drawPolygon( rPoly ); } void PDFWriter::DrawPolyLine( const Polygon& rPoly ) { - pImplementation->drawPolyLine( rPoly ); + xImplementation->drawPolyLine( rPoly ); } void PDFWriter::DrawRect( const Rectangle& rRect ) { - pImplementation->drawRectangle( rRect ); + xImplementation->drawRectangle( rRect ); } void PDFWriter::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound ) { - pImplementation->drawRectangle( rRect, nHorzRound, nVertRound ); + xImplementation->drawRectangle( rRect, nHorzRound, nVertRound ); } void PDFWriter::DrawEllipse( const Rectangle& rRect ) { - pImplementation->drawEllipse( rRect ); + xImplementation->drawEllipse( rRect ); } void PDFWriter::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop ) { - pImplementation->drawArc( rRect, rStart, rStop, false, false ); + xImplementation->drawArc( rRect, rStart, rStop, false, false ); } void PDFWriter::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rStop ) { - pImplementation->drawArc( rRect, rStart, rStop, true, false ); + xImplementation->drawArc( rRect, rStart, rStop, true, false ); } void PDFWriter::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rStop ) { - pImplementation->drawArc( rRect, rStart, rStop, false, true ); + xImplementation->drawArc( rRect, rStart, rStop, false, true ); } void PDFWriter::DrawPolyLine( const Polygon& rPoly, const LineInfo& rInfo ) { - pImplementation->drawPolyLine( rPoly, rInfo ); + xImplementation->drawPolyLine( rPoly, rInfo ); } void PDFWriter::DrawPolyLine( const Polygon& rPoly, const ExtLineInfo& rInfo ) { - pImplementation->drawPolyLine( rPoly, rInfo ); + xImplementation->drawPolyLine( rPoly, rInfo ); } void PDFWriter::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) { - pImplementation->drawPolyPolygon( rPolyPoly ); + xImplementation->drawPolyPolygon( rPolyPoly ); } void PDFWriter::DrawPixel( const Point& rPos, const Color& rColor ) { - pImplementation->drawPixel( rPos, rColor ); + xImplementation->drawPixel( rPos, rColor ); } void PDFWriter::DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Bitmap& rBitmap ) { - pImplementation->drawBitmap( rDestPt, rDestSize, rBitmap ); + xImplementation->drawBitmap( rDestPt, rDestSize, rBitmap ); } void PDFWriter::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const BitmapEx& rBitmap ) { - pImplementation->drawBitmap( rDestPt, rDestSize, rBitmap ); + xImplementation->drawBitmap( rDestPt, rDestSize, rBitmap ); } void PDFWriter::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) { - pImplementation->drawHatch( rPolyPoly, rHatch ); + xImplementation->drawHatch( rPolyPoly, rHatch ); } void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient ) { - pImplementation->drawGradient( rRect, rGradient ); + xImplementation->drawGradient( rRect, rGradient ); } void PDFWriter::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ) { - pImplementation->push(PushFlags::CLIPREGION); - pImplementation->setClipRegion( rPolyPoly.getB2DPolyPolygon() ); - pImplementation->drawGradient( rPolyPoly.GetBoundRect(), rGradient ); - pImplementation->pop(); + xImplementation->push(PushFlags::CLIPREGION); + xImplementation->setClipRegion( rPolyPoly.getB2DPolyPolygon() ); + xImplementation->drawGradient( rPolyPoly.GetBoundRect(), rGradient ); + xImplementation->pop(); } void PDFWriter::DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper ) { - pImplementation->drawWallpaper( rRect, rWallpaper ); + xImplementation->drawWallpaper( rRect, rWallpaper ); } void PDFWriter::DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) { - pImplementation->drawTransparent( rPolyPoly, nTransparencePercent ); + xImplementation->drawTransparent( rPolyPoly, nTransparencePercent ); } void PDFWriter::BeginTransparencyGroup() { - pImplementation->beginTransparencyGroup(); + xImplementation->beginTransparencyGroup(); } void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransparentPercent ) { - pImplementation->endTransparencyGroup( rRect, nTransparentPercent ); + xImplementation->endTransparencyGroup( rRect, nTransparentPercent ); } void PDFWriter::Push( PushFlags nFlags ) { - pImplementation->push( nFlags ); + xImplementation->push( nFlags ); } void PDFWriter::Pop() { - pImplementation->pop(); + xImplementation->pop(); } void PDFWriter::SetMapMode( const MapMode& rMapMode ) { - pImplementation->setMapMode( rMapMode ); + xImplementation->setMapMode( rMapMode ); } void PDFWriter::SetLineColor( const Color& rColor ) { - pImplementation->setLineColor( rColor ); + xImplementation->setLineColor( rColor ); } void PDFWriter::SetFillColor( const Color& rColor ) { - pImplementation->setFillColor( rColor ); + xImplementation->setFillColor( rColor ); } void PDFWriter::SetClipRegion() { - pImplementation->clearClipRegion(); + xImplementation->clearClipRegion(); } void PDFWriter::SetClipRegion( const basegfx::B2DPolyPolygon& rRegion ) { - pImplementation->setClipRegion( rRegion ); + xImplementation->setClipRegion( rRegion ); } void PDFWriter::MoveClipRegion( long nHorzMove, long nVertMove ) { - pImplementation->moveClipRegion( nHorzMove, nVertMove ); + xImplementation->moveClipRegion( nHorzMove, nVertMove ); } void PDFWriter::IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion ) { - pImplementation->intersectClipRegion( rRegion ); + xImplementation->intersectClipRegion( rRegion ); } void PDFWriter::IntersectClipRegion( const Rectangle& rRect ) { - pImplementation->intersectClipRegion( rRect ); + xImplementation->intersectClipRegion( rRect ); } void PDFWriter::SetLayoutMode( ComplexTextLayoutMode nMode ) { - pImplementation->setLayoutMode( nMode ); + xImplementation->setLayoutMode( nMode ); } void PDFWriter::SetDigitLanguage( LanguageType eLang ) { - pImplementation->setDigitLanguage( eLang ); + xImplementation->setDigitLanguage( eLang ); } void PDFWriter::SetTextColor( const Color& rColor ) { - pImplementation->setTextColor( rColor ); + xImplementation->setTextColor( rColor ); } void PDFWriter::SetTextFillColor() { - pImplementation->setTextFillColor(); + xImplementation->setTextFillColor(); } void PDFWriter::SetTextFillColor( const Color& rColor ) { - pImplementation->setTextFillColor( rColor ); + xImplementation->setTextFillColor( rColor ); } void PDFWriter::SetTextLineColor() { - pImplementation->setTextLineColor(); + xImplementation->setTextLineColor(); } void PDFWriter::SetTextLineColor( const Color& rColor ) { - pImplementation->setTextLineColor( rColor ); + xImplementation->setTextLineColor( rColor ); } void PDFWriter::SetOverlineColor() { - pImplementation->setOverlineColor(); + xImplementation->setOverlineColor(); } void PDFWriter::SetOverlineColor( const Color& rColor ) { - pImplementation->setOverlineColor( rColor ); + xImplementation->setOverlineColor( rColor ); } void PDFWriter::SetTextAlign( ::TextAlign eAlign ) { - pImplementation->setTextAlign( eAlign ); + xImplementation->setTextAlign( eAlign ); } void PDFWriter::DrawJPGBitmap( SvStream& rStreamData, bool bIsTrueColor, const Size& rSrcSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask ) { - pImplementation->drawJPGBitmap( rStreamData, bIsTrueColor, rSrcSizePixel, rTargetArea, rMask ); + xImplementation->drawJPGBitmap( rStreamData, bIsTrueColor, rSrcSizePixel, rTargetArea, rMask ); } sal_Int32 PDFWriter::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr ) { - return pImplementation->createLink( rRect, nPageNr ); + return xImplementation->createLink( rRect, nPageNr ); } sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ) { - return pImplementation->registerDestReference( nDestId, rRect, nPageNr, eType ); + return xImplementation->registerDestReference( nDestId, rRect, nPageNr, eType ); } //--->i56629 sal_Int32 PDFWriter::CreateNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { - return pImplementation->createNamedDest( sDestName, rRect, nPageNr, eType ); + return xImplementation->createNamedDest( sDestName, rRect, nPageNr, eType ); } sal_Int32 PDFWriter::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { - return pImplementation->createDest( rRect, nPageNr, eType ); + return xImplementation->createDest( rRect, nPageNr, eType ); } sal_Int32 PDFWriter::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ) { - return pImplementation->setLinkDest( nLinkId, nDestId ); + return xImplementation->setLinkDest( nLinkId, nDestId ); } sal_Int32 PDFWriter::SetLinkURL( sal_Int32 nLinkId, const OUString& rURL ) { - return pImplementation->setLinkURL( nLinkId, rURL ); + return xImplementation->setLinkURL( nLinkId, rURL ); } void PDFWriter::SetLinkPropertyID( sal_Int32 nLinkId, sal_Int32 nPropertyId ) { - pImplementation->setLinkPropertyId( nLinkId, nPropertyId ); + xImplementation->setLinkPropertyId( nLinkId, nPropertyId ); } sal_Int32 PDFWriter::CreateOutlineItem( sal_Int32 nParent, const OUString& rText, sal_Int32 nDestID ) { - return pImplementation->createOutlineItem( nParent, rText, nDestID ); + return xImplementation->createOutlineItem( nParent, rText, nDestID ); } sal_Int32 PDFWriter::SetOutlineItemParent( sal_Int32 nItem, sal_Int32 nNewParent ) { - return pImplementation->setOutlineItemParent( nItem, nNewParent ); + return xImplementation->setOutlineItemParent( nItem, nNewParent ); } sal_Int32 PDFWriter::SetOutlineItemText( sal_Int32 nItem, const OUString& rText ) { - return pImplementation->setOutlineItemText( nItem, rText ); + return xImplementation->setOutlineItemText( nItem, rText ); } sal_Int32 PDFWriter::SetOutlineItemDest( sal_Int32 nItem, sal_Int32 nDest ) { - return pImplementation->setOutlineItemDest( nItem, nDest ); + return xImplementation->setOutlineItemDest( nItem, nDest ); } void PDFWriter::CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ) { - pImplementation->createNote( rRect, rNote, nPageNr ); + xImplementation->createNote( rRect, rNote, nPageNr ); } sal_Int32 PDFWriter::BeginStructureElement( PDFWriter::StructElement eType, const OUString& rAlias ) { - return pImplementation->beginStructureElement( eType, rAlias ); + return xImplementation->beginStructureElement( eType, rAlias ); } void PDFWriter::EndStructureElement() { - pImplementation->endStructureElement(); + xImplementation->endStructureElement(); } bool PDFWriter::SetCurrentStructureElement( sal_Int32 nID ) { - return pImplementation->setCurrentStructureElement( nID ); + return xImplementation->setCurrentStructureElement( nID ); } bool PDFWriter::SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal ) { - return pImplementation->setStructureAttribute( eAttr, eVal ); + return xImplementation->setStructureAttribute( eAttr, eVal ); } bool PDFWriter::SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_Int32 nValue ) { - return pImplementation->setStructureAttributeNumerical( eAttr, nValue ); + return xImplementation->setStructureAttributeNumerical( eAttr, nValue ); } void PDFWriter::SetStructureBoundingBox( const Rectangle& rRect ) { - pImplementation->setStructureBoundingBox( rRect ); + xImplementation->setStructureBoundingBox( rRect ); } void PDFWriter::SetActualText( const OUString& rText ) { - pImplementation->setActualText( rText ); + xImplementation->setActualText( rText ); } void PDFWriter::SetAlternateText( const OUString& rText ) { - pImplementation->setAlternateText( rText ); + xImplementation->setAlternateText( rText ); } void PDFWriter::SetAutoAdvanceTime( sal_uInt32 nSeconds, sal_Int32 nPageNr ) { - pImplementation->setAutoAdvanceTime( nSeconds, nPageNr ); + xImplementation->setAutoAdvanceTime( nSeconds, nPageNr ); } void PDFWriter::SetPageTransition( PDFWriter::PageTransition eType, sal_uInt32 nMilliSec, sal_Int32 nPageNr ) { - pImplementation->setPageTransition( eType, nMilliSec, nPageNr ); + xImplementation->setPageTransition( eType, nMilliSec, nPageNr ); } sal_Int32 PDFWriter::CreateControl( const PDFWriter::AnyWidget& rControl, sal_Int32 nPageNr ) { - return pImplementation->createControl( rControl, nPageNr ); + return xImplementation->createControl( rControl, nPageNr ); } PDFOutputStream::~PDFOutputStream() @@ -448,12 +448,12 @@ PDFOutputStream::~PDFOutputStream() void PDFWriter::AddStream( const OUString& rMimeType, PDFOutputStream* pStream, bool bCompress ) { - pImplementation->addStream( rMimeType, pStream, bCompress ); + xImplementation->addStream( rMimeType, pStream, bCompress ); } std::set< PDFWriter::ErrorCode > PDFWriter::GetErrors() { - return pImplementation->getErrors(); + return xImplementation->getErrors(); } com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder > @@ -467,7 +467,7 @@ PDFWriter::InitEncryption( const OUString& i_rOwnerPassword, void PDFWriter::PlayMetafile( const GDIMetaFile& i_rMTF, const vcl::PDFWriter::PlayMetafileContext& i_rPlayContext, PDFExtOutDevData* i_pData ) { - pImplementation->playMetafile( i_rMTF, i_pData, i_rPlayContext, NULL); + xImplementation->playMetafile( i_rMTF, i_pData, i_rPlayContext, NULL); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 73344f990bd1..475bcb00912c 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -42,7 +42,7 @@ #include "cppuhelper/implbase1.hxx" #include <rtl/digest.h> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace vcl; using namespace com::sun::star; @@ -244,11 +244,11 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa { bool bAssertionFired( false ); - boost::scoped_ptr<VirtualDevice> pPrivateDevice; + std::unique_ptr<VirtualDevice> xPrivateDevice; if( ! pDummyVDev ) { - pPrivateDevice.reset(new VirtualDevice()); - pDummyVDev = pPrivateDevice.get(); + xPrivateDevice.reset(new VirtualDevice()); + pDummyVDev = xPrivateDevice.get(); pDummyVDev->EnableOutput( false ); pDummyVDev->SetMapMode( i_rMtf.GetPrefMapMode() ); } @@ -431,8 +431,8 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa if ( nPixelX && nPixelY ) { Size aDstSizePixel( nPixelX, nPixelY ); - boost::scoped_ptr<VirtualDevice> pVDev(new VirtualDevice); - if( pVDev->SetOutputSizePixel( aDstSizePixel ) ) + std::unique_ptr<VirtualDevice> xVDev(new VirtualDevice); + if( xVDev->SetOutputSizePixel( aDstSizePixel ) ) { Bitmap aPaint, aMask; AlphaMask aAlpha; @@ -440,8 +440,8 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa MapMode aMapMode( pDummyVDev->GetMapMode() ); aMapMode.SetOrigin( aPoint ); - pVDev->SetMapMode( aMapMode ); - Size aDstSize( pVDev->PixelToLogic( aDstSizePixel ) ); + xVDev->SetMapMode( aMapMode ); + Size aDstSize( xVDev->PixelToLogic( aDstSizePixel ) ); Point aMtfOrigin( aTmpMtf.GetPrefMapMode().GetOrigin() ); if ( aMtfOrigin.X() || aMtfOrigin.Y() ) @@ -454,33 +454,33 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa // create paint bitmap aTmpMtf.WindStart(); - aTmpMtf.Play( pVDev.get(), aPoint, aDstSize ); + aTmpMtf.Play( xVDev.get(), aPoint, aDstSize ); aTmpMtf.WindStart(); - pVDev->EnableMapMode( false ); - aPaint = pVDev->GetBitmap( aPoint, aDstSizePixel ); - pVDev->EnableMapMode( true ); + xVDev->EnableMapMode( false ); + aPaint = xVDev->GetBitmap( aPoint, aDstSizePixel ); + xVDev->EnableMapMode( true ); // create mask bitmap - pVDev->SetLineColor( COL_BLACK ); - pVDev->SetFillColor( COL_BLACK ); - pVDev->DrawRect( Rectangle( aPoint, aDstSize ) ); - pVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT | + xVDev->SetLineColor( COL_BLACK ); + xVDev->SetFillColor( COL_BLACK ); + xVDev->DrawRect( Rectangle( aPoint, aDstSize ) ); + xVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT | DRAWMODE_WHITEBITMAP | DRAWMODE_WHITEGRADIENT ); aTmpMtf.WindStart(); - aTmpMtf.Play( pVDev.get(), aPoint, aDstSize ); + aTmpMtf.Play( xVDev.get(), aPoint, aDstSize ); aTmpMtf.WindStart(); - pVDev->EnableMapMode( false ); - aMask = pVDev->GetBitmap( aPoint, aDstSizePixel ); - pVDev->EnableMapMode( true ); + xVDev->EnableMapMode( false ); + aMask = xVDev->GetBitmap( aPoint, aDstSizePixel ); + xVDev->EnableMapMode( true ); // create alpha mask from gradient - pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); - pVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient ); - pVDev->SetDrawMode( DRAWMODE_DEFAULT ); - pVDev->EnableMapMode( false ); - pVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) ); - aAlpha = pVDev->GetBitmap( aPoint, aDstSizePixel ); + xVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); + xVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient ); + xVDev->SetDrawMode( DRAWMODE_DEFAULT ); + xVDev->EnableMapMode( false ); + xVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) ); + aAlpha = xVDev->GetBitmap( aPoint, aDstSizePixel ); implWriteBitmapEx( rPos, rSize, BitmapEx( aPaint, aAlpha ), pDummyVDev, i_rContext ); } } diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 88a0abc1d352..6c66232a4293 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -43,7 +43,7 @@ #include <svdata.hxx> #include <outdata.hxx> #include <boost/scoped_array.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <basegfx/polygon/b2dpolygon.hxx> @@ -705,7 +705,7 @@ bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const { Rectangle rgn( rControlRegion ); mirror( rgn, pOutDev ); - boost::scoped_ptr< ImplControlValue > mirrorValue( aValue.clone()); + std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone()); mirror( *mirrorValue, pOutDev ); bool bRet = drawNativeControl( nType, nPart, rgn, nState, *mirrorValue, aCaption ); return bRet; @@ -722,7 +722,7 @@ bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, { Rectangle rgn( rControlRegion ); mirror( rgn, pOutDev ); - boost::scoped_ptr< ImplControlValue > mirrorValue( aValue.clone()); + std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone()); mirror( *mirrorValue, pOutDev ); if( getNativeControlRegion( nType, nPart, rgn, nState, *mirrorValue, aCaption, rNativeBoundingRegion, rNativeContentRegion ) ) diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index fa0684d063a3..4a7edff5b330 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -656,10 +656,10 @@ bool OpenGLContext::init( vcl::Window* pParent ) if(mbInitialized) return true; - m_pWindow.reset(pParent ? NULL : new vcl::Window(0, WB_NOBORDER|WB_NODIALOGCONTROL)); - mpWindow = pParent ? pParent : m_pWindow.get(); - if(m_pWindow) - m_pWindow->setPosSizePixel(0,0,0,0); + m_xWindow.reset(pParent ? NULL : new vcl::Window(0, WB_NOBORDER|WB_NODIALOGCONTROL)); + mpWindow = pParent ? pParent : m_xWindow.get(); + if(m_xWindow) + m_xWindow->setPosSizePixel(0,0,0,0); m_pChildWindow = 0; initWindow(); return ImplInit(); @@ -1043,8 +1043,8 @@ bool OpenGLContext::InitGLEW() void OpenGLContext::setWinPosAndSize(const Point &rPos, const Size& rSize) { - if(m_pWindow) - m_pWindow->SetPosSizePixel(rPos, rSize); + if(m_xWindow) + m_xWindow->SetPosSizePixel(rPos, rSize); if( m_pChildWindow ) m_pChildWindow->SetPosSizePixel(rPos, rSize); @@ -1054,8 +1054,8 @@ void OpenGLContext::setWinPosAndSize(const Point &rPos, const Size& rSize) void OpenGLContext::setWinSize(const Size& rSize) { - if(m_pWindow) - m_pWindow->SetSizePixel(rSize); + if(m_xWindow) + m_xWindow->SetSizePixel(rSize); if( m_pChildWindow ) m_pChildWindow->SetSizePixel(rSize); @@ -1080,7 +1080,7 @@ bool OpenGLContext::initWindow() { SystemWindowData winData = generateWinData(mpWindow, false); m_pChildWindow = new SystemChildWindow(mpWindow, 0, &winData, false); - m_pChildWindowGC.reset(m_pChildWindow); + m_xChildWindowGC.reset(m_pChildWindow); } if( m_pChildWindow ) @@ -1108,7 +1108,7 @@ bool OpenGLContext::initWindow() { SystemWindowData winData = generateWinData(mpWindow, mbRequestLegacyContext); m_pChildWindow = new SystemChildWindow(mpWindow, 0, &winData, false); - m_pChildWindowGC.reset(m_pChildWindow); + m_xChildWindowGC.reset(m_pChildWindow); } if( m_pChildWindow ) @@ -1143,7 +1143,7 @@ bool OpenGLContext::initWindow() if( !m_pChildWindow ) { m_pChildWindow = new SystemChildWindow(mpWindow, 0, &winData, false); - m_pChildWindowGC.reset(m_pChildWindow); + m_xChildWindowGC.reset(m_pChildWindow); } pChildSysData = m_pChildWindow->GetSystemData(); } @@ -1447,8 +1447,8 @@ void OpenGLContext::show() { if (m_pChildWindow) m_pChildWindow->Show(); - else if (m_pWindow) - m_pWindow->Show(); + else if (m_xWindow) + m_xWindow->Show(); } SystemChildWindow* OpenGLContext::getChildWindow() diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index d6239d19c874..2c6e27f9c710 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -88,7 +88,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, // do nothing if the rectangle is empty if ( !aRect.IsEmpty() ) { - tools::PolyPolygon aClipPolyPoly( ImplLogicToDevicePixel( rPolyPoly ) ); + tools::PolyPolygon aClixPolyPoly( ImplLogicToDevicePixel( rPolyPoly ) ); bool bDrawn = false; if( !mpGraphics && !AcquireGraphics() ) @@ -102,7 +102,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, InitClipRegion(); // try to draw gradient natively - bDrawn = mpGraphics->DrawGradient( aClipPolyPoly, aGradient, this ); + bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient, this ); if( !bDrawn && !mbOutputClipped ) { @@ -132,9 +132,9 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, // if the clipping polypolygon is a rectangle, then it's the same size as the bounding of the // polypolygon, so pass in a NULL for the clipping parameter if( aGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL ) - DrawLinearGradient( aRect, aGradient, aClipPolyPoly.IsRect() ? NULL : &aClipPolyPoly ); + DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly ); else - DrawComplexGradient( aRect, aGradient, aClipPolyPoly.IsRect() ? NULL : &aClipPolyPoly ); + DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly ); } Pop(); @@ -251,7 +251,7 @@ namespace void OutputDevice::DrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, - const tools::PolyPolygon* pClipPolyPoly ) + const tools::PolyPolygon* pClixPolyPoly ) { // get BoundRect of rotated rectangle Rectangle aRect; @@ -329,7 +329,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, aPoly[3] = aBorderRect.BottomLeft(); aPoly.Rotate( aCenter, nAngle ); - ImplDrawPolygon( aPoly, pClipPolyPoly ); + ImplDrawPolygon( aPoly, pClixPolyPoly ); if ( !bLinear) { @@ -342,7 +342,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, aPoly[3] = aBorderRect.BottomLeft(); aPoly.Rotate( aCenter, nAngle ); - ImplDrawPolygon( aPoly, pClipPolyPoly ); + ImplDrawPolygon( aPoly, pClixPolyPoly ); } } @@ -393,7 +393,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, aPoly[3] = aRect.BottomLeft(); aPoly.Rotate( aCenter, nAngle ); - ImplDrawPolygon( aPoly, pClipPolyPoly ); + ImplDrawPolygon( aPoly, pClixPolyPoly ); if ( !bLinear ) { @@ -405,7 +405,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, aPoly[3] = aMirrorRect.BottomLeft(); aPoly.Rotate( aCenter, nAngle ); - ImplDrawPolygon( aPoly, pClipPolyPoly ); + ImplDrawPolygon( aPoly, pClixPolyPoly ); } } if ( !bLinear) @@ -425,13 +425,13 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, aPoly[3] = aRect.BottomLeft(); aPoly.Rotate( aCenter, nAngle ); - ImplDrawPolygon( aPoly, pClipPolyPoly ); + ImplDrawPolygon( aPoly, pClixPolyPoly ); } } void OutputDevice::DrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, - const tools::PolyPolygon* pClipPolyPoly ) + const tools::PolyPolygon* pClixPolyPoly ) { // Determine if we output via Polygon or PolyPolygon // For all rasteroperations other then Overpaint always use PolyPolygon, @@ -439,7 +439,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, // Also for printers always use PolyPolygon, as not all printers // can print polygons on top of each other. - boost::scoped_ptr<tools::PolyPolygon> pPolyPoly; + std::unique_ptr<tools::PolyPolygon> xPolyPoly; Rectangle aRect; Point aCenter; Color aStartCol( rGradient.GetStartColor() ); @@ -458,7 +458,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, rGradient.GetBoundRect( rRect, aRect, aCenter ); if ( UsePolyPolygonForComplexGradient() ) - pPolyPoly.reset(new tools::PolyPolygon( 2 )); + xPolyPoly.reset(new tools::PolyPolygon( 2 )); bool bMtf = false; bool bComplex = true; @@ -500,10 +500,10 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); - if( pPolyPoly ) + if( xPolyPoly ) { - pPolyPoly->Insert( aPoly = rRect ); - pPolyPoly->Insert( aPoly ); + xPolyPoly->Insert( aPoly = rRect ); + xPolyPoly->Insert( aPoly ); } else { @@ -515,7 +515,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, aExtRect.Right() += 1; aExtRect.Bottom() += 1; - ImplDrawPolygon( aPoly = aExtRect, pClipPolyPoly ); + ImplDrawPolygon( aPoly = aExtRect, pClixPolyPoly ); } // loop to output Polygone/PolyPolygone sequentially @@ -538,23 +538,23 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, aPoly.Rotate( aCenter, nAngle ); // adapt colour accordingly - const long nStepIndex = ( ( pPolyPoly ) ? i : ( i + 1 ) ); + const long nStepIndex = ( ( xPolyPoly ) ? i : ( i + 1 ) ); nRed = GetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) ); nGreen = GetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) ); nBlue = GetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) ); // either slow tools::PolyPolygon output or fast Polygon-Paiting - if( pPolyPoly ) + if( xPolyPoly ) { bPaintLastPolygon = true; // #107349# Paint last polygon only if loop has generated any output - pPolyPoly->Replace( pPolyPoly->GetObject( 1 ), 0 ); - pPolyPoly->Replace( aPoly, 1 ); + xPolyPoly->Replace( xPolyPoly->GetObject( 1 ), 0 ); + xPolyPoly->Replace( aPoly, 1 ); - ImplDrawPolyPolygon( *pPolyPoly, pClipPolyPoly ); + ImplDrawPolyPolygon( *xPolyPoly, pClixPolyPoly ); // #107349# Set fill color _after_ geometry painting: - // pPolyPoly's geometry is the band from last iteration's + // xPolyPoly's geometry is the band from last iteration's // aPoly to current iteration's aPoly. The window outdev // path (see else below), on the other hand, paints the // full aPoly. Thus, here, we're painting the band before @@ -567,14 +567,14 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, // #107349# Set fill color _before_ geometry painting mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); - ImplDrawPolygon( aPoly, pClipPolyPoly ); + ImplDrawPolygon( aPoly, pClixPolyPoly ); } } // we should draw last inner Polygon if we output PolyPolygon - if( pPolyPoly ) + if( xPolyPoly ) { - const Polygon& rPoly = pPolyPoly->GetObject( 1 ); + const Polygon& rPoly = xPolyPoly->GetObject( 1 ); if( !rPoly.GetBoundRect().IsEmpty() ) { @@ -589,7 +589,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, } mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); - ImplDrawPolygon( rPoly, pClipPolyPoly ); + ImplDrawPolygon( rPoly, pClixPolyPoly ); } } } @@ -781,7 +781,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, // Also for printers always use PolyPolygon, as not all printers // can print polygons on top of each other. - boost::scoped_ptr<tools::PolyPolygon> pPolyPoly; + std::unique_ptr<tools::PolyPolygon> xPolyPoly; Rectangle aRect; Point aCenter; Color aStartCol( rGradient.GetStartColor() ); @@ -799,7 +799,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, rGradient.GetBoundRect( rRect, aRect, aCenter ); - pPolyPoly.reset(new tools::PolyPolygon( 2 )); + xPolyPoly.reset(new tools::PolyPolygon( 2 )); // last parameter - true if complex gradient, false if linear long nStepCount = GetGradientSteps( rGradient, rRect, true, true ); @@ -840,8 +840,8 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); - pPolyPoly->Insert( aPoly = rRect ); - pPolyPoly->Insert( aPoly ); + xPolyPoly->Insert( aPoly = rRect ); + xPolyPoly->Insert( aPoly ); // loop to output Polygone/PolyPolygone sequentially for( long i = 1; i < nSteps; i++ ) @@ -863,20 +863,20 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, aPoly.Rotate( aCenter, nAngle ); // adapt colour accordingly - const long nStepIndex = ( ( pPolyPoly ) ? i : ( i + 1 ) ); + const long nStepIndex = ( ( xPolyPoly ) ? i : ( i + 1 ) ); nRed = GetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) ); nGreen = GetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) ); nBlue = GetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) ); bPaintLastPolygon = true; // #107349# Paint last polygon only if loop has generated any output - pPolyPoly->Replace( pPolyPoly->GetObject( 1 ), 0 ); - pPolyPoly->Replace( aPoly, 1 ); + xPolyPoly->Replace( xPolyPoly->GetObject( 1 ), 0 ); + xPolyPoly->Replace( aPoly, 1 ); - mpMetaFile->AddAction( new MetaPolyPolygonAction( *pPolyPoly ) ); + mpMetaFile->AddAction( new MetaPolyPolygonAction( *xPolyPoly ) ); // #107349# Set fill color _after_ geometry painting: - // pPolyPoly's geometry is the band from last iteration's + // xPolyPoly's geometry is the band from last iteration's // aPoly to current iteration's aPoly. The window outdev // path (see else below), on the other hand, paints the // full aPoly. Thus, here, we're painting the band before @@ -885,7 +885,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); } - const Polygon& rPoly = pPolyPoly->GetObject( 1 ); + const Polygon& rPoly = xPolyPoly->GetObject( 1 ); if( !rPoly.GetBoundRect().IsEmpty() ) { diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 694cac55b75b..c180114315f1 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -682,12 +682,12 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, if( !aDstRect.IsEmpty() ) { - boost::scoped_ptr<VirtualDevice> pVDev(new VirtualDevice); + std::unique_ptr<VirtualDevice> xVDev(new VirtualDevice); - ((OutputDevice*)pVDev.get())->mnDPIX = mnDPIX; - ((OutputDevice*)pVDev.get())->mnDPIY = mnDPIY; + ((OutputDevice*)xVDev.get())->mnDPIX = mnDPIX; + ((OutputDevice*)xVDev.get())->mnDPIY = mnDPIY; - if( pVDev->SetOutputSizePixel( aDstRect.GetSize() ) ) + if( xVDev->SetOutputSizePixel( aDstRect.GetSize() ) ) { if(GetAntialiasing()) { @@ -696,48 +696,48 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // into account that the content is AntiAlialised and needs to be masked // like that. Instead of masking, i will use a copy-modify-paste cycle // here (as i already use in the VclPrimiziveRenderer with successs) - pVDev->SetAntialiasing(GetAntialiasing()); + xVDev->SetAntialiasing(GetAntialiasing()); // create MapMode for buffer (offset needed) and set MapMode aMap(GetMapMode()); const Point aOutPos(PixelToLogic(aDstRect.TopLeft())); aMap.SetOrigin(Point(-aOutPos.X(), -aOutPos.Y())); - pVDev->SetMapMode(aMap); + xVDev->SetMapMode(aMap); // copy MapMode state and disable for target const bool bOrigMapModeEnabled(IsMapModeEnabled()); EnableMapMode(false); // copy MapMode state and disable for buffer - const bool bBufferMapModeEnabled(pVDev->IsMapModeEnabled()); - pVDev->EnableMapMode(false); + const bool bBufferMapModeEnabled(xVDev->IsMapModeEnabled()); + xVDev->EnableMapMode(false); // copy content from original to buffer - pVDev->DrawOutDev( aPoint, pVDev->GetOutputSizePixel(), // dest - aDstRect.TopLeft(), pVDev->GetOutputSizePixel(), // source + xVDev->DrawOutDev( aPoint, xVDev->GetOutputSizePixel(), // dest + aDstRect.TopLeft(), xVDev->GetOutputSizePixel(), // source *this); // draw MetaFile to buffer - pVDev->EnableMapMode(bBufferMapModeEnabled); + xVDev->EnableMapMode(bBufferMapModeEnabled); ((GDIMetaFile&)rMtf).WindStart(); - ((GDIMetaFile&)rMtf).Play(pVDev.get(), rPos, rSize); + ((GDIMetaFile&)rMtf).Play(xVDev.get(), rPos, rSize); ((GDIMetaFile&)rMtf).WindStart(); // get content bitmap from buffer - pVDev->EnableMapMode(false); + xVDev->EnableMapMode(false); - const Bitmap aPaint(pVDev->GetBitmap(aPoint, pVDev->GetOutputSizePixel())); + const Bitmap aPaint(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel())); // create alpha mask from gradient and get as Bitmap - pVDev->EnableMapMode(bBufferMapModeEnabled); - pVDev->SetDrawMode(DRAWMODE_GRAYGRADIENT); - pVDev->DrawGradient(Rectangle(rPos, rSize), rTransparenceGradient); - pVDev->SetDrawMode(DRAWMODE_DEFAULT); - pVDev->EnableMapMode(false); + xVDev->EnableMapMode(bBufferMapModeEnabled); + xVDev->SetDrawMode(DRAWMODE_GRAYGRADIENT); + xVDev->DrawGradient(Rectangle(rPos, rSize), rTransparenceGradient); + xVDev->SetDrawMode(DRAWMODE_DEFAULT); + xVDev->EnableMapMode(false); - const AlphaMask aAlpha(pVDev->GetBitmap(aPoint, pVDev->GetOutputSizePixel())); + const AlphaMask aAlpha(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel())); - pVDev.reset(); + xVDev.reset(); // draw masked content to target and restore MapMode DrawBitmapEx(aDstRect.TopLeft(), BitmapEx(aPaint, aAlpha)); @@ -752,40 +752,40 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const bool bOldMap = mbMap; aMap.SetOrigin( Point( -aOutPos.X(), -aOutPos.Y() ) ); - pVDev->SetMapMode( aMap ); - const bool bVDevOldMap = pVDev->IsMapModeEnabled(); + xVDev->SetMapMode( aMap ); + const bool bVDevOldMap = xVDev->IsMapModeEnabled(); // create paint bitmap ( (GDIMetaFile&) rMtf ).WindStart(); - ( (GDIMetaFile&) rMtf ).Play( pVDev.get(), rPos, rSize ); + ( (GDIMetaFile&) rMtf ).Play( xVDev.get(), rPos, rSize ); ( (GDIMetaFile&) rMtf ).WindStart(); - pVDev->EnableMapMode( false ); - aPaint = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); - pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here! + xVDev->EnableMapMode( false ); + aPaint = xVDev->GetBitmap( Point(), xVDev->GetOutputSizePixel() ); + xVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here! // create mask bitmap - pVDev->SetLineColor( COL_BLACK ); - pVDev->SetFillColor( COL_BLACK ); - pVDev->DrawRect( Rectangle( pVDev->PixelToLogic( Point() ), pVDev->GetOutputSize() ) ); - pVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT | + xVDev->SetLineColor( COL_BLACK ); + xVDev->SetFillColor( COL_BLACK ); + xVDev->DrawRect( Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) ); + xVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT | DRAWMODE_WHITEBITMAP | DRAWMODE_WHITEGRADIENT ); ( (GDIMetaFile&) rMtf ).WindStart(); - ( (GDIMetaFile&) rMtf ).Play( pVDev.get(), rPos, rSize ); + ( (GDIMetaFile&) rMtf ).Play( xVDev.get(), rPos, rSize ); ( (GDIMetaFile&) rMtf ).WindStart(); - pVDev->EnableMapMode( false ); - aMask = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); - pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here! + xVDev->EnableMapMode( false ); + aMask = xVDev->GetBitmap( Point(), xVDev->GetOutputSizePixel() ); + xVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here! // create alpha mask from gradient - pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); - pVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient ); - pVDev->SetDrawMode( DRAWMODE_DEFAULT ); - pVDev->EnableMapMode( false ); - pVDev->DrawMask( Point(), pVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) ); + xVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); + xVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient ); + xVDev->SetDrawMode( DRAWMODE_DEFAULT ); + xVDev->EnableMapMode( false ); + xVDev->DrawMask( Point(), xVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) ); - aAlpha = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); + aAlpha = xVDev->GetBitmap( Point(), xVDev->GetOutputSizePixel() ); - pVDev.reset(); + xVDev.reset(); EnableMapMode( false ); DrawBitmapEx( aDstRect.TopLeft(), BitmapEx( aPaint, aAlpha ) ); diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx index d132469c63ed..741940f45e2d 100644 --- a/vcl/source/window/openglwin.cxx +++ b/vcl/source/window/openglwin.cxx @@ -19,22 +19,22 @@ public: OpenGLContext& getContext() { return maContext;} private: OpenGLContext maContext; - boost::scoped_ptr<SystemChildWindow> mpChildWindow; + std::unique_ptr<SystemChildWindow> mxChildWindow; }; OpenGLWindowImpl::OpenGLWindowImpl(vcl::Window* pWindow) { SystemWindowData aData = OpenGLContext::generateWinData(pWindow, false); - mpChildWindow.reset(new SystemChildWindow(pWindow, 0, &aData)); - mpChildWindow->Show(); - maContext.init(mpChildWindow.get()); + mxChildWindow.reset(new SystemChildWindow(pWindow, 0, &aData)); + mxChildWindow->Show(); + maContext.init(mxChildWindow.get()); pWindow->SetMouseTransparent(false); } OpenGLWindow::OpenGLWindow(vcl::Window* pParent): Window(pParent, 0), - mpImpl(new OpenGLWindowImpl(this)), + mxImpl(new OpenGLWindowImpl(this)), mpRenderer(NULL) { } @@ -47,7 +47,7 @@ OpenGLWindow::~OpenGLWindow() OpenGLContext& OpenGLWindow::getContext() { - return mpImpl->getContext(); + return mxImpl->getContext(); } void OpenGLWindow::Paint(const Rectangle&) diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx index 65522c6a41c9..782cc9063b3a 100644 --- a/vcl/unx/generic/app/sm.cxx +++ b/vcl/unx/generic/app/sm.cxx @@ -141,8 +141,8 @@ public: }; SalSession * SessionManagerClient::m_pSession = NULL; -boost::scoped_ptr< ICEConnectionObserver > -SessionManagerClient::m_pICEConnectionObserver; +std::unique_ptr< ICEConnectionObserver > +SessionManagerClient::m_xICEConnectionObserver; SmcConn SessionManagerClient::m_pSmcConnection = NULL; OString SessionManagerClient::m_aClientID; bool SessionManagerClient::m_bDocSaveDone = false; // HACK @@ -403,8 +403,8 @@ void SessionManagerClient::saveDone() { if( m_pSmcConnection ) { - assert(m_pICEConnectionObserver); - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + assert(m_xICEConnectionObserver); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); SmcSetProperties( m_pSmcConnection, nSmProps, ppSmProps ); SmcSaveYourselfDone( m_pSmcConnection, True ); SAL_INFO("vcl.sm", "sent SaveYourselfDone SmRestartHint of " << *pSmRestartHint ); @@ -414,17 +414,17 @@ void SessionManagerClient::saveDone() void SessionManagerClient::open(SalSession * pSession) { - assert(!m_pSession && !m_pICEConnectionObserver && !m_pSmcConnection); + assert(!m_pSession && !m_xICEConnectionObserver && !m_pSmcConnection); // must only be called once m_pSession = pSession; // This is the way Xt does it, so we can too: if( getenv( "SESSION_MANAGER" ) ) { - m_pICEConnectionObserver.reset(new ICEConnectionObserver); - m_pICEConnectionObserver->activate(); + m_xICEConnectionObserver.reset(new ICEConnectionObserver); + m_xICEConnectionObserver->activate(); { - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); static SmcCallbacks aCallbacks; // does this need to be static? aCallbacks.save_yourself.callback = SaveYourselfProc; @@ -489,15 +489,15 @@ void SessionManagerClient::close() { if( m_pSmcConnection ) { - assert(m_pICEConnectionObserver); + assert(m_xICEConnectionObserver); { - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); SAL_INFO("vcl.sm", "attempting SmcCloseConnection"); SmcCloseConnection( m_pSmcConnection, 0, NULL ); SAL_INFO("vcl.sm", "SmcConnection closed"); } - m_pICEConnectionObserver->deactivate(); - m_pICEConnectionObserver.reset(); + m_xICEConnectionObserver->deactivate(); + m_xICEConnectionObserver.reset(); m_pSmcConnection = NULL; } } @@ -507,8 +507,8 @@ bool SessionManagerClient::queryInteraction() bool bRet = false; if( m_pSmcConnection ) { - assert(m_pICEConnectionObserver); - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + assert(m_xICEConnectionObserver); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); if( SmcInteractRequest( m_pSmcConnection, SmDialogNormal, InteractProc, NULL ) ) bRet = true; } @@ -519,8 +519,8 @@ void SessionManagerClient::interactionDone( bool bCancelShutdown ) { if( m_pSmcConnection ) { - assert(m_pICEConnectionObserver); - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + assert(m_xICEConnectionObserver); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); SmcInteractDone( m_pSmcConnection, bCancelShutdown ? True : False ); } } diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 17a9a10a57f7..07f8efc7eefa 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -641,12 +641,12 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, // #i60699# No chance to handle graphics exposures - we copy // to a temp bitmap first, into which no repaints are // technically possible. - boost::scoped_ptr<SalBitmap> pDDB(pSrcGraphics->getBitmap( rPosAry.mnSrcX, + std::unique_ptr<SalBitmap> xDDB(pSrcGraphics->getBitmap( rPosAry.mnSrcX, rPosAry.mnSrcY, rPosAry.mnSrcWidth, rPosAry.mnSrcHeight )); - if( !pDDB ) + if( !xDDB ) { stderr0( "SalGraphics::CopyBits !pSrcGraphics->GetBitmap()\n" ); return; @@ -655,7 +655,7 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, SalTwoRect aPosAry( rPosAry ); aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0; - drawBitmap( aPosAry, *pDDB ); + drawBitmap( aPosAry, *xDDB ); } else { stderr0( "X11SalGraphicsImpl::CopyBits from Printer not yet implemented\n" ); diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index 8a38b1bfba6c..45f0a9cd1637 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -50,7 +50,7 @@ #include <valgrind/memcheck.h> #endif -#include <boost/scoped_ptr.hpp> +#include <memory> // - SalBitmap - @@ -414,8 +414,8 @@ XImage* X11SalBitmap::ImplCreateXImage( { BitmapBuffer* pDstBuf; sal_uLong nDstFormat = BMP_FORMAT_TOP_DOWN; - boost::scoped_ptr<BitmapPalette> pPal; - boost::scoped_ptr<ColorMask> pMask; + std::unique_ptr<BitmapPalette> xPal; + std::unique_ptr<ColorMask> xMask; switch( pImage->bits_per_pixel ) { @@ -454,7 +454,7 @@ XImage* X11SalBitmap::ImplCreateXImage( #endif - pMask.reset(new ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask )); + xMask.reset(new ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask )); } break; @@ -485,17 +485,17 @@ XImage* X11SalBitmap::ImplCreateXImage( if( pImage->depth == 1 ) { - pPal.reset(new BitmapPalette( 2 )); - (*pPal)[ 0 ] = Color( COL_BLACK ); - (*pPal)[ 1 ] = Color( COL_WHITE ); + xPal.reset(new BitmapPalette( 2 )); + (*xPal)[ 0 ] = Color( COL_BLACK ); + (*xPal)[ 1 ] = Color( COL_WHITE ); } else if( pImage->depth == 8 && mbGrey ) { - pPal.reset(new BitmapPalette( 256 )); + xPal.reset(new BitmapPalette( 256 )); for( sal_uInt16 i = 0; i < 256; i++ ) { - BitmapColor& rBmpCol = (*pPal)[ i ]; + BitmapColor& rBmpCol = (*xPal)[ i ]; rBmpCol.SetRed( i ); rBmpCol.SetGreen( i ); @@ -510,12 +510,12 @@ XImage* X11SalBitmap::ImplCreateXImage( , (sal_uLong)(1 << pImage->depth) ); - pPal.reset(new BitmapPalette( nCols )); + xPal.reset(new BitmapPalette( nCols )); for( sal_uInt16 i = 0; i < nCols; i++ ) { const SalColor nColor( rColMap.GetColor( i ) ); - BitmapColor& rBmpCol = (*pPal)[ i ]; + BitmapColor& rBmpCol = (*xPal)[ i ]; rBmpCol.SetRed( SALCOLOR_RED( nColor ) ); rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) ); @@ -523,9 +523,9 @@ XImage* X11SalBitmap::ImplCreateXImage( } } - pDstBuf = StretchAndConvert( *mpDIB, rTwoRect, nDstFormat, pPal.get(), pMask.get() ); - pPal.reset(); - pMask.reset(); + pDstBuf = StretchAndConvert( *mpDIB, rTwoRect, nDstFormat, xPal.get(), xMask.get() ); + xPal.reset(); + xMask.reset(); if( pDstBuf && pDstBuf->mpBits ) { diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 673e5cf1a5af..8bd40736e3ec 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -85,13 +85,13 @@ X11SalGraphics::X11SalGraphics(): { if (OpenGLHelper::isVCLOpenGLEnabled()) { - mpImpl.reset(new X11OpenGLSalGraphicsImpl(*this)); - mpTextRenderImpl.reset((new OpenGLX11CairoTextRender(false, *this))); + mxImpl.reset(new X11OpenGLSalGraphicsImpl(*this)); + mxTextRenderImpl.reset((new OpenGLX11CairoTextRender(false, *this))); } else { - mpTextRenderImpl.reset((new X11CairoTextRender(false, *this))); - mpImpl.reset(new X11SalGraphicsImpl(*this)); + mxTextRenderImpl.reset((new X11CairoTextRender(false, *this))); + mxImpl.reset(new X11SalGraphicsImpl(*this)); } } @@ -109,7 +109,7 @@ void X11SalGraphics::freeResources() DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" ); if( mpClipRegion ) XDestroyRegion( mpClipRegion ), mpClipRegion = None; - mpImpl->freeResources(); + mxImpl->freeResources(); if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None; if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None; @@ -124,7 +124,7 @@ void X11SalGraphics::freeResources() SalGraphicsImpl* X11SalGraphics::GetImpl() const { - return mpImpl.get(); + return mxImpl.get(); } void X11SalGraphics::SetDrawable( Drawable aDrawable, SalX11Screen nXScreen ) @@ -165,7 +165,7 @@ void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, bVirDev_ = false; SetDrawable( aTarget, nXScreen ); - mpImpl->Init(); + mxImpl->Init(); } void X11SalGraphics::DeInit() @@ -314,123 +314,123 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons sal_uInt16 X11SalGraphics::GetBitCount() const { - return mpImpl->GetBitCount(); + return mxImpl->GetBitCount(); } long X11SalGraphics::GetGraphicsWidth() const { - return mpImpl->GetGraphicsWidth(); + return mxImpl->GetGraphicsWidth(); } void X11SalGraphics::ResetClipRegion() { - mpImpl->ResetClipRegion(); + mxImpl->ResetClipRegion(); } bool X11SalGraphics::setClipRegion( const vcl::Region& i_rClip ) { - return mpImpl->setClipRegion( i_rClip ); + return mxImpl->setClipRegion( i_rClip ); } void X11SalGraphics::SetLineColor() { - mpImpl->SetLineColor(); + mxImpl->SetLineColor(); } void X11SalGraphics::SetLineColor( SalColor nSalColor ) { - mpImpl->SetLineColor( nSalColor ); + mxImpl->SetLineColor( nSalColor ); } void X11SalGraphics::SetFillColor() { - mpImpl->SetFillColor(); + mxImpl->SetFillColor(); } void X11SalGraphics::SetFillColor( SalColor nSalColor ) { - mpImpl->SetFillColor( nSalColor ); + mxImpl->SetFillColor( nSalColor ); } void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor ) { - mpImpl->SetROPLineColor( nROPColor ); + mxImpl->SetROPLineColor( nROPColor ); } void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor ) { - mpImpl->SetROPFillColor( nROPColor ); + mxImpl->SetROPFillColor( nROPColor ); } void X11SalGraphics::SetXORMode( bool bSet, bool bInvertOnly ) { - mpImpl->SetXORMode( bSet, bInvertOnly ); + mxImpl->SetXORMode( bSet, bInvertOnly ); } void X11SalGraphics::drawPixel( long nX, long nY ) { - mpImpl->drawPixel( nX, nY ); + mxImpl->drawPixel( nX, nY ); } void X11SalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) { - mpImpl->drawPixel( nX, nY, nSalColor ); + mxImpl->drawPixel( nX, nY, nSalColor ); } void X11SalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) { - mpImpl->drawLine( nX1, nY1, nX2, nY2 ); + mxImpl->drawLine( nX1, nY1, nX2, nY2 ); } void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY ) { - mpImpl->drawRect( nX, nY, nDX, nDY ); + mxImpl->drawRect( nX, nY, nDX, nDY ); } void X11SalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) { - mpImpl->drawPolyLine( nPoints, pPtAry ); + mxImpl->drawPolyLine( nPoints, pPtAry ); } void X11SalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) { - mpImpl->drawPolygon( nPoints, pPtAry ); + mxImpl->drawPolygon( nPoints, pPtAry ); } void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32 *pPoints, PCONSTSALPOINT *pPtAry ) { - mpImpl->drawPolyPolygon( nPoly, pPoints, pPtAry ); + mxImpl->drawPolyPolygon( nPoly, pPoints, pPtAry ); } bool X11SalGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) { - return mpImpl->drawPolyLineBezier( nPoints, pPtAry, pFlgAry ); + return mxImpl->drawPolyLineBezier( nPoints, pPtAry, pFlgAry ); } bool X11SalGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) { - return mpImpl->drawPolygonBezier( nPoints, pPtAry, pFlgAry ); + return mxImpl->drawPolygonBezier( nPoints, pPtAry, pFlgAry ); } bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoints, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry) { - return mpImpl->drawPolyPolygonBezier( nPoints, pPoints, pPtAry, pFlgAry ); + return mxImpl->drawPolyPolygonBezier( nPoints, pPoints, pPtAry, pFlgAry ); } void X11SalGraphics::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) { - mpImpl->invert( nPoints, pPtAry, nFlags ); + mxImpl->invert( nPoints, pPtAry, nFlags ); } bool X11SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) { - return mpImpl->drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize ); + return mxImpl->drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize ); } XRenderPictFormat* X11SalGraphics::GetXRenderFormat() const @@ -458,7 +458,7 @@ SystemGraphicsData X11SalGraphics::GetGraphicsData() const // draw a poly-polygon bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPolyPoly, double fTransparency ) { - return mpImpl->drawPolyPolygon( rOrigPolyPoly, fTransparency ); + return mxImpl->drawPolyPolygon( rOrigPolyPoly, fTransparency ); } bool X11SalGraphics::drawPolyLine( @@ -468,23 +468,23 @@ bool X11SalGraphics::drawPolyLine( basegfx::B2DLineJoin eLineJoin, com::sun::star::drawing::LineCap eLineCap) { - return mpImpl->drawPolyLine( rPolygon, fTransparency, rLineWidth, + return mxImpl->drawPolyLine( rPolygon, fTransparency, rLineWidth, eLineJoin, eLineCap ); } bool X11SalGraphics::drawGradient(const tools::PolyPolygon& rPoly, const Gradient& rGradient) { - return mpImpl->drawGradient(rPoly, rGradient); + return mxImpl->drawGradient(rPoly, rGradient); } void X11SalGraphics::BeginPaint() { - return mpImpl->beginPaint(); + return mxImpl->beginPaint(); } void X11SalGraphics::EndPaint() { - return mpImpl->endPaint(); + return mxImpl->endPaint(); } SalGeometryProvider *X11SalGraphics::GetGeometryProvider() const diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx index bd9238001468..850b2a84ee41 100644 --- a/vcl/unx/generic/gdi/salgdi2.cxx +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -39,7 +39,6 @@ #include "vcl/bmpacc.hxx" #include <outdata.hxx> -#include <boost/scoped_ptr.hpp> void X11SalGraphics::CopyScreenArea( Display* pDisplay, Drawable aSrc, SalX11Screen nXScreenSrc, int nSrcDepth, @@ -80,14 +79,14 @@ void X11SalGraphics::CopyScreenArea( Display* pDisplay, bool X11SalGraphics::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) { - X11GraphicsImpl& rImpl = dynamic_cast<X11GraphicsImpl&>(*mpImpl.get()); + X11GraphicsImpl& rImpl = dynamic_cast<X11GraphicsImpl&>(*mxImpl.get()); return rImpl.FillPixmapFromScreen( pPixmap, nX, nY ); } bool X11SalGraphics::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY ) { SAL_INFO( "vcl", "RenderPixmapToScreen" ); - X11GraphicsImpl& rImpl = dynamic_cast<X11GraphicsImpl&>(*mpImpl.get()); + X11GraphicsImpl& rImpl = dynamic_cast<X11GraphicsImpl&>(*mxImpl.get()); return rImpl.RenderPixmapToScreen( pPixmap, pMask, nX, nY ); } @@ -151,7 +150,7 @@ void X11SalGraphics::YieldGraphicsExpose() void X11SalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics *pSSrcGraphics ) { - mpImpl->copyBits( rPosAry, pSSrcGraphics ); + mxImpl->copyBits( rPosAry, pSSrcGraphics ); } void X11SalGraphics::copyArea ( long nDestX, long nDestY, @@ -159,13 +158,13 @@ void X11SalGraphics::copyArea ( long nDestX, long nDestY, long nSrcWidth, long nSrcHeight, sal_uInt16 n ) { - mpImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, n ); + mxImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, n ); } bool X11SalGraphics::blendBitmap( const SalTwoRect& rTR, const SalBitmap& rBitmap ) { - return mpImpl->blendBitmap( rTR, rBitmap ); + return mxImpl->blendBitmap( rTR, rBitmap ); } bool X11SalGraphics::blendAlphaBitmap( const SalTwoRect& rTR, @@ -173,31 +172,31 @@ bool X11SalGraphics::blendAlphaBitmap( const SalTwoRect& rTR, const SalBitmap& rMaskBitmap, const SalBitmap& rAlphaBitmap ) { - return mpImpl->blendAlphaBitmap( rTR, rSrcBitmap, rMaskBitmap, rAlphaBitmap ); + return mxImpl->blendAlphaBitmap( rTR, rSrcBitmap, rMaskBitmap, rAlphaBitmap ); } void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) { - mpImpl->drawBitmap( rPosAry, rSalBitmap ); + mxImpl->drawBitmap( rPosAry, rSalBitmap ); } void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSrcBitmap, const SalBitmap& rMaskBitmap ) { - mpImpl->drawBitmap( rPosAry, rSrcBitmap, rMaskBitmap ); + mxImpl->drawBitmap( rPosAry, rSrcBitmap, rMaskBitmap ); } bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, const SalBitmap& rSrcBitmap, const SalBitmap& rAlphaBmp ) { - return mpImpl->drawAlphaBitmap( rTR, rSrcBitmap, rAlphaBmp ); + return mxImpl->drawAlphaBitmap( rTR, rSrcBitmap, rAlphaBmp ); } bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, const SalBitmap& rBitmap ) { - return mpImpl->drawAlphaBitmap( rTR, rBitmap ); + return mxImpl->drawAlphaBitmap( rTR, rBitmap ); } bool X11SalGraphics::drawTransformedBitmap( @@ -207,37 +206,37 @@ bool X11SalGraphics::drawTransformedBitmap( const SalBitmap& rSourceBitmap, const SalBitmap* pAlphaBitmap) { - return mpImpl->drawTransformedBitmap( rNull, rX, rY, rSourceBitmap, pAlphaBitmap ); + return mxImpl->drawTransformedBitmap( rNull, rX, rY, rSourceBitmap, pAlphaBitmap ); } bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) { - return mpImpl->drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency ); + return mxImpl->drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency ); } void X11SalGraphics::drawBitmap( const SalTwoRect& rRect, const SalBitmap& rBitmap, SalColor nColor ) { - mpImpl->drawBitmap( rRect, rBitmap, nColor ); + mxImpl->drawBitmap( rRect, rBitmap, nColor ); } void X11SalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap &rSalBitmap, SalColor nMaskColor ) { - mpImpl->drawMask( rPosAry, rSalBitmap, nMaskColor ); + mxImpl->drawMask( rPosAry, rSalBitmap, nMaskColor ); } SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) { - return mpImpl->getBitmap( nX, nY, nDX, nDY ); + return mxImpl->getBitmap( nX, nY, nDX, nDY ); } SalColor X11SalGraphics::getPixel( long nX, long nY ) { - return mpImpl->getPixel( nX, nY ); + return mxImpl->getPixel( nX, nY ); } void X11SalGraphics::invert( long nX, @@ -246,7 +245,7 @@ void X11SalGraphics::invert( long nX, long nDY, SalInvert nFlags ) { - mpImpl->invert( nX, nY, nDX, nDY, nFlags ); + mxImpl->invert( nX, nY, nDX, nDY, nFlags ); } bool X11SalGraphics::supportsOperation( OutDevSupportType eType ) const diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx index 622f77860e66..53afb0107aec 100644 --- a/vcl/unx/generic/gdi/salgdi3.cxx +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -91,30 +91,30 @@ X11SalGraphics::GetFontGC() void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) { - mpTextRenderImpl->DrawServerFontLayout(rLayout); + mxTextRenderImpl->DrawServerFontLayout(rLayout); } const FontCharMapPtr X11SalGraphics::GetFontCharMap() const { - return mpTextRenderImpl->GetFontCharMap(); + return mxTextRenderImpl->GetFontCharMap(); } bool X11SalGraphics::GetFontCapabilities(vcl::FontCapabilities &rGetImplFontCapabilities) const { - return mpTextRenderImpl->GetFontCapabilities(rGetImplFontCapabilities); + return mxTextRenderImpl->GetFontCapabilities(rGetImplFontCapabilities); } // SalGraphics sal_uInt16 X11SalGraphics::SetFont( FontSelectPattern *pEntry, int nFallbackLevel ) { - return mpTextRenderImpl->SetFont(pEntry, nFallbackLevel); + return mxTextRenderImpl->SetFont(pEntry, nFallbackLevel); } void X11SalGraphics::SetTextColor( SalColor nSalColor ) { - mpTextRenderImpl->SetTextColor(nSalColor); + mxTextRenderImpl->SetTextColor(nSalColor); nTextPixel_ = GetPixel( nSalColor ); bFontGC_ = false; } @@ -123,44 +123,44 @@ bool X11SalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection, const OUString& rFileURL, const OUString& rFontName ) { - return mpTextRenderImpl->AddTempDevFont(pFontCollection, rFileURL, rFontName); + return mxTextRenderImpl->AddTempDevFont(pFontCollection, rFileURL, rFontName); } void X11SalGraphics::ClearDevFontCache() { - mpTextRenderImpl->ClearDevFontCache(); + mxTextRenderImpl->ClearDevFontCache(); } void X11SalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection ) { - mpTextRenderImpl->GetDevFontList(pFontCollection); + mxTextRenderImpl->GetDevFontList(pFontCollection); } void X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel ) { - mpTextRenderImpl->GetFontMetric(pMetric, nFallbackLevel); + mxTextRenderImpl->GetFontMetric(pMetric, nFallbackLevel); } bool X11SalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) { - return mpTextRenderImpl->GetGlyphBoundRect(aGlyphId, rRect); + return mxTextRenderImpl->GetGlyphBoundRect(aGlyphId, rRect); } bool X11SalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, ::basegfx::B2DPolyPolygon& rPolyPoly ) { - return mpTextRenderImpl->GetGlyphOutline(aGlyphId, rPolyPoly); + return mxTextRenderImpl->GetGlyphOutline(aGlyphId, rPolyPoly); } SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) { - return mpTextRenderImpl->GetTextLayout(rArgs, nFallbackLevel); + return mxTextRenderImpl->GetTextLayout(rArgs, nFallbackLevel); } SystemFontData X11SalGraphics::GetSysFontData( int nFallbackLevel ) const { - return mpTextRenderImpl->GetSysFontData(nFallbackLevel); + return mxTextRenderImpl->GetSysFontData(nFallbackLevel); } bool X11SalGraphics::CreateFontSubset( @@ -173,23 +173,23 @@ bool X11SalGraphics::CreateFontSubset( FontSubsetInfo& rInfo ) { - return mpTextRenderImpl->CreateFontSubset(rToFile, pFont, + return mxTextRenderImpl->CreateFontSubset(rToFile, pFont, pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo); } const void* X11SalGraphics::GetEmbedFontData( const PhysicalFontFace* pFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, size_t nLen, FontSubsetInfo& rInfo, long* pDataLen ) { - return mpTextRenderImpl->GetEmbedFontData(pFont, pUnicodes, pWidths, nLen, rInfo, pDataLen); + return mxTextRenderImpl->GetEmbedFontData(pFont, pUnicodes, pWidths, nLen, rInfo, pDataLen); } void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen ) { - mpTextRenderImpl->FreeEmbedFontData(pData, nLen); + mxTextRenderImpl->FreeEmbedFontData(pData, nLen); } const Ucs2SIntMap* X11SalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority) { - return mpTextRenderImpl->GetFontEncodingVector(pFont, pNonEncoded, ppPriority); + return mxTextRenderImpl->GetFontEncodingVector(pFont, pNonEncoded, ppPriority); } void X11SalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, @@ -197,7 +197,7 @@ void X11SalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, Int32Vector& rWidths, Ucs2UIntMap& rUnicodeEnc ) { - mpTextRenderImpl->GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc); + mxTextRenderImpl->GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 3ec516bd038d..f7d572f374be 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -78,7 +78,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, const Drawable aVdevDrawable = pDevice->GetDrawable(); SetDrawable( aVdevDrawable, m_nXScreen ); - mpImpl->Init(); + mxImpl->Init(); } X11SalVirtualDevice::X11SalVirtualDevice( SalGraphics* pGraphics, diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx index 51c9c2f3ae75..2690c881bd02 100644 --- a/vcl/unx/generic/printer/printerinfomanager.cxx +++ b/vcl/unx/generic/printer/printerinfomanager.cxx @@ -40,8 +40,6 @@ #include "osl/mutex.hxx" #include "osl/process.h" -#include <boost/scoped_ptr.hpp> - // filename of configuration files #define PRINT_FILENAME "psprint.conf" // the group of the global defaults diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index 99efa229bd3e..e26e16158a48 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -450,12 +450,12 @@ GenPspGraphics *GtkInstance::CreatePrintGraphics() return new GenPspGraphics(); } -boost::shared_ptr<vcl::unx::GtkPrintWrapper> +std::shared_ptr<vcl::unx::GtkPrintWrapper> GtkInstance::getPrintWrapper() const { - if (!m_pPrintWrapper) - m_pPrintWrapper.reset(new vcl::unx::GtkPrintWrapper); - return m_pPrintWrapper; + if (!m_xPrintWrapper) + m_xPrintWrapper.reset(new vcl::unx::GtkPrintWrapper); + return m_xPrintWrapper; } #if GTK_CHECK_VERSION(3,0,0) diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx index a636af504e69..650276c3a1f4 100644 --- a/vcl/unx/gtk/gdi/salprn-gtk.cxx +++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx @@ -65,11 +65,11 @@ public: bool run(); GtkPrinter* getPrinter() const { - return m_pWrapper->print_unix_dialog_get_selected_printer(GTK_PRINT_UNIX_DIALOG(m_pDialog)); + return m_xWrapper->print_unix_dialog_get_selected_printer(GTK_PRINT_UNIX_DIALOG(m_pDialog)); } GtkPrintSettings* getSettings() const { - return m_pWrapper->print_unix_dialog_get_settings(GTK_PRINT_UNIX_DIALOG(m_pDialog)); + return m_xWrapper->print_unix_dialog_get_settings(GTK_PRINT_UNIX_DIALOG(m_pDialog)); } void updateControllerPrintRange(); #if 0 @@ -110,7 +110,7 @@ private: vcl::PrinterController& m_rController; std::map<GtkWidget*, OUString> m_aControlToPropertyMap; std::map<GtkWidget*, sal_Int32> m_aControlToNumValMap; - boost::shared_ptr<GtkPrintWrapper> m_pWrapper; + std::shared_ptr<GtkPrintWrapper> m_xWrapper; }; struct GtkSalPrinter_Impl @@ -213,10 +213,10 @@ GtkSalPrinter::StartJob( if (!lcl_useSystemPrintDialog()) return PspSalPrinter::StartJob(i_pFileName, i_rJobName, i_rAppName, io_pSetupData, io_rController); - assert(!m_pImpl); + assert(!m_xImpl); - m_pImpl.reset(new GtkSalPrinter_Impl()); - m_pImpl->m_sJobName = i_rJobName; + m_xImpl.reset(new GtkSalPrinter_Impl()); + m_xImpl->m_sJobName = i_rJobName; OString sFileName; if (i_pFileName) @@ -229,16 +229,16 @@ GtkSalPrinter::StartJob( return false; } aDialog.updateControllerPrintRange(); - m_pImpl->m_pPrinter = aDialog.getPrinter(); - m_pImpl->m_pSettings = aDialog.getSettings(); + m_xImpl->m_pPrinter = aDialog.getPrinter(); + m_xImpl->m_pSettings = aDialog.getSettings(); #if 0 - if (const gchar *uri = gtk_print_settings_get(m_pImpl->m_pSettings, GTK_PRINT_SETTINGS_OUTPUT_URI)) + if (const gchar *uri = gtk_print_settings_get(m_xImpl->m_pSettings, GTK_PRINT_SETTINGS_OUTPUT_URI)) { - const gchar *pStr = gtk_print_settings_get(m_pImpl->m_pSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT); + const gchar *pStr = gtk_print_settings_get(m_xImpl->m_pSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT); if (pStr && !strcmp(pStr, "pdf")) { - aDialog.ExportAsPDF(OUString((const sal_Char *)uri, strlen((const sal_Char *)uri), RTL_TEXTENCODING_UTF8), m_pImpl->m_pSettings); + aDialog.ExportAsPDF(OUString((const sal_Char *)uri, strlen((const sal_Char *)uri), RTL_TEXTENCODING_UTF8), m_xImpl->m_pSettings); bDoJob = false; } } @@ -251,7 +251,7 @@ GtkSalPrinter::StartJob( //To-Do proper name, watch for encodings sFileName = OString("/tmp/hacking.ps"); - m_pImpl->m_sSpoolFile = sFileName; + m_xImpl->m_sSpoolFile = sFileName; OUString aFileName = OStringToOUString(sFileName, osl_getThreadTextEncoding()); @@ -268,14 +268,14 @@ GtkSalPrinter::EndJob() if (!lcl_useSystemPrintDialog()) return bRet; - assert(m_pImpl); + assert(m_xImpl); - if (!bRet || m_pImpl->m_sSpoolFile.isEmpty()) + if (!bRet || m_xImpl->m_sSpoolFile.isEmpty()) return bRet; - boost::shared_ptr<GtkPrintWrapper> const pWrapper(lcl_getGtkSalInstance().getPrintWrapper()); + std::shared_ptr<GtkPrintWrapper> const xWrapper(lcl_getGtkSalInstance().getPrintWrapper()); - GtkPageSetup* pPageSetup = pWrapper->page_setup_new(); + GtkPageSetup* pPageSetup = xWrapper->page_setup_new(); #if 0 //todo gtk_page_setup_set_orientation(pPageSetup,); @@ -286,14 +286,14 @@ GtkSalPrinter::EndJob() gtk_page_setup_set_right_margin(pPageSetup,); #endif - GtkPrintJob* const pJob = pWrapper->print_job_new( - OUStringToOString(m_pImpl->m_sJobName, RTL_TEXTENCODING_UTF8).getStr(), - m_pImpl->m_pPrinter, m_pImpl->m_pSettings, pPageSetup); + GtkPrintJob* const pJob = xWrapper->print_job_new( + OUStringToOString(m_xImpl->m_sJobName, RTL_TEXTENCODING_UTF8).getStr(), + m_xImpl->m_pPrinter, m_xImpl->m_pSettings, pPageSetup); GError* error = NULL; - bRet = pWrapper->print_job_set_source_file(pJob, m_pImpl->m_sSpoolFile.getStr(), &error); + bRet = xWrapper->print_job_set_source_file(pJob, m_xImpl->m_sSpoolFile.getStr(), &error); if (bRet) - pWrapper->print_job_send(pJob, NULL, NULL, NULL); + xWrapper->print_job_send(pJob, NULL, NULL, NULL); else { //To-Do, do something with this @@ -302,7 +302,7 @@ GtkSalPrinter::EndJob() } g_object_unref(pPageSetup); - m_pImpl.reset(); + m_xImpl.reset(); //To-Do, remove temp spool file @@ -398,9 +398,9 @@ lcl_combo_box_text_append(GtkWidget* const pWidget, gchar const* const pText) GtkPrintDialog::GtkPrintDialog(vcl::PrinterController& io_rController) : m_rController(io_rController) - , m_pWrapper(lcl_getGtkSalInstance().getPrintWrapper()) + , m_xWrapper(lcl_getGtkSalInstance().getPrintWrapper()) { - assert(m_pWrapper->supportsPrinting()); + assert(m_xWrapper->supportsPrinting()); impl_initDialog(); impl_initCustomTab(); impl_readFromSettings(); @@ -410,7 +410,7 @@ void GtkPrintDialog::impl_initDialog() { //To-Do, like fpicker, set UI language - m_pDialog = m_pWrapper->print_unix_dialog_new(NULL, NULL); + m_pDialog = m_xWrapper->print_unix_dialog_new(NULL, NULL); vcl::Window* const pTopWindow(Application::GetActiveTopWindow()); if (pTopWindow) @@ -424,7 +424,7 @@ GtkPrintDialog::impl_initDialog() } } - m_pWrapper->print_unix_dialog_set_manual_capabilities(GTK_PRINT_UNIX_DIALOG(m_pDialog), + m_xWrapper->print_unix_dialog_set_manual_capabilities(GTK_PRINT_UNIX_DIALOG(m_pDialog), GtkPrintCapabilities(GTK_PRINT_CAPABILITY_COPIES | GTK_PRINT_CAPABILITY_COLLATE | GTK_PRINT_CAPABILITY_REVERSE @@ -745,7 +745,7 @@ GtkPrintDialog::impl_initCustomTab() for (CustomTabs_t::const_reverse_iterator aI = aCustomTabs.rbegin(); aI != aEnd; ++aI) { gtk_widget_show_all(aI->first); - m_pWrapper->print_unix_dialog_add_custom_tab(GTK_PRINT_UNIX_DIALOG(m_pDialog), aI->first, + m_xWrapper->print_unix_dialog_add_custom_tab(GTK_PRINT_UNIX_DIALOG(m_pDialog), aI->first, gtk_label_new(OUStringToOString(aI->second, RTL_TEXTENCODING_UTF8).getStr())); } } @@ -763,10 +763,10 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled // the controls in the rDisabled sequence (cf. the intialization of // the "PrintContent" UI option in SwPrintUIOptions::SwPrintUIOptions, // sw/source/core/view/printdata.cxx) - if (m_pWrapper->supportsPrintSelection() && !i_rDisabled[2]) + if (m_xWrapper->supportsPrintSelection() && !i_rDisabled[2]) { - m_pWrapper->print_unix_dialog_set_support_selection(pDialog, TRUE); - m_pWrapper->print_unix_dialog_set_has_selection(pDialog, TRUE); + m_xWrapper->print_unix_dialog_set_support_selection(pDialog, TRUE); + m_xWrapper->print_unix_dialog_set_has_selection(pDialog, TRUE); } beans::PropertyValue* const pPrintContent( @@ -788,7 +788,7 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled break; case 2: #if GTK_CHECK_VERSION(2,14,0) - if (m_pWrapper->supportsPrintSelection()) + if (m_xWrapper->supportsPrintSelection()) ePrintPages = GTK_PRINT_PAGES_SELECTION; else #endif @@ -797,8 +797,8 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled default: SAL_WARN("vcl.gtk", "unexpected selection type: " << nSelectionType); } - m_pWrapper->print_settings_set_print_pages(pSettings, ePrintPages); - m_pWrapper->print_unix_dialog_set_settings(pDialog, pSettings); + m_xWrapper->print_settings_set_print_pages(pSettings, ePrintPages); + m_xWrapper->print_unix_dialog_set_settings(pDialog, pSettings); g_object_unref(G_OBJECT(pSettings)); } } @@ -1038,7 +1038,7 @@ GtkPrintDialog::updateControllerPrintRange() { GtkPrintSettings* const pSettings(getSettings()); // TODO: use get_print_pages - if (const gchar* const pStr = m_pWrapper->print_settings_get(pSettings, GTK_PRINT_SETTINGS_PRINT_PAGES)) + if (const gchar* const pStr = m_xWrapper->print_settings_get(pSettings, GTK_PRINT_SETTINGS_PRINT_PAGES)) { beans::PropertyValue* pVal = m_rController.getValue(OUString("PrintRange")); if (!pVal) @@ -1063,7 +1063,7 @@ GtkPrintDialog::updateControllerPrintRange() { OUStringBuffer sBuf; gint num_ranges; - const GtkPageRange* const pRanges = m_pWrapper->print_settings_get_page_ranges(pSettings, &num_ranges); + const GtkPageRange* const pRanges = m_xWrapper->print_settings_get_page_ranges(pSettings, &num_ranges); for (gint i = 0; i != num_ranges && pRanges; ++i) { sBuf.append(sal_Int32(pRanges[i].start+1)); @@ -1103,25 +1103,25 @@ GtkPrintDialog::impl_readFromSettings() bool bChanged(false); - const gint nOldCopyCount(m_pWrapper->print_settings_get_n_copies(pSettings)); + const gint nOldCopyCount(m_xWrapper->print_settings_get_n_copies(pSettings)); const sal_Int32 nCopyCount(aCopyCount.toInt32()); if (nCopyCount > 0 && nOldCopyCount != nCopyCount) { bChanged = true; - m_pWrapper->print_settings_set_n_copies(pSettings, sal::static_int_cast<gint>(nCopyCount)); + m_xWrapper->print_settings_set_n_copies(pSettings, sal::static_int_cast<gint>(nCopyCount)); } - const bool bOldCollate(m_pWrapper->print_settings_get_collate(pSettings)); + const bool bOldCollate(m_xWrapper->print_settings_get_collate(pSettings)); const bool bCollate(aCollate.equalsIgnoreAsciiCase("true")); if (bOldCollate != bCollate) { bChanged = true; - m_pWrapper->print_settings_set_collate(pSettings, bCollate); + m_xWrapper->print_settings_set_collate(pSettings, bCollate); } // TODO: wth was this var. meant for? (void) bChanged; - m_pWrapper->print_unix_dialog_set_settings(GTK_PRINT_UNIX_DIALOG(m_pDialog), pSettings); + m_xWrapper->print_unix_dialog_set_settings(GTK_PRINT_UNIX_DIALOG(m_pDialog), pSettings); g_object_unref(G_OBJECT(pSettings)); } @@ -1135,10 +1135,10 @@ const const OUString aPrintDialogStr("PrintDialog"); pItem->setValue(aPrintDialogStr, OUString("CopyCount"), - OUString::number(m_pWrapper->print_settings_get_n_copies(pSettings))); + OUString::number(m_xWrapper->print_settings_get_n_copies(pSettings))); pItem->setValue(aPrintDialogStr, OUString("Collate"), - m_pWrapper->print_settings_get_collate(pSettings) + m_xWrapper->print_settings_get_collate(pSettings) ? OUString("true") : OUString("false")) ; diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 179bc4e7b4c2..670137992aa8 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -1290,12 +1290,12 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, { pImpl->PreDraw(); - boost::scoped_ptr<OpenGLTexture> pBlackTexture(aBlackDC.getTexture()); - boost::scoped_ptr<OpenGLTexture> pWhiteTexture(aWhiteDC.getTexture()); + std::unique_ptr<OpenGLTexture> xBlackTexture(aBlackDC.getTexture()); + std::unique_ptr<OpenGLTexture> xWhiteTexture(aWhiteDC.getTexture()); - if (pBlackTexture && pWhiteTexture) + if (xBlackTexture && xWhiteTexture) { - pImpl->DrawTextureDiff(*pWhiteTexture, *pBlackTexture, aBlackDC.getTwoRect()); + pImpl->DrawTextureDiff(*xWhiteTexture, *xBlackTexture, aBlackDC.getTwoRect()); bOk = true; } diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index bcadd8d538af..a46d2cd155ec 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -217,9 +217,9 @@ void WinLayout::DrawText(SalGraphics& rGraphics) const { pImpl->PreDraw(); - boost::scoped_ptr<OpenGLTexture> pTexture(aDC.getTexture()); - if (pTexture) - pImpl->DrawMask(*pTexture, salColor, aDC.getTwoRect()); + std::unique_ptr<OpenGLTexture> xTexture(aDC.getTexture()); + if (xTexture) + pImpl->DrawMask(*xTexture, salColor, aDC.getTwoRect()); pImpl->PostDraw(); } diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 05adec176ff7..f02ac0390b8e 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1542,12 +1542,12 @@ public: } DemoWin aMainWin(aRenderer, bThreads); - boost::scoped_ptr<DemoWidgets> aWidgets; + std::unique_ptr<DemoWidgets> xWidgets; aMainWin.SetText("Interactive VCL demo #1"); if (bWidgets) - aWidgets.reset(new DemoWidgets()); + xWidgets.reset(new DemoWidgets()); else aMainWin.Show(); diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index eda5059d30a1..e5eec219988a 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1216,7 +1216,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& } // chart element - boost::scoped_ptr<SvXMLElementExport> pElChart; + std::unique_ptr<SvXMLElementExport> xElChart; // get property states for autostyles if( mxExpPropMapper.is()) @@ -1289,7 +1289,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& AddAutoStyleAttribute( aPropertyStates ); //element - pElChart.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_CHART, true, true )); + xElChart.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_CHART, true, true )); } else // autostyles { @@ -1870,7 +1870,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( // plot-area element - boost::scoped_ptr<SvXMLElementExport> pElPlotArea; + std::unique_ptr<SvXMLElementExport> xElPlotArea; // get property states for autostyles xPropSet = Reference< beans::XPropertySet >( xDiagram, uno::UNO_QUERY ); if( xPropSet.is()) @@ -1961,7 +1961,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( } // plot-area element - pElPlotArea.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_PLOT_AREA, true, true )); + xElPlotArea.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_PLOT_AREA, true, true )); //inner position rectangle element exportCoordinateRegion( xDiagram ); diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index f69baba7fa44..de4fc70b22a9 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -487,20 +487,20 @@ static const SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = struct XMLTextImportHelper::Impl : private ::boost::noncopyable { - boost::scoped_ptr<SvXMLTokenMap> m_pTextElemTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextPElemTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextPAttrTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextFieldAttrTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextNumberedParagraphAttrTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextListBlockAttrTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextListBlockElemTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextFrameAttrTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextContourAttrTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextHyperlinkAttrTokenMap; - boost::scoped_ptr<SvXMLTokenMap> m_pTextMasterPageElemTokenMap; - boost::scoped_ptr< std::vector<OUString> > m_pPrevFrmNames; - boost::scoped_ptr< std::vector<OUString> > m_pNextFrmNames; - boost::scoped_ptr<XMLTextListsHelper> m_pTextListsHelper; + std::unique_ptr<SvXMLTokenMap> m_xTextElemTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextPElemTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextPAttrTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextFieldAttrTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextNumberedParagraphAttrTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextListBlockAttrTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextListBlockElemTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextFrameAttrTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextContourAttrTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextHyperlinkAttrTokenMap; + std::unique_ptr<SvXMLTokenMap> m_xTextMasterPageElemTokenMap; + std::unique_ptr< std::vector<OUString> > m_xPrevFrmNames; + std::unique_ptr< std::vector<OUString> > m_xNextFrmNames; + std::unique_ptr<XMLTextListsHelper> m_xTextListsHelper; SvXMLImportContextRef m_xAutoStyles; SvXMLImportContextRef m_xFontDecls; @@ -511,7 +511,7 @@ struct XMLTextImportHelper::Impl rtl::Reference< SvXMLImportPropertyMapper > m_xSectionImpPrMap; rtl::Reference< SvXMLImportPropertyMapper > m_xRubyImpPrMap; - boost::scoped_ptr<SvI18NMap> m_pRenameMap; + std::unique_ptr<SvI18NMap> m_xRenameMap; /* Change and extend data structure: - data structure contains candidates of paragraph styles, which @@ -520,7 +520,7 @@ struct XMLTextImportHelper::Impl of the outline style (#i69629#) */ ::boost::scoped_array< ::std::vector< OUString > > - m_pOutlineStylesCandidates; + m_xOutlineStylesCandidates; // start range, xml:id, RDFa stuff typedef ::boost::tuple< @@ -578,23 +578,8 @@ struct XMLTextImportHelper::Impl bool const bInsertMode, bool const bStylesOnlyMode, bool const bProgress, bool const bBlockMode, bool const bOrganizerMode) - : m_pTextElemTokenMap( 0 ) - , m_pTextPElemTokenMap( 0 ) - , m_pTextPAttrTokenMap( 0 ) - , m_pTextFieldAttrTokenMap( 0 ) - , m_pTextNumberedParagraphAttrTokenMap( 0 ) - , m_pTextListBlockAttrTokenMap( 0 ) - , m_pTextListBlockElemTokenMap( 0 ) - , m_pTextFrameAttrTokenMap( 0 ) - , m_pTextContourAttrTokenMap( 0 ) - , m_pTextHyperlinkAttrTokenMap( 0 ) - , m_pTextMasterPageElemTokenMap( 0 ) - , m_pPrevFrmNames( 0 ) - , m_pNextFrmNames( 0 ) - , m_pTextListsHelper( new XMLTextListsHelper() ) - , m_pRenameMap( 0 ) + : m_xTextListsHelper( new XMLTextListsHelper() ) // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) - , m_pOutlineStylesCandidates( 0 ) , m_xServiceFactory( rModel, UNO_QUERY ) , m_rSvXMLImport( rImport ) , m_bInsertMode( bInsertMode ) @@ -609,10 +594,10 @@ struct XMLTextImportHelper::Impl void InitOutlineStylesCandidates() { - if (!m_pOutlineStylesCandidates) + if (!m_xOutlineStylesCandidates) { size_t const size(m_xChapterNumbering->getCount()); - m_pOutlineStylesCandidates.reset( + m_xOutlineStylesCandidates.reset( new ::std::vector< OUString >[size] ); } } @@ -622,202 +607,202 @@ struct XMLTextImportHelper::Impl uno::Reference< text::XText > & XMLTextImportHelper::GetText() { - return m_pImpl->m_xText; + return m_xImpl->m_xText; } uno::Reference< text::XTextCursor > & XMLTextImportHelper::GetCursor() { - return m_pImpl->m_xCursor; + return m_xImpl->m_xCursor; } uno::Reference< text::XTextRange > & XMLTextImportHelper::GetCursorAsRange() { - return m_pImpl->m_xCursorAsRange; + return m_xImpl->m_xCursorAsRange; } bool XMLTextImportHelper::IsInsertMode() const { - return m_pImpl->m_bInsertMode; + return m_xImpl->m_bInsertMode; } bool XMLTextImportHelper::IsStylesOnlyMode() const { - return m_pImpl->m_bStylesOnlyMode; + return m_xImpl->m_bStylesOnlyMode; } bool XMLTextImportHelper::IsBlockMode() const { - return m_pImpl->m_bBlockMode; + return m_xImpl->m_bBlockMode; } bool XMLTextImportHelper::IsOrganizerMode() const { - return m_pImpl->m_bOrganizerMode; + return m_xImpl->m_bOrganizerMode; } bool XMLTextImportHelper::IsProgress() const { - return m_pImpl->m_bProgress; + return m_xImpl->m_bProgress; } uno::Reference<container::XNameContainer> const& XMLTextImportHelper::GetParaStyles() const { - return m_pImpl->m_xParaStyles; + return m_xImpl->m_xParaStyles; } uno::Reference<container::XNameContainer> const& XMLTextImportHelper::GetTextStyles() const { - return m_pImpl->m_xTextStyles; + return m_xImpl->m_xTextStyles; } uno::Reference<container::XNameContainer> const& XMLTextImportHelper::GetNumberingStyles() const { - return m_pImpl->m_xNumStyles; + return m_xImpl->m_xNumStyles; } uno::Reference<container::XNameContainer> const& XMLTextImportHelper::GetFrameStyles() const { - return m_pImpl->m_xFrameStyles; + return m_xImpl->m_xFrameStyles; } uno::Reference<container::XNameContainer> const& XMLTextImportHelper::GetPageStyles() const { - return m_pImpl->m_xPageStyles; + return m_xImpl->m_xPageStyles; } uno::Reference<container::XIndexReplace> const& XMLTextImportHelper::GetChapterNumbering() const { - return m_pImpl->m_xChapterNumbering; + return m_xImpl->m_xChapterNumbering; } rtl::Reference< SvXMLImportPropertyMapper > const& XMLTextImportHelper::GetParaImportPropertySetMapper() const { - return m_pImpl->m_xParaImpPrMap; + return m_xImpl->m_xParaImpPrMap; } rtl::Reference< SvXMLImportPropertyMapper > const& XMLTextImportHelper::GetTextImportPropertySetMapper() const { - return m_pImpl->m_xTextImpPrMap; + return m_xImpl->m_xTextImpPrMap; } rtl::Reference< SvXMLImportPropertyMapper > const& XMLTextImportHelper::GetSectionImportPropertySetMapper() const { - return m_pImpl->m_xSectionImpPrMap; + return m_xImpl->m_xSectionImpPrMap; } rtl::Reference< SvXMLImportPropertyMapper > const& XMLTextImportHelper::GetRubyImportPropertySetMapper() const { - return m_pImpl->m_xRubyImpPrMap; + return m_xImpl->m_xRubyImpPrMap; } void XMLTextImportHelper::SetInsideDeleteContext(bool const bNew) { - m_pImpl->m_bInsideDeleteContext = bNew; + m_xImpl->m_bInsideDeleteContext = bNew; } bool XMLTextImportHelper::IsInsideDeleteContext() const { - return m_pImpl->m_bInsideDeleteContext; + return m_xImpl->m_bInsideDeleteContext; } SvXMLImport & XMLTextImportHelper::GetXMLImport() { - return m_pImpl->m_rSvXMLImport; + return m_xImpl->m_rSvXMLImport; } XMLTextListsHelper & XMLTextImportHelper::GetTextListHelper() { - return *m_pImpl->m_pTextListsHelper; + return *m_xImpl->m_xTextListsHelper; } const SvXMLTokenMap& XMLTextImportHelper::GetTextElemTokenMap() { - if (!m_pImpl->m_pTextElemTokenMap.get()) + if (!m_xImpl->m_xTextElemTokenMap.get()) { - m_pImpl->m_pTextElemTokenMap.reset( + m_xImpl->m_xTextElemTokenMap.reset( new SvXMLTokenMap( aTextElemTokenMap )); } - return *m_pImpl->m_pTextElemTokenMap; + return *m_xImpl->m_xTextElemTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextPElemTokenMap() { - if (!m_pImpl->m_pTextPElemTokenMap.get()) + if (!m_xImpl->m_xTextPElemTokenMap.get()) { - m_pImpl->m_pTextPElemTokenMap.reset( + m_xImpl->m_xTextPElemTokenMap.reset( new SvXMLTokenMap( aTextPElemTokenMap )); } - return *m_pImpl->m_pTextPElemTokenMap; + return *m_xImpl->m_xTextPElemTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextPAttrTokenMap() { - if (!m_pImpl->m_pTextPAttrTokenMap.get()) + if (!m_xImpl->m_xTextPAttrTokenMap.get()) { - m_pImpl->m_pTextPAttrTokenMap.reset( + m_xImpl->m_xTextPAttrTokenMap.reset( new SvXMLTokenMap( aTextPAttrTokenMap )); } - return *m_pImpl->m_pTextPAttrTokenMap; + return *m_xImpl->m_xTextPAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextFrameAttrTokenMap() { - if (!m_pImpl->m_pTextFrameAttrTokenMap.get()) + if (!m_xImpl->m_xTextFrameAttrTokenMap.get()) { - m_pImpl->m_pTextFrameAttrTokenMap.reset( + m_xImpl->m_xTextFrameAttrTokenMap.reset( new SvXMLTokenMap( aTextFrameAttrTokenMap )); } - return *m_pImpl->m_pTextFrameAttrTokenMap; + return *m_xImpl->m_xTextFrameAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextContourAttrTokenMap() { - if (!m_pImpl->m_pTextContourAttrTokenMap.get()) + if (!m_xImpl->m_xTextContourAttrTokenMap.get()) { - m_pImpl->m_pTextContourAttrTokenMap.reset( + m_xImpl->m_xTextContourAttrTokenMap.reset( new SvXMLTokenMap( aTextContourAttrTokenMap )); } - return *m_pImpl->m_pTextContourAttrTokenMap; + return *m_xImpl->m_xTextContourAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextHyperlinkAttrTokenMap() { - if (!m_pImpl->m_pTextHyperlinkAttrTokenMap.get()) + if (!m_xImpl->m_xTextHyperlinkAttrTokenMap.get()) { - m_pImpl->m_pTextHyperlinkAttrTokenMap.reset( + m_xImpl->m_xTextHyperlinkAttrTokenMap.reset( new SvXMLTokenMap( aTextHyperlinkAttrTokenMap )); } - return *m_pImpl->m_pTextHyperlinkAttrTokenMap; + return *m_xImpl->m_xTextHyperlinkAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextMasterPageElemTokenMap() { - if (!m_pImpl->m_pTextMasterPageElemTokenMap.get()) + if (!m_xImpl->m_xTextMasterPageElemTokenMap.get()) { - m_pImpl->m_pTextMasterPageElemTokenMap.reset( + m_xImpl->m_xTextMasterPageElemTokenMap.reset( new SvXMLTokenMap( aTextMasterPageElemTokenMap )); } - return *m_pImpl->m_pTextMasterPageElemTokenMap; + return *m_xImpl->m_xTextMasterPageElemTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextFieldAttrTokenMap() { - if (!m_pImpl->m_pTextFieldAttrTokenMap.get()) + if (!m_xImpl->m_xTextFieldAttrTokenMap.get()) { - m_pImpl->m_pTextFieldAttrTokenMap.reset( + m_xImpl->m_xTextFieldAttrTokenMap.reset( new SvXMLTokenMap( aTextFieldAttrTokenMap )); } - return *m_pImpl->m_pTextFieldAttrTokenMap; + return *m_xImpl->m_xTextFieldAttrTokenMap; } @@ -892,7 +877,7 @@ XMLTextImportHelper::XMLTextImportHelper( bool const bInsertMode, bool const bStylesOnlyMode, bool const bProgress, bool const bBlockMode, bool const bOrganizerMode) - : m_pImpl( new Impl(rModel, rImport, bInsertMode, bStylesOnlyMode, + : m_xImpl( new Impl(rModel, rImport, bInsertMode, bStylesOnlyMode, bProgress, bBlockMode, bOrganizerMode) ) , m_pBackpatcherImpl( MakeBackpatcherImpl() ) { @@ -903,12 +888,12 @@ XMLTextImportHelper::XMLTextImportHelper( if (xCNSupplier.is()) { // note: m_xChapterNumbering is accessed to import some fields - m_pImpl->m_xChapterNumbering = xCNSupplier->getChapterNumberingRules(); + m_xImpl->m_xChapterNumbering = xCNSupplier->getChapterNumberingRules(); // the AutoCorrect document doesn't have a proper outline numbering - if (!IsBlockMode() && m_pImpl->m_xChapterNumbering.is()) + if (!IsBlockMode() && m_xImpl->m_xChapterNumbering.is()) { Reference< XPropertySet > const xNumRuleProps( - m_pImpl->m_xChapterNumbering, UNO_QUERY); + m_xImpl->m_xChapterNumbering, UNO_QUERY); if ( xNumRuleProps.is() ) { Reference< XPropertySetInfo > xNumRulePropSetInfo( @@ -925,10 +910,10 @@ XMLTextImportHelper::XMLTextImportHelper( if ( !sListId.isEmpty() ) { Reference< XNamed > const xChapterNumNamed( - m_pImpl->m_xChapterNumbering, UNO_QUERY); + m_xImpl->m_xChapterNumbering, UNO_QUERY); if ( xChapterNumNamed.is() ) { - m_pImpl->m_pTextListsHelper->KeepListAsProcessed( + m_xImpl->m_xTextListsHelper->KeepListAsProcessed( sListId, xChapterNumNamed->getName(), OUString() ); @@ -949,35 +934,35 @@ XMLTextImportHelper::XMLTextImportHelper( const OUString aParaStyles("ParagraphStyles"); if( xFamilies->hasByName( aParaStyles ) ) { - m_pImpl->m_xParaStyles.set(xFamilies->getByName(aParaStyles), + m_xImpl->m_xParaStyles.set(xFamilies->getByName(aParaStyles), UNO_QUERY); } const OUString aCharStyles("CharacterStyles"); if( xFamilies->hasByName( aCharStyles ) ) { - m_pImpl->m_xTextStyles.set(xFamilies->getByName(aCharStyles), + m_xImpl->m_xTextStyles.set(xFamilies->getByName(aCharStyles), UNO_QUERY); } const OUString aNumStyles("NumberingStyles"); if( xFamilies->hasByName( aNumStyles ) ) { - m_pImpl->m_xNumStyles.set(xFamilies->getByName(aNumStyles), + m_xImpl->m_xNumStyles.set(xFamilies->getByName(aNumStyles), UNO_QUERY); } const OUString aFrameStyles("FrameStyles"); if( xFamilies->hasByName( aFrameStyles ) ) { - m_pImpl->m_xFrameStyles.set(xFamilies->getByName(aFrameStyles), + m_xImpl->m_xFrameStyles.set(xFamilies->getByName(aFrameStyles), UNO_QUERY); } const OUString aPageStyles("PageStyles"); if( xFamilies->hasByName( aPageStyles ) ) { - m_pImpl->m_xPageStyles.set(xFamilies->getByName(aPageStyles), + m_xImpl->m_xPageStyles.set(xFamilies->getByName(aPageStyles), UNO_QUERY); } } @@ -985,40 +970,40 @@ XMLTextImportHelper::XMLTextImportHelper( Reference < XTextFramesSupplier > xTFS( rModel, UNO_QUERY ); if( xTFS.is() ) { - m_pImpl->m_xTextFrames.set(xTFS->getTextFrames()); + m_xImpl->m_xTextFrames.set(xTFS->getTextFrames()); } Reference < XTextGraphicObjectsSupplier > xTGOS( rModel, UNO_QUERY ); if( xTGOS.is() ) { - m_pImpl->m_xGraphics.set(xTGOS->getGraphicObjects()); + m_xImpl->m_xGraphics.set(xTGOS->getGraphicObjects()); } Reference < XTextEmbeddedObjectsSupplier > xTEOS( rModel, UNO_QUERY ); if( xTEOS.is() ) { - m_pImpl->m_xObjects.set(xTEOS->getEmbeddedObjects()); + m_xImpl->m_xObjects.set(xTEOS->getEmbeddedObjects()); } XMLPropertySetMapper *pPropMapper = new XMLTextPropertySetMapper( TextPropMap::PARA, false ); - m_pImpl->m_xParaImpPrMap = + m_xImpl->m_xParaImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TextPropMap::TEXT, false ); - m_pImpl->m_xTextImpPrMap = + m_xImpl->m_xTextImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TextPropMap::FRAME, false ); - m_pImpl->m_xFrameImpPrMap = + m_xImpl->m_xFrameImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TextPropMap::SECTION, false ); - m_pImpl->m_xSectionImpPrMap = + m_xImpl->m_xSectionImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TextPropMap::RUBY, false ); - m_pImpl->m_xRubyImpPrMap = + m_xImpl->m_xRubyImpPrMap = new SvXMLImportPropertyMapper( pPropMapper, rImport ); } @@ -1073,36 +1058,36 @@ SvXMLImportPropertyMapper* void XMLTextImportHelper::SetCursor( const Reference < XTextCursor > & rCursor ) { - m_pImpl->m_xCursor.set(rCursor); - m_pImpl->m_xText.set(rCursor->getText()); - m_pImpl->m_xCursorAsRange.set( rCursor, UNO_QUERY ); + m_xImpl->m_xCursor.set(rCursor); + m_xImpl->m_xText.set(rCursor->getText()); + m_xImpl->m_xCursorAsRange.set( rCursor, UNO_QUERY ); } void XMLTextImportHelper::ResetCursor() { - m_pImpl->m_xCursor.set(0); - m_pImpl->m_xText.set(0); - m_pImpl->m_xCursorAsRange.set(0); + m_xImpl->m_xCursor.set(0); + m_xImpl->m_xText.set(0); + m_xImpl->m_xCursorAsRange.set(0); } bool XMLTextImportHelper::HasFrameByName( const OUString& rName ) const { - return (m_pImpl->m_xTextFrames.is() && - m_pImpl->m_xTextFrames->hasByName(rName)) - || (m_pImpl->m_xGraphics.is() && - m_pImpl->m_xGraphics->hasByName(rName)) - || (m_pImpl->m_xObjects.is() && - m_pImpl->m_xObjects->hasByName(rName)); + return (m_xImpl->m_xTextFrames.is() && + m_xImpl->m_xTextFrames->hasByName(rName)) + || (m_xImpl->m_xGraphics.is() && + m_xImpl->m_xGraphics->hasByName(rName)) + || (m_xImpl->m_xObjects.is() && + m_xImpl->m_xObjects->hasByName(rName)); } void XMLTextImportHelper::InsertString( const OUString& rChars ) { - assert(m_pImpl->m_xText.is()); - assert(m_pImpl->m_xCursorAsRange.is()); - if (m_pImpl->m_xText.is()) + assert(m_xImpl->m_xText.is()); + assert(m_xImpl->m_xCursorAsRange.is()); + if (m_xImpl->m_xText.is()) { - m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + m_xImpl->m_xText->insertString(m_xImpl->m_xCursorAsRange, rChars, sal_False); } } @@ -1110,9 +1095,9 @@ void XMLTextImportHelper::InsertString( const OUString& rChars ) void XMLTextImportHelper::InsertString( const OUString& rChars, bool& rIgnoreLeadingSpace ) { - assert(m_pImpl->m_xText.is()); - assert(m_pImpl->m_xCursorAsRange.is()); - if (m_pImpl->m_xText.is()) + assert(m_xImpl->m_xText.is()); + assert(m_xImpl->m_xCursorAsRange.is()); + if (m_xImpl->m_xText.is()) { sal_Int32 nLen = rChars.getLength(); OUStringBuffer sChars( nLen ); @@ -1136,43 +1121,43 @@ void XMLTextImportHelper::InsertString( const OUString& rChars, break; } } - m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + m_xImpl->m_xText->insertString(m_xImpl->m_xCursorAsRange, sChars.makeStringAndClear(), sal_False); } } void XMLTextImportHelper::InsertControlCharacter( sal_Int16 nControl ) { - assert(m_pImpl->m_xText.is()); - assert(m_pImpl->m_xCursorAsRange.is()); - if (m_pImpl->m_xText.is()) + assert(m_xImpl->m_xText.is()); + assert(m_xImpl->m_xCursorAsRange.is()); + if (m_xImpl->m_xText.is()) { - m_pImpl->m_xText->insertControlCharacter( - m_pImpl->m_xCursorAsRange, nControl, sal_False); + m_xImpl->m_xText->insertControlCharacter( + m_xImpl->m_xCursorAsRange, nControl, sal_False); } } void XMLTextImportHelper::InsertTextContent( Reference < XTextContent > & xContent ) { - assert(m_pImpl->m_xText.is()); - assert(m_pImpl->m_xCursorAsRange.is()); - if (m_pImpl->m_xText.is()) + assert(m_xImpl->m_xText.is()); + assert(m_xImpl->m_xCursorAsRange.is()); + if (m_xImpl->m_xText.is()) { // note: this may throw IllegalArgumentException and callers handle it - m_pImpl->m_xText->insertTextContent( m_pImpl->m_xCursorAsRange, xContent, sal_False); + m_xImpl->m_xText->insertTextContent( m_xImpl->m_xCursorAsRange, xContent, sal_False); } } void XMLTextImportHelper::DeleteParagraph() { - assert(m_pImpl->m_xText.is()); - assert(m_pImpl->m_xCursor.is()); - assert(m_pImpl->m_xCursorAsRange.is()); + assert(m_xImpl->m_xText.is()); + assert(m_xImpl->m_xCursor.is()); + assert(m_xImpl->m_xCursorAsRange.is()); bool bDelete = true; Reference < XEnumerationAccess > const xEnumAccess( - m_pImpl->m_xCursor, UNO_QUERY); + m_xImpl->m_xCursor, UNO_QUERY); if( xEnumAccess.is() ) { Reference < XEnumeration > xEnum(xEnumAccess->createEnumeration()); @@ -1191,10 +1176,10 @@ void XMLTextImportHelper::DeleteParagraph() } if( bDelete ) { - if (m_pImpl->m_xCursor->goLeft( 1, sal_True )) + if (m_xImpl->m_xCursor->goLeft( 1, sal_True )) { OUString sEmpty; - m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + m_xImpl->m_xText->insertString(m_xImpl->m_xCursorAsRange, sEmpty, sal_True); } } @@ -1218,10 +1203,10 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, XMLTextStyleContext *pStyle = 0; sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH : XML_STYLE_FAMILY_TEXT_TEXT; - if (!rStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is()) + if (!rStyleName.isEmpty() && m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)-> + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)-> FindStyleChildContext( nFamily, rStyleName, true ); pStyle = const_cast<XMLTextStyleContext*>(PTR_CAST( XMLTextStyleContext,pTempStyle)); @@ -1233,7 +1218,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, if( nCount ) { rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles) + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles) ->GetImportPropertyMapper(nFamily); if( xImpPrMap.is() ) { @@ -1428,10 +1413,10 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( : XML_STYLE_FAMILY_TEXT_TEXT; XMLTextStyleContext *pStyle = 0; OUString sStyleName( rStyleName ); - if (!sStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is()) + if (!sStyleName.isEmpty() && m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)-> + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)-> FindStyleChildContext( nFamily, sStyleName, true ); pStyle = const_cast<XMLTextStyleContext*>(PTR_CAST( XMLTextStyleContext,pTempStyle)); } @@ -1448,8 +1433,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName ); const OUString rPropName = bPara ? s_ParaStyleName : s_CharStyleName; const Reference < XNameContainer > & rStyles = (bPara) - ? m_pImpl->m_xParaStyles - : m_pImpl->m_xTextStyles; + ? m_xImpl->m_xParaStyles + : m_xImpl->m_xTextStyles; if( rStyles.is() && xPropSetInfo->hasPropertyByName( rPropName ) && rStyles->hasByName( sStyleName ) ) @@ -1504,7 +1489,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } // Inconsistent behavior regarding lists (#i92811#) - sListId = m_pImpl->m_pTextListsHelper->GetListIdForListBlock( + sListId = m_xImpl->m_xTextListsHelper->GetListIdForListBlock( *pListBlock); } else if (pNumberedParagraph) @@ -1620,11 +1605,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if ( ( bBuildIdFound && nUPD == 680 ) || !pStyle || !pStyle->IsListStyleSet() ) { - if (m_pImpl->m_xChapterNumbering.is()) + if (m_xImpl->m_xChapterNumbering.is()) { Reference< XNamed > xNumNamed( xNumRules, UNO_QUERY ); Reference< XNamed > const xChapterNumNamed ( - m_pImpl->m_xChapterNumbering, UNO_QUERY); + m_xImpl->m_xChapterNumbering, UNO_QUERY); if ( xNumNamed.is() && xChapterNumNamed.is() && xNumNamed->getName() == xChapterNumNamed->getName() ) { @@ -1660,21 +1645,21 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( XML_STYLE_FAMILY_MASTER_PAGE, pStyle->GetMasterPageName()) ); if( sDisplayName.isEmpty() || - (m_pImpl->m_xPageStyles.is() && - m_pImpl->m_xPageStyles->hasByName( sDisplayName))) + (m_xImpl->m_xPageStyles.is() && + m_xImpl->m_xPageStyles->hasByName( sDisplayName))) { xPropSet->setPropertyValue(s_PageDescName, makeAny(sDisplayName)); } } if( bPara && !pStyle->GetDropCapStyleName().isEmpty() && - m_pImpl->m_xTextStyles.is()) + m_xImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, pStyle->GetDropCapStyleName()) ); - if (m_pImpl->m_xTextStyles->hasByName(sDisplayName) && + if (m_xImpl->m_xTextStyles->hasByName(sDisplayName) && xPropSetInfo->hasPropertyByName( pStyle->sDropCapCharStyleName ) ) { xPropSet->setPropertyValue( pStyle->sDropCapCharStyleName, makeAny(sDisplayName) ); @@ -1685,10 +1670,10 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if (!bPara && pStyle->HasCombinedCharactersLetter()) { // insert combined characters text field - if (m_pImpl->m_xServiceFactory.is()) + if (m_xImpl->m_xServiceFactory.is()) { uno::Reference<beans::XPropertySet> const xTmp( - m_pImpl->m_xServiceFactory->createInstance( + m_xImpl->m_xServiceFactory->createInstance( s_ServiceCombinedCharacters), UNO_QUERY); if( xTmp.is() ) { @@ -1707,11 +1692,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // insert the field over it's original text Reference<XTextContent> xTextContent(xTmp, UNO_QUERY); - if (m_pImpl->m_xText.is() && rCursor.is()) + if (m_xImpl->m_xText.is() && rCursor.is()) { // #i107225# the combined characters need to be inserted first // the selected text has to be removed afterwards - m_pImpl->m_xText->insertTextContent( rCursor->getStart(), xTextContent, sal_True ); + m_xImpl->m_xText->insertTextContent( rCursor->getStart(), xTextContent, sal_True ); if( !rCursor->getString().isEmpty() ) { @@ -1791,7 +1776,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( style, if it has no direct list style property and (if exists) the automatic paragraph style has also no direct list style set. */ - if (m_pImpl->m_xParaStyles.is() && m_pImpl->m_xParaStyles->hasByName(sStyleName)) + if (m_xImpl->m_xParaStyles.is() && m_xImpl->m_xParaStyles->hasByName(sStyleName)) { bool bOutlineStyleCandidate( false ); @@ -1817,17 +1802,17 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // Assure that heading applies the outline style (#i103817#) if ( ( !pStyle || !pStyle->IsListStyleSet() ) && !bOutlineStyleCandidate && - m_pImpl->m_xChapterNumbering.is()) + m_xImpl->m_xChapterNumbering.is()) { OUString sEmptyStr; if ( !lcl_HasListStyle( sStyleName, - m_pImpl->m_xParaStyles, GetXMLImport(), + m_xImpl->m_xParaStyles, GetXMLImport(), s_NumberingStyleName, sEmptyStr ) ) { // heading not in a list --> apply outline style xPropSet->setPropertyValue( s_NumberingRules, - makeAny(m_pImpl->m_xChapterNumbering) ); + makeAny(m_xImpl->m_xChapterNumbering) ); xPropSet->setPropertyValue( s_NumberingLevel, makeAny(static_cast<sal_Int8>(nOutlineLevel - 1))); } @@ -1858,23 +1843,23 @@ void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName, if( rStyleName.isEmpty() ) { // Empty? Then we need o do stuff. Let's do error checking first. - if (m_pImpl->m_xChapterNumbering.is() && + if (m_xImpl->m_xChapterNumbering.is() && ( nOutlineLevel > 0 ) && - (nOutlineLevel <= m_pImpl->m_xChapterNumbering->getCount())) + (nOutlineLevel <= m_xImpl->m_xChapterNumbering->getCount())) { nOutlineLevel--; // for the remainder, the level's are 0-based // empty style name: look-up previously used name // if we don't have a previously used name, we'll use the default - m_pImpl->InitOutlineStylesCandidates(); - if (m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel].empty()) + m_xImpl->InitOutlineStylesCandidates(); + if (m_xImpl->m_xOutlineStylesCandidates[nOutlineLevel].empty()) { // no other name used previously? Then use default // iterate over property value sequence to find the style name Sequence<PropertyValue> aProperties; - m_pImpl->m_xChapterNumbering->getByIndex( nOutlineLevel ) + m_xImpl->m_xChapterNumbering->getByIndex( nOutlineLevel ) >>= aProperties; for( sal_Int32 i = 0; i < aProperties.getLength(); i++ ) { @@ -1882,7 +1867,7 @@ void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName, { OUString aOutlineStyle; aProperties[i].Value >>= aOutlineStyle; - m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel] + m_xImpl->m_xOutlineStylesCandidates[nOutlineLevel] .push_back( aOutlineStyle ); break; // early out, if we found it!. } @@ -1893,7 +1878,7 @@ void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName, // format (or the default we've just put into that style) // take last added one (#i71249#) rStyleName = - m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel].back(); + m_xImpl->m_xOutlineStylesCandidates[nOutlineLevel].back(); } // else: nothing we can do, so we'll leave it empty } @@ -1904,12 +1889,12 @@ void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel const OUString& rStyleName ) { if (!rStyleName.isEmpty() - && m_pImpl->m_xChapterNumbering.is() + && m_xImpl->m_xChapterNumbering.is() && (nOutlineLevel > 0) - && (nOutlineLevel <= m_pImpl->m_xChapterNumbering->getCount())) + && (nOutlineLevel <= m_xImpl->m_xChapterNumbering->getCount())) { - m_pImpl->InitOutlineStylesCandidates(); - m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel-1].push_back( + m_xImpl->InitOutlineStylesCandidates(); + m_xImpl->m_xOutlineStylesCandidates[nOutlineLevel-1].push_back( rStyleName); } } @@ -1919,8 +1904,8 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels ) static const char s_NumberingStyleName[] = "NumberingStyleName"; static const char s_HeadingStyleName [] = "HeadingStyleName"; - if ((m_pImpl->m_pOutlineStylesCandidates != 0 || bSetEmptyLevels) && - m_pImpl->m_xChapterNumbering.is() && + if ((m_xImpl->m_xOutlineStylesCandidates != 0 || bSetEmptyLevels) && + m_xImpl->m_xChapterNumbering.is() && !IsInsertMode()) { bool bChooseLastOne( false ); @@ -1945,12 +1930,12 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels ) OUString sOutlineStyleName; { Reference<XPropertySet> xChapterNumRule( - m_pImpl->m_xChapterNumbering, UNO_QUERY); + m_xImpl->m_xChapterNumbering, UNO_QUERY); const OUString sName("Name"); xChapterNumRule->getPropertyValue(sName) >>= sOutlineStyleName; } - const sal_Int32 nCount = m_pImpl->m_xChapterNumbering->getCount(); + const sal_Int32 nCount = m_xImpl->m_xChapterNumbering->getCount(); /* First collect all paragraph styles chosen for assignment to each list level of the outline style, then perform the intrinsic assignment. Reason: The assignment of a certain paragraph style to a list level @@ -1961,34 +1946,34 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels ) for( sal_Int32 i=0; i < nCount; ++i ) { if ( bSetEmptyLevels || - (m_pImpl->m_pOutlineStylesCandidates && - !m_pImpl->m_pOutlineStylesCandidates[i].empty())) + (m_xImpl->m_xOutlineStylesCandidates && + !m_xImpl->m_xOutlineStylesCandidates[i].empty())) { // determine, which candidate is one to be assigned to the list // level of the outline style - if (m_pImpl->m_pOutlineStylesCandidates && - !m_pImpl->m_pOutlineStylesCandidates[i].empty()) + if (m_xImpl->m_xOutlineStylesCandidates && + !m_xImpl->m_xOutlineStylesCandidates[i].empty()) { if ( bChooseLastOne ) { sChosenStyles[i] = - m_pImpl->m_pOutlineStylesCandidates[i].back(); + m_xImpl->m_xOutlineStylesCandidates[i].back(); } else { for (sal_uInt32 j = 0; - j < m_pImpl->m_pOutlineStylesCandidates[i].size(); + j < m_xImpl->m_xOutlineStylesCandidates[i].size(); ++j) { if (!lcl_HasListStyle( - m_pImpl->m_pOutlineStylesCandidates[i][j], - m_pImpl->m_xParaStyles, + m_xImpl->m_xOutlineStylesCandidates[i][j], + m_xImpl->m_xParaStyles, GetXMLImport(), s_NumberingStyleName, sOutlineStyleName)) { sChosenStyles[i] = - m_pImpl->m_pOutlineStylesCandidates[i][j]; + m_xImpl->m_xOutlineStylesCandidates[i][j]; break; } } @@ -2006,7 +1991,7 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels ) if ( bSetEmptyLevels || !sChosenStyles[i].isEmpty() ) { pProps->Value <<= sChosenStyles[i]; - m_pImpl->m_xChapterNumbering->replaceByIndex(i, + m_xImpl->m_xChapterNumbering->replaceByIndex(i, makeAny( aProps )); } } @@ -2068,14 +2053,14 @@ void XMLTextImportHelper::SetHyperlink( } } - if (m_pImpl->m_xTextStyles.is()) + if (m_xImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rStyleName ) ); if( !sDisplayName.isEmpty() && xPropSetInfo->hasPropertyByName(s_UnvisitedCharStyleName) && - m_pImpl->m_xTextStyles->hasByName(sDisplayName)) + m_xImpl->m_xTextStyles->hasByName(sDisplayName)) { xPropSet->setPropertyValue(s_UnvisitedCharStyleName, makeAny(sDisplayName)); @@ -2086,7 +2071,7 @@ void XMLTextImportHelper::SetHyperlink( XML_STYLE_FAMILY_TEXT_TEXT, rVisitedStyleName ); if( !sDisplayName.isEmpty() && xPropSetInfo->hasPropertyByName(s_VisitedCharStyleName) && - m_pImpl->m_xTextStyles->hasByName(sDisplayName)) + m_xImpl->m_xTextStyles->hasByName(sDisplayName)) { xPropSet->setPropertyValue(s_VisitedCharStyleName, makeAny(sDisplayName)); @@ -2114,10 +2099,10 @@ void XMLTextImportHelper::SetRuby( xPropSet->setPropertyValue(sRubyText, makeAny(rText)); // the ruby style (ruby-adjust) - if (!rStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is()) + if (!rStyleName.isEmpty() && m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)-> + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_RUBY, rStyleName, true ); XMLPropStyleContext *pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,pTempStyle)); @@ -2127,13 +2112,13 @@ void XMLTextImportHelper::SetRuby( } // the ruby text character style - if (m_pImpl->m_xTextStyles.is()) + if (m_xImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rTextStyleName ) ); if( (!sDisplayName.isEmpty()) && - m_pImpl->m_xTextStyles->hasByName( sDisplayName )) + m_xImpl->m_xTextStyles->hasByName( sDisplayName )) { xPropSet->setPropertyValue(sRubyCharStyleName, makeAny(sDisplayName)); } @@ -2143,7 +2128,7 @@ void XMLTextImportHelper::SetRuby( void XMLTextImportHelper::SetAutoStyles( SvXMLStylesContext *pStyles ) { - m_pImpl->m_xAutoStyles = pStyles; + m_xImpl->m_xAutoStyles = pStyles; } SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( @@ -2166,7 +2151,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( pContext = new XMLParaContext( rImport, nPrefix, rLocalName, xAttrList, bHeading ); - if (m_pImpl->m_bProgress && XML_TEXT_TYPE_SHAPE != eType) + if (m_xImpl->m_bProgress && XML_TEXT_TYPE_SHAPE != eType) { rImport.GetProgressBarHelper()->Increment(); } @@ -2191,7 +2176,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( xAttrList ); break; case XML_TOK_TEXT_SEQUENCE_DECLS: - if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -2201,7 +2186,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_VARFIELD_DECLS: - if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -2211,7 +2196,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_USERFIELD_DECLS: - if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted)|| + if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted)|| XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -2221,7 +2206,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_DDE_DECLS: - if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLDdeFieldDeclsImportContext( @@ -2231,7 +2216,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_FRAME_PAGE: - if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType ) { @@ -2246,7 +2231,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_DRAW_A_PAGE: - if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType) { @@ -2311,7 +2296,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; default: - if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_xImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType ) { @@ -2332,7 +2317,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( if( XML_TEXT_TYPE_BODY == eType && bContent ) { - m_pImpl->m_bBodyContentStarted = false; + m_xImpl->m_bBodyContentStarted = false; } return pContext; @@ -2351,7 +2336,7 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName, bool* pIsSystemLanguage ) { const SvXMLStyleContext* pStyle = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)-> + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE, sStyleName, true ); @@ -2384,10 +2369,10 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName, const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUString& rName ) const { const SvxXMLListStyleContext *pStyle = 0; - if (m_pImpl->m_xAutoStyles.Is()) + if (m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)-> + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_LIST, rName, true ); pStyle = PTR_CAST( SvxXMLListStyleContext ,pTempStyle); @@ -2399,10 +2384,10 @@ const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUSt XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rName ) const { XMLPropStyleContext *pStyle = 0; - if (m_pImpl->m_xAutoStyles.Is()) + if (m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)-> + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_SD_GRAPHICS_ID, rName, true ); pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST( XMLPropStyleContext ,pTempStyle)); @@ -2415,10 +2400,10 @@ XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle( const OUString& rName ) const { XMLPropStyleContext* pStyle = NULL; - if (m_pImpl->m_xAutoStyles.Is()) + if (m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)-> + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_SECTION, rName, true ); @@ -2432,10 +2417,10 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster( const OUString& rName ) const { XMLPropStyleContext* pStyle = NULL; - if (m_pImpl->m_xAutoStyles.Is()) + if (m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = - static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)-> + static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_PAGE_MASTER, rName, true ); @@ -2459,41 +2444,41 @@ void XMLTextImportHelper::PopListContext() const SvXMLTokenMap& XMLTextImportHelper::GetTextNumberedParagraphAttrTokenMap() { - if (!m_pImpl->m_pTextNumberedParagraphAttrTokenMap.get()) + if (!m_xImpl->m_xTextNumberedParagraphAttrTokenMap.get()) { - m_pImpl->m_pTextNumberedParagraphAttrTokenMap.reset( + m_xImpl->m_xTextNumberedParagraphAttrTokenMap.reset( new SvXMLTokenMap( aTextNumberedParagraphAttrTokenMap ) ); } - return *m_pImpl->m_pTextNumberedParagraphAttrTokenMap; + return *m_xImpl->m_xTextNumberedParagraphAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextListBlockAttrTokenMap() { - if (!m_pImpl->m_pTextListBlockAttrTokenMap.get()) + if (!m_xImpl->m_xTextListBlockAttrTokenMap.get()) { - m_pImpl->m_pTextListBlockAttrTokenMap.reset( + m_xImpl->m_xTextListBlockAttrTokenMap.reset( new SvXMLTokenMap( aTextListBlockAttrTokenMap ) ); } - return *m_pImpl->m_pTextListBlockAttrTokenMap; + return *m_xImpl->m_xTextListBlockAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextListBlockElemTokenMap() { - if (!m_pImpl->m_pTextListBlockElemTokenMap.get()) + if (!m_xImpl->m_xTextListBlockElemTokenMap.get()) { - m_pImpl->m_pTextListBlockElemTokenMap.reset( + m_xImpl->m_xTextListBlockElemTokenMap.reset( new SvXMLTokenMap( aTextListBlockElemTokenMap ) ); } - return *m_pImpl->m_pTextListBlockElemTokenMap; + return *m_xImpl->m_xTextListBlockElemTokenMap; } SvI18NMap& XMLTextImportHelper::GetRenameMap() { - if (!m_pImpl->m_pRenameMap.get()) + if (!m_xImpl->m_xRenameMap.get()) { - m_pImpl->m_pRenameMap.reset( new SvI18NMap() ); + m_xImpl->m_xRenameMap.reset( new SvI18NMap() ); } - return *m_pImpl->m_pRenameMap; + return *m_xImpl->m_xRenameMap; } void XMLTextImportHelper::InsertBookmarkStartRange( @@ -2502,9 +2487,9 @@ void XMLTextImportHelper::InsertBookmarkStartRange( OUString const& i_rXmlId, ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & i_rpRDFaAttributes) { - m_pImpl->m_BookmarkStartRanges[sName] = + m_xImpl->m_BookmarkStartRanges[sName] = ::boost::make_tuple(rRange, i_rXmlId, i_rpRDFaAttributes); - m_pImpl->m_BookmarkVector.push_back(sName); + m_xImpl->m_BookmarkVector.push_back(sName); } bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( @@ -2513,22 +2498,22 @@ bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( OUString & o_rXmlId, ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & o_rpRDFaAttributes) { - if (m_pImpl->m_BookmarkStartRanges.count(sName)) + if (m_xImpl->m_BookmarkStartRanges.count(sName)) { Impl::BookmarkMapEntry_t & rEntry = - (*m_pImpl->m_BookmarkStartRanges.find(sName)).second; + (*m_xImpl->m_BookmarkStartRanges.find(sName)).second; o_rRange.set(rEntry.get<0>()); o_rXmlId = rEntry.get<1>(); o_rpRDFaAttributes = rEntry.get<2>(); - m_pImpl->m_BookmarkStartRanges.erase(sName); - Impl::BookmarkVector_t::iterator it(m_pImpl->m_BookmarkVector.begin()); - while (it != m_pImpl->m_BookmarkVector.end() && it->compareTo(sName)!=0) + m_xImpl->m_BookmarkStartRanges.erase(sName); + Impl::BookmarkVector_t::iterator it(m_xImpl->m_BookmarkVector.begin()); + while (it != m_xImpl->m_BookmarkVector.end() && it->compareTo(sName)!=0) { ++it; } - if (it!=m_pImpl->m_BookmarkVector.end()) + if (it!=m_xImpl->m_BookmarkVector.end()) { - m_pImpl->m_BookmarkVector.erase(it); + m_xImpl->m_BookmarkVector.erase(it); } return true; } @@ -2540,9 +2525,9 @@ bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( OUString XMLTextImportHelper::FindActiveBookmarkName() { - if (!m_pImpl->m_BookmarkVector.empty()) + if (!m_xImpl->m_BookmarkVector.empty()) { - return m_pImpl->m_BookmarkVector.back(); + return m_xImpl->m_BookmarkVector.back(); } else { @@ -2552,31 +2537,31 @@ OUString XMLTextImportHelper::FindActiveBookmarkName() void XMLTextImportHelper::pushFieldCtx( const OUString& name, const OUString& type ) { - m_pImpl->m_FieldStack.push(Impl::field_stack_item_t( + m_xImpl->m_FieldStack.push(Impl::field_stack_item_t( Impl::field_name_type_t(name, type), Impl::field_params_t())); } void XMLTextImportHelper::popFieldCtx() { - if ( !m_pImpl->m_FieldStack.empty() ) - m_pImpl->m_FieldStack.pop(); + if ( !m_xImpl->m_FieldStack.empty() ) + m_xImpl->m_FieldStack.pop(); } void XMLTextImportHelper::addFieldParam( const OUString& name, const OUString& value ) { - assert(!m_pImpl->m_FieldStack.empty()); - if (!m_pImpl->m_FieldStack.empty()) { - Impl::field_stack_item_t & FieldStackItem(m_pImpl->m_FieldStack.top()); + assert(!m_xImpl->m_FieldStack.empty()); + if (!m_xImpl->m_FieldStack.empty()) { + Impl::field_stack_item_t & FieldStackItem(m_xImpl->m_FieldStack.top()); FieldStackItem.second.push_back(Impl::field_param_t( name, value )); } } OUString XMLTextImportHelper::getCurrentFieldType() { - assert(!m_pImpl->m_FieldStack.empty()); - if (!m_pImpl->m_FieldStack.empty()) + assert(!m_xImpl->m_FieldStack.empty()); + if (!m_xImpl->m_FieldStack.empty()) { - return m_pImpl->m_FieldStack.top().first.second; + return m_xImpl->m_FieldStack.top().first.second; } else { @@ -2586,15 +2571,15 @@ OUString XMLTextImportHelper::getCurrentFieldType() bool XMLTextImportHelper::hasCurrentFieldCtx() { - return !m_pImpl->m_FieldStack.empty(); + return !m_xImpl->m_FieldStack.empty(); } void XMLTextImportHelper::setCurrentFieldParamsTo(::com::sun::star::uno::Reference< ::com::sun::star::text::XFormField> &xFormField) { - assert(!m_pImpl->m_FieldStack.empty()); - if (!m_pImpl->m_FieldStack.empty() && xFormField.is()) + assert(!m_xImpl->m_FieldStack.empty()); + if (!m_xImpl->m_FieldStack.empty() && xFormField.is()) { - FieldParamImporter(&m_pImpl->m_FieldStack.top().second, + FieldParamImporter(&m_xImpl->m_FieldStack.top().second, xFormField->getParameters()).Import(); } } @@ -2615,26 +2600,26 @@ void XMLTextImportHelper::ConnectFrameChains( { OUString sNextFrmName(GetRenameMap().Get( XML_TEXT_RENAME_TYPE_FRAME, rNextFrmName )); - if (m_pImpl->m_xTextFrames.is() - && m_pImpl->m_xTextFrames->hasByName(sNextFrmName)) + if (m_xImpl->m_xTextFrames.is() + && m_xImpl->m_xTextFrames->hasByName(sNextFrmName)) { rFrmPropSet->setPropertyValue(s_ChainNextName, makeAny(sNextFrmName)); } else { - if (!m_pImpl->m_pPrevFrmNames.get()) + if (!m_xImpl->m_xPrevFrmNames.get()) { - m_pImpl->m_pPrevFrmNames.reset( new std::vector<OUString> ); - m_pImpl->m_pNextFrmNames.reset( new std::vector<OUString> ); + m_xImpl->m_xPrevFrmNames.reset( new std::vector<OUString> ); + m_xImpl->m_xNextFrmNames.reset( new std::vector<OUString> ); } - m_pImpl->m_pPrevFrmNames->push_back(rFrmName); - m_pImpl->m_pNextFrmNames->push_back(sNextFrmName); + m_xImpl->m_xPrevFrmNames->push_back(rFrmName); + m_xImpl->m_xNextFrmNames->push_back(sNextFrmName); } } - if (m_pImpl->m_pPrevFrmNames.get() && !m_pImpl->m_pPrevFrmNames->empty()) + if (m_xImpl->m_xPrevFrmNames.get() && !m_xImpl->m_xPrevFrmNames->empty()) { - for(std::vector<OUString>::iterator i = m_pImpl->m_pPrevFrmNames->begin(), j = m_pImpl->m_pNextFrmNames->begin(); i != m_pImpl->m_pPrevFrmNames->end() && j != m_pImpl->m_pNextFrmNames->end(); ++i, ++j) + for(std::vector<OUString>::iterator i = m_xImpl->m_xPrevFrmNames->begin(), j = m_xImpl->m_xNextFrmNames->begin(); i != m_xImpl->m_xPrevFrmNames->end() && j != m_xImpl->m_xNextFrmNames->end(); ++i, ++j) { if((*j).equals(rFrmName)) { @@ -2642,8 +2627,8 @@ void XMLTextImportHelper::ConnectFrameChains( // inserting the entry rFrmPropSet->setPropertyValue(s_ChainPrevName, makeAny(*i)); - i = m_pImpl->m_pPrevFrmNames->erase(i); - j = m_pImpl->m_pNextFrmNames->erase(j); + i = m_xImpl->m_xPrevFrmNames->erase(i); + j = m_xImpl->m_xNextFrmNames->erase(j); // There cannot be more than one previous frames break; @@ -2788,12 +2773,12 @@ void XMLTextImportHelper::SetChangesProtectionKey(const Sequence<sal_Int8> &) OUString XMLTextImportHelper::GetOpenRedlineId() { - return m_pImpl->m_sOpenRedlineIdentifier; + return m_xImpl->m_sOpenRedlineIdentifier; } void XMLTextImportHelper::SetOpenRedlineId( OUString& rId) { - m_pImpl->m_sOpenRedlineIdentifier = rId; + m_xImpl->m_sOpenRedlineIdentifier = rId; } void XMLTextImportHelper::ResetOpenRedlineId() @@ -2805,12 +2790,12 @@ void XMLTextImportHelper::ResetOpenRedlineId() void XMLTextImportHelper::SetCellParaStyleDefault(OUString const& rNewValue) { - m_pImpl->m_sCellParaStyleDefault = rNewValue; + m_xImpl->m_sCellParaStyleDefault = rNewValue; } OUString const& XMLTextImportHelper::GetCellParaStyleDefault() { - return m_pImpl->m_sCellParaStyleDefault; + return m_xImpl->m_sCellParaStyleDefault; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 231e614e0745..33876d24dfc8 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1160,7 +1160,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( SvXMLAutoStylePoolP & rASP ) : XMLStyleExport( rExp, OUString(), &rASP ), - m_pImpl(new Impl), + m_xImpl(new Impl), rAutoStylePool( rASP ), pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())), pFieldExport( 0 ), @@ -2315,7 +2315,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( { // name attribute is mandatory, so have to pull a // rabbit out of the hat here sName = sFieldMarkName + OUString::number( - m_pImpl->AddFieldMarkStart(xFormField)); + m_xImpl->AddFieldMarkStart(xFormField)); } GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, sName); @@ -2366,7 +2366,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( { // name attribute is mandatory, so have to pull a // rabbit out of the hat here sName = sFieldMarkName + OUString::number( - m_pImpl->GetFieldMarkIndex(xFormField)); + m_xImpl->GetFieldMarkIndex(xFormField)); } GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, sName); |