// Give the new style a light blue background
xStyleProps.setPropertyValue ( "ParaBackColor", new Integer ( 13421823 ) );
// Get the StyleFamiliesSupplier interface of the document
XStyleFamiliesSupplier xSupplier = (XStyleFamiliesSupplier)UnoRuntime.queryInterface (
XStyleFamiliesSupplier.class, mxDoc );
// Use the StyleFamiliesSupplier interface to get the XNameAccess interface of the
// actual style families
XNameAccess xFamilies = ( XNameAccess ) UnoRuntime.queryInterface (
XNameAccess.class, xSupplier.getStyleFamilies() );
// Access the 'ParagraphStyles' Family
XNameContainer xFamily = (XNameContainer ) UnoRuntime.queryInterface (
XNameContainer.class, xFamilies.getByName ( "ParagraphStyles" ) );