Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3135
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/35/3135/1
Typo fixes, small code changes
* Corrected spelling errors in comments
* In accpara.cxx, SwAccessibleParagraph::_getRunAttributesImpl had the
if statement commented out, but the scope block remained... minor in
the grand scheme of things, but messy code
* Some unused commented out code removed
Change-Id: Id8b29c4051c7c09a1cc555996f9e56fd4f0f3611
---
M sw/source/core/access/acccontext.cxx
M sw/source/core/access/accframe.cxx
M sw/source/core/access/accfrmobjmap.cxx
M sw/source/core/access/accmap.cxx
M sw/source/core/access/accnotextframe.cxx
M sw/source/core/access/accpara.cxx
M sw/source/core/access/accportions.cxx
M sw/source/core/access/accselectionhelper.cxx
M sw/source/core/access/acctable.cxx
M sw/source/core/access/acctextframe.cxx
10 files changed, 82 insertions(+), 98 deletions(-)
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 86f9da8..80e3c4d 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -176,7 +176,7 @@
rLower.AlwaysIncludeAsChild() )
{
// This wouldn't be required if the SwAccessibleFrame,
- // wouldn't know about the vis area.
+ // wouldn't know about the visible area.
eAction = SCROLLED;
}
if( NONE != eAction )
@@ -798,7 +798,7 @@
There are two modes.
- - realative
+ - relative
Return bounding box relative to parent if parent is no root
frame. Otherwise return the absolute bounding box.
diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
index c931ee6..4d4e4d7 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -40,14 +40,14 @@
using namespace sw::access;
-// Regarding visibilily (or in terms of accessibility: regarding the showing
+// Regarding visibility (or in terms of accessibility: regarding the showing
// state): A frame is visible and therfor contained in the tree if its frame
// size overlaps with the visible area. The bounding box however is the
// frame's paint area.
-/* static */ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap,
- const SwRect& rVisArea,
- const SwFrm *pFrm,
- sal_Bool bInPagePreview )
+sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Bool bInPagePreview )
{
sal_Int32 nCount = 0;
@@ -73,12 +73,12 @@
return nCount;
}
-/* static */ SwAccessibleChild SwAccessibleFrame::GetChild(
- SwAccessibleMap& rAccMap,
- const SwRect& rVisArea,
- const SwFrm& rFrm,
- sal_Int32& rPos,
- sal_Bool bInPagePreview )
+SwAccessibleChild SwAccessibleFrame::GetChild(
+ SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview )
{
SwAccessibleChild aRet;
@@ -111,7 +111,7 @@
}
else
{
- // The unsorted list is sorted enough, because it return lower
+ // The unsorted list is sorted enough, because it returns lower
// frames in the correct order.
const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
@@ -140,13 +140,13 @@
return aRet;
}
-/* static */ sal_Bool SwAccessibleFrame::GetChildIndex(
- SwAccessibleMap& rAccMap,
- const SwRect& rVisArea,
- const SwFrm& rFrm,
- const SwAccessibleChild& rChild,
- sal_Int32& rPos,
- sal_Bool bInPagePreview )
+sal_Bool SwAccessibleFrame::GetChildIndex(
+ SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ const SwAccessibleChild& rChild,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview )
{
sal_Bool bFound = sal_False;
@@ -177,7 +177,7 @@
}
else
{
- // The unsorted list is sorted enough, because it return lower
+ // The unsorted list is sorted enough, because it returns lower
// frames in the correct order.
const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
@@ -278,11 +278,11 @@
return aRet;
}
-/* static */ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap,
- const SwRect& rVisArea,
- const SwFrm& rFrm,
- ::std::list< SwAccessibleChild >& rChildren,
- sal_Bool bInPagePreview )
+void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ ::std::list< SwAccessibleChild >& rChildren,
+ sal_Bool bInPagePreview )
{
if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
{
@@ -307,7 +307,7 @@
}
else
{
- // The unsorted list is sorted enough, because it return lower
+ // The unsorted list is sorted enough, because it returns lower
// frames in the correct order.
const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
@@ -383,7 +383,7 @@
return sal_True;
// If a fly frame has a transparent background color, we have to consider the background.
- // But a background color "no fill"/"auto fill" has *not* to be considered.
+ // But a background color "no fill"/"auto fill" should *not* be considered.
if( pFrm->IsFlyFrm() &&
(rBack.GetColor().GetTransparency() != 0) &&
(rBack.GetColor() != COL_TRANSPARENT)
@@ -421,8 +421,8 @@
{
}
-/* static */ const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj,
- sal_Bool bInPagePreview )
+const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj,
+ sal_Bool bInPagePreview )
{
return rFrmOrObj.GetParent( bInPagePreview );
}
diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx
index cd71ebc..316b029 100644
--- a/sw/source/core/access/accfrmobjmap.cxx
+++ b/sw/source/core/access/accfrmobjmap.cxx
@@ -149,7 +149,7 @@
return _SwAccessibleChildMap::insert( aEntry );
}
-/* static */ bool SwAccessibleChildMap::IsSortingRequired( const SwFrm& rFrm )
+bool SwAccessibleChildMap::IsSortingRequired( const SwFrm& rFrm )
{
return ( rFrm.IsPageFrm() &&
static_cast< const SwPageFrm& >( rFrm ).GetSortedObjs() ) ||
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 997a5d8..c09ba4a 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -299,14 +299,14 @@
INVALID_ATTR };
private:
- SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED
- // and POS_CHANGED
+ SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED
+ // and POS_CHANGED
uno::WeakReference < XAccessible > mxAcc; // The object that fires the event
SwAccessibleChild maFrmOrObj; // the child for CHILD_POS_CHANGED and
- // the same as xAcc for any other
- // event type
- EventType meType; // The event type
- tAccessibleStates mnStates; // check states or update caret pos
+ // the same as xAcc for any other
+ // event type
+ EventType meType; // The event type
+ tAccessibleStates mnStates; // check states or update caret pos
SwAccessibleEvent_Impl& operator==( const SwAccessibleEvent_Impl& );
@@ -464,11 +464,11 @@
// The shape list is filled if an accessible shape is destroyed. It
// simply keeps a reference to the accessible shape's XShape. These
-// references are destroyed within the EndAction when firing events,
-// There are twp reason for this. First of all, a new accessible shape
+// references are destroyed within the EndAction when firing events.
+// There are two reason for this. First of all, a new accessible shape
// for the XShape might be created soon. It's then cheaper if the XShape
// still exists. The other reason are situations where an accessible shape
-// is destroyed within an SwFrmFmt::Modify. In this case, destryoing
+// is destroyed within an SwFrmFmt::Modify. In this case, destroying
// the XShape at the same time (indirectly by destroying the accessible
// shape) leads to an assert, because a client of the Modify is destroyed
// within a Modify call.
@@ -870,7 +870,7 @@
// An INVALID_CONTENT event overwrites a CARET_OR_STATES
// event (but keeps its flags) and it is contained in a
// POS_CHANGED event.
- // Therefor, the event's type has to be adapted and the event
+ // Therefore, the event's type has to be adapted and the event
// has to be put at the end.
//
// fdo#56031 An INVALID_CONTENT event overwrites a INVALID_ATTR
@@ -1417,13 +1417,13 @@
// If the new context has the focus, and if we know
// another context that had the focus, then the focus
// just moves from the old context to the new one. We
- // have to send a focus event and a caret event for
- // the old context then. We have to to that know,
+ // then have to send a focus event and a caret event for
+ // the old context. We have to to that now,
// because after we have left this method, anyone might
// call getStates for the new context and will get a
// focused state then. Sending the focus changes event
// after that seems to be strange. However, we cannot
- // send a focus event fo the new context now, because
+ // send a focus event for the new context now, because
// noone except us knows it. In any case, we remember
// the new context as the one that has the focus
// currently.
@@ -1553,7 +1553,7 @@
// Remove reference to old caret object. Though mxCursorContext
// is a weak reference and cleared automatically, clearing it
- // directly makes sure to not keep a defunctional object.
+ // directly makes sure to not keep a non-functional object.
uno::Reference < XAccessible > xOldAcc( mxCursorContext );
if( xOldAcc.is() )
{
@@ -2299,8 +2299,8 @@
return OutputDevice::LogicToLogic( GetVisArea().SVRect(), aSrc, aDest );
}
-// Convert a MM100 value realtive to the document root into a pixel value
-// realtive to the screen!
+// Convert a MM100 value relative to the document root into a pixel value
+// relative to the screen!
Point SwAccessibleMap::LogicToPixel( const Point& rPoint ) const
{
MapMode aSrc( MAP_100TH_MM );
@@ -2400,12 +2400,12 @@
if( !pObj )
return sal_False;
- uno::Reference < drawing::XShape > xShape( _rxShape ); //keep reference to shape, because
- // we might be the only one that
- // hold it.
+ uno::Reference < drawing::XShape > xShape( _rxShape ); // keep reference to shape, because
+ // we might be the only one that
+ // holds it.
// Also get keep parent.
uno::Reference < XAccessible > xParent( pCurrentChild->getAccessibleParent() );
- pCurrentChild = 0; // well be realease by dispose
+ pCurrentChild = 0; // well be released by dispose
Dispose( 0, pObj, 0 );
{
@@ -2547,7 +2547,7 @@
/** method to build up a new data structure of the accessible pararaphs,
which have a selection
- Important note: method has to used inside a mutual exclusive section
+ Important note: method has to be used inside a mutual exclusive section
*/
SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
{
@@ -2586,7 +2586,7 @@
do {
// for a selection the cursor has to have a mark.
- // for savety reasons assure that point and mark are in text nodes
+ // for safety reasons assure that point and mark are in text nodes
if ( pCrsr->HasMark() &&
pCrsr->GetPoint()->nNode.GetNode().IsTxtNode() &&
pCrsr->GetMark()->nNode.GetNode().IsTxtNode() )
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index d86aec4..98cb887 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -216,7 +216,7 @@
/// XAccessibleImage
/** implementation of the XAccessibleImage methods is a no-brainer, as
- all releveant information is already accessible through other
+ all relevant information is already accessible through other
methods. So we just delegate to those. */
OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageDescription()
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index a1c2829..2dc5c22 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -45,11 +45,11 @@
#include <accpara.hxx>
#include <access.hrc>
#include <accportions.hxx>
-#include <sfx2/viewsh.hxx> // for ExecuteAtViewShell(...)
-#include <sfx2/viewfrm.hxx> // for ExecuteAtViewShell(...)
-#include <sfx2/dispatch.hxx> // for ExecuteAtViewShell(...)
+#include <sfx2/viewsh.hxx> // for ExecuteAtViewShell(...)
+#include <sfx2/viewfrm.hxx> // for ExecuteAtViewShell(...)
+#include <sfx2/dispatch.hxx> // for ExecuteAtViewShell(...)
#include <unotools/charclass.hxx> // for GetWordBoundary
-// for get/setCharacterAttribute(...)
+ // for get/setCharacterAttribute(...)
#include <unocrsr.hxx>
#include <unoport.hxx>
#include <doc.hxx>
@@ -433,7 +433,7 @@
Window *pWin = GetWindow();
if( nOld != nNew )
{
- // The cursor's node position is sumilated by the focus!
+ // The cursor's node position is simulated by the focus!
if( pWin && pWin->HasFocus() && -1 == nOld )
FireStateChangedEvent( AccessibleStateType::FOCUSED, sal_True );
@@ -534,20 +534,20 @@
OSL_ENSURE( GetMap() != NULL, "no map?" );
ViewShell* pViewShell = GetMap()->GetShell();
- OSL_ENSURE( pViewShell != NULL, "View shell exptected!" );
+ OSL_ENSURE( pViewShell != NULL, "View shell expected!" );
SfxViewShell* pSfxShell = pViewShell->GetSfxViewShell();
- OSL_ENSURE( pSfxShell != NULL, "SfxViewShell shell exptected!" );
+ OSL_ENSURE( pSfxShell != NULL, "SfxViewShell shell expected!" );
if( !pSfxShell )
return;
SfxViewFrame *pFrame = pSfxShell->GetViewFrame();
- OSL_ENSURE( pFrame != NULL, "View frame exptected!" );
+ OSL_ENSURE( pFrame != NULL, "View frame expected!" );
if( !pFrame )
return;
SfxDispatcher *pDispatcher = pFrame->GetDispatcher();
- OSL_ENSURE( pDispatcher != NULL, "Dispatcher exptected!" );
+ OSL_ENSURE( pDispatcher != NULL, "Dispatcher expected!" );
if( !pDispatcher )
return;
@@ -1450,7 +1450,7 @@
0 );
// #i82637#
// From the perspective of the a11y API the character attributes, which
- // are set at the automatic paragraph style of the paragraph are treated
+ // are set at the automatic paragraph style of the paragraph, are treated
// as run attributes.
// SwXTextCursor::GetCrsrAttr( *pPaM, aSet, sal_True, sal_True );
// get character attributes from automatic paragraph style and merge these into <aSet>
@@ -2254,13 +2254,11 @@
sal_Int32 nCount = 0;
// #i77108# - provide hyperlinks also in editable documents.
-// if( !IsEditableState() )
- {
- const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
- SwHyperlinkIter_Impl aIter( pTxtFrm );
- while( aIter.next() )
- nCount++;
- }
+
+ const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
+ SwHyperlinkIter_Impl aIter( pTxtFrm );
+ while( aIter.next() )
+ nCount++;
return nCount;
}
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 692b04e..1720053 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -329,7 +329,7 @@
{
OSL_ENSURE( aLineBreaks.size() >= 2, "need min + max value" );
- // The last two positions except the two deleimiters are the ones
+ // The last two positions except the two delimiters are the ones
// we are looking for, except for empty paragraphs (nBreaks==3)
size_t nBreaks = aLineBreaks.size();
FillBoundary( rBound, aLineBreaks, nBreaks <= 3 ? 0 : nBreaks-4 );
diff --git a/sw/source/core/access/accselectionhelper.cxx
b/sw/source/core/access/accselectionhelper.cxx
index 13397a6..06665f3 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -76,8 +76,7 @@
}
-//===== XAccessibleSelection ============================================
-
+// XAccessibleSelection
void SwAccessibleSelectionHelper::selectAccessibleChild(
sal_Int32 nChildIndex )
throw ( lang::IndexOutOfBoundsException,
@@ -309,7 +308,6 @@
throw ( lang::IndexOutOfBoundsException,
RuntimeException )
{
- // return sal_False // we can't deselect
if( nChildIndex < 0 ||
nChildIndex >= rContext.GetChildCount( *(rContext.GetMap()) ) )
throwIndexOutOfBoundsException();
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 34c27ff..d725885 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -72,8 +72,6 @@
};
-//------------------------------------------------------------------------------
-
class SwAccessibleTableData_Impl
{
SwAccessibleMap& mrAccMap;
@@ -479,8 +477,6 @@
static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
}
-//------------------------------------------------------------------------------
-
class SwAccSingleTableSelHander_Impl : public SwAccTableSelHander_Impl
{
sal_Bool bSelected;
@@ -505,8 +501,6 @@
{
bSelected = sal_False;
}
-
-//------------------------------------------------------------------------------
class SwAccAllTableSelHander_Impl : public SwAccTableSelHander_Impl
@@ -573,8 +567,6 @@
nRowOrCol++;
}
}
-
-//------------------------------------------------------------------------------
const SwSelBoxes *SwAccessibleTable::GetSelBoxes() const
{
@@ -785,7 +777,7 @@
return aRet;
}
-//====== XTypeProvider ====================================================
+// XTypeProvider
uno::Sequence< uno::Type > SAL_CALL SwAccessibleTable::getTypes()
throw(uno::RuntimeException)
{
@@ -1004,7 +996,7 @@
SwAccessibleTable::getAccessibleColumnHeaders( )
throw (uno::RuntimeException)
{
- // #i87532# - assure that return accesible object is empty,
+ // #i87532# - assure that return accessible object is empty,
// if no column header exists.
SwAccessibleTableColHeaders* pTableColHeaders =
new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) );
@@ -1332,7 +1324,7 @@
}
// There are two reason why this method has been called. The first one
- // is there is no context for pFrm. The method is them called by
+ // is there is no context for pFrm. The method is then called by
// the map, and we have to call our superclass.
// The other situation is that we have been call by a call to get notified
// about its change. We then must not call the superclass
@@ -1372,7 +1364,7 @@
}
-//===== XAccessibleSelection =============================================
+// XAccessibleSelection
void SAL_CALL SwAccessibleTable::selectAccessibleChild(
sal_Int32 nChildIndex )
@@ -1518,7 +1510,7 @@
SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable );
- // paremter checking (part 1): index lower 0
+ // parameter checking (part 1): index lower 0
if( nSelectedChildIndex < 0 )
throw lang::IndexOutOfBoundsException();
@@ -1622,14 +1614,14 @@
{
}
-//===== XInterface ======================================================
+// XInterface
uno::Any SAL_CALL SwAccessibleTableColHeaders::queryInterface( const uno::Type& aType )
throw (uno::RuntimeException)
{
return SwAccessibleTable::queryInterface( aType );
}
-//===== XAccessibleContext ==============================================
+// XAccessibleContext
sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount(void)
throw (uno::RuntimeException)
{
@@ -1679,7 +1671,7 @@
return SwAccessibleTable::getAccessibleChild( nIndex );
}
-//===== XAccessibleTable ================================================
+// XAccessibleTable
uno::Reference< XAccessibleTable >
SAL_CALL SwAccessibleTableColHeaders::getAccessibleRowHeaders()
throw (uno::RuntimeException)
@@ -1694,7 +1686,7 @@
return uno::Reference< XAccessibleTable >();
}
-//===== XServiceInfo ====================================================
+// XServiceInfo
OUString SAL_CALL SwAccessibleTableColHeaders::getImplementationName (void)
throw (uno::RuntimeException)
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index e6a96b2..10f9b51 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -111,7 +111,7 @@
break;
}
}
- // intentional no break here
+ // intentionally no break here
case RES_DESCRIPTION_CHANGED:
{
if ( pFlyFrm )
@@ -206,11 +206,7 @@
}
-//
// XAccessibleRelationSet
-//
-
-
SwFlyFrm* SwAccessibleTextFrame::getFlyFrm() const
{
SwFlyFrm* pFlyFrm = NULL;
--
To view, visit https://gerrit.libreoffice.org/3135
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8b29c4051c7c09a1cc555996f9e56fd4f0f3611
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Chris Sherlock <chris.sherlock79@gmail.com>
Context
- [PATCH] Typo fixes, small code changes · Chris Sherlock (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.