Fix typos: code + comments

Change-Id: I9b997720c5212a9413a78f15e139549f0345895c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209992
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
This commit is contained in:
Andrea Gelmini
2026-08-26 09:11:46 +02:00
committed by Julien Nabet
parent dfe1fb7da1
commit 1dd550023c
8 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ def createTable():
0) 0)
textInTextFrame.insertString( textInTextFrame.insertString(
cursorInTextFrame, cursorInTextFrame,
"\nWith this second line the height of the rame raises.", "\nWith this second line the height of the frame raises.",
0) 0)
text.insertControlCharacter(cursor, PARAGRAPH_BREAK, 0) text.insertControlCharacter(cursor, PARAGRAPH_BREAK, 0)
@@ -509,7 +509,7 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement )
Reference < XInterface > (), 1 ); Reference < XInterface > (), 1 );
} }
// TODO for library package parse the language, for the moment will try // 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 // will terminate processing
const bool bSuccess = FindProviderAndApply( const bool bSuccess = FindProviderAndApply(
*providerCache(), [&aName, &aElement](Reference<container::XNameContainer>& xCont) { *providerCache(), [&aName, &aElement](Reference<container::XNameContainer>& xCont) {
@@ -117,7 +117,7 @@ private:
// in case of createInstanceWithArgumentsXXX() called m_bIsValid is set to reset // in case of createInstanceWithArgumentsXXX() called m_bIsValid is set to reset
// and then set to true when initialisation is complete // and then set to true when initialisation is complete
bool m_bIsValid; bool m_bIsValid;
// m_bInitialised ensure initialisation only takes place once. // m_bInitialised ensures initialisation only takes place once.
bool m_bInitialised; bool m_bInitialised;
bool m_bIsPkgMSP; bool m_bIsPkgMSP;
css::uno::Reference< css::script::provider::XScriptProvider > m_xMSPPkg; css::uno::Reference< css::script::provider::XScriptProvider > m_xMSPPkg;
+6 -6
View File
@@ -39,7 +39,7 @@ class MsgBox(unohelper.Base):
self.ButtonSize = 50 self.ButtonSize = 50
self.boxSize = 200 self.boxSize = 200
self.lineHeight = 10 self.lineHeight = 10
self.fromBroxSize = False self.fromBoxSize = False
self.numberOfLines = -1 self.numberOfLines = -1
self.Buttons = [] self.Buttons = []
@@ -62,7 +62,7 @@ class MsgBox(unohelper.Base):
numberOfButtons = len(self.Buttons) numberOfButtons = len(self.Buttons)
self.ButtonSpace = self.ButtonSize/2 self.ButtonSpace = self.ButtonSize/2
if self.fromBroxSize: if self.fromBoxSize:
# button size is calculated from boxsize # button size is calculated from boxsize
size = (2 * self.boxSize) / (3 * numberOfButtons + 1) size = (2 * self.boxSize) / (3 * numberOfButtons + 1)
self.ButtonSize = size self.ButtonSize = size
@@ -180,12 +180,12 @@ class MsgBox(unohelper.Base):
def renderFromBoxSize(self, size = 150): def renderFromBoxSize(self, size = 150):
self.boxSize = size self.boxSize = size
self.fromBroxSize = True self.fromBoxSize = True
return return
def renderFromButtonSize(self, size = 50): def renderFromButtonSize(self, size = 50):
self.ButtonSize = size self.ButtonSize = size
self.fromBroxSize = False self.fromBoxSize = False
return return
class ButtonListener(unohelper.Base, XActionListener): class ButtonListener(unohelper.Base, XActionListener):
@@ -220,14 +220,14 @@ if __name__ == '__main__':
myBox.addButton("No") myBox.addButton("No")
myBox.addButton("May be") myBox.addButton("May be")
myBox.renderFromBoxSize(150) 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")) 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 = MsgBox(ctx)
myBox.addButton("oK") myBox.addButton("oK")
myBox.renderFromButtonSize() myBox.renderFromButtonSize()
myBox.numberOflines = 2 myBox.numberOfLines = 2
print(myBox.show("A small message",0,"Dialog title")) print(myBox.show("A small message",0,"Dialog title"))
+1 -1
View File
@@ -1095,7 +1095,7 @@ class PythonScript(unohelper.Base, XScript):
e.Message = e.Message + " (" + complete + ")" e.Message = e.Message + " (" + complete + ")"
raise raise
except Exception: except Exception:
# General python exception are converted to uno RuntimeException # General python exceptions are converted to uno RuntimeException
text = lastException2String() text = lastException2String()
complete = ( complete = (
"Error during invoking function " "Error during invoking function "
@@ -1422,7 +1422,7 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >&
// Private helper methods // 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 ) Locale& aLocale )
{ {
bool bSuccess = false; bool bSuccess = false;
@@ -1494,7 +1494,7 @@ void StringResourcePersistenceImpl::implScanLocaleNames( const Sequence< OUStrin
//OUString aName = aInetObj.getBase(); //OUString aName = aInetObj.getBase();
Locale aLocale; Locale aLocale;
if( checkNamingSceme( aPureName, m_aNameBase, aLocale ) ) if( checkNamingScheme( aPureName, m_aNameBase, aLocale ) )
{ {
LocaleItem* pLocaleItem = new LocaleItem( std::move(aLocale), false ); LocaleItem* pLocaleItem = new LocaleItem( std::move(aLocale), false );
m_aLocaleItemVector.emplace_back( pLocaleItem ); m_aLocaleItemVector.emplace_back( pLocaleItem );
@@ -1511,7 +1511,7 @@ void StringResourcePersistenceImpl::implScanLocaleNames( const Sequence< OUStrin
} }
else if( !bDefaultFound && aExtension == "default" ) else if( !bDefaultFound && aExtension == "default" )
{ {
if( checkNamingSceme( aPureName, m_aNameBase, aDefaultLocale ) ) if( checkNamingScheme( aPureName, m_aNameBase, aDefaultLocale ) )
bDefaultFound = true; bDefaultFound = true;
} }
} }
@@ -1560,7 +1560,7 @@ bool StringResourcePersistenceImpl::implLoadLocale(std::unique_lock<std::mutex>&
return false; return false;
} }
static OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem ) static OUString implGetNameSchemeForLocaleItem( const LocaleItem* pLocaleItem )
{ {
/* FIXME-BCP47: this uses '_' underscore character as separator and /* FIXME-BCP47: this uses '_' underscore character as separator and
* also appends Variant, which can't be blindly changed as it would * 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[] = "_"; static const char aUnder[] = "_";
assert(pLocaleItem && assert(pLocaleItem &&
"StringResourcePersistenceImpl::implGetNameScemeForLocaleItem(): pLocaleItem == NULL"); "StringResourcePersistenceImpl::implGetNameSchemeForLocaleItem(): pLocaleItem == NULL");
Locale aLocale = pLocaleItem->m_locale; Locale aLocale = pLocaleItem->m_locale;
OUString aRetStr = aUnder + aLocale.Language; OUString aRetStr = aUnder + aLocale.Language;
@@ -1595,7 +1595,7 @@ OUString StringResourcePersistenceImpl::implGetFileNameForLocaleItem
if( aFileName.isEmpty() ) if( aFileName.isEmpty() )
aFileName = aNameBaseDefaultStr; aFileName = aNameBaseDefaultStr;
aFileName += implGetNameScemeForLocaleItem( pLocaleItem ); aFileName += implGetNameSchemeForLocaleItem( pLocaleItem );
return aFileName; return aFileName;
} }
@@ -108,12 +108,12 @@ protected:
/// @throws css::lang::NoSupportException /// @throws css::lang::NoSupportException
void implCheckReadOnly( const char* pExceptionMsg ); 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 // This method compares the locales exactly, no closest match search is performed
/// @throws css::lang::IllegalArgumentException /// @throws css::lang::IllegalArgumentException
LocaleItem* getItemForLocale( const css::lang::Locale& locale, bool bException ); 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 // This method performs a closest match search, at least the language must match
LocaleItem* getClosestMatchItemForLocale( const css::lang::Locale& locale ); LocaleItem* getClosestMatchItemForLocale( const css::lang::Locale& locale );
/// @throws css::lang::IllegalArgumentException /// @throws css::lang::IllegalArgumentException
+2 -2
View File
@@ -313,7 +313,7 @@ eventMethodToDescriptor( std::u16string_view rEventMethod, ScriptEventDescriptor
EventInfoHash& infos = getEventTransInfo(); 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 // or emulate
if ( !sMethodName.isEmpty() if ( !sMethodName.isEmpty()
&& !sTypeName.isEmpty() && !sTypeName.isEmpty()
@@ -326,7 +326,7 @@ eventMethodToDescriptor( std::u16string_view rEventMethod, ScriptEventDescriptor
evtDesc.ListenerType = sTypeName; evtDesc.ListenerType = sTypeName;
evtDesc.EventMethod = sMethodName; 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 // get persisted or shown in property editors
evtDesc.ScriptType = "VBAInterop"; evtDesc.ScriptType = "VBAInterop";
return true; return true;