summaryrefslogtreecommitdiff
path: root/svx/source/accessibility
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-12 09:52:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-26 07:35:36 +0100
commit4fbd63860500b2db76df4d5aedbe5e3aa31fac69 (patch)
tree5fa96dc262ba651e82244b0f9e508f79e88ea2df /svx/source/accessibility
parent62fa5bb8c1299469eacc21cb35ee670b65120713 (diff)
switching long to a 64-bit type on 64-bit windows
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/accessibility')
-rw-r--r--svx/source/accessibility/ChildrenManager.cxx6
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx8
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.hxx8
-rw-r--r--svx/source/accessibility/DescriptionGenerator.cxx4
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx2
-rw-r--r--svx/source/accessibility/ShapeTypeHandler.cxx4
-rw-r--r--svx/source/accessibility/lookupcolorname.cxx8
-rw-r--r--svx/source/accessibility/lookupcolorname.hxx2
-rw-r--r--svx/source/accessibility/svxpixelctlaccessiblecontext.cxx12
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx22
10 files changed, 38 insertions, 38 deletions
diff --git a/svx/source/accessibility/ChildrenManager.cxx b/svx/source/accessibility/ChildrenManager.cxx
index 88bf9bd8cecf..c70e7f86f5f6 100644
--- a/svx/source/accessibility/ChildrenManager.cxx
+++ b/svx/source/accessibility/ChildrenManager.cxx
@@ -49,17 +49,17 @@ ChildrenManager::~ChildrenManager()
SAL_INFO("svx", "~ChildrenManager");
}
-long ChildrenManager::GetChildCount() const throw ()
+tools::Long ChildrenManager::GetChildCount() const throw ()
{
return mpImpl->GetChildCount();
}
-css::uno::Reference<XAccessible> ChildrenManager::GetChild (long nIndex)
+css::uno::Reference<XAccessible> ChildrenManager::GetChild (tools::Long nIndex)
{
return mpImpl->GetChild (nIndex);
}
-css::uno::Reference<css::drawing::XShape> ChildrenManager::GetChildShape(long nIndex)
+css::uno::Reference<css::drawing::XShape> ChildrenManager::GetChildShape(tools::Long nIndex)
{
return mpImpl->GetChildShape(nIndex);
}
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 08af808b26bf..893bc350f1f1 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -109,13 +109,13 @@ void ChildrenManagerImpl::Init()
}
-long ChildrenManagerImpl::GetChildCount() const throw ()
+tools::Long ChildrenManagerImpl::GetChildCount() const throw ()
{
return maVisibleChildren.size();
}
-css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(long nIndex)
+css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(tools::Long nIndex)
{
uno::Reference<XAccessible> xAcc = GetChild(nIndex);
auto I = std::find_if(maVisibleChildren.begin(), maVisibleChildren.end(),
@@ -129,7 +129,7 @@ css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(lon
yet in the cache.
*/
uno::Reference<XAccessible>
- ChildrenManagerImpl::GetChild (long nIndex)
+ ChildrenManagerImpl::GetChild (tools::Long nIndex)
{
// Check whether the given index is valid.
if (nIndex < 0 || o3tl::make_unsigned(nIndex) >= maVisibleChildren.size())
@@ -710,7 +710,7 @@ void ChildrenManagerImpl::ViewForwarderChanged()
bool ChildrenManagerImpl::ReplaceChild (
AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
- const long /*_nIndex*/,
+ const tools::Long /*_nIndex*/,
const AccessibleShapeTreeInfo& _rShapeTreeInfo)
{
// Iterate over the visible children. If one of them has an already
diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx
index e09dec4b7e6d..ecff9d0b6bf8 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.hxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.hxx
@@ -116,11 +116,11 @@ public:
@return
If there are no children a 0 is returned.
*/
- long GetChildCount() const throw ();
+ tools::Long GetChildCount() const throw ();
/// @throws css::uno::RuntimeException
/// @throws css::lang::IndexOutOfBoundsException
- css::uno::Reference<css::drawing::XShape> GetChildShape(long nIndex);
+ css::uno::Reference<css::drawing::XShape> GetChildShape(tools::Long nIndex);
/** Return the requested accessible child or throw and
IndexOutOfBoundsException if the given index is invalid.
@param nIndex
@@ -135,7 +135,7 @@ public:
Throws an IndexOutOfBoundsException if the index is not valid.
*/
css::uno::Reference<css::accessibility::XAccessible>
- GetChild (long nIndex);
+ GetChild (tools::Long nIndex);
/** Return the requested accessible child.
@param aChildDescriptor
@@ -256,7 +256,7 @@ public:
virtual bool ReplaceChild (
AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
- const long _nIndex,
+ const tools::Long _nIndex,
const AccessibleShapeTreeInfo& _rShapeTreeInfo
) override;
diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx
index d76918c218eb..ae2e90240baa 100644
--- a/svx/source/accessibility/DescriptionGenerator.cxx
+++ b/svx/source/accessibility/DescriptionGenerator.cxx
@@ -162,7 +162,7 @@ void DescriptionGenerator::AddColor (const OUString& sPropertyName)
try
{
- long nValue(0);
+ tools::Long nValue(0);
if (mxSet.is())
{
uno::Any aValue = mxSet->getPropertyValue (sPropertyName);
@@ -187,7 +187,7 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName)
if (mxSet.is())
{
uno::Any aValue = mxSet->getPropertyValue (sPropertyName);
- long nValue = 0;
+ tools::Long nValue = 0;
aValue >>= nValue;
msDescription.append (nValue);
}
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 5ef5801e90c1..ffe195b4d990 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -621,7 +621,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::deselectAccessibleChild( sal_Int32
}
// internals
-void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection( long nIndex )
+void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection( tools::Long nIndex )
{
if( nIndex < 0 || nIndex >= getSelectedAccessibleChildCount() )
throw lang::IndexOutOfBoundsException();
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index 133ce38bea02..79aa5807f3a6 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -168,7 +168,7 @@ void ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount,
}
-long ShapeTypeHandler::GetSlotId (const OUString& aServiceName) const
+tools::Long ShapeTypeHandler::GetSlotId (const OUString& aServiceName) const
{
tServiceNameToSlotId::const_iterator I (maServiceNameToSlotId.find (aServiceName));
if (I != maServiceNameToSlotId.end())
@@ -180,7 +180,7 @@ long ShapeTypeHandler::GetSlotId (const OUString& aServiceName) const
// Extract the given shape's service name and forward request to appropriate
// method.
-long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape) const
+tools::Long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape) const
{
if (rxShape.is())
return GetSlotId (rxShape->getShapeType());
diff --git a/svx/source/accessibility/lookupcolorname.cxx b/svx/source/accessibility/lookupcolorname.cxx
index d8f75f45aae3..bebb52d32945 100644
--- a/svx/source/accessibility/lookupcolorname.cxx
+++ b/svx/source/accessibility/lookupcolorname.cxx
@@ -41,7 +41,7 @@ public:
ColorNameMap(const ColorNameMap&) = delete;
ColorNameMap& operator=(const ColorNameMap&) = delete;
- OUString lookUp(long color) const;
+ OUString lookUp(tools::Long color) const;
private:
typedef std::unordered_map< long, OUString > Map;
@@ -83,7 +83,7 @@ ColorNameMap::ColorNameMap() {
try
{
css::uno::Any aColor = xNA->getByName(rName);
- long nColor = 0;
+ tools::Long nColor = 0;
aColor >>= nColor;
map_[nColor] = rName;
}
@@ -95,7 +95,7 @@ ColorNameMap::ColorNameMap() {
}
}
-OUString ColorNameMap::lookUp(long color) const {
+OUString ColorNameMap::lookUp(tools::Long color) const {
Map::const_iterator i(map_.find(color));
if (i != map_.end()) {
return i->second;
@@ -110,7 +110,7 @@ struct theColorNameMap: public rtl::Static< ColorNameMap, theColorNameMap > {};
namespace accessibility {
-OUString lookUpColorName(long color) {
+OUString lookUpColorName(tools::Long color) {
return theColorNameMap::get().lookUp(color);
}
diff --git a/svx/source/accessibility/lookupcolorname.hxx b/svx/source/accessibility/lookupcolorname.hxx
index 4c4a672b2033..f6e4c9234d38 100644
--- a/svx/source/accessibility/lookupcolorname.hxx
+++ b/svx/source/accessibility/lookupcolorname.hxx
@@ -48,7 +48,7 @@ namespace accessibility {
when no name exists, a string of the form "#RRGGBB" with two hexadecimal
digits for each color component.
*/
-OUString lookUpColorName(long color);
+OUString lookUpColorName(tools::Long color);
}
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index e966698a2c05..aedb8d297bac 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -148,7 +148,7 @@ uno::Reference<XAccessible > SAL_CALL SvxPixelCtlAccessible::getAccessibleAtPoin
if (mpPixelCtl)
{
- long nIndex = mpPixelCtl->PointToIndex(Point(rPoint.X, rPoint.Y));
+ tools::Long nIndex = mpPixelCtl->PointToIndex(Point(rPoint.X, rPoint.Y));
xRet = CreateChild(nIndex, mpPixelCtl->IndexToPoint(nIndex));
}
@@ -210,7 +210,7 @@ void SvxPixelCtlAccessible::implSelect(sal_Int32 nChildIndex, bool bSelect)
if (!mpPixelCtl)
return;
- long nIndex = mpPixelCtl->ShowPosition(mpPixelCtl->IndexToPoint(nChildIndex));
+ tools::Long nIndex = mpPixelCtl->ShowPosition(mpPixelCtl->IndexToPoint(nChildIndex));
NotifyChild(nIndex, bSelect, false);
}
@@ -232,7 +232,7 @@ void SAL_CALL SvxPixelCtlAccessible::disposing()
mpPixelCtl = nullptr;
}
-void SvxPixelCtlAccessible::NotifyChild(long nIndex,bool bSelect ,bool bCheck)
+void SvxPixelCtlAccessible::NotifyChild(tools::Long nIndex,bool bSelect ,bool bCheck)
{
DBG_ASSERT( !(!bSelect && !bCheck),"" );//non is false
@@ -279,7 +279,7 @@ void SvxPixelCtlAccessible::NotifyChild(long nIndex,bool bSelect ,bool bCheck)
m_xCurChild= xNewChild;
}
-uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (long nIndex,Point mPoint)
+uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (tools::Long nIndex,Point mPoint)
{
bool bPixelColorOrBG = mpPixelCtl->GetBitmapPixel(sal_uInt16(nIndex)) != 0;
Size size(mpPixelCtl->GetWidth() / SvxPixelCtl::GetLineCount(), mpPixelCtl->GetHeight() / SvxPixelCtl::GetLineCount());
@@ -324,7 +324,7 @@ void SvxPixelCtlAccessibleChild::SelectChild( bool bSelect)
SvxPixelCtlAccessibleChild::SvxPixelCtlAccessibleChild( SvxPixelCtl& rWindow, bool bPixelColorOrBG,
const tools::Rectangle& rBoundingBox, const rtl::Reference<SvxPixelCtlAccessible>& rxParent,
- long nIndexInParent)
+ tools::Long nIndexInParent)
: mrParentWindow( rWindow )
, mxParent(rxParent)
, m_bPixelColorOrBG(bPixelColorOrBG)
@@ -425,7 +425,7 @@ uno::Reference< XAccessibleStateSet > SAL_CALL SvxPixelCtlAccessibleChild::getAc
pStateSetHelper->AddState( AccessibleStateType::SHOWING );
pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
- long nIndex = mrParentWindow.GetFocusPosIndex();
+ tools::Long nIndex = mrParentWindow.GetFocusPosIndex();
if ( nIndex == mnIndexInParent)
{
pStateSetHelper->AddState( AccessibleStateType::SELECTED );
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 824a2a51382d..d400ea955b0c 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -59,7 +59,7 @@ namespace
}
-static const ChildIndexToPointData* IndexToPoint( long nIndex )
+static const ChildIndexToPointData* IndexToPoint( tools::Long nIndex )
{
DBG_ASSERT( nIndex < 9 && nIndex >= 0, "-IndexToPoint(): invalid child index! You have been warned..." );
@@ -81,15 +81,15 @@ static const ChildIndexToPointData* IndexToPoint( long nIndex )
}
-static long PointToIndex( RectPoint ePoint )
+static tools::Long PointToIndex( RectPoint ePoint )
{
- long nRet( static_cast<long>(ePoint) );
+ tools::Long nRet( static_cast<tools::Long>(ePoint) );
// corner control
// corners are counted from left to right and top to bottom
DBG_ASSERT( int(RectPoint::LT) == 0 && int(RectPoint::MT) == 1 && int(RectPoint::RT) == 2 && int(RectPoint::LM) == 3 && int(RectPoint::MM) == 4 && int(RectPoint::RM) == 5 &&
int(RectPoint::LB) == 6 && int(RectPoint::MB) == 7 && int(RectPoint::RB) == 8, "*PointToIndex(): unexpected enum value!" );
- nRet = static_cast<long>(ePoint);
+ nRet = static_cast<tools::Long>(ePoint);
return nRet;
}
@@ -121,7 +121,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleAtPo
Reference< XAccessible > xRet;
- long nChild = mpRepr ? PointToIndex(mpRepr->GetApproxRPFromPixPt(rPoint)) : NOCHILDSELECTED;
+ tools::Long nChild = mpRepr ? PointToIndex(mpRepr->GetApproxRPFromPixPt(rPoint)) : NOCHILDSELECTED;
if (nChild != NOCHILDSELECTED)
xRet = getAccessibleChild( nChild );
@@ -298,7 +298,7 @@ bool SvxRectCtlAccessibleContext::implIsSelected( sal_Int32 nIndex )
}
// internals
-void SvxRectCtlAccessibleContext::checkChildIndex( long nIndex )
+void SvxRectCtlAccessibleContext::checkChildIndex( tools::Long nIndex )
{
if( nIndex < 0 || nIndex >= getAccessibleChildCount() )
throw lang::IndexOutOfBoundsException();
@@ -307,8 +307,8 @@ void SvxRectCtlAccessibleContext::checkChildIndex( long nIndex )
void SvxRectCtlAccessibleContext::FireChildFocus( RectPoint eButton )
{
::osl::MutexGuard aGuard( m_aMutex );
- long nNew = PointToIndex( eButton );
- long nNumOfChildren = getAccessibleChildCount();
+ tools::Long nNew = PointToIndex( eButton );
+ tools::Long nNumOfChildren = getAccessibleChildCount();
if( nNew < nNumOfChildren )
{
// select new child
@@ -330,13 +330,13 @@ void SvxRectCtlAccessibleContext::FireChildFocus( RectPoint eButton )
mnSelectedChild = NOCHILDSELECTED;
}
-void SvxRectCtlAccessibleContext::selectChild( long nNew )
+void SvxRectCtlAccessibleContext::selectChild( tools::Long nNew )
{
::osl::MutexGuard aGuard( m_aMutex );
if( nNew == mnSelectedChild )
return;
- long nNumOfChildren = getAccessibleChildCount();
+ tools::Long nNumOfChildren = getAccessibleChildCount();
if( nNew < nNumOfChildren )
{ // valid index
if( mnSelectedChild != NOCHILDSELECTED )
@@ -404,7 +404,7 @@ SvxRectCtlChildAccessibleContext::SvxRectCtlChildAccessibleContext(
const OUString& rName,
const OUString& rDescription,
const tools::Rectangle& rBoundingBox,
- long nIndexInParent )
+ tools::Long nIndexInParent )
: msDescription( rDescription )
, msName( rName )
, mxParent(rxParent)