Fix typos + some reformatting.

Change-Id: Ifa93c25de625bdbf8e042058530d923421b7404a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210575
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
This commit is contained in:
Andrea Gelmini
2026-09-10 22:25:35 +02:00
committed by Julien Nabet
parent 6a1480506d
commit 853bc4536b
20 changed files with 38 additions and 38 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDrawImageEmbeddedNotBlocked)
CPPUNIT_TEST_FIXTURE(Test, testEmptySvgFamilyName)
{
createSwDoc("empty-svg-family-name.odt");
// .odt import did crash on the empty font list (which I think is valid according SVG spec)
// .odt import did crash on the empty font list (which I think is valid according to SVG spec)
}
CPPUNIT_TEST_FIXTURE(Test, testHideAllSections)
+1 -1
View File
@@ -103,7 +103,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonCustomShape)
xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr);
CPPUNIT_ASSERT(pXmlDocument);
// Expected coordinates are 0|10800, 8936|8936, 10800|0, 12664|8936, 21600|10800, 12664|12664,
// 10800|21600, 8936|12664, 0|10800. Assert forth point, which comes from equations. Allow some
// 10800|21600, 8936|12664, 0|10800. Assert fourth point, which comes from equations. Allow some
// tolerance.
sal_Int32 nXCoord = getXPath(pXmlDocument, "(//wp:lineTo)[3]", "x").toInt32();
// Without fix it would fail with expected 12664, actual 3
+1 -1
View File
@@ -95,7 +95,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf163178_columnbreakInTable)
CPPUNIT_TEST_FIXTURE(Test, testTdf171527_flyInFramePr)
{
// given a with a framePr'd image anchoring a drawing shape
// given a document with a framePr'd image anchoring a drawing shape
createSwDoc("tdf171527_flyInFramePr.doc");
save(TestFilter::DOCX);
+1 -1
View File
@@ -527,7 +527,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFormulaNumberWithGroupSeparator)
pWrtShell->Down(false);
pField = pWrtShell->GetCurField();
CPPUNIT_ASSERT_EQUAL(u"5.000*10%"_ustr, pField->GetFormula());
// the problem was that this was
// the problem was that this was 0
CPPUNIT_ASSERT_EQUAL(u"500"_ustr, pField->ExpandField(true, nullptr));
pWrtShell->Down(false);
pField = pWrtShell->GetCurField();
+1 -1
View File
@@ -540,7 +540,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest11, testTdf163194)
{
// Test (1) that exporting comments in margin to PDF produces expected layout of the comments,
// that have limited and reasonable width and position, inside the page bounds (and close to
// its right side), independent on the manually set comment sidebar width; and (2) that the
// its right side), independent of the manually set comment sidebar width; and (2) that the
// export doesn't change the annotation sizes in the document.
// Annotation size depends on DisplayWidthFactor. Set it to a fixed value for testing.
+6 -6
View File
@@ -293,7 +293,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf159026)
// undo tracked table deletion
// This resulted crashing
// This resulted in crashing
dispatchCommand(mxComponent, u".uno:Undo"_ustr, {});
}
@@ -606,7 +606,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf148791)
dispatchCommand(mxComponent, u".uno:PasteRowsBefore"_ustr, {});
pXmlDoc = parseLayoutDump();
// repeating table header (and its thead/tbody indentation) doesn't effect row number
// repeating table header (and its thead/tbody indentation) doesn't affect row number
assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 32);
// there are two nested tables after the paste
assertXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell/tab", 4);
@@ -1477,7 +1477,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf107893)
pTxBxFrm = SwTextBoxHelper::getOtherTextBoxFormat(getShape(1));
//This was nullptr because of unsuccessful re-adding
CPPUNIT_ASSERT_MESSAGE("Textbox cannot be readd after Undo!", pTxBxFrm);
CPPUNIT_ASSERT_MESSAGE("Textbox cannot be re-added after Undo!", pTxBxFrm);
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf121031)
@@ -1671,7 +1671,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf139566)
uno::Reference<frame::XFrames> xFrames = mxDesktop->getFrames();
sal_Int32 nFrames = xFrames->getCount();
// Create a second window so the first window looses focus
// Create a second window so the first window loses focus
dispatchCommand(mxComponent, u".uno:NewWindow"_ustr, {});
CPPUNIT_ASSERT_EQUAL(nFrames + 1, xFrames->getCount());
@@ -2480,7 +2480,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, AtPageTextBoxCrash)
u"AnchorType"_ustr, uno::Any(text::TextContentAnchorType::TextContentAnchorType_AT_PAGE));
// The page anchored objects must not have content anchor
// unless this will lead to crash later, for example on
// otherwise this will lead to crash later, for example on
// removing the paragraph where it is anchored to...
CPPUNIT_ASSERT_EQUAL(RndStdIds::FLY_AT_PAGE, pTxBxFrm->GetAnchor().GetAnchorId());
CPPUNIT_ASSERT(!pTxBxFrm->GetAnchor().GetAnchorNode());
@@ -3159,7 +3159,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testCursorPositionAfterUndo)
// select the word
dispatchCommand(mxComponent, u".uno:SelectWord"_ustr, {});
// check the word is select
// check the word is selected
SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
CPPUNIT_ASSERT_EQUAL(u"tincidunt"_ustr, pShellCursor->GetText());
+2 -2
View File
@@ -836,7 +836,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf135083)
auto xLastPara = getParagraph(3);
CPPUNIT_ASSERT_EQUAL(u"dolor"_ustr, xLastPara->getString());
// Without the fix in place, the last paragraph would loose its settings. ListId would be empty.
// Without the fix in place, the last paragraph would lose its settings. ListId would be empty.
CPPUNIT_ASSERT(!getProperty<OUString>(xLastPara, u"ListId"_ustr).isEmpty());
}
@@ -1342,7 +1342,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf158375_ole_object_disable)
// it shouldn't switch because the current configuration
// (DisableActiveContent) prohibits OLE objects changing to states other
// then LOADED
// than LOADED
auto xShape = getShape(1);
uno::Reference<document::XEmbeddedObjectSupplier2> xEmbedSupplier(xShape, uno::UNO_QUERY);
auto xEmbeddedObj = xEmbedSupplier->getExtendedControlOverEmbeddedObject();
+2 -2
View File
@@ -1636,8 +1636,8 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
pFrame = pTextNd->getLayoutFrame(GetLayout(), nullptr, &tmp);
if (pFrame)
{
//tdf#116397 now that we looking for the bounds of the field drop the SmartTag
//index within field setting so we don't the bounds of the char within the field
//tdf#116397 now that we are looking for the bounds of the field drop the SmartTag
//index within field setting so we don't get the bounds of the char within the field
SwSpecialPos* pSpecialPos = aTmpState.m_pSpecialPos;
aTmpState.m_pSpecialPos = nullptr;
pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState );
+1 -1
View File
@@ -674,7 +674,7 @@ bool SwPaM::HasReadonlySel(bool bFormView, bool const isReplace) const
GetPoint(), &tmp);
}
// Will be set if point are inside edit-in-readonly environment
// Will be set if point is inside edit-in-readonly environment
const SwFrame* pPointEditInReadonlyFrame = nullptr;
if ( pFrame != nullptr
&& ( pFrame->IsProtected()
@@ -374,7 +374,7 @@ void DocumentLinksAdministrationManager::SetData( const OUString& rItem )
return nullptr;
}
/// embedded all local links (Areas/Graphics)
/// embeds all local links (Areas/Graphics)
bool DocumentLinksAdministrationManager::EmbedAllLinks()
{
bool bRet = false;
+6 -6
View File
@@ -80,7 +80,7 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat,
"<lcl_AdjustPositioningAttr(..)> - anchor frame is a follow." );
bool bVert = false;
bool bR2L = false;
// #i45952# - use anchor position of anchor frame, if it exist.
// #i45952# - use anchor position of anchor frame, if it exists.
Point aAnchorPos;
if ( pAnchorFrame )
{
@@ -93,7 +93,7 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat,
{
// #i45952#
aAnchorPos = _rSdrObj.GetAnchorPos();
// If no anchor frame exist - e.g. because no layout exists - the
// If no anchor frame exists - e.g. because no layout exists - the
// default layout direction is taken.
const SvxFrameDirectionItem& rDirItem =
_pFrameFormat->GetAttrSet().GetPool()->GetUserOrPoolDefaultItem( RES_FRAMEDIR );
@@ -166,7 +166,7 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat,
_pFrameFormat->SetFormatAttr( SwFormatVertOrient( nVertRelPos, text::VertOrientation::NONE, text::RelOrientation::FRAME ) );
// #i44334#, #i44681# - positioning attributes already set
_pFrameFormat->PosAttrSet();
// #i34750# - keep current object rectangle for drawing
// #i34750# - keep current object rectangle for drawing
// objects. The object rectangle is used on events from the drawing layer
// to adjust the positioning attributes - see <SwDrawContact::Changed_(..)>.
{
@@ -249,7 +249,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
DelFrameFormat( pFormat );
// #i45952# - re-introduce position normalization of group member
// objects, because its anchor position is cleared, when they are
// objects, because their anchor position is cleared, when they are
// grouped.
Point aAnchorPos( pObj->GetAnchorPos() );
pObj->NbcSetAnchorPos( Point( 0, 0 ) );
@@ -509,7 +509,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
{
SwDrawFrameFormat *pFormat = static_cast<SwDrawFrameFormat*>(pContact->GetFormat());
// before delete of selection is performed, marked
// <SwDrawVirtObj>-objects have to be replaced by its
// <SwDrawVirtObj>-objects have to be replaced by their
// reference objects. Thus, assert, if a
// <SwDrawVirt>-object is found in the mark list.
if ( dynamic_cast<const SwDrawVirtObj*>( pObj) != nullptr )
@@ -695,7 +695,7 @@ namespace docfunc
}
else
{
// contact object of drawing object doesn't exists.
// contact object of drawing object doesn't exist.
// Thus, the drawing object isn't yet positioned.
// Thus, it isn't known, if all drawing objects are on page.
bAllDrawObjsOnPage = false;
+3 -3
View File
@@ -72,8 +72,8 @@
using namespace ::com::sun::star;
//JP 16.12.99: definition:
// from pos cPosEnDash to cPosEmDash all chars changed to em dashes,
// from pos cPosEmDash to cPosEnd all chars changed to em dashes
// from pos cnPosEnDash to cnPosEmDash all chars changed to en dashes,
// from pos cnPosEmDash to cPosEnd all chars changed to em dashes
// all other chars are changed to the user configuration
const sal_Unicode pBulletChar[6] = { '+', '*', '-', 0x2013, 0x2014, 0 };
@@ -133,7 +133,7 @@ class SwAutoFormat
}
static bool IsSpace( const sal_Unicode c )
{ return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */); }
{ return (' ' == c || '\t' == c || 0x0a == c || 0x3000 == c /* Jap. space */); }
void SetColl( SwPoolFormatId nId, bool bHdLineOrText = false );
void GoNextPara();
+1 -1
View File
@@ -118,7 +118,7 @@ void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut );
/**
* Paint border around a run of characters using frame painting code.
*
* @param[in] rFont font object of actual text, which specify the border
* @param[in] rFont font object of actual text, which specifies the border
* @param[in] rPaintArea rectangle area in which line portion takes place
* @param[in] bVerticalLayout corresponding text frame verticality
* @param[in] bVerticalLayoutLRBT corresponding text frame verticality (LRBT subset)
+1 -1
View File
@@ -72,7 +72,7 @@ namespace sw::mark
enum class RestoreMode { Flys = 1, NonFlys = 2, All = 3 };
/// Takes care of storing relevant attributes of an SwTextNode before split, then restore them on the new node.
/// Takes care of storing relevant attributes of an SwTextNode before split, then restoring them on the new node.
class ContentIdxStore
{
public:
+1 -1
View File
@@ -140,7 +140,7 @@ public:
void JoinAndDelFollows(); // for DelFrames of the TableNodes!
// calls thr RegistFlys of the rows
// calls the RegistFlys of the rows
void RegistFlys();
inline const SwTabFrame *GetFollow() const;
+4 -4
View File
@@ -170,7 +170,7 @@ bool HasNumberingWhichNeedsLayoutUpdate(const SwTextNode& rTextNode);
} // namespace sw
/// Represents the visualization of a paragraph. Typical upper is an
/// SwBodyFrame. The first text portion of the first line is az SwParaPortion.
/// SwBodyFrame. The first text portion of the first line is an SwParaPortion.
class SW_DLLPUBLIC SwTextFrame final : public SwContentFrame
{
friend class SwTextIter;
@@ -271,7 +271,7 @@ class SW_DLLPUBLIC SwTextFrame final : public SwContentFrame
void ParagraphComposer( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
const SvxAdjustItem& rAdjust );
// In order to safe stack space, we split this method:
// In order to save stack space, we split this method:
// Format_ calls Format_ with parameters
void FormatImpl( vcl::RenderContext* pRenderContext, SwParaPortion *pPara,
::std::vector<SwAnchoredObject *> & rIntersectingObjs);
@@ -798,11 +798,11 @@ public:
OUString GetCurWord(SwPosition const&) const;
sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
/// This text frame may have a split fly frames anchored to it. Is any of them a frame that has
/// This text frame may have a split fly frame anchored to it. Is any of them a frame that has
/// a follow, i.e. not the last in a master -> follow 1 -> ... -> last follow chain?
SwFlyAtContentFrame* HasNonLastSplitFlyDrawObj() const;
/// This text frame has a follow and the text frame don't contain text. Additionally one split
/// This text frame has a follow and the text frame doesn't contain text. Additionally one split
/// fly is anchored to the text frame.
bool IsEmptyMasterWithSplitFly() const;
+1 -1
View File
@@ -233,7 +233,7 @@ static tools::Long lcl_Undersize( const SwFrame* pFrame )
{
if( static_cast<const SwTextFrame*>(pFrame)->IsUndersized() )
{
// Does this TextFrame would like to be a little bit bigger?
// Would this TextFrame like to be a little bit bigger?
nRet = static_cast<const SwTextFrame*>(pFrame)->GetParHeight() -
aRectFnSet.GetHeight(pFrame->getFramePrintArea());
if( nRet < 0 )
+2 -2
View File
@@ -108,12 +108,12 @@ inline void SwAttrHandler::ResetFont( SwFont& rFnt ) const
OSL_ENSURE(m_oFnt, "ResetFont without a font");
if (m_oFnt)
rFnt = *m_oFnt;
};
}
inline const SwFont* SwAttrHandler::GetFont() const
{
return m_oFnt ? &*m_oFnt : nullptr;
};
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+1 -1
View File
@@ -893,7 +893,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
}
}
/// Takes the default font and calculated the ascent and height
/// Takes the default font and calculates the ascent and height
void SwAttrHandler::GetDefaultAscentAndHeight( SwViewShell const * pShell, OutputDevice const & rOut,
sal_uInt16& nAscent, sal_uInt16& nHeight ) const
{
+1 -1
View File
@@ -612,7 +612,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
{
// New: We should have a look into the last portion, if it was a
// field portion. For this, we expand the text of the field portion
// into our string. If the line break position is inside of before
// into our string. If the line break position is inside or before
// the field portion, we trigger an underflow.
TextFrameIndex nOldIdx = rInf.GetIdx();