Class OfficeDocument

  • All Implemented Interfaces:
    com.sun.star.frame.XModel, com.sun.star.frame.XStorable, com.sun.star.lang.XComponent, com.sun.star.lib.uno.Proxy, com.sun.star.uno.IQueryInterface, com.sun.star.uno.XInterface, com.sun.star.util.XModifiable, com.sun.star.util.XModifyBroadcaster, com.sun.star.view.XPrintable

    public class OfficeDocument
    extends java.lang.Object
    implements com.sun.star.frame.XModel, com.sun.star.util.XModifiable, com.sun.star.frame.XStorable, com.sun.star.view.XPrintable
    Wrapper class for service OfficeDocument which emulates the upcoming mode of automatic runtime Java classes to get rid of the need for queryInterface. See further information on the wrapping and compatibility limitations in the base class Wrapper.
    Since:
    OOo 2.0.0
    • Field Summary

      • Fields inherited from interface com.sun.star.lang.XComponent

        UNOTYPEINFO
      • Fields inherited from interface com.sun.star.frame.XModel

        UNOTYPEINFO
      • Fields inherited from interface com.sun.star.util.XModifiable

        UNOTYPEINFO
      • Fields inherited from interface com.sun.star.view.XPrintable

        UNOTYPEINFO
      • Fields inherited from interface com.sun.star.frame.XStorable

        UNOTYPEINFO
    • Constructor Summary

      Constructors 
      Constructor Description
      OfficeDocument​(com.sun.star.frame.XModel xModel)  
    • Constructor Detail

      • OfficeDocument

        public OfficeDocument​(com.sun.star.frame.XModel xModel)
    • Method Detail

      • attachResource

        public boolean attachResource​(java.lang.String aURL,
                                      com.sun.star.beans.PropertyValue[] aArguments)
        Specified by:
        attachResource in interface com.sun.star.frame.XModel
      • getURL

        public java.lang.String getURL()
        Specified by:
        getURL in interface com.sun.star.frame.XModel
      • getArgs

        public com.sun.star.beans.PropertyValue[] getArgs()
        Specified by:
        getArgs in interface com.sun.star.frame.XModel
      • connectController

        public void connectController​(com.sun.star.frame.XController xController)
        Specified by:
        connectController in interface com.sun.star.frame.XModel
      • disconnectController

        public void disconnectController​(com.sun.star.frame.XController xController)
        Specified by:
        disconnectController in interface com.sun.star.frame.XModel
      • lockControllers

        public void lockControllers()
        Specified by:
        lockControllers in interface com.sun.star.frame.XModel
      • unlockControllers

        public void unlockControllers()
        Specified by:
        unlockControllers in interface com.sun.star.frame.XModel
      • hasControllersLocked

        public boolean hasControllersLocked()
        Specified by:
        hasControllersLocked in interface com.sun.star.frame.XModel
      • getCurrentController

        public com.sun.star.frame.XController getCurrentController()
        Specified by:
        getCurrentController in interface com.sun.star.frame.XModel
      • setCurrentController

        public void setCurrentController​(com.sun.star.frame.XController xController)
                                  throws com.sun.star.container.NoSuchElementException
        Specified by:
        setCurrentController in interface com.sun.star.frame.XModel
        Throws:
        com.sun.star.container.NoSuchElementException
      • getCurrentSelection

        public java.lang.Object getCurrentSelection()
        Specified by:
        getCurrentSelection in interface com.sun.star.frame.XModel
      • addModifyListener

        public void addModifyListener​(com.sun.star.util.XModifyListener xListener)
        Specified by:
        addModifyListener in interface com.sun.star.util.XModifyBroadcaster
      • removeModifyListener

        public void removeModifyListener​(com.sun.star.util.XModifyListener xListener)
        Specified by:
        removeModifyListener in interface com.sun.star.util.XModifyBroadcaster
      • isModified

        public boolean isModified()
        Specified by:
        isModified in interface com.sun.star.util.XModifiable
      • setModified

        public void setModified​(boolean bModified)
                         throws com.sun.star.beans.PropertyVetoException
        Specified by:
        setModified in interface com.sun.star.util.XModifiable
        Throws:
        com.sun.star.beans.PropertyVetoException
      • getPrinter

        public com.sun.star.beans.PropertyValue[] getPrinter()
        Specified by:
        getPrinter in interface com.sun.star.view.XPrintable
      • setPrinter

        public void setPrinter​(com.sun.star.beans.PropertyValue[] aPrinter)
                        throws com.sun.star.lang.IllegalArgumentException
        Specified by:
        setPrinter in interface com.sun.star.view.XPrintable
        Throws:
        com.sun.star.lang.IllegalArgumentException
      • print

        public void print​(com.sun.star.beans.PropertyValue[] xOptions)
                   throws com.sun.star.lang.IllegalArgumentException
        Specified by:
        print in interface com.sun.star.view.XPrintable
        Throws:
        com.sun.star.lang.IllegalArgumentException
      • hasLocation

        public boolean hasLocation()
        Specified by:
        hasLocation in interface com.sun.star.frame.XStorable
      • getLocation

        public java.lang.String getLocation()
        Specified by:
        getLocation in interface com.sun.star.frame.XStorable
      • isReadonly

        public boolean isReadonly()
        Specified by:
        isReadonly in interface com.sun.star.frame.XStorable
      • store

        public void store()
                   throws com.sun.star.io.IOException
        Specified by:
        store in interface com.sun.star.frame.XStorable
        Throws:
        com.sun.star.io.IOException
      • storeAsURL

        public void storeAsURL​(java.lang.String aURL,
                               com.sun.star.beans.PropertyValue[] aArguments)
                        throws com.sun.star.io.IOException
        Specified by:
        storeAsURL in interface com.sun.star.frame.XStorable
        Throws:
        com.sun.star.io.IOException
      • storeToURL

        public void storeToURL​(java.lang.String aURL,
                               com.sun.star.beans.PropertyValue[] aArguments)
                        throws com.sun.star.io.IOException
        Specified by:
        storeToURL in interface com.sun.star.frame.XStorable
        Throws:
        com.sun.star.io.IOException
      • getOid

        public java.lang.String getOid()
        Specified by:
        getOid in interface com.sun.star.uno.IQueryInterface
      • isSame

        public boolean isSame​(java.lang.Object aObject)
        Specified by:
        isSame in interface com.sun.star.uno.IQueryInterface
      • queryInterface

        public java.lang.Object queryInterface​(com.sun.star.uno.Type aType)
        Specified by:
        queryInterface in interface com.sun.star.uno.IQueryInterface
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.sun.star.lang.XComponent
      • addEventListener

        public void addEventListener​(com.sun.star.lang.XEventListener xListener)
        Specified by:
        addEventListener in interface com.sun.star.lang.XComponent
      • removeEventListener

        public void removeEventListener​(com.sun.star.lang.XEventListener xListener)
        Specified by:
        removeEventListener in interface com.sun.star.lang.XComponent