Package: ooouno
ooounoooounois a library of all(more than 4300)classes, typings and types for the LibreOfficeAPI.ooounois for version7.4of LibreOfficeAPI.More aboutLibreOffice.DocsRead the docshereInstallationCONDAooounoonAnaconda$condainstall-cconda-forgeooounoFor LibreOffice <=7.3$ conda install-cconda-forge"ooouno>=0.2.5,<1.0"For LibreOffice <=7.2$ conda install-cconda-forge"ooouno<0.2"PIPooounoPyPI$pipinstallooounoFor LibreOffice <=7.3pip install "ooouno>= 0.2.5, < 1.0"For LibreOffice <=7.2pip install "ooouno<0.2"UsageAll class found in LOAPIare recreated in this library.For instance:from ooo.dyn.style.line_spacing import LineSpacingis equivalent tofrom com.sun.star.style import LineSpacingNamespaceThere are four namespaces representing LOAPIin this library.ooo.loNamespaceooo.locontains all static python classes. The format isooo.lo.<ns>.<snake_case_name>.<PascalCaseName>fromooo.lo.uno.x_interfaceimportXInterfacedeffoo(input:str)->XInterface:...ooo.dynNamespaceooo.dyncontains static and dynamic classes depending on class type.
The format isooo.dyn.<ns>.<snake_case_name>.<PascalCaseName>This namespace has dynamic classes that are changed at runtime.
For classes that are dynamic are fully or partially replaced by UNO version at runtime.This allows for typings while in design time (working in IDE) and at runtime UNO classes are created instead.>>>fromooo.dyn.style.line_spacingimportLineSpacingasDynLineSpacing>>>fromooo.lo.style.line_spacingimportLineSpacingasLoLineSpacing>>>dyn_lns=DynLineSpacing(Height=10,Mode=3)>>>lo_lns=LoLineSpacing(Height=10,Mode=3)>>>assertdyn_lns.Height==10>>>assertdyn_lns.Mode==3>>>type(dyn_lns).__name__'com.sun.star.style.LineSpacing'>>>type(lo_lns).__name__'LineSpacing'ooo.cssloAs of version2.0.0theooo.csslonamespace is deprecated. Use theooo.lonamespace instead.Namespaceooo.csslocontains static classes as LOAPIstyle imports.The format isooo.csslo.<ns>.<PascalCaseName>When importing fromooo.cssloall classes in that namespace are also loaded.
Under some circumstances this may not be desired. Such as packaging withstickytape.>>>fromooo.lo.style.line_spacingimportLineSpacingasLoLineSpacing>>>fromooo.csslo.styleimportLineSpacingasCssLineSpacing>>>LoLineSpacingisCssLineSpacingTrue>>>ls=CssLineSpacing()>>>type(ls).__name__'LineSpacing'ooo.cssdynAs of version2.0.0theooo.cssdynnamespace is deprecated. Use theooo.dynnamespace instead.Namespaceooo.cssdyncontains static and dynamic classes depending on class type as LOAPIstyle imports.When importing fromooo.cssdynall classes in that namespace are also loaded.
Under some circumstances this may not be desired. Such as packaging withstickytape.>>>fromooo.dyn.style.line_spacingimportLineSpacingasDynLineSpacing>>>fromooo.cssdyn.styleimportLineSpacingasCssLineSpacing>>>DynLineSpacingisCssLineSpacingTrue>>>ls=CssLineSpacing()>>>type(ls).__name__'com.sun.star.style.LineSpacing'Generally speakingWhen using ooo as typings then import fromooo.loorooo.csslo.When using ooo interactively such as creating struts, enums, singletons, const classes then
import fromooo.dynorooo.cssdyn.DevelopmentDevelopment environment is configured usingpoetry.It is recommended to install virtual environment locally.To Configure poetry to install virtual environment in local folder:poetry config virtualenvs.in-project trueAfter virtual environment has been set up.Linux/MacLink UNO files into virtual environment.oooenv cmd-link -aWindowsRun toggle command to set virtual environment.oooenv env -tSee AlsooooenvOOO Development Tools - Develop DocsRelated ProjectsOOO Development ToolsLibreOffice API TypingsScriptForge TypingsAccess2base TypingsLibreOffice Python UNO ExamplesLibreOffice Developer SearchLibreOffice UNO TypingsOOO UNO TEMPLATE