From 1dd550023ca2419b51e9b6f9c194228d03685b32 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Tue, 25 Aug 2026 21:47:14 +0200 Subject: [PATCH] Fix typos: code + comments Change-Id: I9b997720c5212a9413a78f15e139549f0345895c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209992 Reviewed-by: Julien Nabet Tested-by: Jenkins --- scripting/examples/python/TableSample.py | 2 +- scripting/source/provider/MasterScriptProvider.cxx | 2 +- scripting/source/provider/MasterScriptProvider.hxx | 2 +- scripting/source/pyprov/msgbox.py | 12 ++++++------ scripting/source/pyprov/pythonscript.py | 2 +- scripting/source/stringresource/stringresource.cxx | 12 ++++++------ scripting/source/stringresource/stringresource.hxx | 4 ++-- scripting/source/vbaevents/eventhelper.cxx | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/scripting/examples/python/TableSample.py b/scripting/examples/python/TableSample.py index 0920bf8ad021..cbb3c43c87ba 100644 --- a/scripting/examples/python/TableSample.py +++ b/scripting/examples/python/TableSample.py @@ -116,7 +116,7 @@ def createTable(): 0) textInTextFrame.insertString( cursorInTextFrame, - "\nWith this second line the height of the rame raises.", + "\nWith this second line the height of the frame raises.", 0) text.insertControlCharacter(cursor, PARAGRAPH_BREAK, 0) diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index f033a9dbe317..9abb584871e3 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -509,7 +509,7 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement ) Reference < XInterface > (), 1 ); } // TODO for library package parse the language, for the moment will try - // to get each provider to process the new Package, the first one the succeeds + // to get each provider to process the new Package, the first one that succeeds // will terminate processing const bool bSuccess = FindProviderAndApply( *providerCache(), [&aName, &aElement](Reference& xCont) { diff --git a/scripting/source/provider/MasterScriptProvider.hxx b/scripting/source/provider/MasterScriptProvider.hxx index 0e6c40f5f0a6..93442c2381af 100644 --- a/scripting/source/provider/MasterScriptProvider.hxx +++ b/scripting/source/provider/MasterScriptProvider.hxx @@ -117,7 +117,7 @@ private: // in case of createInstanceWithArgumentsXXX() called m_bIsValid is set to reset // and then set to true when initialisation is complete bool m_bIsValid; - // m_bInitialised ensure initialisation only takes place once. + // m_bInitialised ensures initialisation only takes place once. bool m_bInitialised; bool m_bIsPkgMSP; css::uno::Reference< css::script::provider::XScriptProvider > m_xMSPPkg; diff --git a/scripting/source/pyprov/msgbox.py b/scripting/source/pyprov/msgbox.py index 5e9436fff82b..4ddcfda51bc1 100644 --- a/scripting/source/pyprov/msgbox.py +++ b/scripting/source/pyprov/msgbox.py @@ -39,7 +39,7 @@ class MsgBox(unohelper.Base): self.ButtonSize = 50 self.boxSize = 200 self.lineHeight = 10 - self.fromBroxSize = False + self.fromBoxSize = False self.numberOfLines = -1 self.Buttons = [] @@ -62,7 +62,7 @@ class MsgBox(unohelper.Base): numberOfButtons = len(self.Buttons) self.ButtonSpace = self.ButtonSize/2 - if self.fromBroxSize: + if self.fromBoxSize: # button size is calculated from boxsize size = (2 * self.boxSize) / (3 * numberOfButtons + 1) self.ButtonSize = size @@ -180,12 +180,12 @@ class MsgBox(unohelper.Base): def renderFromBoxSize(self, size = 150): self.boxSize = size - self.fromBroxSize = True + self.fromBoxSize = True return def renderFromButtonSize(self, size = 50): self.ButtonSize = size - self.fromBroxSize = False + self.fromBoxSize = False return class ButtonListener(unohelper.Base, XActionListener): @@ -220,14 +220,14 @@ if __name__ == '__main__': myBox.addButton("No") myBox.addButton("May be") myBox.renderFromBoxSize(150) - myBox.numberOflines = 2 + myBox.numberOfLines = 2 print(myBox.show("A very long message A very long message A very long message A very long message A very long message A very long message A very long message A very long message A very long message A very long message " + chr(10)+chr(10)+"Do you agree ?",0,"Dialog title")) myBox = MsgBox(ctx) myBox.addButton("oK") myBox.renderFromButtonSize() - myBox.numberOflines = 2 + myBox.numberOfLines = 2 print(myBox.show("A small message",0,"Dialog title")) diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index 3d61cda2067f..8b982ccf2b50 100644 --- a/scripting/source/pyprov/pythonscript.py +++ b/scripting/source/pyprov/pythonscript.py @@ -1095,7 +1095,7 @@ class PythonScript(unohelper.Base, XScript): e.Message = e.Message + " (" + complete + ")" raise except Exception: - # General python exception are converted to uno RuntimeException + # General python exceptions are converted to uno RuntimeException text = lastException2String() complete = ( "Error during invoking function " diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index a403f59c1b6d..2813cd2166b8 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -1422,7 +1422,7 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >& // Private helper methods -static bool checkNamingSceme( std::u16string_view aName, std::u16string_view aNameBase, +static bool checkNamingScheme( std::u16string_view aName, std::u16string_view aNameBase, Locale& aLocale ) { bool bSuccess = false; @@ -1494,7 +1494,7 @@ void StringResourcePersistenceImpl::implScanLocaleNames( const Sequence< OUStrin //OUString aName = aInetObj.getBase(); Locale aLocale; - if( checkNamingSceme( aPureName, m_aNameBase, aLocale ) ) + if( checkNamingScheme( aPureName, m_aNameBase, aLocale ) ) { LocaleItem* pLocaleItem = new LocaleItem( std::move(aLocale), false ); m_aLocaleItemVector.emplace_back( pLocaleItem ); @@ -1511,7 +1511,7 @@ void StringResourcePersistenceImpl::implScanLocaleNames( const Sequence< OUStrin } else if( !bDefaultFound && aExtension == "default" ) { - if( checkNamingSceme( aPureName, m_aNameBase, aDefaultLocale ) ) + if( checkNamingScheme( aPureName, m_aNameBase, aDefaultLocale ) ) bDefaultFound = true; } } @@ -1560,7 +1560,7 @@ bool StringResourcePersistenceImpl::implLoadLocale(std::unique_lock& return false; } -static OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem ) +static OUString implGetNameSchemeForLocaleItem( const LocaleItem* pLocaleItem ) { /* FIXME-BCP47: this uses '_' underscore character as separator and * also appends Variant, which can't be blindly changed as it would @@ -1569,7 +1569,7 @@ static OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem ) static const char aUnder[] = "_"; assert(pLocaleItem && - "StringResourcePersistenceImpl::implGetNameScemeForLocaleItem(): pLocaleItem == NULL"); + "StringResourcePersistenceImpl::implGetNameSchemeForLocaleItem(): pLocaleItem == NULL"); Locale aLocale = pLocaleItem->m_locale; OUString aRetStr = aUnder + aLocale.Language; @@ -1595,7 +1595,7 @@ OUString StringResourcePersistenceImpl::implGetFileNameForLocaleItem if( aFileName.isEmpty() ) aFileName = aNameBaseDefaultStr; - aFileName += implGetNameScemeForLocaleItem( pLocaleItem ); + aFileName += implGetNameSchemeForLocaleItem( pLocaleItem ); return aFileName; } diff --git a/scripting/source/stringresource/stringresource.hxx b/scripting/source/stringresource/stringresource.hxx index 75c3ed239729..7a1514ba2b80 100644 --- a/scripting/source/stringresource/stringresource.hxx +++ b/scripting/source/stringresource/stringresource.hxx @@ -108,12 +108,12 @@ protected: /// @throws css::lang::NoSupportException void implCheckReadOnly( const char* pExceptionMsg ); - // Returns the LocalItem for a given locale, if it exists, otherwise NULL + // Returns the LocaleItem for a given locale, if it exists, otherwise NULL // This method compares the locales exactly, no closest match search is performed /// @throws css::lang::IllegalArgumentException LocaleItem* getItemForLocale( const css::lang::Locale& locale, bool bException ); - // Returns the LocalItem for a given locale, if it exists, otherwise NULL + // Returns the LocaleItem for a given locale, if it exists, otherwise NULL // This method performs a closest match search, at least the language must match LocaleItem* getClosestMatchItemForLocale( const css::lang::Locale& locale ); /// @throws css::lang::IllegalArgumentException diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 508d5ce4a6b8..2d67cff9d5f1 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -313,7 +313,7 @@ eventMethodToDescriptor( std::u16string_view rEventMethod, ScriptEventDescriptor EventInfoHash& infos = getEventTransInfo(); - // Only create an ScriptEventDescriptor for an event we can translate + // Only create a ScriptEventDescriptor for an event we can translate // or emulate if ( !sMethodName.isEmpty() && !sTypeName.isEmpty() @@ -326,7 +326,7 @@ eventMethodToDescriptor( std::u16string_view rEventMethod, ScriptEventDescriptor evtDesc.ListenerType = sTypeName; evtDesc.EventMethod = sMethodName; - // set this it VBAInterop, ensures that it doesn't + // set this to VBAInterop, ensures that it doesn't // get persisted or shown in property editors evtDesc.ScriptType = "VBAInterop"; return true;