From 4ee0d493d0a994c5572999a03824fae70e578e65 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Tue, 8 Sep 2026 22:15:56 +0200 Subject: [PATCH] Fix typos in code + comments Change-Id: I66a422f3519dceed4f5e253a2895eb2e0d943662 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210574 Reviewed-by: Julien Nabet Tested-by: Jenkins --- sfx2/source/appl/appserv.cxx | 2 +- sfx2/source/appl/linkmgr2.cxx | 2 +- sfx2/source/dialog/filedlghelper.cxx | 2 +- solenv/bin/native-code.py | 4 ++-- starmath/inc/mathml/import.hxx | 2 +- starmath/source/accessibility.cxx | 2 +- starmath/source/mathml/import.cxx | 6 +++--- stoc/source/servicemanager/servicemanager.cxx | 4 ++-- svl/source/numbers/zforlist.cxx | 2 +- svx/source/accessibility/AccessibleControlShape.cxx | 2 +- svx/source/dialog/weldeditview.cxx | 4 ++-- svx/source/svdraw/svdpage.cxx | 4 ++-- sw/inc/EnhancedPDFExportHelper.hxx | 8 ++++---- sw/inc/ndarr.hxx | 6 +++--- sw/inc/pam.hxx | 2 +- sw/inc/swtypes.hxx | 6 +++--- sw/qa/core/doc/doc.cxx | 2 +- sw/qa/core/layout/layout.cxx | 2 +- sw/qa/extras/mailmerge/mailmerge2.cxx | 4 ++-- sw/qa/extras/odfexport/odfexport4.cxx | 2 +- 20 files changed, 34 insertions(+), 34 deletions(-) diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index e537dfe2cc3c..0c8914a4d365 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -1749,7 +1749,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) Reference< XFrame > xTargetFrame( lcl_findStartModuleFrame( xContext ) ); if ( !xTargetFrame.is() ) xTargetFrame = SfxFrame::CreateBlankFrame(); - ENSURE_OR_THROW( xTargetFrame.is(), "could not obtain a frameto load the Basic IDE into!" ); + ENSURE_OR_THROW( xTargetFrame.is(), "could not obtain a frame to load the Basic IDE into!" ); xLoader->load( aLoadArgs.getPropertyValues(), xTargetFrame ); } diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index 6122ded8c85b..f9bf27a7a818 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -616,7 +616,7 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) LinkManager* pLinkMgr = pLink->GetLinkManager(); if (pLinkMgr && sfx2::LinkManager::GetDisplayNames(pLink, nullptr, &sTopic, &sItem) && !sTopic.isEmpty()) { - // first only loop over the DocumentShells the shells and find those + // first only loop over the DocumentShells and find those // with the name: CharClass aCC( LanguageTag( LANGUAGE_SYSTEM) ); diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index c4fb2e4c6924..26e65bc2691a 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -3025,6 +3025,6 @@ OUString DecodeSpaces_Impl( const OUString& rSource ) return sRet; } -} // end of namespace sfx2 +} // namespace sfx2 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index b90662d8029b..e34ebf77c614 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -13,7 +13,7 @@ import xml.etree.ElementTree as ET # foo_component_getFactory functions are split into groups, so that you could # choose e.g. 'core' and 'writer' functionality and through factory_map, # relevant function sections will be referenced in lo_get_factory_map(). -# That prevents garbage collector to ignore them as unused. +# That prevents the garbage collector from ignoring them as unused. # The same groups are used for constructor based implementations # referenced in lo_get_constructor_map(). @@ -445,7 +445,7 @@ core_constructor_list = [ # ucb/source/ucp/ucphier1.component "ucb_HierarchyContentProvider_get_implementation", "ucb_HierarchyDataSource_get_implementation", -# ucb/source/ucp/package/ucppkg1 +# ucb/source/ucp/package/ucppkg1.component "ucb_package_ContentProvider_get_implementation", # unotools/util/utl.component "unotools_ServiceDocument_get_implementation", diff --git a/starmath/inc/mathml/import.hxx b/starmath/inc/mathml/import.hxx index 134214388a5c..d8528793f453 100644 --- a/starmath/inc/mathml/import.hxx +++ b/starmath/inc/mathml/import.hxx @@ -65,7 +65,7 @@ public: virtual void SetViewSettings(const css::uno::Sequence& aViewProps) override; - /** Imports configurations settings formula + /** Imports configuration settings formula */ virtual void SetConfigurationSettings( const css::uno::Sequence& aViewProps) override; diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 2fac8c4dfac5..b7e9196fc3b8 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -431,7 +431,7 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange( sal_Int32 nEndIndex ) { //!! nEndIndex may be the string length per definition of the interface !! - //!! text should be copied exclusive that end index though. And arguments + //!! text should be copied exclusive of that end index though. And arguments //!! may be switched. SolarMutexGuard aGuard; diff --git a/starmath/source/mathml/import.cxx b/starmath/source/mathml/import.cxx index e032040be47f..e45520b7ed79 100644 --- a/starmath/source/mathml/import.cxx +++ b/starmath/source/mathml/import.cxx @@ -173,7 +173,7 @@ void SmMLImportContext::inheritStyle() break; } - // Parent inheritation + // Parent inheritance // Mathcolor, mathsize, dir and displaystyle are inherited from parent SmMlElement* pParent = *m_pParent; m_pElement->setAttribute(pParent->getAttribute(SmMlAttributeValueType::MlMathcolor)); @@ -212,7 +212,7 @@ void SmMLImportContext::inheritStyle() if (m_pElement->getMlElementType() == SmMlElementType::MlMo) { - // Set form based in position + // Set form based on position SmMlAttribute aAttribute(SmMlAttributeValueType::MlForm); SmMlForm aForm; if (m_pElement->getSubElementId() == 0) @@ -236,7 +236,7 @@ void SmMLImportContext::inheritStyleEnd() { if ((*m_pParent)->getSubElementsCount() == m_pElement->getSubElementId()) { - // Set form based in position + // Set form based on position SmMlAttribute aAttribute(SmMlAttributeValueType::MlForm); SmMlForm aForm = { SmMlAttributeValueForm::MlPosfix }; aAttribute.setMlForm(&aForm); diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index aef267c70dd5..9588a3c450b9 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -1004,7 +1004,7 @@ void OServiceManager::insert( const Any & Element ) if( Element.getValueTypeClass() != TypeClass_INTERFACE ) { throw IllegalArgumentException( - "exception interface, got " + Element.getValueTypeName(), + "expected interface, got " + Element.getValueTypeName(), Reference< XInterface >(), 0 ); } Reference xEle( Element, UNO_QUERY_THROW ); @@ -1279,7 +1279,7 @@ Reference ORegistryServiceManager::loadWithImplementationName( } /** - * Return all implementation out of the registry. + * Return all implementations out of the registry. */ Sequence ORegistryServiceManager::getFromServiceName( std::u16string_view serviceName ) const diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 1cd2d46d3def..2bd411e60497 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -719,7 +719,7 @@ bool SvNFFormatData::PutEntry(SvNFLanguageData& rCurrentLanguage, sal_uInt32 CLOffset = ImpGenerateCL(rCurrentLanguage, rNatNum, eLge); // create new standard formats if necessary nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLge); - if (nKey == NUMBERFORMAT_ENTRY_NOT_FOUND) // only in not yet present + if (nKey == NUMBERFORMAT_ENTRY_NOT_FOUND) // only if not yet present { SvNumberformat* pStdFormat = GetFormatEntry(CLOffset + ZF_STANDARD); sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey( SvNumberformat::FormatterPrivateAccess() ); diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 21fd696ac458..cf1f1c9b8203 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -121,7 +121,7 @@ AccessibleControlShape::~AccessibleControlShape() m_xControlContextProxy.clear(); m_xControlContextTypeAccess.clear(); m_xControlContextComponent.clear(); - // this should remove the _only_ three "real" reference (means not delegated to + // this should remove the _only_ three "real" references (means not delegated to // ourself) to this proxy, and thus delete it } diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 3d9ff33e5534..71b0e354095f 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -567,7 +567,7 @@ public: virtual void UpdateData() override { - // would possibly only by needed if the XText interface is implemented + // would possibly only be needed if the XText interface is implemented // and its text needs to be updated. } virtual SfxBroadcaster& GetBroadcaster() const override @@ -937,7 +937,7 @@ IMPL_LINK(WeldTextForwarder, NotifyHdl, EENotify&, rNotify, void) if (rNotify.eNotificationType == EE_NOTIFY_PROCESSNOTIFICATIONS && !pEditEngine->IsUpdateLayout()) { - // tdf#143088 an UpdateMode of false will just to on to cause + // tdf#143088 an UpdateMode of false will just go on to cause // AccessibleTextHelper_Impl::GetTextForwarder to throw an // exception as a Frozen EditEngine is considered Invalid so return // early instead diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 1ba8b6329976..ad2b4d50410c 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -1069,7 +1069,7 @@ void SdrObjList::ReplaceObjectInContainer ( { // A user defined position of the object that is to be replaced is // not transferred to the new object so erase the former and append - // the later object from/to the navigation order. + // the latter object from/to the navigation order. OSL_ASSERT(nObjectPosition < maList.size()); unotools::WeakReference aReference (maList[nObjectPosition].get()); auto iObject = ::std::find( @@ -1395,7 +1395,7 @@ SdrPage::~SdrPage() pPageUser->PageInDestruction(*this); } - // Clear the vector. This means that user do not need to call RemovePageUser() + // Clear the vector. This means that users do not need to call RemovePageUser() // when they get called from PageInDestruction(). maPageUsers.clear(); diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index a0f09ea8d01f..229e8c6df0e9 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -119,8 +119,8 @@ struct Por_Info */ int const m_Mode; - Por_Info(const SwLinePortion& rPor, const SwTextPainter& rTextPainer, int const nMode) - : mrPor(rPor), mrTextPainter(rTextPainer), m_Mode(nMode) {}; + Por_Info(const SwLinePortion& rPor, const SwTextPainter& rTextPainter, int const nMode) + : mrPor(rPor), mrTextPainter(rTextPainter), m_Mode(nMode) {}; }; struct lt_TableColumn @@ -185,14 +185,14 @@ class SwTaggedPDFHelper }; /* - * Analyses the document structure and export Notes, Hyperlinks, References, + * Analyses the document structure and exports Notes, Hyperlinks, References, * and Outline. Link ids created during pdf export are stored in * SwEnhancedPDFState, in order to use them during * tagged pdf output. Therefore the SwEnhancedPDFExportHelper is used * before painting. Unfortunately links from the EditEngine into the * Writer document require to be exported after they have been painted. * Therefore SwEnhancedPDFExportHelper also has to be used after the - * painting process, the parameter bEditEngineOnly indicated that only + * painting process, the parameter bEditEngineOnly indicates that only * the bookmarks from the EditEngine have to be processed. */ class SwEnhancedPDFExportHelper diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index c2dd854d42a6..335a1fd09191 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -219,7 +219,7 @@ public: static SwContentNode* GoPrevSection( SwPosition *, bool bSkipHidden = true, bool bSkipProtect = true, bool canCrossBoundary = false ); - /** Create an empty section of Start- and EndNote. It may be called + /** Create an empty section of Start- and EndNode. It may be called only if a new section with content is to be created, e.g. at filters/Undo/... */ static SwStartNode* MakeEmptySection( const SwNode& rWhere, @@ -291,7 +291,7 @@ public: /// Create regular text from what was table. bool TableToText( const SwNodeRange& rRange, sal_Unicode cCh, SwUndoTableToText* ); - /// Is in untbl.cxx and may called only by Undo-object. + /// Is in untbl.cxx and may be called only by Undo-object. SwTableNode* UndoTableToText( SwNodeOffset nStt, SwNodeOffset nEnd, const SwTableToTextSaves& rSavedData ); @@ -304,7 +304,7 @@ public: sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 ); /** Splits a table at the base-line which contains the index. All base lines behind it are moved to a new table/ -node. - Is the flag bCalcNewSize set to TRUE, the new SSize for both + If the flag bCalcNewSize is set to TRUE, the new SSize for both tables is calculated from the Maximum of the boxes, provided SSize is set "absolute" (LONG_MAX). */ diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index afc302ddbffa..53bd48e23b90 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -299,7 +299,7 @@ public: /** Is in something protected (readonly) or selection contains something protected. */ bool HasReadonlySel(bool bFormView, bool isReplace) const; - /** Is there hidden sections in the selected area. */ + /** Are there hidden sections in the selected area. */ bool HasHiddenSections() const; bool ContainsPosition(const SwPosition & rPos) const diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index e6ab728125d2..e04620b726f0 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -105,7 +105,7 @@ constexpr short lOutlineMinTextDistance = o3tl::toTwips(15, o3tl::Length::in100) // Count of SystemField-types of SwDoc. #define INIT_FLDTYPES 33 -// Count of predefined Seq-field types. It is always the last +// Count of predefined Seq-field types. They are always the last // fields before INIT_FLDTYPES. #define INIT_SEQ_FLDTYPES 5 @@ -123,7 +123,7 @@ SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, vcl::RenderContext* pOutDe // Separator for jumps to different content types in document. const sal_Unicode cMarkSeparator = '|'; -// Sequences names for jumps are ! +// Sequence names for jumps are ! const char cSequenceMarkSeparator = '!'; /// separator for toxmarks: #%19%19|toxmark sal_Unicode const toxMarkSeparator = '\u0019'; @@ -248,7 +248,7 @@ enum class PrepareHint // MoveBwd: pVoid == pOldPage Register, // Invalidate frames with registers. FootnoteInvalidationGone, // A Follow loses its footnote, possibly its first line can move up. - FootnoteMove, // A footnote changes its page. Its contents receives at first a + FootnoteMove, // A footnote changes its page. Its contents receive at first a // height of zero in order to avoid too much noise. At formatting // it checks whether it fits and if necessary changes its page again. ErgoSum, // Needed because of movement in FootnoteFrames. Check QuoVadis/ErgoSum. diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index faa3c0b920ed..564b938ebd60 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -75,7 +75,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testMathInsertAnchorType) createSwDoc(); SwDoc* pDoc = getSwDoc(); - // When inserting an a math object. + // When inserting a math object. SwWrtShell* pShell = getSwDocShell()->GetWrtShell(); SvGlobalName aGlobalName(SO3_SM_CLASSID); pShell->InsertObject(svt::EmbeddedObjectRef(), &aGlobalName); diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx index 51a20360ed57..97926197ddf5 100644 --- a/sw/qa/core/layout/layout.cxx +++ b/sw/qa/core/layout/layout.cxx @@ -806,7 +806,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testDoublePageBorder) // When rendering that document: std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile(); - // Then make sure the top border is thick+thing and the bottom border is thin+thick (from top to + // Then make sure the top border is thick+thin and the bottom border is thin+thick (from top to // bottom): MetafileXmlDump dumper; xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile); diff --git a/sw/qa/extras/mailmerge/mailmerge2.cxx b/sw/qa/extras/mailmerge/mailmerge2.cxx index af7e788e5eb1..abb3177b0157 100644 --- a/sw/qa/extras/mailmerge/mailmerge2.cxx +++ b/sw/qa/extras/mailmerge/mailmerge2.cxx @@ -273,7 +273,7 @@ DECLARE_SHELL_MAILMERGE_TEST(testTdf81750_shell, "tdf81750.odt", "10-testing-add // prepare unit test and run executeMailMerge(); - // check several pages page + // check several pages OUString aExpected(u"Text: Foo "_ustr); xmlDocUniquePtr pXmlDoc = parseLayoutDump(static_cast(mxSwTextDocument.get())); assertXPathContent(pXmlDoc, "/root/page[1]/body/txt[2]", aExpected); @@ -442,7 +442,7 @@ DECLARE_SHELL_MAILMERGE_TEST(testTdf168252, "mm-single-date.fodt", "single-date. // Without the fix, this would fail with // - Expected: 2025-08-31 // - Actual : 2025-09-02 - // because the DB filed code assumed obsolete null date. + // because the DB field code assumed obsolete null date. CPPUNIT_ASSERT_EQUAL(u"2025-08-31"_ustr, mxSwTextDocument->getText()->getString()); } diff --git a/sw/qa/extras/odfexport/odfexport4.cxx b/sw/qa/extras/odfexport/odfexport4.cxx index ede255396abf..984eb26b0fff 100644 --- a/sw/qa/extras/odfexport/odfexport4.cxx +++ b/sw/qa/extras/odfexport/odfexport4.cxx @@ -1598,7 +1598,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf168817) createSwDoc("ruby+hyperlink.fodt"); saveAndReload(TestFilter::ODT); xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); - // Check that only one instance of respective elements are produced + // Check that only one instance of respective elements is produced assertXPath(pXmlDoc, "//text:p", 1); assertXPath(pXmlDoc, "//text:ruby", 1); assertXPath(pXmlDoc, "//text:a", 1);