From be7ff6a857361b30e660d167b45282f6dad65273 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Tue, 8 Sep 2026 22:13:26 +0200 Subject: [PATCH] Fix typos in code and comments + some reformatting Change-Id: Ic6fe197734655a2591a6730d07f23d4222a278f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210564 Tested-by: Jenkins Reviewed-by: Julien Nabet --- cli_ure/source/basetypes/uno/PolymorphicType.cs | 10 +++++----- compilerplugins/clang/conditionalstring.cxx | 6 ++---- connectivity/Module_connectivity.mk | 1 - connectivity/source/commontools/dbtools.cxx | 2 +- connectivity/source/drivers/dbase/DIndex.cxx | 2 +- connectivity/source/drivers/dbase/DTable.cxx | 6 +++--- connectivity/source/drivers/dbase/dindexnode.cxx | 2 +- connectivity/source/drivers/mysqlc/mysqlc_tables.cxx | 2 +- connectivity/source/inc/dbase/dindexnode.hxx | 2 +- cui/source/factory/dlgfact.cxx | 6 +++--- cui/source/factory/dlgfact.hxx | 2 +- cui/source/inc/CommandCategoryListBox.hxx | 4 ++-- cui/source/inc/cuitabarea.hxx | 2 +- cui/uiconfig/ui/pageformatpage.ui | 2 +- desktop/qa/desktop_lib/test_desktop_lib.cxx | 8 ++++---- .../source/processor2d/vclmetafileprocessor2d.cxx | 4 ++-- drawinglayer/source/tools/emfppath.cxx | 12 ++++++------ drawinglayer/source/tools/emfppath.hxx | 4 ++-- editeng/source/outliner/outliner.cxx | 2 +- filter/qa/pdf.cxx | 2 +- 20 files changed, 39 insertions(+), 42 deletions(-) diff --git a/cli_ure/source/basetypes/uno/PolymorphicType.cs b/cli_ure/source/basetypes/uno/PolymorphicType.cs index 888a0757abad..b366a5fb30d1 100644 --- a/cli_ure/source/basetypes/uno/PolymorphicType.cs +++ b/cli_ure/source/basetypes/uno/PolymorphicType.cs @@ -28,14 +28,14 @@ namespace uno { /** represents a polymorphic type. This class is used to carry type information for polymorphic struct types - and arrays of polymorphic struct types. These types would be easiest represented + and arrays of polymorphic struct types. These types would be most easily represented with type templates, which are not available in .NET 1.1. Therefore the System.Type cannot contain information about template parameters. To retain this information we use PolymorphicType which directly inherits from System.Type. The additional information about type parameters are passed - as simple string when creating an instance of PolymorphicType. Usually one + as a simple string when creating an instance of PolymorphicType. Usually one only needs a PolymorphicType when a polymorphic type is put into an - uno.Any. For example, let's assume there is a idl type PolyStruct: + uno.Any. For example, let's assume there is an idl type PolyStruct: module test { struct PolyStruct< T > @@ -90,7 +90,7 @@ public class PolymorphicType: Type /** provides a unique instance of this class. - This function returns null if the specified type is no polymorphic struct. + This function returns null if the specified type is not a polymorphic struct. @param type the type of the polymorphic struct. For example, created by @@ -98,7 +98,7 @@ public class PolymorphicType: Type @param name the full name of the struct (including the type list). @return - null - the argument type is no valid polymorphic struct or
+ null - the argument type is not a valid polymorphic struct or
an instance of this class. @exception System.ArgumentNullException The argument was null. diff --git a/compilerplugins/clang/conditionalstring.cxx b/compilerplugins/clang/conditionalstring.cxx index 92d0d2a91856..c08aa24a8119 100644 --- a/compilerplugins/clang/conditionalstring.cxx +++ b/compilerplugins/clang/conditionalstring.cxx @@ -17,7 +17,7 @@ // Find uses of OUString in conditional expressions that could be rewritten as std::u16string_view, // as in // -// s += (b ? OUString("xy") : OUString(z"); +// s += (b ? OUString("xy") : OUString("z")); namespace { @@ -215,9 +215,7 @@ public: check(expr->getArg(1)); return true; } - if (dc.Operator(OO_LessEqual) - .Namespace("rtl") - .GlobalNamespace()) //TODO: more precise check + if (dc.Operator(OO_LessEqual).Namespace("rtl").GlobalNamespace()) //TODO: more precise check { assert(fn->getNumParams() == 2); assert(expr->getNumArgs() == 2); diff --git a/connectivity/Module_connectivity.mk b/connectivity/Module_connectivity.mk index e8fdc6e33ef0..725a0663b1b7 100644 --- a/connectivity/Module_connectivity.mk +++ b/connectivity/Module_connectivity.mk @@ -22,7 +22,6 @@ $(eval $(call gb_Module_add_targets,connectivity,\ Configuration_flat \ Configuration_mysql_jdbc \ Configuration_odbc \ - Configuration_mysql_jdbc \ Configuration_writer \ Library_calc \ Library_dbase \ diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 4ba7a02e5070..17977eeabb67 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -458,7 +458,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, } catch(Exception&) { - TOOLS_WARN_EXCEPTION( "connectivity.commontools", "EXception when we set the new active connection!"); + TOOLS_WARN_EXCEPTION( "connectivity.commontools", "Exception when we set the new active connection!"); } } } diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 2c64b51b01e9..8db48b3cf2ad 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -554,7 +554,7 @@ void ODbaseIndex::CreateImpl() if(xSet->last()) { ODbaseResultSet* pDbaseRes = dynamic_cast(xSet.getTyped().get()); - assert(pDbaseRes); //"No dbase resultset found? What's going on here! + assert(pDbaseRes); // No dbase resultset found? What's going on here! nRowsLeft = xSet->getRow(); xSet->beforeFirst(); diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index e8233d83550a..c41350b57816 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -361,7 +361,7 @@ void ODbaseTable::fillColumns() aTypeName = "NUMERIC"; eType = DataType::DECIMAL; - // for numeric fields two characters more are written, then the precision of the column description predescribes, + // for numeric fields two characters more are written, then the precision of the column description prescribes, // to keep room for the possible sign and the comma. This has to be considered... nPrecision = SvDbaseConverter::ConvertPrecisionToOdbc(nPrecision,aDBFColumn.db_dez); // This is not true for older versions... @@ -1651,7 +1651,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo ::comphelper::UStringMixEqual aCase(isCaseSensitive()); Reference xColumns(m_xColumns.get()); - // first search a key that exist already in the table + // first search a key that exists already in the table for (sal_Int32 i = 0; i < nColumnCount; ++i) { sal_Int32 nPos = i; @@ -2519,7 +2519,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) { OSL_ASSERT(false); } - } // for(sal_uInt32 nRowPos = 0; nRowPos < m_aHeader.db_anz;++nRowPos) + } // for(sal_uInt32 nRowPos = 0; nRowPos < m_aHeader.nbRecords;++nRowPos) } void ODbaseTable::throwInvalidDbaseFormat() diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 2df303d80d56..7d52ddf6b05e 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -169,7 +169,7 @@ sal_uInt16 ONDXPage::FindPos(const ONDXKey& rKey) const bool ONDXPage::Find(const ONDXKey& rKey) { // searches the given key - // Speciality: At the end of the method + // Specialty: At the end of the method // the actual page and the position of the node, fulfilling the '<=' condition, are saved // This is considered at insert. sal_uInt16 i = 0; diff --git a/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx b/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx index b79f5de4ef30..57a9dcad8c72 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx @@ -35,7 +35,7 @@ static void lcl_unescape(OUString& rName) rName = rName.copy(1, rName.getLength() - 1); } - // Replace double ` by simple ` + // Replace double ` with single ` rName = rName.replaceAll("``", "`"); } diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index f5280c2a76a0..a97c4db66770 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -75,7 +75,7 @@ namespace connectivity::dbase class ONDXPage; // Index Page Pointer - // This is ref-count pointer class + // This is a ref-counted pointer class class ONDXPagePtr { friend SvStream& WriteONDXPagePtr(SvStream &rStream, const ONDXPagePtr&); diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 5d61574e02a8..41ace2aa59cc 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -242,7 +242,7 @@ VclPtr AbstractDialogFactory_Impl::CreateCustomizeTabDialo return VclPtr>::Create(std::move(xDlg1)); } -// TabDialog that use functionality of the drawing layer +// TabDialog that uses functionality of the drawing layer VclPtr AbstractDialogFactory_Impl::CreateTextTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet, SdrView* pView) @@ -252,7 +252,7 @@ VclPtr AbstractDialogFactory_Impl::CreateTextTabDialog(wel namespace { -// AbstractSvxCaptionDialog implementations just forwards everything to the dialog +// AbstractSvxCaptionDialog implementation just forwards everything to the dialog class AbstractSvxCaptionDialog_Impl final : public vcl::AbstractDialogImpl_Async { @@ -273,7 +273,7 @@ public: }; } -// TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog +// TabDialog that uses functionality of the drawing layer and adds AnchorTypes -- for SvxCaptionTabDialog VclPtr AbstractDialogFactory_Impl::CreateCaptionDialog(weld::Window* pParent, const SdrView* pView, SvxAnchorIds nAnchorTypes) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 16b9b9e32f26..23291cbbe638 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -20,7 +20,7 @@ #include -//AbstractDialogFactory_Impl implementations +// AbstractDialogFactory_Impl implementation class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory { public: diff --git a/cui/source/inc/CommandCategoryListBox.hxx b/cui/source/inc/CommandCategoryListBox.hxx index 3ead3379ba72..882d56469bab 100644 --- a/cui/source/inc/CommandCategoryListBox.hxx +++ b/cui/source/inc/CommandCategoryListBox.hxx @@ -63,8 +63,8 @@ public: } /** - Signals that a command category has been selected. - And updates the functions list box to include + Signals that a command category has been selected, + and updates the functions list box to include the commands in the selected category. */ void categorySelected(CuiConfigFunctionListBox* pFunctionListBox, const OUString& filterTerm, diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 095dfa0e77da..8c974f98cef2 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -714,7 +714,7 @@ private: std::unique_ptr m_xCtlPreviewOld; std::unique_ptr m_xCtlPreviewNew; - static void ConvertColorValues (Color& rColor, ColorModel eModell); + static void ConvertColorValues (Color& rColor, ColorModel eModel); static void RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK ); static void CmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey ); sal_uInt16 ColorToPercent_Impl( sal_uInt16 nColor ); diff --git a/cui/uiconfig/ui/pageformatpage.ui b/cui/uiconfig/ui/pageformatpage.ui index 5ad921468d6c..c90eba4ec878 100644 --- a/cui/uiconfig/ui/pageformatpage.ui +++ b/cui/uiconfig/ui/pageformatpage.ui @@ -54,7 +54,7 @@ False - Select a predefined paper size, or create a custom format by entering the dimensions for the paper in the Height and Width boxes. + Select a predefined paper size, or create a custom format by entering the dimensions for the paper in the Height and Width boxes. diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index e98cb0dd7683..ac6cacec276f 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -2531,7 +2531,7 @@ void DesktopLOKTest::testCommentsWriter() tools::Long nWidth, nHeight; pDocument->m_pDocumentClass->getDocumentSize(pDocument, &nWidth, &nHeight); - // Document width alongwith without sidebar comes to be < 13000 + // Document width without sidebar comes to be < 13000 CPPUNIT_ASSERT( nWidth < 13000 ); // Can we get all the comments using .uno:ViewAnnotations command ? @@ -2680,7 +2680,7 @@ void DesktopLOKTest::testCommentsImpress() void DesktopLOKTest::testCommentsCallbacksWriter() { - // Comments callback are emitted only if tiled annotations are off + // Comment callbacks are emitted only if tiled annotations are off comphelper::LibreOfficeKit::setTiledAnnotations(false); LibLODocument_Impl* pDocument = loadDoc("comments.odt"); pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}"); @@ -2784,7 +2784,7 @@ void addParameter(tools::JsonWriter& rJson, const char* sName, std::string_view void DesktopLOKTest::testCommentsAddEditDeleteDraw() { - // Comments callback are emitted only if tiled annotations are off + // Comment callbacks are emitted only if tiled annotations are off comphelper::LibreOfficeKit::setTiledAnnotations(false); LibLODocument_Impl* pDocument = loadDoc("BlankDrawDocument.odg"); pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}"); @@ -3766,7 +3766,7 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(classOffset(24), offsetof(LibreOfficeKitClass, getDocsCount)); CPPUNIT_ASSERT_EQUAL(classOffset(25), offsetof(LibreOfficeKitClass, registerFileSaveDialogCallback)); - // When extending LibreOfficeKit with a new function pointer, add new assert for the offsetof the + // When extending LibreOfficeKit with a new function pointer, add new assert for the offsetof the // new function pointer and bump this assert for the size of the class. CPPUNIT_ASSERT_EQUAL(classOffset(26), sizeof(LibreOfficeKitClass)); diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 25c09cf98c31..f2ee40e08081 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -647,7 +647,7 @@ VclMetafileProcessor2D::~VclMetafileProcessor2D() XTEXT_EOW(i) end of word XTEXT_EOS(i) end of sentence - this three are with index and are created with the help of an i18n::XBreakIterator in + these three are with index and are created with the help of an i18n::XBreakIterator in ImplDrawWithComments. Simplifying, moving out text painting, reworking to create some data structure for holding those TEXT infos. Supported directly by TextSimplePortionPrimitive2D with adding a Locale to the basic text @@ -2222,7 +2222,7 @@ void VclMetafileProcessor2D::processPolyPolygonGradientPrimitive2D( // These will need more space and time, but the result will be as if the Gradient // was rotated with the object. // This mechanism is used by all exporters still not using Primitives (e.g. Print, - // Slideshow, Export rto PDF, export to Picture, ...) but relying on Metafile + // Slideshow, Export to PDF, export to Picture, ...) but relying on Metafile // transfers. One more reason to *change* these to primitives. // BTW: One more example how useful the principles of primitives are; the decomposition // is by definition a simpler, maybe more expensive representation of the same content. diff --git a/drawinglayer/source/tools/emfppath.cxx b/drawinglayer/source/tools/emfppath.cxx index 8e51402bd801..40298937d7e6 100644 --- a/drawinglayer/source/tools/emfppath.cxx +++ b/drawinglayer/source/tools/emfppath.cxx @@ -156,7 +156,7 @@ namespace emfplushelper for (sal_uInt32 i = 0; i < nPoints; i++) { - if (p && pPointTypes && (pPointTypes [i] == 0)) + if (p && pPointTypes && (pPointTypes[i] == 0)) { aPolygon.append (polygon); last_normal = i; @@ -165,15 +165,15 @@ namespace emfplushelper } if (bMapIt) - mapped = rR.Map(xPoints[i], yPoints [i]); + mapped = rR.Map(xPoints[i], yPoints[i]); else mapped = ::basegfx::B2DPoint(xPoints[i], yPoints[i]); if (pPointTypes) { - if ((pPointTypes [i] & 0x07) == 3) + if ((pPointTypes[i] & 0x07) == 3) { - if (((i - last_normal )% 3) == 1) + if (((i - last_normal) % 3) == 1) { assert(p != 0); polygon.setNextControlPoint (p - 1, mapped); @@ -205,7 +205,7 @@ namespace emfplushelper p++; - if (pPointTypes && (pPointTypes [i] & 0x80)) // closed polygon + if (pPointTypes && (pPointTypes[i] & 0x80)) // closed polygon { polygon.setClosed (true); aPolygon.append (polygon); @@ -339,6 +339,6 @@ namespace emfplushelper aPolygon.append(polygon); return aPolygon; } -} +} // namespace emfplushelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/source/tools/emfppath.hxx b/drawinglayer/source/tools/emfppath.hxx index 27472515fdcc..782957440241 100644 --- a/drawinglayer/source/tools/emfppath.hxx +++ b/drawinglayer/source/tools/emfppath.hxx @@ -39,11 +39,11 @@ namespace emfplushelper void Read(SvStream& s, sal_uInt32 pathFlags); - ::basegfx::B2DPolyPolygon& GetPolygon(EmfPlusHelperData const & rR, bool bMapIt = true, bool bAddLineToCloseShape = false); + ::basegfx::B2DPolyPolygon& GetPolygon(EmfPlusHelperData const& rR, bool bMapIt = true, bool bAddLineToCloseShape = false); ::basegfx::B2DPolyPolygon& GetCardinalSpline(EmfPlusHelperData const& rR, float fTension, sal_uInt32 aOffset, sal_uInt32 aNumSegments); ::basegfx::B2DPolyPolygon& GetClosedCardinalSpline(EmfPlusHelperData const& rR, float fTension); }; -} +} // namespace emfplushelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 8b460c13e64c..fe9fde964489 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1914,7 +1914,7 @@ std::optional Outliner::GetNonOverflowingText() const if (nCount < 0) { SAL_INFO("editeng.chaining", - "[Overflowing] No Overflowing text but GetNonOverflowinText called?!"); + "[Overflowing] No Overflowing text but GetNonOverflowingText called?!"); return {}; } diff --git a/filter/qa/pdf.cxx b/filter/qa/pdf.cxx index 3b61588c24fb..36a7db8a7345 100644 --- a/filter/qa/pdf.cxx +++ b/filter/qa/pdf.cxx @@ -463,7 +463,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSignCertificatePEM) std::unique_ptr pPdfDocument = pPDFium->openDocument(aStream.GetData(), aStream.GetSize(), OString()); // Without the accompanying fix in place, this test would have failed, as signing was enabled - // without configured certificate, so the whole export failed. + // without configuring a certificate, so the whole export failed. CPPUNIT_ASSERT(pPdfDocument); CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getSignatureCount()); }