diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-04-25 20:17:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-04-25 22:43:39 +0200 |
commit | d26d1da82f0625ce1e5a99cc0081b1fcf422b315 (patch) | |
tree | 5f4fa18baa60dc09f24b4681dc04b3a76599244e /svtools | |
parent | 33966ab25d21594a3a4f40ce30ece73fa4f45a27 (diff) |
rename SvtValueSet back to ValueSet
Change-Id: I51ab96ffef7acc0d416d13ac8e380e49381f4d1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92902
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/valueacc.cxx | 190 | ||||
-rw-r--r-- | svtools/source/control/valueimp.hxx | 36 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 202 |
4 files changed, 216 insertions, 216 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index b31ccc45d4a3..d1c2fe0be831 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1393,7 +1393,7 @@ SvtLineListBox::SvtLineListBox(std::unique_ptr<weld::MenuButton> pControl) , m_xBuilder(Application::CreateBuilder(m_xControl.get(), "svt/ui/linewindow.ui")) , m_xTopLevel(m_xBuilder->weld_widget("line_popup_window")) , m_xNoneButton(m_xBuilder->weld_button("none_line_button")) - , m_xLineSet(new SvtValueSet(nullptr)) + , m_xLineSet(new ValueSet(nullptr)) , m_xLineSetWin(new weld::CustomWeld(*m_xBuilder, "lineset", *m_xLineSet)) , m_nWidth( 5 ) , aVirDev(VclPtr<VirtualDevice>::Create()) @@ -1565,7 +1565,7 @@ Color SvtLineListBox::GetColorDist( sal_Int32 nPos ) return pData->GetColorDist( GetColor( ), rResult ); } -IMPL_LINK_NOARG(SvtLineListBox, ValueSelectHdl, SvtValueSet*, void) +IMPL_LINK_NOARG(SvtLineListBox, ValueSelectHdl, ValueSet*, void) { maSelectHdl.Call(*this); UpdatePreview(); diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 5f5aafaad7c3..c43e8d070127 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star; -SvtValueSetItem::SvtValueSetItem( SvtValueSet& rParent ) +ValueSetItem::ValueSetItem( ValueSet& rParent ) : mrParent(rParent) , mnId(0) , meType(VALUESETITEM_NONE) @@ -47,7 +47,7 @@ SvtValueSetItem::SvtValueSetItem( SvtValueSet& rParent ) } -SvtValueSetItem::~SvtValueSetItem() +ValueSetItem::~ValueSetItem() { if( mxAcc.is() ) { @@ -55,25 +55,25 @@ SvtValueSetItem::~SvtValueSetItem() } } -uno::Reference< accessibility::XAccessible > SvtValueSetItem::GetAccessible( bool bIsTransientChildrenDisabled ) +uno::Reference< accessibility::XAccessible > ValueSetItem::GetAccessible( bool bIsTransientChildrenDisabled ) { if( !mxAcc.is() ) - mxAcc = new SvtValueItemAcc( this, bIsTransientChildrenDisabled ); + mxAcc = new ValueItemAcc( this, bIsTransientChildrenDisabled ); return mxAcc.get(); } -SvtValueItemAcc::SvtValueItemAcc( SvtValueSetItem* pParent, bool bIsTransientChildrenDisabled ) : +ValueItemAcc::ValueItemAcc( ValueSetItem* pParent, bool bIsTransientChildrenDisabled ) : mpParent( pParent ), mbIsTransientChildrenDisabled( bIsTransientChildrenDisabled ) { } -SvtValueItemAcc::~SvtValueItemAcc() +ValueItemAcc::~ValueItemAcc() { } -void SvtValueItemAcc::ParentDestroyed() +void ValueItemAcc::ParentDestroyed() { const ::osl::MutexGuard aGuard( maMutex ); mpParent = nullptr; @@ -81,21 +81,21 @@ void SvtValueItemAcc::ParentDestroyed() namespace { - class theSvtValueItemAccUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvtValueItemAccUnoTunnelId > {}; + class theValueItemAccUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theValueItemAccUnoTunnelId > {}; } -const uno::Sequence< sal_Int8 >& SvtValueItemAcc::getUnoTunnelId() +const uno::Sequence< sal_Int8 >& ValueItemAcc::getUnoTunnelId() { - return theSvtValueItemAccUnoTunnelId::get().getSeq(); + return theValueItemAccUnoTunnelId::get().getSeq(); } -SvtValueItemAcc* SvtValueItemAcc::getImplementation( const uno::Reference< uno::XInterface >& rxData ) +ValueItemAcc* ValueItemAcc::getImplementation( const uno::Reference< uno::XInterface >& rxData ) throw() { try { - return comphelper::getUnoTunnelImplementation<SvtValueItemAcc>(rxData); + return comphelper::getUnoTunnelImplementation<ValueItemAcc>(rxData); } catch(const css::uno::Exception&) { @@ -104,25 +104,25 @@ SvtValueItemAcc* SvtValueItemAcc::getImplementation( const uno::Reference< uno:: } -uno::Reference< accessibility::XAccessibleContext > SAL_CALL SvtValueItemAcc::getAccessibleContext() +uno::Reference< accessibility::XAccessibleContext > SAL_CALL ValueItemAcc::getAccessibleContext() { return this; } -sal_Int32 SAL_CALL SvtValueItemAcc::getAccessibleChildCount() +sal_Int32 SAL_CALL ValueItemAcc::getAccessibleChildCount() { return 0; } -uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueItemAcc::getAccessibleChild( sal_Int32 ) +uno::Reference< accessibility::XAccessible > SAL_CALL ValueItemAcc::getAccessibleChild( sal_Int32 ) { throw lang::IndexOutOfBoundsException(); } -uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueItemAcc::getAccessibleParent() +uno::Reference< accessibility::XAccessible > SAL_CALL ValueItemAcc::getAccessibleParent() { const SolarMutexGuard aSolarGuard; uno::Reference< accessibility::XAccessible > xRet; @@ -134,7 +134,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueItemAcc::getAccess } -sal_Int32 SAL_CALL SvtValueItemAcc::getAccessibleIndexInParent() +sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent() { const SolarMutexGuard aSolarGuard; // The index defaults to -1 to indicate the child does not belong to its @@ -146,7 +146,7 @@ sal_Int32 SAL_CALL SvtValueItemAcc::getAccessibleIndexInParent() bool bDone = false; sal_uInt16 nCount = mpParent->mrParent.ImplGetVisibleItemCount(); - SvtValueSetItem* pItem; + ValueSetItem* pItem; for (sal_uInt16 i=0; i<nCount && !bDone; i++) { // Guard the retrieval of the i-th child with a try/catch block @@ -173,7 +173,7 @@ sal_Int32 SAL_CALL SvtValueItemAcc::getAccessibleIndexInParent() //if this valueset contain a none field(common value is default), then we should increase the real index and set the noitem index value equal 0. if ( mpParent && ( (mpParent->mrParent.GetStyle() & WB_NONEFIELD) != 0 ) ) { - SvtValueSetItem* pFirstItem = mpParent->mrParent.ImplGetItem (VALUESET_ITEM_NONEITEM); + ValueSetItem* pFirstItem = mpParent->mrParent.ImplGetItem (VALUESET_ITEM_NONEITEM); if( pFirstItem && pFirstItem ->GetAccessible(mbIsTransientChildrenDisabled).get() == this ) nIndexInParent = 0; else @@ -183,19 +183,19 @@ sal_Int32 SAL_CALL SvtValueItemAcc::getAccessibleIndexInParent() } -sal_Int16 SAL_CALL SvtValueItemAcc::getAccessibleRole() +sal_Int16 SAL_CALL ValueItemAcc::getAccessibleRole() { return accessibility::AccessibleRole::LIST_ITEM; } -OUString SAL_CALL SvtValueItemAcc::getAccessibleDescription() +OUString SAL_CALL ValueItemAcc::getAccessibleDescription() { return OUString(); } -OUString SAL_CALL SvtValueItemAcc::getAccessibleName() +OUString SAL_CALL ValueItemAcc::getAccessibleName() { const SolarMutexGuard aSolarGuard; @@ -211,13 +211,13 @@ OUString SAL_CALL SvtValueItemAcc::getAccessibleName() } -uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL SvtValueItemAcc::getAccessibleRelationSet() +uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL ValueItemAcc::getAccessibleRelationSet() { return uno::Reference< accessibility::XAccessibleRelationSet >(); } -uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SvtValueItemAcc::getAccessibleStateSet() +uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL ValueItemAcc::getAccessibleStateSet() { const SolarMutexGuard aSolarGuard; ::utl::AccessibleStateSetHelper* pStateSet = new ::utl::AccessibleStateSetHelper; @@ -247,7 +247,7 @@ uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SvtValueItemAcc::g } -lang::Locale SAL_CALL SvtValueItemAcc::getLocale() +lang::Locale SAL_CALL ValueItemAcc::getLocale() { const SolarMutexGuard aSolarGuard; uno::Reference< accessibility::XAccessible > xParent( getAccessibleParent() ); @@ -265,7 +265,7 @@ lang::Locale SAL_CALL SvtValueItemAcc::getLocale() } -void SAL_CALL SvtValueItemAcc::addAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) +void SAL_CALL ValueItemAcc::addAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) { const ::osl::MutexGuard aGuard( maMutex ); @@ -288,7 +288,7 @@ void SAL_CALL SvtValueItemAcc::addAccessibleEventListener( const uno::Reference< } -void SAL_CALL SvtValueItemAcc::removeAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) +void SAL_CALL ValueItemAcc::removeAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) { const ::osl::MutexGuard aGuard( maMutex ); @@ -303,7 +303,7 @@ void SAL_CALL SvtValueItemAcc::removeAccessibleEventListener( const uno::Referen } -sal_Bool SAL_CALL SvtValueItemAcc::containsPoint( const awt::Point& aPoint ) +sal_Bool SAL_CALL ValueItemAcc::containsPoint( const awt::Point& aPoint ) { const awt::Rectangle aRect( getBounds() ); const Point aSize( aRect.Width, aRect.Height ); @@ -312,13 +312,13 @@ sal_Bool SAL_CALL SvtValueItemAcc::containsPoint( const awt::Point& aPoint ) return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); } -uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueItemAcc::getAccessibleAtPoint( const awt::Point& ) +uno::Reference< accessibility::XAccessible > SAL_CALL ValueItemAcc::getAccessibleAtPoint( const awt::Point& ) { uno::Reference< accessibility::XAccessible > xRet; return xRet; } -awt::Rectangle SAL_CALL SvtValueItemAcc::getBounds() +awt::Rectangle SAL_CALL ValueItemAcc::getBounds() { const SolarMutexGuard aSolarGuard; awt::Rectangle aRet; @@ -339,7 +339,7 @@ awt::Rectangle SAL_CALL SvtValueItemAcc::getBounds() return aRet; } -awt::Point SAL_CALL SvtValueItemAcc::getLocation() +awt::Point SAL_CALL ValueItemAcc::getLocation() { const awt::Rectangle aRect( getBounds() ); awt::Point aRet; @@ -350,7 +350,7 @@ awt::Point SAL_CALL SvtValueItemAcc::getLocation() return aRet; } -awt::Point SAL_CALL SvtValueItemAcc::getLocationOnScreen() +awt::Point SAL_CALL ValueItemAcc::getLocationOnScreen() { const SolarMutexGuard aSolarGuard; awt::Point aRet; @@ -367,7 +367,7 @@ awt::Point SAL_CALL SvtValueItemAcc::getLocationOnScreen() return aRet; } -awt::Size SAL_CALL SvtValueItemAcc::getSize() +awt::Size SAL_CALL ValueItemAcc::getSize() { const awt::Rectangle aRect( getBounds() ); awt::Size aRet; @@ -378,18 +378,18 @@ awt::Size SAL_CALL SvtValueItemAcc::getSize() return aRet; } -void SAL_CALL SvtValueItemAcc::grabFocus() +void SAL_CALL ValueItemAcc::grabFocus() { // nothing to do } -sal_Int32 SAL_CALL SvtValueItemAcc::getForeground( ) +sal_Int32 SAL_CALL ValueItemAcc::getForeground( ) { Color nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor(); return static_cast<sal_Int32>(nColor); } -sal_Int32 SAL_CALL SvtValueItemAcc::getBackground( ) +sal_Int32 SAL_CALL ValueItemAcc::getBackground( ) { Color nColor; if (mpParent && mpParent->meType == VALUESETITEM_COLOR) @@ -399,11 +399,11 @@ sal_Int32 SAL_CALL SvtValueItemAcc::getBackground( ) return static_cast<sal_Int32>(nColor); } -sal_Int64 SAL_CALL SvtValueItemAcc::getSomething( const uno::Sequence< sal_Int8 >& rId ) +sal_Int64 SAL_CALL ValueItemAcc::getSomething( const uno::Sequence< sal_Int8 >& rId ) { sal_Int64 nRet; - if( isUnoTunnelId<SvtValueItemAcc>(rId) ) + if( isUnoTunnelId<ValueItemAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -411,7 +411,7 @@ sal_Int64 SAL_CALL SvtValueItemAcc::getSomething( const uno::Sequence< sal_Int8 return nRet; } -void SvtValueItemAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValue, const uno::Any& rNewValue ) +void ValueItemAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValue, const uno::Any& rNewValue ) { if( !nEventId ) return; @@ -430,7 +430,7 @@ void SvtValueItemAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldV } } -SvtValueSetAcc::SvtValueSetAcc( SvtValueSet* pParent ) : +ValueSetAcc::ValueSetAcc( ValueSet* pParent ) : ValueSetAccComponentBase (m_aMutex), mpParent( pParent ), mbIsFocused(false) @@ -438,12 +438,12 @@ SvtValueSetAcc::SvtValueSetAcc( SvtValueSet* pParent ) : } -SvtValueSetAcc::~SvtValueSetAcc() +ValueSetAcc::~ValueSetAcc() { } -void SvtValueSetAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValue, const uno::Any& rNewValue ) +void ValueSetAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValue, const uno::Any& rNewValue ) { if( !nEventId ) return; @@ -470,21 +470,21 @@ void SvtValueSetAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldVa namespace { - class theSvtValueSetAccUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvtValueSetAccUnoTunnelId > {}; + class theValueSetAccUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theValueSetAccUnoTunnelId > {}; } -const uno::Sequence< sal_Int8 >& SvtValueSetAcc::getUnoTunnelId() +const uno::Sequence< sal_Int8 >& ValueSetAcc::getUnoTunnelId() { - return theSvtValueSetAccUnoTunnelId::get().getSeq(); + return theValueSetAccUnoTunnelId::get().getSeq(); } -SvtValueSetAcc* SvtValueSetAcc::getImplementation( const uno::Reference< uno::XInterface >& rxData ) +ValueSetAcc* ValueSetAcc::getImplementation( const uno::Reference< uno::XInterface >& rxData ) throw() { try { - return comphelper::getUnoTunnelImplementation<SvtValueSetAcc>(rxData); + return comphelper::getUnoTunnelImplementation<ValueSetAcc>(rxData); } catch(const css::uno::Exception&) { @@ -493,7 +493,7 @@ SvtValueSetAcc* SvtValueSetAcc::getImplementation( const uno::Reference< uno::XI } -void SvtValueSetAcc::GetFocus() +void ValueSetAcc::GetFocus() { mbIsFocused = true; @@ -506,7 +506,7 @@ void SvtValueSetAcc::GetFocus() } -void SvtValueSetAcc::LoseFocus() +void ValueSetAcc::LoseFocus() { mbIsFocused = false; @@ -519,14 +519,14 @@ void SvtValueSetAcc::LoseFocus() } -uno::Reference< accessibility::XAccessibleContext > SAL_CALL SvtValueSetAcc::getAccessibleContext() +uno::Reference< accessibility::XAccessibleContext > SAL_CALL ValueSetAcc::getAccessibleContext() { ThrowIfDisposed(); return this; } -sal_Int32 SAL_CALL SvtValueSetAcc::getAccessibleChildCount() +sal_Int32 SAL_CALL ValueSetAcc::getAccessibleChildCount() { const SolarMutexGuard aSolarGuard; ThrowIfDisposed(); @@ -538,11 +538,11 @@ sal_Int32 SAL_CALL SvtValueSetAcc::getAccessibleChildCount() } -uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getAccessibleChild( sal_Int32 i ) +uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessibleChild( sal_Int32 i ) { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; - SvtValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(i)); + ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(i)); if( !pItem ) throw lang::IndexOutOfBoundsException(); @@ -551,14 +551,14 @@ uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getAccessi return xRet; } -uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getAccessibleParent() +uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessibleParent() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; return mpParent->GetDrawingArea()->get_accessible_parent(); } -sal_Int32 SAL_CALL SvtValueSetAcc::getAccessibleIndexInParent() +sal_Int32 SAL_CALL ValueSetAcc::getAccessibleIndexInParent() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -594,14 +594,14 @@ sal_Int32 SAL_CALL SvtValueSetAcc::getAccessibleIndexInParent() return nRet; } -sal_Int16 SAL_CALL SvtValueSetAcc::getAccessibleRole() +sal_Int16 SAL_CALL ValueSetAcc::getAccessibleRole() { ThrowIfDisposed(); return accessibility::AccessibleRole::LIST; } -OUString SAL_CALL SvtValueSetAcc::getAccessibleDescription() +OUString SAL_CALL ValueSetAcc::getAccessibleDescription() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -616,7 +616,7 @@ OUString SAL_CALL SvtValueSetAcc::getAccessibleDescription() } -OUString SAL_CALL SvtValueSetAcc::getAccessibleName() +OUString SAL_CALL ValueSetAcc::getAccessibleName() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -630,14 +630,14 @@ OUString SAL_CALL SvtValueSetAcc::getAccessibleName() return aRet; } -uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL SvtValueSetAcc::getAccessibleRelationSet() +uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL ValueSetAcc::getAccessibleRelationSet() { ThrowIfDisposed(); SolarMutexGuard g; return mpParent->GetDrawingArea()->get_accessible_relation_set(); } -uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SvtValueSetAcc::getAccessibleStateSet() +uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL ValueSetAcc::getAccessibleStateSet() { ThrowIfDisposed(); ::utl::AccessibleStateSetHelper* pStateSet = new ::utl::AccessibleStateSetHelper(); @@ -656,7 +656,7 @@ uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SvtValueSetAcc::ge } -lang::Locale SAL_CALL SvtValueSetAcc::getLocale() +lang::Locale SAL_CALL ValueSetAcc::getLocale() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -675,7 +675,7 @@ lang::Locale SAL_CALL SvtValueSetAcc::getLocale() } -void SAL_CALL SvtValueSetAcc::addAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) +void SAL_CALL ValueSetAcc::addAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) { ThrowIfDisposed(); ::osl::MutexGuard aGuard (m_aMutex); @@ -699,7 +699,7 @@ void SAL_CALL SvtValueSetAcc::addAccessibleEventListener( const uno::Reference< } -void SAL_CALL SvtValueSetAcc::removeAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) +void SAL_CALL ValueSetAcc::removeAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) { ThrowIfDisposed(); ::osl::MutexGuard aGuard (m_aMutex); @@ -715,7 +715,7 @@ void SAL_CALL SvtValueSetAcc::removeAccessibleEventListener( const uno::Referenc } -sal_Bool SAL_CALL SvtValueSetAcc::containsPoint( const awt::Point& aPoint ) +sal_Bool SAL_CALL ValueSetAcc::containsPoint( const awt::Point& aPoint ) { ThrowIfDisposed(); const awt::Rectangle aRect( getBounds() ); @@ -726,7 +726,7 @@ sal_Bool SAL_CALL SvtValueSetAcc::containsPoint( const awt::Point& aPoint ) } -uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getAccessibleAtPoint( const awt::Point& aPoint ) +uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessibleAtPoint( const awt::Point& aPoint ) { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -739,7 +739,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getAccessi if( VALUESET_ITEM_NONEITEM != nItemPos ) { - SvtValueSetItem *const pItem = mpParent->mItemList[nItemPos].get(); + ValueSetItem *const pItem = mpParent->mItemList[nItemPos].get(); xRet = pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ); } } @@ -748,7 +748,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getAccessi } -awt::Rectangle SAL_CALL SvtValueSetAcc::getBounds() +awt::Rectangle SAL_CALL ValueSetAcc::getBounds() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -764,7 +764,7 @@ awt::Rectangle SAL_CALL SvtValueSetAcc::getBounds() return aRet; } -awt::Point SAL_CALL SvtValueSetAcc::getLocation() +awt::Point SAL_CALL ValueSetAcc::getLocation() { ThrowIfDisposed(); const awt::Rectangle aRect( getBounds() ); @@ -776,7 +776,7 @@ awt::Point SAL_CALL SvtValueSetAcc::getLocation() return aRet; } -awt::Point SAL_CALL SvtValueSetAcc::getLocationOnScreen() +awt::Point SAL_CALL ValueSetAcc::getLocationOnScreen() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -787,7 +787,7 @@ awt::Point SAL_CALL SvtValueSetAcc::getLocationOnScreen() { uno::Reference<accessibility::XAccessibleContext> xParentContext(xParent->getAccessibleContext()); uno::Reference<accessibility::XAccessibleComponent> xParentComponent(xParentContext, css::uno::UNO_QUERY); - OSL_ENSURE( xParentComponent.is(), "SvtValueSetAcc::getLocationOnScreen: no parent component!" ); + OSL_ENSURE( xParentComponent.is(), "ValueSetAcc::getLocationOnScreen: no parent component!" ); if ( xParentComponent.is() ) { awt::Point aParentScreenLoc( xParentComponent->getLocationOnScreen() ); @@ -800,7 +800,7 @@ awt::Point SAL_CALL SvtValueSetAcc::getLocationOnScreen() return aScreenLoc; } -awt::Size SAL_CALL SvtValueSetAcc::getSize() +awt::Size SAL_CALL ValueSetAcc::getSize() { ThrowIfDisposed(); const awt::Rectangle aRect( getBounds() ); @@ -812,32 +812,32 @@ awt::Size SAL_CALL SvtValueSetAcc::getSize() return aRet; } -void SAL_CALL SvtValueSetAcc::grabFocus() +void SAL_CALL ValueSetAcc::grabFocus() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; mpParent->GrabFocus(); } -sal_Int32 SAL_CALL SvtValueSetAcc::getForeground( ) +sal_Int32 SAL_CALL ValueSetAcc::getForeground( ) { ThrowIfDisposed(); Color nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor(); return static_cast<sal_Int32>(nColor); } -sal_Int32 SAL_CALL SvtValueSetAcc::getBackground( ) +sal_Int32 SAL_CALL ValueSetAcc::getBackground( ) { ThrowIfDisposed(); Color nColor = Application::GetSettings().GetStyleSettings().GetWindowColor(); return static_cast<sal_Int32>(nColor); } -void SAL_CALL SvtValueSetAcc::selectAccessibleChild( sal_Int32 nChildIndex ) +void SAL_CALL ValueSetAcc::selectAccessibleChild( sal_Int32 nChildIndex ) { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; - SvtValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex)); + ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex)); if(pItem == nullptr) throw lang::IndexOutOfBoundsException(); @@ -846,11 +846,11 @@ void SAL_CALL SvtValueSetAcc::selectAccessibleChild( sal_Int32 nChildIndex ) } -sal_Bool SAL_CALL SvtValueSetAcc::isAccessibleChildSelected( sal_Int32 nChildIndex ) +sal_Bool SAL_CALL ValueSetAcc::isAccessibleChildSelected( sal_Int32 nChildIndex ) { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; - SvtValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex)); + ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex)); if (pItem == nullptr) throw lang::IndexOutOfBoundsException(); @@ -860,7 +860,7 @@ sal_Bool SAL_CALL SvtValueSetAcc::isAccessibleChildSelected( sal_Int32 nChildInd } -void SAL_CALL SvtValueSetAcc::clearAccessibleSelection() +void SAL_CALL ValueSetAcc::clearAccessibleSelection() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -868,14 +868,14 @@ void SAL_CALL SvtValueSetAcc::clearAccessibleSelection() } -void SAL_CALL SvtValueSetAcc::selectAllAccessibleChildren() +void SAL_CALL ValueSetAcc::selectAllAccessibleChildren() { ThrowIfDisposed(); // unsupported due to single selection only } -sal_Int32 SAL_CALL SvtValueSetAcc::getSelectedAccessibleChildCount() +sal_Int32 SAL_CALL ValueSetAcc::getSelectedAccessibleChildCount() { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -883,7 +883,7 @@ sal_Int32 SAL_CALL SvtValueSetAcc::getSelectedAccessibleChildCount() for( sal_uInt16 i = 0, nCount = getItemCount(); i < nCount; i++ ) { - SvtValueSetItem* pItem = getItem (i); + ValueSetItem* pItem = getItem (i); if( pItem && mpParent->IsItemSelected( pItem->mnId ) ) ++nRet; @@ -893,7 +893,7 @@ sal_Int32 SAL_CALL SvtValueSetAcc::getSelectedAccessibleChildCount() } -uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) +uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -901,7 +901,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getSelecte for( sal_uInt16 i = 0, nCount = getItemCount(), nSel = 0; ( i < nCount ) && !xRet.is(); i++ ) { - SvtValueSetItem* pItem = getItem(i); + ValueSetItem* pItem = getItem(i); if( pItem && mpParent->IsItemSelected( pItem->mnId ) && ( nSelectedChildIndex == static_cast< sal_Int32 >( nSel++ ) ) ) xRet = pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ); @@ -911,7 +911,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL SvtValueSetAcc::getSelecte } -void SAL_CALL SvtValueSetAcc::deselectAccessibleChild( sal_Int32 nChildIndex ) +void SAL_CALL ValueSetAcc::deselectAccessibleChild( sal_Int32 nChildIndex ) { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; @@ -922,11 +922,11 @@ void SAL_CALL SvtValueSetAcc::deselectAccessibleChild( sal_Int32 nChildIndex ) } -sal_Int64 SAL_CALL SvtValueSetAcc::getSomething( const uno::Sequence< sal_Int8 >& rId ) +sal_Int64 SAL_CALL ValueSetAcc::getSomething( const uno::Sequence< sal_Int8 >& rId ) { sal_Int64 nRet; - if( isUnoTunnelId<SvtValueSetAcc>(rId) ) + if( isUnoTunnelId<ValueSetAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -935,7 +935,7 @@ sal_Int64 SAL_CALL SvtValueSetAcc::getSomething( const uno::Sequence< sal_Int8 > } -void SAL_CALL SvtValueSetAcc::disposing() +void SAL_CALL ValueSetAcc::disposing() { ::std::vector<uno::Reference<accessibility::XAccessibleEventListener> > aListenerListCopy; @@ -966,7 +966,7 @@ void SAL_CALL SvtValueSetAcc::disposing() } -sal_uInt16 SvtValueSetAcc::getItemCount() const +sal_uInt16 ValueSetAcc::getItemCount() const { sal_uInt16 nCount = mpParent->ImplGetVisibleItemCount(); // When the None-Item is visible then increase the number of items by @@ -976,9 +976,9 @@ sal_uInt16 SvtValueSetAcc::getItemCount() const return nCount; } -SvtValueSetItem* SvtValueSetAcc::getItem (sal_uInt16 nIndex) const +ValueSetItem* ValueSetAcc::getItem (sal_uInt16 nIndex) const { - SvtValueSetItem* pItem = nullptr; + ValueSetItem* pItem = nullptr; if (HasNoneField()) { @@ -996,7 +996,7 @@ SvtValueSetItem* SvtValueSetAcc::getItem (sal_uInt16 nIndex) const } -void SvtValueSetAcc::ThrowIfDisposed() +void ValueSetAcc::ThrowIfDisposed() { if (rBHelper.bDisposed || rBHelper.bInDispose) { @@ -1007,13 +1007,13 @@ void SvtValueSetAcc::ThrowIfDisposed() } else { - DBG_ASSERT (mpParent!=nullptr, "SvtValueSetAcc not disposed but mpParent == NULL"); + DBG_ASSERT (mpParent!=nullptr, "ValueSetAcc not disposed but mpParent == NULL"); } } -bool SvtValueSetAcc::HasNoneField() const +bool ValueSetAcc::HasNoneField() const { - assert(mpParent && "SvtValueSetAcc::HasNoneField called with mpParent==NULL"); + assert(mpParent && "ValueSetAcc::HasNoneField called with mpParent==NULL"); return ((mpParent->GetStyle() & WB_NONEFIELD) != 0); } diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 4d1bb79ae25c..5f874acb99db 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -45,12 +45,12 @@ enum ValueSetItemType VALUESETITEM_USERDRAW }; -class SvtValueItemAcc; -class SvtValueSet; +class ValueItemAcc; +class ValueSet; -struct SvtValueSetItem +struct ValueSetItem { - SvtValueSet& mrParent; + ValueSet& mrParent; sal_uInt16 mnId; sal_uInt8 meType; bool mbVisible; @@ -58,10 +58,10 @@ struct SvtValueSetItem Color maColor; OUString maText; void* mpData; - rtl::Reference< SvtValueItemAcc > mxAcc; + rtl::Reference< ValueItemAcc > mxAcc; - explicit SvtValueSetItem( SvtValueSet& rParent ); - ~SvtValueSetItem(); + explicit ValueSetItem( ValueSet& rParent ); + ~ValueSetItem(); css::uno::Reference< css::accessibility::XAccessible > GetAccessible( bool bIsTransientChildrenDisabled ); @@ -76,19 +76,19 @@ typedef ::cppu::WeakComponentImplHelper< css::lang::XUnoTunnel > ValueSetAccComponentBase; -class SvtValueSetAcc : +class ValueSetAcc : public ::cppu::BaseMutex, public ValueSetAccComponentBase { public: - explicit SvtValueSetAcc(SvtValueSet* pParent); - virtual ~SvtValueSetAcc() override; + explicit ValueSetAcc(ValueSet* pParent); + virtual ~ValueSetAcc() override; void FireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } - static SvtValueSetAcc* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxData ) throw(); + static ValueSetAcc* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxData ) throw(); public: @@ -148,7 +148,7 @@ public: private: ::std::vector< css::uno::Reference< css::accessibility::XAccessibleEventListener > > mxEventListeners; - SvtValueSet* mpParent; + ValueSet* mpParent; /// The current FOCUSED state. bool mbIsFocused; @@ -170,7 +170,7 @@ private: @return Returns NULL when the given index is out of range. */ - SvtValueSetItem* getItem (sal_uInt16 nIndex) const; + ValueSetItem* getItem (sal_uInt16 nIndex) const; /** Check whether or not the object has been disposed (or is in the state of being disposed). If that is the case then @@ -189,7 +189,7 @@ private: bool HasNoneField() const; }; -class SvtValueItemAcc : public ::cppu::WeakImplHelper< css::accessibility::XAccessible, +class ValueItemAcc : public ::cppu::WeakImplHelper< css::accessibility::XAccessible, css::accessibility::XAccessibleEventBroadcaster, css::accessibility::XAccessibleContext, css::accessibility::XAccessibleComponent, @@ -200,19 +200,19 @@ private: ::std::vector< css::uno::Reference< css::accessibility::XAccessibleEventListener > > mxEventListeners; ::osl::Mutex maMutex; - SvtValueSetItem* mpParent; + ValueSetItem* mpParent; bool mbIsTransientChildrenDisabled; public: - SvtValueItemAcc(SvtValueSetItem* pParent, bool bIsTransientChildrenDisabled); - virtual ~SvtValueItemAcc() override; + ValueItemAcc(ValueSetItem* pParent, bool bIsTransientChildrenDisabled); + virtual ~ValueItemAcc() override; void ParentDestroyed(); void FireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); - static SvtValueItemAcc* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxData ) throw(); + static ValueItemAcc* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxData ) throw(); public: diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 90f3f362fe1f..f1b65e0565b5 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -63,7 +63,7 @@ enum } -SvtValueSet::SvtValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow) +ValueSet::ValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow) : maVirDev( VclPtr<VirtualDevice>::Create()) , mxScrolledWindow(std::move(pScrolledWindow)) , mnHighItemId(0) @@ -102,25 +102,25 @@ SvtValueSet::SvtValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow) if (mxScrolledWindow) { mxScrolledWindow->set_user_managed_scrolling(); - mxScrolledWindow->connect_vadjustment_changed(LINK(this, SvtValueSet, ImplScrollHdl)); + mxScrolledWindow->connect_vadjustment_changed(LINK(this, ValueSet, ImplScrollHdl)); } } -void SvtValueSet::SetDrawingArea(weld::DrawingArea* pDrawingArea) +void ValueSet::SetDrawingArea(weld::DrawingArea* pDrawingArea) { CustomWidgetController::SetDrawingArea(pDrawingArea); // #106446#, #106601# force mirroring of virtual device maVirDev->EnableRTL(pDrawingArea->get_direction()); } -Reference<XAccessible> SvtValueSet::CreateAccessible() +Reference<XAccessible> ValueSet::CreateAccessible() { if (!mxAccessible) - mxAccessible.set(new SvtValueSetAcc(this)); + mxAccessible.set(new ValueSetAcc(this)); return mxAccessible; } -SvtValueSet::~SvtValueSet() +ValueSet::~ValueSet() { Reference<XComponent> xComponent(mxAccessible, UNO_QUERY); if (xComponent.is()) @@ -129,13 +129,13 @@ SvtValueSet::~SvtValueSet() ImplDeleteItems(); } -void SvtValueSet::ImplDeleteItems() +void ValueSet::ImplDeleteItems() { const size_t n = mItemList.size(); for ( size_t i = 0; i < n; ++i ) { - SvtValueSetItem* pItem = mItemList[i].get(); + ValueSetItem* pItem = mItemList[i].get(); if ( pItem->mbVisible && ImplHasAccessibleListeners() ) { Any aOldAny; @@ -151,16 +151,16 @@ void SvtValueSet::ImplDeleteItems() mItemList.clear(); } -void SvtValueSet::Select() +void ValueSet::Select() { maSelectHdl.Call( this ); } -void SvtValueSet::UserDraw( const UserDrawEvent& ) +void ValueSet::UserDraw( const UserDrawEvent& ) { } -size_t SvtValueSet::ImplGetItem( const Point& rPos ) const +size_t ValueSet::ImplGetItem( const Point& rPos ) const { if (!mbHasVisibleItems) { @@ -197,7 +197,7 @@ size_t SvtValueSet::ImplGetItem( const Point& rPos ) const return VALUESET_ITEM_NOTFOUND; } -SvtValueSetItem* SvtValueSet::ImplGetItem( size_t nPos ) +ValueSetItem* ValueSet::ImplGetItem( size_t nPos ) { if (nPos == VALUESET_ITEM_NONEITEM) return mpNoneItem.get(); @@ -205,12 +205,12 @@ SvtValueSetItem* SvtValueSet::ImplGetItem( size_t nPos ) return (nPos < mItemList.size()) ? mItemList[nPos].get() : nullptr; } -SvtValueSetItem* SvtValueSet::ImplGetFirstItem() +ValueSetItem* ValueSet::ImplGetFirstItem() { return !mItemList.empty() ? mItemList[0].get() : nullptr; } -sal_uInt16 SvtValueSet::ImplGetVisibleItemCount() const +sal_uInt16 ValueSet::ImplGetVisibleItemCount() const { sal_uInt16 nRet = 0; const size_t nItemCount = mItemList.size(); @@ -224,21 +224,21 @@ sal_uInt16 SvtValueSet::ImplGetVisibleItemCount() const return nRet; } -void SvtValueSet::ImplFireAccessibleEvent( short nEventId, const Any& rOldValue, const Any& rNewValue ) +void ValueSet::ImplFireAccessibleEvent( short nEventId, const Any& rOldValue, const Any& rNewValue ) { - SvtValueSetAcc* pAcc = SvtValueSetAcc::getImplementation(mxAccessible); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation(mxAccessible); if( pAcc ) pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue ); } -bool SvtValueSet::ImplHasAccessibleListeners() +bool ValueSet::ImplHasAccessibleListeners() { - SvtValueSetAcc* pAcc = SvtValueSetAcc::getImplementation(mxAccessible); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation(mxAccessible); return( pAcc && pAcc->HasAccessibleListeners() ); } -IMPL_LINK(SvtValueSet, ImplScrollHdl, weld::ScrolledWindow&, rScrollWin, void) +IMPL_LINK(ValueSet, ImplScrollHdl, weld::ScrolledWindow&, rScrollWin, void) { auto nNewFirstLine = rScrollWin.vadjustment_get_value(); if ( nNewFirstLine != mnFirstLine ) @@ -249,7 +249,7 @@ IMPL_LINK(SvtValueSet, ImplScrollHdl, weld::ScrolledWindow&, rScrollWin, void) } } -void SvtValueSet::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) +void ValueSet::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (GetStyle() & WB_FLATVALUESET) { @@ -264,31 +264,31 @@ void SvtValueSet::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang ImplDraw(rRenderContext); } -void SvtValueSet::GetFocus() +void ValueSet::GetFocus() { SAL_INFO("svtools", "value set getting focus"); Invalidate(); CustomWidgetController::GetFocus(); // Tell the accessible object that we got the focus. - SvtValueSetAcc* pAcc = SvtValueSetAcc::getImplementation(mxAccessible); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation(mxAccessible); if (pAcc) pAcc->GetFocus(); } -void SvtValueSet::LoseFocus() +void ValueSet::LoseFocus() { SAL_INFO("svtools", "value set losing focus"); Invalidate(); CustomWidgetController::LoseFocus(); // Tell the accessible object that we lost the focus. - SvtValueSetAcc* pAcc = SvtValueSetAcc::getImplementation(mxAccessible); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation(mxAccessible); if( pAcc ) pAcc->LoseFocus(); } -void SvtValueSet::Resize() +void ValueSet::Resize() { mbFormat = true; if ( IsReallyVisible() && IsUpdateMode() ) @@ -296,7 +296,7 @@ void SvtValueSet::Resize() CustomWidgetController::Resize(); } -bool SvtValueSet::KeyInput( const KeyEvent& rKeyEvent ) +bool ValueSet::KeyInput( const KeyEvent& rKeyEvent ) { size_t nLastItem = mItemList.size(); @@ -446,9 +446,9 @@ bool SvtValueSet::KeyInput( const KeyEvent& rKeyEvent ) return true; } -void SvtValueSet::ImplTracking(const Point& rPos) +void ValueSet::ImplTracking(const Point& rPos) { - SvtValueSetItem* pItem = ImplGetItem( ImplGetItem( rPos ) ); + ValueSetItem* pItem = ImplGetItem( ImplGetItem( rPos ) ); if ( pItem ) { if( GetStyle() & WB_MENUSTYLEVALUESET || GetStyle() & WB_FLATVALUESET ) @@ -465,11 +465,11 @@ void SvtValueSet::ImplTracking(const Point& rPos) } } -bool SvtValueSet::MouseButtonDown( const MouseEvent& rMouseEvent ) +bool ValueSet::MouseButtonDown( const MouseEvent& rMouseEvent ) { if ( rMouseEvent.IsLeft() ) { - SvtValueSetItem* pItem = ImplGetItem( ImplGetItem( rMouseEvent.GetPosPixel() ) ); + ValueSetItem* pItem = ImplGetItem( ImplGetItem( rMouseEvent.GetPosPixel() ) ); if (pItem && !rMouseEvent.IsMod2()) { if (rMouseEvent.GetClicks() == 1) @@ -489,7 +489,7 @@ bool SvtValueSet::MouseButtonDown( const MouseEvent& rMouseEvent ) return CustomWidgetController::MouseButtonDown( rMouseEvent ); } -bool SvtValueSet::MouseMove(const MouseEvent& rMouseEvent) +bool ValueSet::MouseMove(const MouseEvent& rMouseEvent) { // because of SelectionMode if ((GetStyle() & WB_MENUSTYLEVALUESET) || (GetStyle() & WB_FLATVALUESET)) @@ -497,7 +497,7 @@ bool SvtValueSet::MouseMove(const MouseEvent& rMouseEvent) return CustomWidgetController::MouseMove(rMouseEvent); } -void SvtValueSet::RemoveItem( sal_uInt16 nItemId ) +void ValueSet::RemoveItem( sal_uInt16 nItemId ) { size_t nPos = GetItemPos( nItemId ); @@ -524,7 +524,7 @@ void SvtValueSet::RemoveItem( sal_uInt16 nItemId ) Invalidate(); } -void SvtValueSet::RecalcScrollBar() +void ValueSet::RecalcScrollBar() { // reset scrolled window state to initial value // so it will get configured to the right adjustment @@ -533,7 +533,7 @@ void SvtValueSet::RecalcScrollBar() mxScrolledWindow->set_vpolicy(VclPolicyType::NEVER); } -void SvtValueSet::Clear() +void ValueSet::Clear() { ImplDeleteItems(); @@ -551,12 +551,12 @@ void SvtValueSet::Clear() Invalidate(); } -size_t SvtValueSet::GetItemCount() const +size_t ValueSet::GetItemCount() const { return mItemList.size(); } -size_t SvtValueSet::GetItemPos( sal_uInt16 nItemId ) const +size_t ValueSet::GetItemPos( sal_uInt16 nItemId ) const { for ( size_t i = 0, n = mItemList.size(); i < n; ++i ) { if ( mItemList[i]->mnId == nItemId ) { @@ -566,12 +566,12 @@ size_t SvtValueSet::GetItemPos( sal_uInt16 nItemId ) const return VALUESET_ITEM_NOTFOUND; } -sal_uInt16 SvtValueSet::GetItemId( size_t nPos ) const +sal_uInt16 ValueSet::GetItemId( size_t nPos ) const { return ( nPos < mItemList.size() ) ? mItemList[nPos]->mnId : 0 ; } -sal_uInt16 SvtValueSet::GetItemId( const Point& rPos ) const +sal_uInt16 ValueSet::GetItemId( const Point& rPos ) const { size_t nItemPos = ImplGetItem( rPos ); if ( nItemPos != VALUESET_ITEM_NOTFOUND ) @@ -580,7 +580,7 @@ sal_uInt16 SvtValueSet::GetItemId( const Point& rPos ) const return 0; } -tools::Rectangle SvtValueSet::GetItemRect( sal_uInt16 nItemId ) const +tools::Rectangle ValueSet::GetItemRect( sal_uInt16 nItemId ) const { const size_t nPos = GetItemPos( nItemId ); @@ -590,7 +590,7 @@ tools::Rectangle SvtValueSet::GetItemRect( sal_uInt16 nItemId ) const return tools::Rectangle(); } -tools::Rectangle SvtValueSet::ImplGetItemRect( size_t nPos ) const +tools::Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const { const size_t nVisibleBegin = static_cast<size_t>(mnFirstLine)*mnCols; const size_t nVisibleEnd = nVisibleBegin + static_cast<size_t>(mnVisLines)*mnCols; @@ -610,7 +610,7 @@ tools::Rectangle SvtValueSet::ImplGetItemRect( size_t nPos ) const return tools::Rectangle( Point(x, y), Size(mnItemWidth, mnItemHeight) ); } -void SvtValueSet::ImplHighlightItem( sal_uInt16 nItemId, bool bIsSelection ) +void ValueSet::ImplHighlightItem( sal_uInt16 nItemId, bool bIsSelection ) { if ( mnHighItemId == nItemId ) return; @@ -627,7 +627,7 @@ void SvtValueSet::ImplHighlightItem( sal_uInt16 nItemId, bool bIsSelection ) mbDrawSelection = true; } -void SvtValueSet::ImplDraw(vcl::RenderContext& rRenderContext) +void ValueSet::ImplDraw(vcl::RenderContext& rRenderContext) { if (mbFormat) Format(rRenderContext); @@ -668,7 +668,7 @@ void SvtValueSet::ImplDraw(vcl::RenderContext& rRenderContext) * all of the included items and their labels fit; if we can * calculate that. */ -void SvtValueSet::RecalculateItemSizes() +void ValueSet::RecalculateItemSizes() { Size aLargestItem = GetLargestItemSize(); @@ -684,7 +684,7 @@ void SvtValueSet::RecalculateItemSizes() } } -void SvtValueSet::SelectItem( sal_uInt16 nItemId ) +void ValueSet::SelectItem( sal_uInt16 nItemId ) { size_t nItemPos = 0; @@ -748,7 +748,7 @@ void SvtValueSet::SelectItem( sal_uInt16 nItemId ) if( nPos != VALUESET_ITEM_NOTFOUND ) { - SvtValueItemAcc* pItemAcc = SvtValueItemAcc::getImplementation( + ValueItemAcc* pItemAcc = ValueItemAcc::getImplementation( mItemList[nPos]->GetAccessible( false/*bIsTransientChildrenDisabled*/ ) ); if( pItemAcc ) @@ -764,15 +764,15 @@ void SvtValueSet::SelectItem( sal_uInt16 nItemId ) // focus event (select) const size_t nPos = GetItemPos( mnSelItemId ); - SvtValueSetItem* pItem; + ValueSetItem* pItem; if( nPos != VALUESET_ITEM_NOTFOUND ) pItem = mItemList[nPos].get(); else pItem = mpNoneItem.get(); - SvtValueItemAcc* pItemAcc = nullptr; + ValueItemAcc* pItemAcc = nullptr; if (pItem != nullptr) - pItemAcc = SvtValueItemAcc::getImplementation( pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ) ); + pItemAcc = ValueItemAcc::getImplementation( pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ) ); if( pItemAcc ) { @@ -789,7 +789,7 @@ void SvtValueSet::SelectItem( sal_uInt16 nItemId ) } } -void SvtValueSet::SetNoSelection() +void ValueSet::SetNoSelection() { mbNoSelection = true; mbHighlight = false; @@ -798,7 +798,7 @@ void SvtValueSet::SetNoSelection() Invalidate(); } -void SvtValueSet::SetStyle(WinBits nStyle) +void ValueSet::SetStyle(WinBits nStyle) { if (nStyle != mnStyle) { @@ -808,7 +808,7 @@ void SvtValueSet::SetStyle(WinBits nStyle) } } -void SvtValueSet::Format(vcl::RenderContext const & rRenderContext) +void ValueSet::Format(vcl::RenderContext const & rRenderContext) { Size aWinSize(GetOutputSizePixel()); size_t nItemCount = mItemList.size(); @@ -1034,7 +1034,7 @@ void SvtValueSet::Format(vcl::RenderContext const & rRenderContext) if (nStyle & WB_NONEFIELD) { if (!mpNoneItem) - mpNoneItem.reset(new SvtValueSetItem(*this)); + mpNoneItem.reset(new ValueSetItem(*this)); mpNoneItem->mnId = 0; mpNoneItem->meType = VALUESETITEM_NONE; @@ -1069,7 +1069,7 @@ void SvtValueSet::Format(vcl::RenderContext const & rRenderContext) } for (size_t i = 0; i < nItemCount; i++) { - SvtValueSetItem* pItem = mItemList[i].get(); + ValueSetItem* pItem = mItemList[i].get(); if (i >= nFirstItem && i < nLastItem) { @@ -1126,7 +1126,7 @@ void SvtValueSet::Format(vcl::RenderContext const & rRenderContext) mbFormat = false; } -void SvtValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext) +void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext) { if (!IsReallyVisible()) return; @@ -1147,9 +1147,9 @@ void SvtValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext) } } -void SvtValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nItemId, const bool bFocus, const bool bDrawSel ) +void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nItemId, const bool bFocus, const bool bDrawSel ) { - SvtValueSetItem* pItem; + ValueSetItem* pItem; tools::Rectangle aRect; if (nItemId) { @@ -1267,7 +1267,7 @@ void SvtValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 ImplDrawItemText(rRenderContext, pItem->maText); } -void SvtValueSet::ImplFormatItem(vcl::RenderContext const & rRenderContext, SvtValueSetItem* pItem, tools::Rectangle aRect) +void ValueSet::ImplFormatItem(vcl::RenderContext const & rRenderContext, ValueSetItem* pItem, tools::Rectangle aRect) { WinBits nStyle = GetStyle(); if (nStyle & WB_ITEMBORDER) @@ -1403,7 +1403,7 @@ void SvtValueSet::ImplFormatItem(vcl::RenderContext const & rRenderContext, SvtV } } -void SvtValueSet::ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUString& rText) +void ValueSet::ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUString& rText) { if (!(GetStyle() & WB_NAMEFIELD)) return; @@ -1430,18 +1430,18 @@ void SvtValueSet::ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUS rRenderContext.DrawText(Point((aWinSize.Width() - nTxtWidth) / 2, nTxtOffset + (NAME_OFFSET / 2)), rText); } -void SvtValueSet::StyleUpdated() +void ValueSet::StyleUpdated() { mbFormat = true; CustomWidgetController::StyleUpdated(); } -void SvtValueSet::EnableFullItemMode( bool bFullMode ) +void ValueSet::EnableFullItemMode( bool bFullMode ) { mbFullMode = bFullMode; } -void SvtValueSet::SetColCount( sal_uInt16 nNewCols ) +void ValueSet::SetColCount( sal_uInt16 nNewCols ) { if ( mnUserCols != nNewCols ) { @@ -1453,14 +1453,14 @@ void SvtValueSet::SetColCount( sal_uInt16 nNewCols ) } } -void SvtValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) +void ValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) { size_t nPos = GetItemPos( nItemId ); if ( nPos == VALUESET_ITEM_NOTFOUND ) return; - SvtValueSetItem* pItem = mItemList[nPos].get(); + ValueSetItem* pItem = mItemList[nPos].get(); pItem->meType = VALUESETITEM_IMAGE; pItem->maImage = rImage; @@ -1473,14 +1473,14 @@ void SvtValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) mbFormat = true; } -void SvtValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor ) +void ValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor ) { size_t nPos = GetItemPos( nItemId ); if ( nPos == VALUESET_ITEM_NOTFOUND ) return; - SvtValueSetItem* pItem = mItemList[nPos].get(); + ValueSetItem* pItem = mItemList[nPos].get(); pItem->meType = VALUESETITEM_COLOR; pItem->maColor = rColor; @@ -1493,7 +1493,7 @@ void SvtValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor ) mbFormat = true; } -Color SvtValueSet::GetItemColor( sal_uInt16 nItemId ) const +Color ValueSet::GetItemColor( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); @@ -1503,7 +1503,7 @@ Color SvtValueSet::GetItemColor( sal_uInt16 nItemId ) const return Color(); } -Size SvtValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCols, +Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCols, sal_uInt16 nDesireLines ) const { size_t nCalcCols = nDesireCols; @@ -1574,20 +1574,20 @@ Size SvtValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesire return aSize; } -void SvtValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage ) +void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage ) { - std::unique_ptr<SvtValueSetItem> pItem(new SvtValueSetItem( *this )); + std::unique_ptr<ValueSetItem> pItem(new ValueSetItem( *this )); pItem->mnId = nItemId; pItem->meType = VALUESETITEM_IMAGE; pItem->maImage = rImage; ImplInsertItem( std::move(pItem), VALUESET_APPEND ); } -void SvtValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, +void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, const OUString& rText, size_t nPos, bool bShowLegend ) { - std::unique_ptr<SvtValueSetItem> pItem(new SvtValueSetItem( *this )); + std::unique_ptr<ValueSetItem> pItem(new ValueSetItem( *this )); pItem->mnId = nItemId; pItem->meType = bShowLegend ? VALUESETITEM_IMAGE_AND_TEXT : VALUESETITEM_IMAGE; pItem->maImage = rImage; @@ -1595,18 +1595,18 @@ void SvtValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, ImplInsertItem( std::move(pItem), nPos ); } -void SvtValueSet::InsertItem( sal_uInt16 nItemId, size_t nPos ) +void ValueSet::InsertItem( sal_uInt16 nItemId, size_t nPos ) { - std::unique_ptr<SvtValueSetItem> pItem(new SvtValueSetItem( *this )); + std::unique_ptr<ValueSetItem> pItem(new ValueSetItem( *this )); pItem->mnId = nItemId; pItem->meType = VALUESETITEM_USERDRAW; ImplInsertItem( std::move(pItem), nPos ); } -void SvtValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor, +void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor, const OUString& rText ) { - std::unique_ptr<SvtValueSetItem> pItem(new SvtValueSetItem( *this )); + std::unique_ptr<ValueSetItem> pItem(new ValueSetItem( *this )); pItem->mnId = nItemId; pItem->meType = VALUESETITEM_COLOR; pItem->maColor = rColor; @@ -1614,7 +1614,7 @@ void SvtValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor, ImplInsertItem( std::move(pItem), VALUESET_APPEND ); } -void SvtValueSet::ImplInsertItem( std::unique_ptr<SvtValueSetItem> pItem, const size_t nPos ) +void ValueSet::ImplInsertItem( std::unique_ptr<ValueSetItem> pItem, const size_t nPos ) { DBG_ASSERT( pItem->mnId, "ValueSet::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( pItem->mnId ) == VALUESET_ITEM_NOTFOUND, @@ -1633,14 +1633,14 @@ void SvtValueSet::ImplInsertItem( std::unique_ptr<SvtValueSetItem> pItem, const Invalidate(); } -int SvtValueSet::GetScrollWidth() const +int ValueSet::GetScrollWidth() const { if (mxScrolledWindow) return mxScrolledWindow->get_vscroll_width(); return 0; } -void SvtValueSet::SetEdgeBlending(bool bNew) +void ValueSet::SetEdgeBlending(bool bNew) { if(mbEdgeBlending != bNew) { @@ -1654,7 +1654,7 @@ void SvtValueSet::SetEdgeBlending(bool bNew) } } -Size SvtValueSet::CalcItemSizePixel( const Size& rItemSize) const +Size ValueSet::CalcItemSizePixel( const Size& rItemSize) const { Size aSize = rItemSize; @@ -1675,7 +1675,7 @@ Size SvtValueSet::CalcItemSizePixel( const Size& rItemSize) const return aSize; } -void SvtValueSet::SetLineCount( sal_uInt16 nNewLines ) +void ValueSet::SetLineCount( sal_uInt16 nNewLines ) { if ( mnUserVisLines != nNewLines ) { @@ -1687,7 +1687,7 @@ void SvtValueSet::SetLineCount( sal_uInt16 nNewLines ) } } -void SvtValueSet::SetItemWidth( long nNewItemWidth ) +void ValueSet::SetItemWidth( long nNewItemWidth ) { if ( mnUserItemWidth != nNewItemWidth ) { @@ -1700,19 +1700,19 @@ void SvtValueSet::SetItemWidth( long nNewItemWidth ) } //method to set accessible when the style is user draw. -void SvtValueSet::InsertItem( sal_uInt16 nItemId, const OUString& rText, size_t nPos ) +void ValueSet::InsertItem( sal_uInt16 nItemId, const OUString& rText, size_t nPos ) { DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND, "ValueSet::InsertItem(): ItemId already exists" ); - std::unique_ptr<SvtValueSetItem> pItem(new SvtValueSetItem( *this )); + std::unique_ptr<ValueSetItem> pItem(new ValueSetItem( *this )); pItem->mnId = nItemId; pItem->meType = VALUESETITEM_USERDRAW; pItem->maText = rText; ImplInsertItem( std::move(pItem), nPos ); } -void SvtValueSet::SetItemHeight( long nNewItemHeight ) +void ValueSet::SetItemHeight( long nNewItemHeight ) { if ( mnUserItemHeight != nNewItemHeight ) { @@ -1724,7 +1724,7 @@ void SvtValueSet::SetItemHeight( long nNewItemHeight ) } } -OUString SvtValueSet::RequestHelp(tools::Rectangle& rHelpRect) +OUString ValueSet::RequestHelp(tools::Rectangle& rHelpRect) { Point aPos = rHelpRect.TopLeft(); const size_t nItemPos = ImplGetItem( aPos ); @@ -1737,7 +1737,7 @@ OUString SvtValueSet::RequestHelp(tools::Rectangle& rHelpRect) return sRet; } -OUString SvtValueSet::GetItemText(sal_uInt16 nItemId) const +OUString ValueSet::GetItemText(sal_uInt16 nItemId) const { const size_t nPos = GetItemPos(nItemId); @@ -1747,7 +1747,7 @@ OUString SvtValueSet::GetItemText(sal_uInt16 nItemId) const return OUString(); } -void SvtValueSet::SetExtraSpacing( sal_uInt16 nNewSpacing ) +void ValueSet::SetExtraSpacing( sal_uInt16 nNewSpacing ) { if ( GetStyle() & WB_ITEMBORDER ) { @@ -1760,19 +1760,19 @@ void SvtValueSet::SetExtraSpacing( sal_uInt16 nNewSpacing ) } } -void SvtValueSet::SetFormat() +void ValueSet::SetFormat() { mbFormat = true; } -void SvtValueSet::SetItemData( sal_uInt16 nItemId, void* pData ) +void ValueSet::SetItemData( sal_uInt16 nItemId, void* pData ) { size_t nPos = GetItemPos( nItemId ); if ( nPos == VALUESET_ITEM_NOTFOUND ) return; - SvtValueSetItem* pItem = mItemList[nPos].get(); + ValueSetItem* pItem = mItemList[nPos].get(); pItem->mpData = pData; if ( pItem->meType == VALUESETITEM_USERDRAW ) @@ -1787,7 +1787,7 @@ void SvtValueSet::SetItemData( sal_uInt16 nItemId, void* pData ) } } -void* SvtValueSet::GetItemData( sal_uInt16 nItemId ) const +void* ValueSet::GetItemData( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); @@ -1797,14 +1797,14 @@ void* SvtValueSet::GetItemData( sal_uInt16 nItemId ) const return nullptr; } -void SvtValueSet::SetItemText(sal_uInt16 nItemId, const OUString& rText) +void ValueSet::SetItemText(sal_uInt16 nItemId, const OUString& rText) { size_t nPos = GetItemPos( nItemId ); if ( nPos == VALUESET_ITEM_NOTFOUND ) return; - SvtValueSetItem* pItem = mItemList[nPos].get(); + ValueSetItem* pItem = mItemList[nPos].get(); // Remember old and new name for accessibility event. Any aOldName; @@ -1830,16 +1830,16 @@ void SvtValueSet::SetItemText(sal_uInt16 nItemId, const OUString& rText) if (ImplHasAccessibleListeners()) { Reference<XAccessible> xAccessible(pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/)); - SvtValueItemAcc* pValueItemAcc = static_cast<SvtValueItemAcc*>(xAccessible.get()); + ValueItemAcc* pValueItemAcc = static_cast<ValueItemAcc*>(xAccessible.get()); pValueItemAcc->FireAccessibleEvent(AccessibleEventId::NAME_CHANGED, aOldName, aNewName); } } -Size SvtValueSet::GetLargestItemSize() +Size ValueSet::GetLargestItemSize() { Size aLargestItem; - for (const std::unique_ptr<SvtValueSetItem>& pItem : mItemList) + for (const std::unique_ptr<ValueSetItem>& pItem : mItemList) { if (!pItem->mbVisible) continue; @@ -1867,7 +1867,7 @@ Size SvtValueSet::GetLargestItemSize() return aLargestItem; } -void SvtValueSet::SetOptimalSize() +void ValueSet::SetOptimalSize() { Size aLargestSize(GetLargestItemSize()); aLargestSize.setWidth(std::max(aLargestSize.Width(), mnUserItemWidth)); @@ -1876,7 +1876,7 @@ void SvtValueSet::SetOptimalSize() GetDrawingArea()->set_size_request(aPrefSize.Width(), aPrefSize.Height()); } -Image SvtValueSet::GetItemImage(sal_uInt16 nItemId) const +Image ValueSet::GetItemImage(sal_uInt16 nItemId) const { size_t nPos = GetItemPos( nItemId ); @@ -1886,7 +1886,7 @@ Image SvtValueSet::GetItemImage(sal_uInt16 nItemId) const return Image(); } -void SvtValueSet::SetColor(const Color& rColor) +void ValueSet::SetColor(const Color& rColor) { maColor = rColor; mbFormat = true; @@ -1894,14 +1894,14 @@ void SvtValueSet::SetColor(const Color& rColor) Invalidate(); } -void SvtValueSet::Show() +void ValueSet::Show() { if (mxScrolledWindow) mxScrolledWindow->show(); CustomWidgetController::Show(); } -void SvtValueSet::Hide() +void ValueSet::Hide() { CustomWidgetController::Hide(); if (mxScrolledWindow) |