java: remove exceptions from throws clauses that are not

.. actually thrown

Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
This commit is contained in:
Noel Grandin 2014-08-05 15:29:21 +02:00
parent b6a83e99c8
commit 616b3ad504
85 changed files with 195 additions and 451 deletions

View File

@ -351,9 +351,6 @@ public class OOoBean
the currently displayed document. the currently displayed document.
*/ */
public synchronized void clearDocument( boolean bClearStateToo ) public synchronized void clearDocument( boolean bClearStateToo )
throws
com.sun.star.util.CloseVetoException,
NoConnectionException
{ {
// TBD // TBD
clear(); clear();
@ -1036,8 +1033,6 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
{@link #setAllBarsVisible setAllBarsVisible}. {@link #setAllBarsVisible setAllBarsVisible}.
*/ */
protected void applyToolVisibilities() protected void applyToolVisibilities()
throws
java.lang.InterruptedException
{ {
bIgnoreVisibility = true; bIgnoreVisibility = true;
setMenuBarVisible( bMenuBarVisible ); setMenuBarVisible( bMenuBarVisible );

View File

@ -62,7 +62,7 @@ class MyCallMe implements XCallMe
} }
// Methods // Methods
public void call( /*IN*/String s, /*IN*/int nToDo ) throws test.TestBridgeException, com.sun.star.uno.RuntimeException public void call( /*IN*/String s, /*IN*/int nToDo ) throws com.sun.star.uno.RuntimeException
{ {
} }

View File

@ -73,7 +73,7 @@ public class StorageFileAccess implements org.hsqldb.lib.FileAccess{
public class FileSync implements FileAccess.FileSync public class FileSync implements FileAccess.FileSync
{ {
NativeOutputStreamHelper os; NativeOutputStreamHelper os;
FileSync(NativeOutputStreamHelper _os) throws java.io.IOException FileSync(NativeOutputStreamHelper _os)
{ {
os = _os; os = _os;
} }

View File

@ -49,7 +49,7 @@ public class JdbcLongVarCharTest extends ComplexTestCase
return "LongVarCharTest"; return "LongVarCharTest";
} }
public void testLongVarChar() throws com.sun.star.uno.Exception, com.sun.star.beans.UnknownPropertyException public void testLongVarChar()
{ {
try try

View File

@ -105,7 +105,7 @@ public class CRMDatabase
} }
public void saveAndClose() throws SQLException, IOException public void saveAndClose() throws IOException
{ {
XDatabaseDocumentUI ui = getDocumentUI(); XDatabaseDocumentUI ui = getDocumentUI();
if ( ui != null ) if ( ui != null )

View File

@ -36,9 +36,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.URL; import com.sun.star.util.URL;
import com.sun.star.util.XURLTransformer; import com.sun.star.util.XURLTransformer;
import com.sun.star.view.XSelectionSupplier; import com.sun.star.view.XSelectionSupplier;
import java.io.IOException;
// ---------- junit imports ----------------- // ---------- junit imports -----------------
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
@ -81,7 +78,7 @@ public class Beamer extends TestCase
@Test @Test
public void testBeamer() throws Exception, IOException, java.lang.Exception public void testBeamer() throws Exception, java.lang.Exception
{ {
final XController controller = docModel.getCurrentController(); final XController controller = docModel.getCurrentController();
final XFrame frame = controller.getFrame(); final XFrame frame = controller.getFrame();

View File

@ -148,7 +148,7 @@ public class CopyTableWizard extends CRMBasedTestCase
} }
} }
private void copyTable(final String tableName, final XConnection sourceConnection, final XConnection destConnection) throws Exception, IOException, java.lang.Exception private void copyTable(final String tableName, final XConnection sourceConnection, final XConnection destConnection) throws Exception, java.lang.Exception
{ {
final XInteractionHandler interAction = new CopyTableInterActionHandler(); final XInteractionHandler interAction = new CopyTableInterActionHandler();

View File

@ -347,7 +347,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
} }
private void impl_closeDocument(XModel _databaseDoc) throws CloseVetoException, IOException, Exception private void impl_closeDocument(XModel _databaseDoc) throws CloseVetoException, Exception
{ {
final XCloseable closeDoc = UnoRuntime.queryInterface(XCloseable.class, _databaseDoc); final XCloseable closeDoc = UnoRuntime.queryInterface(XCloseable.class, _databaseDoc);
closeDoc.close(true); closeDoc.close(true);
@ -511,7 +511,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
} }
private void impl_storeDocument( final XModel _document ) throws Exception, IOException private void impl_storeDocument( final XModel _document ) throws Exception
{ {
// store the document // store the document
final String documentURL = FileHelper.getOOoCompatibleFileURL( _document.getURL() ); final String documentURL = FileHelper.getOOoCompatibleFileURL( _document.getURL() );

View File

@ -203,7 +203,7 @@ public class PropertyBag extends TestCase
} }
@Test @Test
public void checkDynamicSet() throws com.sun.star.uno.Exception public void checkDynamicSet()
{ {
System.out.println( "checking proper dynamic of the set" ); System.out.println( "checking proper dynamic of the set" );
createStandardBag( false ); createStandardBag( false );

View File

@ -54,7 +54,7 @@ public class OfficeResourceLoader
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
@After public void after() throws com.sun.star.uno.Exception, java.lang.Exception @After public void after() throws java.lang.Exception
{ {
} }
@ -94,7 +94,7 @@ public class OfficeResourceLoader
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
@Test public void checkLocales() throws com.sun.star.uno.Exception, java.lang.Exception @Test public void checkLocales() throws java.lang.Exception
{ {
// en-US bundle (should always be built and thus present and thus found) // en-US bundle (should always be built and thus present and thus found)
m_bundle = m_loader.loadBundle( "orl", new Locale( "en", "US", "" ) ); m_bundle = m_loader.loadBundle( "orl", new Locale( "en", "US", "" ) );

View File

@ -65,7 +65,7 @@ public class ObjectInspector extends complexlib.ComplexTestCase
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void after() throws com.sun.star.uno.Exception, java.lang.Exception public void after() throws java.lang.Exception
{ {
closeExistentInspector(); closeExistentInspector();
} }

View File

@ -44,13 +44,13 @@ public class TestSkeleton extends complexlib.ComplexTestCase
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void before() throws com.sun.star.uno.Exception, java.lang.Exception public void before() throws java.lang.Exception
{ {
m_orb = param.getMSF(); m_orb = param.getMSF();
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void after() throws com.sun.star.uno.Exception, java.lang.Exception public void after() throws java.lang.Exception
{ {
} }

View File

@ -17,8 +17,6 @@
*/ */
import java.io.IOException;
import com.sun.star.bridge.UnoUrlResolver; import com.sun.star.bridge.UnoUrlResolver;
import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.comp.helper.Bootstrap; import com.sun.star.comp.helper.Bootstrap;
@ -39,7 +37,7 @@ import com.sun.star.uno.XNamingService;
public class TestPGP { public class TestPGP {
static void doSomething(Object r) throws com.sun.star.uno.Exception, IOException, Exception { static void doSomething(Object r) throws com.sun.star.uno.Exception, Exception {
XNamingService rName = UnoRuntime.queryInterface(XNamingService.class, r); XNamingService rName = UnoRuntime.queryInterface(XNamingService.class, r);
if(rName != null) { if(rName != null) {

View File

@ -98,7 +98,7 @@ public class CellBinding extends complexlib.ComplexTestCase
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void after() throws com.sun.star.uno.Exception, java.lang.Exception public void after() throws java.lang.Exception
{ {
closeDocument(); closeDocument();
} }

View File

@ -59,7 +59,7 @@ public class ControlValidation extends complexlib.ComplexTestCase implements com
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/* test framework */ /* test framework */
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void before() throws com.sun.star.uno.Exception, java.lang.Exception public void before() throws java.lang.Exception
{ {
m_orb = param.getMSF(); m_orb = param.getMSF();
} }

View File

@ -31,7 +31,6 @@ import com.sun.star.form.runtime.FormFeature;
import com.sun.star.form.runtime.XFormController; import com.sun.star.form.runtime.XFormController;
import com.sun.star.form.runtime.XFormOperations; import com.sun.star.form.runtime.XFormOperations;
import com.sun.star.sdb.CommandType; import com.sun.star.sdb.CommandType;
import com.sun.star.sdbc.SQLException;
import com.sun.star.sdbc.XParameters; import com.sun.star.sdbc.XParameters;
import com.sun.star.sdbc.XPreparedStatement; import com.sun.star.sdbc.XPreparedStatement;
import com.sun.star.uno.Exception; import com.sun.star.uno.Exception;
@ -140,7 +139,7 @@ public class ListBox extends TestCase
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
private String[] impl_getTypedValue( final String _asType, final int _rowNum ) throws SQLException private String[] impl_getTypedValue( final String _asType, final int _rowNum )
{ {
Map< String, String[] > valueMap = new HashMap< String, String[] >(); Map< String, String[] > valueMap = new HashMap< String, String[] >();
valueMap.put( "bigint", new String[] { "1111111111", "222222222" } ); valueMap.put( "bigint", new String[] { "1111111111", "222222222" } );

View File

@ -59,7 +59,7 @@ public class RadioButtons extends complexlib.ComplexTestCase
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void before() throws com.sun.star.uno.Exception, java.lang.Exception public void before() throws java.lang.Exception
{ {
m_orb = param.getMSF(); m_orb = param.getMSF();
} }

View File

@ -39,7 +39,7 @@ public class SpreadsheetDocument extends DocumentHelper
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public SpreadsheetDocument( XMultiServiceFactory orb, XComponent document ) throws com.sun.star.uno.Exception public SpreadsheetDocument( XMultiServiceFactory orb, XComponent document )
{ {
super( orb, document ); super( orb, document );
} }
@ -47,7 +47,7 @@ public class SpreadsheetDocument extends DocumentHelper
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/** returns the sheets collection /** returns the sheets collection
*/ */
public XSpreadsheets getSheets() throws com.sun.star.uno.Exception public XSpreadsheets getSheets()
{ {
XSpreadsheetDocument spreadsheetDoc = UnoRuntime.queryInterface( XSpreadsheetDocument.class, XSpreadsheetDocument spreadsheetDoc = UnoRuntime.queryInterface( XSpreadsheetDocument.class,
getDocument() getDocument()

View File

@ -42,13 +42,13 @@ public abstract class TestCase extends complexlib.ComplexTestCase implements com
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void before() throws com.sun.star.uno.Exception, java.lang.Exception public void before() throws java.lang.Exception
{ {
m_orb = param.getMSF(); m_orb = param.getMSF();
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void after() throws com.sun.star.uno.Exception, java.lang.Exception public void after() throws java.lang.Exception
{ {
} }

View File

@ -71,7 +71,7 @@ public class ValueBinding extends integration.forms.TestCase
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void checkBindingProperties() throws com.sun.star.uno.Exception, java.lang.Exception public void checkBindingProperties() throws java.lang.Exception
{ {
} }

View File

@ -147,7 +147,6 @@ public class DesktopTerminate
} }
@AfterClass public static void tearDownConnection() @AfterClass public static void tearDownConnection()
throws InterruptedException, com.sun.star.uno.Exception
{ {
System.out.println("tearDownConnection()"); System.out.println("tearDownConnection()");
// don't do a tearDown here, desktop is already terminated. // don't do a tearDown here, desktop is already terminated.

View File

@ -87,7 +87,6 @@ public class GetServiceWhileDisposingOffice
@AfterClass @AfterClass
public static void tearDownConnection() public static void tearDownConnection()
throws InterruptedException, com.sun.star.uno.Exception
{ {
System.out.println("tearDownConnection()"); System.out.println("tearDownConnection()");
// Office is already terminated. // Office is already terminated.

View File

@ -281,12 +281,7 @@ public class RecoveryTest extends ComplexTestCase {
if (cancel) { if (cancel) {
log.println("clicking 'Cancel' button..."); log.println("clicking 'Cancel' button...");
try{ rt.clickThreadButton(xMSF, xWindow, "Cancel");
rt.clickThreadButton(xMSF, xWindow, "Cancel");
} catch (com.sun.star.accessibility.IllegalAccessibleComponentStateException e){
failed("Could not click 'Cancel' at CrashReporter Dialog");
}
} }
else { else {
log.println("clicking 'Next' button..."); log.println("clicking 'Next' button...");
@ -377,11 +372,7 @@ public class RecoveryTest extends ComplexTestCase {
if (cancel) { if (cancel) {
log.println("clicking 'Cancel' button..."); log.println("clicking 'Cancel' button...");
try{ rt.clickThreadButton(xMSF, xWindow, "Cancel");
rt.clickThreadButton(xMSF, xWindow, "Cancel");
} catch (com.sun.star.accessibility.IllegalAccessibleComponentStateException e){
failed("Could not click 'Cancel' at recovery-dialog.");
}
} }
else { else {
@ -394,11 +385,7 @@ public class RecoveryTest extends ComplexTestCase {
} else { } else {
log.println("do not recover: clicking 'Cancel' button..."); log.println("do not recover: clicking 'Cancel' button...");
try{ rt.clickThreadButton(xMSF, xWindow, "Cancel");
rt.clickThreadButton(xMSF, xWindow, "Cancel");
} catch (com.sun.star.accessibility.IllegalAccessibleComponentStateException e){
failed("Could not click 'Cancel' at recovery-dialog");
}
} }
} catch (Exception e){ } catch (Exception e){

View File

@ -300,7 +300,6 @@ public class RecoveryTools {
} }
public void clickThreadButton(XMultiServiceFactory xMSF, XWindow xWindow, String buttonName) public void clickThreadButton(XMultiServiceFactory xMSF, XWindow xWindow, String buttonName)
throws com.sun.star.accessibility.IllegalAccessibleComponentStateException
{ {
KlickButtonThread kbt = new KlickButtonThread(xMSF, xWindow, buttonName); KlickButtonThread kbt = new KlickButtonThread(xMSF, xWindow, buttonName);
kbt.start(); kbt.start();

View File

@ -50,7 +50,6 @@ public class Factory_Test
} }
public Factory_Test( XComponentContext xContext ) public Factory_Test( XComponentContext xContext )
throws com.sun.star.uno.Exception
{ {
if (null == xContext.getValueByName( "/singletons/com.sun.star.lang.theServiceManager" )) if (null == xContext.getValueByName( "/singletons/com.sun.star.lang.theServiceManager" ))
{ {
@ -60,7 +59,6 @@ public class Factory_Test
} }
public static Object __create( XComponentContext xContext ) public static Object __create( XComponentContext xContext )
throws com.sun.star.uno.Exception
{ {
return new Factory_Test( xContext ); return new Factory_Test( xContext );
} }

View File

@ -27,7 +27,7 @@ public class GlobalFile {
* return null. * return null.
*/ */
public static File createTempDir(String prefix, String directory) public static File createTempDir(String prefix, String directory)
throws IOException { {
File f = null; File f = null;
String tempDir; String tempDir;
boolean isCreated = false; boolean isCreated = false;

View File

@ -201,8 +201,7 @@ public class ChartInDraw
public void testThreeD() public void testThreeD()
throws RuntimeException, UnknownPropertyException, PropertyVetoException, throws RuntimeException, UnknownPropertyException, PropertyVetoException,
com.sun.star.lang.IllegalArgumentException, WrappedTargetException, com.sun.star.lang.IllegalArgumentException, WrappedTargetException
com.sun.star.lang.IndexOutOfBoundsException
{ {
XPropertySet aDiaProp = UnoRuntime.queryInterface( XPropertySet.class, maDiagram ); XPropertySet aDiaProp = UnoRuntime.queryInterface( XPropertySet.class, maDiagram );
Boolean aTrue = new Boolean( true ); Boolean aTrue = new Boolean( true );

View File

@ -113,7 +113,7 @@ public class CodeSamples
} }
// check if the connection is not null aand dispose it later on. // check if the connection is not null aand dispose it later on.
public static void checkConnection(XConnection con) throws com.sun.star.uno.Exception public static void checkConnection(XConnection con)
{ {
if(con != null) if(con != null)
{ {

View File

@ -176,7 +176,7 @@ public class sdbcx
// 15. example // 15. example
// print all columns of a XColumnsSupplier // print all columns of a XColumnsSupplier
public static void printColumns(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException public static void printColumns(XColumnsSupplier xColumnsSup)
{ {
System.out.println("Example printColumns"); System.out.println("Example printColumns");
// the table must be at least support a XColumnsSupplier interface // the table must be at least support a XColumnsSupplier interface
@ -190,7 +190,7 @@ public class sdbcx
// 16. example // 16. example
// print all keys inclusive the columns of a key // print all keys inclusive the columns of a key
public static void printKeys(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException public static void printKeys(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception
{ {
System.out.println("Example printKeys"); System.out.println("Example printKeys");
XKeysSupplier xKeysSup = UnoRuntime.queryInterface(XKeysSupplier.class,xColumnsSup); XKeysSupplier xKeysSup = UnoRuntime.queryInterface(XKeysSupplier.class,xColumnsSup);
@ -212,7 +212,7 @@ public class sdbcx
// 17. example // 17. example
// print all keys inclusive the columns of a key // print all keys inclusive the columns of a key
public static void printIndexes(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException public static void printIndexes(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception
{ {
System.out.println("Example printIndexes"); System.out.println("Example printIndexes");
XIndexesSupplier xIndexesSup = UnoRuntime.queryInterface(XIndexesSupplier.class,xColumnsSup); XIndexesSupplier xIndexesSup = UnoRuntime.queryInterface(XIndexesSupplier.class,xColumnsSup);
@ -235,7 +235,7 @@ public class sdbcx
// 18. example // 18. example
// column properties // column properties
public static void printColumnProperties(Object column) throws com.sun.star.uno.Exception,SQLException public static void printColumnProperties(Object column) throws com.sun.star.uno.Exception
{ {
System.out.println("Example printColumnProperties"); System.out.println("Example printColumnProperties");
XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,column); XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,column);
@ -260,7 +260,7 @@ public class sdbcx
// 19. example // 19. example
// index properties // index properties
public static void printIndexProperties(Object index) throws com.sun.star.uno.Exception,SQLException public static void printIndexProperties(Object index) throws com.sun.star.uno.Exception
{ {
System.out.println("Example printIndexProperties"); System.out.println("Example printIndexProperties");
XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,index); XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,index);
@ -275,7 +275,7 @@ public class sdbcx
// 20. example // 20. example
// key properties // key properties
public static void printKeyProperties(Object key) throws com.sun.star.uno.Exception,SQLException public static void printKeyProperties(Object key) throws com.sun.star.uno.Exception
{ {
System.out.println("Example printKeyProperties"); System.out.println("Example printKeyProperties");
XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,key); XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,key);

View File

@ -270,7 +270,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
public short executeDialogWithembeddedExampleSnippets() throws com.sun.star.script.BasicErrorException { public short executeDialogWithembeddedExampleSnippets() {
if (m_xWindowPeer == null){ if (m_xWindowPeer == null){
createWindowPeer(); createWindowPeer();
} }
@ -282,7 +282,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
} }
public short executeDialog() throws com.sun.star.script.BasicErrorException { public short executeDialog() {
if (m_xWindowPeer == null) { if (m_xWindowPeer == null) {
createWindowPeer(); createWindowPeer();
} }
@ -299,7 +299,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
} }
public void initialize(String[] PropertyNames, Object[] PropertyValues) throws com.sun.star.script.BasicErrorException{ public void initialize(String[] PropertyNames, Object[] PropertyValues) {
try{ try{
XMultiPropertySet xMultiPropertySet = UnoRuntime.queryInterface(XMultiPropertySet.class, m_xDlgModelNameContainer); XMultiPropertySet xMultiPropertySet = UnoRuntime.queryInterface(XMultiPropertySet.class, m_xDlgModelNameContainer);
xMultiPropertySet.setPropertyValues(PropertyNames, PropertyValues); xMultiPropertySet.setPropertyValues(PropertyNames, PropertyValues);
@ -317,7 +317,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
* @return * @return
* @throws java.lang.Exception * @throws java.lang.Exception
*/ */
public XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) throws com.sun.star.script.BasicErrorException{ public XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) {
try{ try{
if (_xWindowParentPeer == null){ if (_xWindowParentPeer == null){
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer);
@ -357,7 +357,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
* @return * @return
* @throws java.lang.Exception * @throws java.lang.Exception
*/ */
public XWindowPeer createWindowPeer() throws com.sun.star.script.BasicErrorException{ public XWindowPeer createWindowPeer() {
return createWindowPeer(null); return createWindowPeer(null);
} }
@ -366,7 +366,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
} }
public Object insertControlModel(String ServiceName, String sName, String[] sProperties, Object[] sValues) throws com.sun.star.script.BasicErrorException{ public Object insertControlModel(String ServiceName, String sName, String[] sProperties, Object[] sValues) {
try { try {
Object oControlModel = m_xMSFDialogModel.createInstance(ServiceName); Object oControlModel = m_xMSFDialogModel.createInstance(ServiceName);
XMultiPropertySet xControlMultiPropertySet = UnoRuntime.queryInterface(XMultiPropertySet.class, oControlModel); XMultiPropertySet xControlMultiPropertySet = UnoRuntime.queryInterface(XMultiPropertySet.class, oControlModel);

View File

@ -122,8 +122,7 @@ public class LinguisticExamples
/** Get the SpellChecker to be used. /** Get the SpellChecker to be used.
*/ */
public boolean GetSpell() public boolean GetSpell()
throws com.sun.star.uno.Exception, throws com.sun.star.uno.RuntimeException
com.sun.star.uno.RuntimeException
{ {
if (mxLinguSvcMgr != null) if (mxLinguSvcMgr != null)
mxSpell = mxLinguSvcMgr.getSpellChecker(); mxSpell = mxLinguSvcMgr.getSpellChecker();
@ -133,8 +132,7 @@ public class LinguisticExamples
/** Get the Hyphenator to be used. /** Get the Hyphenator to be used.
*/ */
public boolean GetHyph() public boolean GetHyph()
throws com.sun.star.uno.Exception, throws com.sun.star.uno.RuntimeException
com.sun.star.uno.RuntimeException
{ {
if (mxLinguSvcMgr != null) if (mxLinguSvcMgr != null)
mxHyph = mxLinguSvcMgr.getHyphenator(); mxHyph = mxLinguSvcMgr.getHyphenator();
@ -144,8 +142,7 @@ public class LinguisticExamples
/** Get the Thesaurus to be used. /** Get the Thesaurus to be used.
*/ */
public boolean GetThes() public boolean GetThes()
throws com.sun.star.uno.Exception, throws com.sun.star.uno.RuntimeException
com.sun.star.uno.RuntimeException
{ {
if (mxLinguSvcMgr != null) if (mxLinguSvcMgr != null)
mxThes = mxLinguSvcMgr.getThesaurus(); mxThes = mxLinguSvcMgr.getThesaurus();

View File

@ -234,14 +234,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
} }
else else
{ {
try OfficePrint.convertDocument(_sInputFile, _sReferencePath, aGTA);
{
OfficePrint.convertDocument(_sInputFile, _sReferencePath, aGTA);
}
catch(ConvWatchCancelException e)
{
assure(e.getMessage(), false);
}
} }
if (aGTA.restartOffice()) if (aGTA.restartOffice())

View File

@ -1064,7 +1064,7 @@ public class OfficePrint {
} }
public static void convertDocument(String _sInputFile, String _sOutputPath, GraphicalTestArguments _aGTA) throws ConvWatchCancelException public static void convertDocument(String _sInputFile, String _sOutputPath, GraphicalTestArguments _aGTA)
{ {
XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory(); XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory();
if (xMSF == null) if (xMSF == null)

View File

@ -878,7 +878,7 @@ public class OpenOfficePostscriptCreator implements IOffice
} }
public void convertDocument(String _sInputFile, String _sOutputPath, ParameterHelper _aGTA) throws OfficeException public void convertDocument(String _sInputFile, String _sOutputPath, ParameterHelper _aGTA)
{ {
XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory(); XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory();
if (xMSF == null) if (xMSF == null)

View File

@ -76,11 +76,8 @@ public class ConfigurationRead {
* @param name The hierarchical name of a subnode. * @param name The hierarchical name of a subnode.
* @return True, if the node exists. * @return True, if the node exists.
*/ */
public boolean hasByHieracrhicalName(String name) throws NoSuchElementException, public boolean hasByHieracrhicalName(String name) {
com.sun.star.lang.WrappedTargetException {
return root.hasByHierarchicalName(name); return root.hasByHierarchicalName(name);
} }
@ -89,7 +86,6 @@ public class ConfigurationRead {
* @return All elements of the root node. * @return All elements of the root node.
*/ */
public String[] getRootNodeNames() { public String[] getRootNodeNames() {
XNameAccess xName = UnoRuntime.queryInterface(XNameAccess.class, root); XNameAccess xName = UnoRuntime.queryInterface(XNameAccess.class, root);
String[]names = xName.getElementNames(); String[]names = xName.getElementNames();
return names; return names;

View File

@ -17,7 +17,6 @@
*/ */
package helper; package helper;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.inspection.LineDescriptor; import com.sun.star.inspection.LineDescriptor;
import com.sun.star.inspection.XPropertyControlFactory; import com.sun.star.inspection.XPropertyControlFactory;
import com.sun.star.inspection.XPropertyHandler; import com.sun.star.inspection.XPropertyHandler;
@ -240,7 +239,7 @@ public class PropertyHandlerImpl implements XPropertyHandler{
/** /**
* This method currently does nothing * This method currently does nothing
*/ */
public void describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory) throws UnknownPropertyException, com.sun.star.lang.NullPointerException { public void describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory) {
} }
} }

View File

@ -241,7 +241,7 @@ public class SOfficeFactory {
* creates a simple TextTable defaultet to 2 rows and 2 columns * creates a simple TextTable defaultet to 2 rows and 2 columns
*/ */
public static XTextTable createTextTable(XTextDocument xTextDoc) public static XTextTable createTextTable(XTextDocument xTextDoc)
throws com.sun.star.uno.Exception { {
TableDsc tDsc = new TableDsc(); TableDsc tDsc = new TableDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc); InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@ -255,7 +255,7 @@ public class SOfficeFactory {
*/ */
public static XTextTable createTextTable(XTextDocument xTextDoc, public static XTextTable createTextTable(XTextDocument xTextDoc,
int rows, int columns) int rows, int columns)
throws com.sun.star.uno.Exception { {
TableDsc tDsc = new TableDsc(rows, columns); TableDsc tDsc = new TableDsc(rows, columns);
InstCreator instCreate = new InstCreator(xTextDoc, tDsc); InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@ -269,7 +269,7 @@ public class SOfficeFactory {
* ... to be continued * ... to be continued
*/ */
public static XTextFrame createTextFrame(XTextDocument xTextDoc) public static XTextFrame createTextFrame(XTextDocument xTextDoc)
throws com.sun.star.uno.Exception { {
FrameDsc tDsc = new FrameDsc(); FrameDsc tDsc = new FrameDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc); InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@ -293,7 +293,7 @@ public class SOfficeFactory {
} }
public static void insertString(XTextDocument xTextDoc, String cString) public static void insertString(XTextDocument xTextDoc, String cString)
throws com.sun.star.uno.Exception { {
XText xText = xTextDoc.getText(); XText xText = xTextDoc.getText();
XText oText = UnoRuntime.queryInterface( XText oText = UnoRuntime.queryInterface(
XText.class, xText); XText.class, xText);
@ -328,7 +328,7 @@ public class SOfficeFactory {
* the method createBookmark * the method createBookmark
*/ */
public static XTextContent createBookmark(XTextDocument xTextDoc) public static XTextContent createBookmark(XTextDocument xTextDoc)
throws com.sun.star.uno.Exception { {
BookmarkDsc tDsc = new BookmarkDsc(); BookmarkDsc tDsc = new BookmarkDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc); InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@ -342,7 +342,7 @@ public class SOfficeFactory {
* the method createReferenceMark * the method createReferenceMark
*/ */
public static XTextContent createReferenceMark(XTextDocument xTextDoc) public static XTextContent createReferenceMark(XTextDocument xTextDoc)
throws com.sun.star.uno.Exception { {
ReferenceMarkDsc tDsc = new ReferenceMarkDsc(); ReferenceMarkDsc tDsc = new ReferenceMarkDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc); InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@ -356,7 +356,7 @@ public class SOfficeFactory {
* the method createFootnote * the method createFootnote
*/ */
public static XTextContent createFootnote(XTextDocument xTextDoc) public static XTextContent createFootnote(XTextDocument xTextDoc)
throws com.sun.star.uno.Exception { {
FootnoteDsc tDsc = new FootnoteDsc(); FootnoteDsc tDsc = new FootnoteDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc); InstCreator instCreate = new InstCreator(xTextDoc, tDsc);

View File

@ -210,7 +210,7 @@ public class _XTreeControl extends MultiMethodTest {
} }
} }
public void _isNodeExpanded() throws ExpandVetoException{ public void _isNodeExpanded() {
boolean bOK = true; boolean bOK = true;

View File

@ -18,7 +18,6 @@
package ifc.registry; package ifc.registry;
import com.sun.star.registry.CannotRegisterImplementationException;
import com.sun.star.registry.XImplementationRegistration; import com.sun.star.registry.XImplementationRegistration;
import com.sun.star.registry.XSimpleRegistry; import com.sun.star.registry.XSimpleRegistry;
import com.sun.star.uno.RuntimeException; import com.sun.star.uno.RuntimeException;
@ -62,7 +61,7 @@ public class _XImplementationRegistration extends MultiMethodTest {
* *
*/ */
public void _registerImplementation() public void _registerImplementation()
throws CannotRegisterImplementationException, RuntimeException throws RuntimeException
{ {
url = util.utils.getFullTestURL("qadevlibs/MyPersistObjectImpl.jar"); url = util.utils.getFullTestURL("qadevlibs/MyPersistObjectImpl.jar");
loader = "com.sun.star.loader.Java2"; loader = "com.sun.star.loader.Java2";

View File

@ -69,13 +69,7 @@ public class SwAccessibleTableCellView extends TestCase {
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF()); SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF());
try { oTable = SOfficeFactory.createTextTable(xTextDoc);
oTable = SOfficeFactory.createTextTable(xTextDoc);
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
throw new StatusException("Couldn't create TextTable : " +
e.getMessage(), e);
}
try { try {
SOfficeFactory.insertTextContent(xTextDoc, oTable); SOfficeFactory.insertTextContent(xTextDoc, oTable);

View File

@ -71,13 +71,7 @@ public class SwAccessibleTableView extends TestCase {
XTextTable oTable = null; XTextTable oTable = null;
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF()); SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
try { oTable = SOfficeFactory.createTextTable( xTextDoc );
oTable = SOfficeFactory.createTextTable( xTextDoc );
} catch ( com.sun.star.uno.Exception e ) {
e.printStackTrace( log );
throw new StatusException("Couldn't create TextTable : " +
e.getMessage(), e);
}
try { try {
SOfficeFactory.insertTextContent(xTextDoc, oTable ); SOfficeFactory.insertTextContent(xTextDoc, oTable );

View File

@ -87,14 +87,9 @@ public class SwXBookmark extends TestCase {
XInterface oObj = null; XInterface oObj = null;
Object instance = null; Object instance = null;
log.println( "creating a test environment" ); log.println( "creating a test environment" );
try { oObj = SOfficeFactory.createBookmark( xTextDoc );
oObj = SOfficeFactory.createBookmark( xTextDoc ); SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj );
SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj ); instance = SOF.createInstance(xTextDoc,"com.sun.star.text.Bookmark");
instance = SOF.createInstance(xTextDoc,"com.sun.star.text.Bookmark");
} catch ( com.sun.star.uno.Exception e ) {
e.printStackTrace( log );
throw new StatusException( "Couldn't create Bookmark", e );
}
log.println( "creating a new environment for bodytext object" ); log.println( "creating a new environment for bodytext object" );
TestEnvironment tEnv = new TestEnvironment( oObj ); TestEnvironment tEnv = new TestEnvironment( oObj );

View File

@ -85,15 +85,10 @@ public class SwXBookmarks extends TestCase {
XInterface oObj = null; XInterface oObj = null;
log.println( "creating a test environment" ); log.println( "creating a test environment" );
try { oObj = SOfficeFactory.createBookmark( xTextDoc );
oObj = SOfficeFactory.createBookmark( xTextDoc ); SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj );
SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj ); oObj = SOfficeFactory.createBookmark( xTextDoc );
oObj = SOfficeFactory.createBookmark( xTextDoc ); SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj );
SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj );
} catch( com.sun.star.uno.Exception e ) {
e.printStackTrace( log );
throw new StatusException( "Couldn't create Bookmark", e );
}
XBookmarksSupplier oBSupp = UnoRuntime.queryInterface(XBookmarksSupplier.class, xTextDoc); XBookmarksSupplier oBSupp = UnoRuntime.queryInterface(XBookmarksSupplier.class, xTextDoc);
XNameAccess oBookNA = oBSupp.getBookmarks(); XNameAccess oBookNA = oBSupp.getBookmarks();

View File

@ -91,12 +91,7 @@ public class SwXCell extends TestCase {
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
log.println( "creating a test environment" ); log.println( "creating a test environment" );
try { oTable = SOfficeFactory.createTextTable(xTextDoc, 3, 4);
oTable = SOfficeFactory.createTextTable(xTextDoc, 3, 4);
} catch ( com.sun.star.uno.Exception e ) {
log.println("Unable to create TextTable...");
e.printStackTrace(log);
}
try { try {
SOfficeFactory.insertTextContent( xTextDoc, oTable ); SOfficeFactory.insertTextContent( xTextDoc, oTable );
} catch ( com.sun.star.lang.IllegalArgumentException e ) { } catch ( com.sun.star.lang.IllegalArgumentException e ) {

View File

@ -92,14 +92,8 @@ public class SwXCellRange extends TestCase {
XTextTable the_table = null; XTextTable the_table = null;
XInterface oObj = null; XInterface oObj = null;
try { the_table = SOfficeFactory.createTextTable( xTextDoc );
the_table = SOfficeFactory.createTextTable( xTextDoc ); the_table.initialize(5, 5);
the_table.initialize(5, 5);
} catch ( com.sun.star.uno.Exception e ) {
e.printStackTrace( log );
throw new StatusException("Couldn't create testobj: "
+e.getMessage(),e);
}
if( SOfficeFactory.getTableCollection( xTextDoc ).getCount() == 0 ) { if( SOfficeFactory.getTableCollection( xTextDoc ).getCount() == 0 ) {
try { try {

View File

@ -117,13 +117,7 @@ public class SwXTableCellText extends TestCase {
XTextTable oTable = null; XTextTable oTable = null;
log.println( "Creating a test environment" ); log.println( "Creating a test environment" );
try { oTable = SOfficeFactory.createTextTable( xTextDoc );
oTable = SOfficeFactory.createTextTable( xTextDoc );
} catch ( com.sun.star.uno.Exception e ) {
e.printStackTrace( log );
throw new StatusException("Couldn't create TextTable : "
+e.getMessage(),e);
}
try { try {
SOfficeFactory.insertTextContent(xTextDoc, oTable ); SOfficeFactory.insertTextContent(xTextDoc, oTable );

View File

@ -92,13 +92,7 @@ public class SwXTableColumns extends TestCase {
log.println( "creating a test environment" ); log.println( "creating a test environment" );
try { oTable = SOfficeFactory.createTextTable( xTextDoc );
oTable = SOfficeFactory.createTextTable( xTextDoc );
} catch ( com.sun.star.uno.Exception e ) {
e.printStackTrace( log );
throw new StatusException("Couldn't create TextTable: "
+e.getMessage(),e);
}
try { try {
SOfficeFactory.insertTextContent(xTextDoc, oTable ); SOfficeFactory.insertTextContent(xTextDoc, oTable );

View File

@ -87,13 +87,7 @@ public class SwXTableRows extends TestCase {
log.println( "creating a test environment" ); log.println( "creating a test environment" );
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
try { oTable = SOfficeFactory.createTextTable( xTextDoc );
oTable = SOfficeFactory.createTextTable( xTextDoc );
} catch ( com.sun.star.uno.Exception e ) {
e.printStackTrace( log );
throw new StatusException("Couldn't create TextTable: "
+e.getMessage(),e);
}
try { try {
SOfficeFactory.insertTextContent(xTextDoc, oTable ); SOfficeFactory.insertTextContent(xTextDoc, oTable );

View File

@ -84,14 +84,8 @@ public class SwXTextTable extends TestCase {
TestEnvironment tEnv = null; TestEnvironment tEnv = null;
Object instance = null; Object instance = null;
try { oObj = SOfficeFactory.createTextTable(xTextDoc);
oObj = SOfficeFactory.createTextTable(xTextDoc); instance = SOfficeFactory.createTextTable(xTextDoc);
instance = SOfficeFactory.createTextTable(xTextDoc);
} catch (com.sun.star.uno.Exception uE) {
uE.printStackTrace(log);
throw new StatusException("Couldn't create testobj : " +
uE.getMessage(), uE);
}
int nRow = 6; int nRow = 6;
int nCol = 2; int nCol = 2;

View File

@ -86,15 +86,8 @@ public class SwXTextTableCursor extends TestCase {
// create testobject here // create testobject here
XTextTable oTable = null; XTextTable oTable = null;
try { oTable = SOfficeFactory.createTextTable( xTextDoc );
oTable = SOfficeFactory.createTextTable( xTextDoc ); SOfficeFactory.insertTextContent(xTextDoc, oTable );
SOfficeFactory.insertTextContent(xTextDoc, oTable );
}
catch( com.sun.star.uno.Exception uE ) {
uE.printStackTrace( log );
throw new StatusException("Couldn't create TextTable : "
+ uE.getMessage(), uE);
}
oObj = oTable.createCursorByCellName("A1"); oObj = oTable.createCursorByCellName("A1");

View File

@ -309,10 +309,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
private void fillParameter(final Map parameters, private void fillParameter(final Map parameters,
final XRowSet rowSet, final ParameterDefinition paramDef) final XRowSet rowSet, final ParameterDefinition paramDef)
throws SQLException, throws SQLException,
UnknownPropertyException, IllegalArgumentException
PropertyVetoException,
IllegalArgumentException,
WrappedTargetException
{ {
final ArrayList<?> masterValues = (ArrayList<?>) parameters.get(MASTER_VALUES); final ArrayList<?> masterValues = (ArrayList<?>) parameters.get(MASTER_VALUES);
if (masterValues != null && !masterValues.isEmpty()) if (masterValues != null && !masterValues.isEmpty())

View File

@ -792,7 +792,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
} }
protected void startReportSection(final AttributeMap attrs, final int role) protected void startReportSection(final AttributeMap attrs, final int role)
throws IOException, DataSourceException, ReportProcessingException throws ReportProcessingException
{ {
if (allowBuffering(role)) if (allowBuffering(role))
{ {
@ -804,7 +804,6 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
throws IOException, DataSourceException, ReportProcessingException; throws IOException, DataSourceException, ReportProcessingException;
protected void startGroup(final AttributeMap attrs) protected void startGroup(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException
{ {
final Object repeatingHeaderOrFooter = attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, "repeating-header-or-footer"); final Object repeatingHeaderOrFooter = attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, "repeating-header-or-footer");
if (OfficeToken.TRUE.equals(repeatingHeaderOrFooter)) if (OfficeToken.TRUE.equals(repeatingHeaderOrFooter))
@ -821,12 +820,10 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
} }
protected void startGroupInstance(final AttributeMap attrs) protected void startGroupInstance(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException
{ {
} }
protected void startGroupBody(final AttributeMap attrs) protected void startGroupBody(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException
{ {
} }
@ -993,12 +990,11 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
} }
protected void endGroupBody(final AttributeMap attrs) protected void endGroupBody(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException throws IOException
{ {
} }
protected void endGroupInstance(final AttributeMap attrs) protected void endGroupInstance(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException
{ {
} }
@ -1012,7 +1008,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
protected void endReportSection(final AttributeMap attrs, protected void endReportSection(final AttributeMap attrs,
final int role) final int role)
throws IOException, DataSourceException, ReportProcessingException throws IOException, ReportProcessingException
{ {
if (allowBuffering(role)) if (allowBuffering(role))
{ {
@ -1021,7 +1017,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
} }
protected void endGroup(final AttributeMap attrs) protected void endGroup(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException throws ReportProcessingException
{ {
} }
@ -1029,7 +1025,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
throws IOException, DataSourceException, ReportProcessingException; throws IOException, DataSourceException, ReportProcessingException;
protected void endBody(final AttributeMap attrs) protected void endBody(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException throws IOException
{ {
getXmlWriter().writeCloseTag(); getXmlWriter().writeCloseTag();
} }
@ -1167,7 +1163,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
} }
} }
public BufferState finishBuffering() throws ReportProcessingException public BufferState finishBuffering()
{ {
final BufferState state = (BufferState) xmlWriters.pop(); final BufferState state = (BufferState) xmlWriters.pop();
try try

View File

@ -40,7 +40,6 @@ import org.jfree.layouting.namespace.Namespaces;
import org.jfree.layouting.util.AttributeMap; import org.jfree.layouting.util.AttributeMap;
import org.jfree.report.JFreeReportBoot; import org.jfree.report.JFreeReportBoot;
import org.jfree.report.JFreeReportInfo; import org.jfree.report.JFreeReportInfo;
import org.jfree.report.ReportProcessingException;
import org.jfree.report.structure.Element; import org.jfree.report.structure.Element;
import org.jfree.report.structure.Node; import org.jfree.report.structure.Node;
import org.jfree.report.structure.Section; import org.jfree.report.structure.Section;
@ -82,7 +81,7 @@ public class StylesWriter
public void writeContentStyles(final OfficeStylesCollection predefined, public void writeContentStyles(final OfficeStylesCollection predefined,
final OfficeStylesCollection globals) final OfficeStylesCollection globals)
throws IOException, ReportProcessingException throws IOException
{ {
writeFontFaces(new OfficeStylesCollection[] writeFontFaces(new OfficeStylesCollection[]
{ {
@ -96,7 +95,7 @@ public class StylesWriter
public void writeGlobalStyles(final OfficeStylesCollection predefined, public void writeGlobalStyles(final OfficeStylesCollection predefined,
final OfficeStylesCollection globals) final OfficeStylesCollection globals)
throws IOException, ReportProcessingException throws IOException
{ {
if (writeOpeningTag) if (writeOpeningTag)
{ {

View File

@ -99,12 +99,11 @@ public class ChartRawReportTarget extends OfficeDocumentReportTarget
} }
protected void startReportSection(final AttributeMap attrs, final int role) protected void startReportSection(final AttributeMap attrs, final int role)
throws IOException, DataSourceException, ReportProcessingException throws ReportProcessingException
{ {
} }
protected void endReportSection(final AttributeMap attrs, final int role) protected void endReportSection(final AttributeMap attrs, final int role)
throws IOException, DataSourceException, ReportProcessingException
{ {
} }

View File

@ -264,7 +264,7 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget
} }
} }
protected void startReportSection(final AttributeMap attrs, final int role) throws IOException, DataSourceException, ReportProcessingException protected void startReportSection(final AttributeMap attrs, final int role) throws ReportProcessingException
{ {
if ((role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER) && (!PageSection.isPrintWithReportHeader(attrs) || !PageSection.isPrintWithReportFooter(attrs))) if ((role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER) && (!PageSection.isPrintWithReportHeader(attrs) || !PageSection.isPrintWithReportFooter(attrs)))
{ {
@ -276,7 +276,7 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget
} }
} }
protected void endReportSection(final AttributeMap attrs, final int role) throws IOException, DataSourceException, ReportProcessingException protected void endReportSection(final AttributeMap attrs, final int role) throws IOException, ReportProcessingException
{ {
if ((role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER) && (!PageSection.isPrintWithReportHeader(attrs) || !PageSection.isPrintWithReportFooter(attrs))) if ((role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER) && (!PageSection.isPrintWithReportHeader(attrs) || !PageSection.isPrintWithReportFooter(attrs)))
{ {

View File

@ -1050,7 +1050,7 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
} }
protected void startReportSection(final AttributeMap attrs, final int role) protected void startReportSection(final AttributeMap attrs, final int role)
throws IOException, DataSourceException, ReportProcessingException throws ReportProcessingException
{ {
sectionHeight = new LengthCalculator(); sectionHeight = new LengthCalculator();
if (role == OfficeDocumentReportTarget.ROLE_TEMPLATE || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER) if (role == OfficeDocumentReportTarget.ROLE_TEMPLATE || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER)
@ -1099,7 +1099,6 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
} }
protected void startGroup(final AttributeMap attrs) protected void startGroup(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException
{ {
super.startGroup(attrs); super.startGroup(attrs);
final PageContext pageContext = new PageContext(getCurrentContext()); final PageContext pageContext = new PageContext(getCurrentContext());
@ -1136,7 +1135,6 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
} }
protected void startGroupInstance(final AttributeMap attrs) protected void startGroupInstance(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException
{ {
if (getGroupContext().isGroupWithRepeatingSection()) if (getGroupContext().isGroupWithRepeatingSection())
{ {
@ -1145,7 +1143,7 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
} }
protected void endGroup(final AttributeMap attrs) protected void endGroup(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException throws ReportProcessingException
{ {
if (getGroupContext().isGroupWithRepeatingSection()) if (getGroupContext().isGroupWithRepeatingSection())
{ {
@ -1177,7 +1175,7 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
} }
protected void endReportSection(final AttributeMap attrs, final int role) protected void endReportSection(final AttributeMap attrs, final int role)
throws IOException, DataSourceException, ReportProcessingException throws IOException, ReportProcessingException
{ {
if (role == ROLE_TEMPLATE || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER) if (role == ROLE_TEMPLATE || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER)
{ {
@ -1386,7 +1384,7 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
} }
protected void endGroupBody(final AttributeMap attrs) protected void endGroupBody(final AttributeMap attrs)
throws IOException, DataSourceException, ReportProcessingException throws IOException
{ {
if (tableLayoutConfig == TABLE_LAYOUT_SINGLE_DETAIL_TABLE && detailBandProcessingState == DETAIL_SECTION_OTHER_PRINTED) if (tableLayoutConfig == TABLE_LAYOUT_SINGLE_DETAIL_TABLE && detailBandProcessingState == DETAIL_SECTION_OTHER_PRINTED)
{ {

View File

@ -277,10 +277,11 @@ public class Parcel implements XNameContainer
} }
// rename parcel // rename parcel
public void rename( String name ) throws com.sun.star.lang.WrappedTargetException public void rename( String name )
{ {
this.name = name; this.name = name;
} }
public ParcelContainer getParent() { return parent; } public ParcelContainer getParent() { return parent; }
/** /**
* Returns the path of this <tt>Parcel</tt> * Returns the path of this <tt>Parcel</tt>

View File

@ -235,7 +235,7 @@ public class ScriptMetaData extends ScriptEntry {
return "\nParcelLocation = " + getParcelLocation() + "\nLocationPlaceHolder = " + locationPlaceHolder + super.toString(); return "\nParcelLocation = " + getParcelLocation() + "\nLocationPlaceHolder = " + locationPlaceHolder + super.toString();
} }
public URL[] getClassPath() throws java.net.MalformedURLException public URL[] getClassPath()
{ {
try try
{ {

View File

@ -137,7 +137,7 @@ public class UnoPkgContainer extends ParcelContainer
LogUtils.DEBUG("Leaving deRegisterPackageContainer for " + url ); LogUtils.DEBUG("Leaving deRegisterPackageContainer for " + url );
} }
private void init() throws com.sun.star.lang.IllegalArgumentException, com.sun.star.lang.WrappedTargetException private void init() throws com.sun.star.lang.IllegalArgumentException
{ {
LogUtils.DEBUG("getting container for " + containerUrl ); LogUtils.DEBUG("getting container for " + containerUrl );
DeployedUnoPackagesDB db = null; DeployedUnoPackagesDB db = null;

View File

@ -31,7 +31,6 @@ public class ClassLoaderFactory
private ClassLoaderFactory() {} private ClassLoaderFactory() {}
public static ClassLoader getURLClassLoader( ScriptMetaData scriptData ) public static ClassLoader getURLClassLoader( ScriptMetaData scriptData )
throws NoSuitableClassLoaderException, MalformedURLException
{ {
ClassLoader parent = scriptData.getClass().getClassLoader(); ClassLoader parent = scriptData.getClass().getClassLoader();
URL[] classPath = scriptData.getClassPath(); URL[] classPath = scriptData.getClassPath();

View File

@ -198,14 +198,6 @@ class ScriptImpl implements XScript
metaData.getLanguageName(), metaData.getLanguage(), metaData.getLanguageName(), metaData.getLanguage(),
ScriptFrameworkErrorType.MALFORMED_URL ); ScriptFrameworkErrorType.MALFORMED_URL );
} }
catch ( NoSuitableClassLoaderException nsc )
{
// Framework error
throw new ScriptFrameworkErrorException(
nsc.getMessage(), null,
metaData.getLanguageName(), metaData.getLanguage(),
ScriptFrameworkErrorType.UNKNOWN );
}
// Set class loader to be used for class files // Set class loader to be used for class files
// and jar files // and jar files
Thread.currentThread().setContextClassLoader(cl); Thread.currentThread().setContextClassLoader(cl);

View File

@ -30,8 +30,6 @@ import com.sun.star.uno.Any;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Map; import java.util.Map;
import java.net.MalformedURLException;
import com.sun.star.script.provider.XScriptContext; import com.sun.star.script.provider.XScriptContext;
import com.sun.star.script.provider.XScript; import com.sun.star.script.provider.XScript;
import com.sun.star.script.provider.ScriptExceptionRaisedException; import com.sun.star.script.provider.ScriptExceptionRaisedException;
@ -194,28 +192,6 @@ class ScriptImpl implements XScript
metaData ); metaData );
LogUtils.DEBUG( "Classloader finished..." ); LogUtils.DEBUG( "Classloader finished..." );
} }
catch (MalformedURLException mfe )
{
// Framework error
ScriptFrameworkErrorException e2 =
new ScriptFrameworkErrorException(
mfe.toString(), null,
metaData.getLanguageName(), metaData.getLanguage(),
ScriptFrameworkErrorType.MALFORMED_URL );
e2.initCause( mfe );
throw e2;
}
catch (NoSuitableClassLoaderException ncl )
{
// Framework error
ScriptFrameworkErrorException e2 =
new ScriptFrameworkErrorException(
ncl.toString(), null,
metaData.getLanguageName(), metaData.getLanguage(),
ScriptFrameworkErrorType.UNKNOWN );
e2.initCause( ncl );
throw e2;
}
catch (ArrayStoreException e ) catch (ArrayStoreException e )
{ {
// Framework error // Framework error

View File

@ -196,14 +196,6 @@ class ScriptImpl implements XScript
metaData.getLanguageName(), metaData.getLanguage(), metaData.getLanguageName(), metaData.getLanguage(),
ScriptFrameworkErrorType.MALFORMED_URL ); ScriptFrameworkErrorType.MALFORMED_URL );
} }
catch ( com.sun.star.script.framework.provider.NoSuitableClassLoaderException nsc )
{
// Framework error
throw new ScriptFrameworkErrorException(
nsc.getMessage(), null,
metaData.getLanguageName(), metaData.getLanguage(),
ScriptFrameworkErrorType.UNKNOWN );
}
Context ctxt = null; Context ctxt = null;
try try

View File

@ -20,7 +20,6 @@ package installer;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.io.*;
import java.util.*; import java.util.*;
import javax.swing.*; import javax.swing.*;
@ -69,9 +68,6 @@ public class IdeVersion extends javax.swing.JPanel implements ActionListener, Ta
} }
} }
props = ideProps; props = ideProps;
}
catch (IOException eIO) {
System.err.println("Failed to parse .netbeans/ide.log");
} }
catch (Exception e) { catch (Exception e) {
System.err.println("Exception thrown in initComponents"); System.err.println("Exception thrown in initComponents");

View File

@ -65,19 +65,10 @@ public class InstUtil {
public static boolean hasNetbeansInstallation() { public static boolean hasNetbeansInstallation() {
boolean result = false; boolean result = false;
try result = checkForSupportedVersion( getNetbeansLocation(), versions );
{
result = checkForSupportedVersion( getNetbeansLocation(), versions );
if (result == false) if (result == false)
System.out.println("No supported version of NetBeans found."); System.out.println("No supported version of NetBeans found.");
}
catch ( IOException ioe )
{
System.err.println("Exception caught trying to determine netbeans installation: " + ioe );
ioe.printStackTrace();
result = false;
}
return result; return result;
} }
@ -102,26 +93,17 @@ public class InstUtil {
public static boolean hasJeditInstallation() { public static boolean hasJeditInstallation() {
boolean result = false; boolean result = false;
try result = checkForSupportedVersion( getJeditLocation(), versions );
if ( !result )
{ {
result = checkForSupportedVersion( getJeditLocation(), versions ); System.out.println("No supported version for JEdit found.");
if ( !result )
{
System.out.println("No supported version for JEdit found.");
}
}
catch ( IOException ioe )
{
System.err.println("Exception caught trying to determine jedit installation: " + ioe );
ioe.printStackTrace();
result = false;
} }
return result; return result;
} }
public static Properties getNetbeansLocation() throws IOException { public static Properties getNetbeansLocation() {
Properties results = new Properties(); Properties results = new Properties();
StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer();
@ -168,7 +150,7 @@ public class InstUtil {
public static Properties getJeditLocation() throws IOException { public static Properties getJeditLocation() {
Properties results = new Properties(); Properties results = new Properties();

View File

@ -101,9 +101,6 @@ public class CheckBookmarks {
} }
@Test public void checkBookmarks() @Test public void checkBookmarks()
throws com.sun.star.uno.Exception,
com.sun.star.io.IOException,
java.security.NoSuchAlgorithmException
{ {
actualHashes.assertExpectation(get20111110Expectations()); actualHashes.assertExpectation(get20111110Expectations());
} }
@ -170,7 +167,6 @@ public class CheckBookmarks {
} }
private void insertRandomParts(long seed) private void insertRandomParts(long seed)
throws com.sun.star.uno.Exception
{ {
java.util.Random rnd = new java.util.Random(seed); java.util.Random rnd = new java.util.Random(seed);
XTextCursor xCrsr = m_xDoc.getText().createTextCursor(); XTextCursor xCrsr = m_xDoc.getText().createTextCursor();
@ -181,7 +177,6 @@ public class CheckBookmarks {
} }
private void deleteRandomParts(long seed) private void deleteRandomParts(long seed)
throws com.sun.star.uno.Exception
{ {
java.util.Random rnd = new java.util.Random(seed); java.util.Random rnd = new java.util.Random(seed);
XTextCursor xCrsr = m_xDoc.getText().createTextCursor(); XTextCursor xCrsr = m_xDoc.getText().createTextCursor();
@ -193,7 +188,6 @@ public class CheckBookmarks {
} }
private void insertLinebreaks(long seed) private void insertLinebreaks(long seed)
throws com.sun.star.uno.Exception
{ {
XText xText = m_xDoc.getText(); XText xText = m_xDoc.getText();
java.util.Random rnd = new java.util.Random(seed); java.util.Random rnd = new java.util.Random(seed);

View File

@ -284,7 +284,7 @@ public class CheckCrossReferences {
} }
} }
@Before public void setUpDocument() throws com.sun.star.uno.Exception { @Before public void setUpDocument() {
document = util.WriterTools.loadTextDoc( document = util.WriterTools.loadTextDoc(
UnoRuntime.queryInterface( UnoRuntime.queryInterface(
XMultiServiceFactory.class, XMultiServiceFactory.class,

View File

@ -179,7 +179,7 @@ public class CheckFlies {
} }
} }
@Before public void setUpDocument() throws com.sun.star.uno.Exception { @Before public void setUpDocument() {
document = util.WriterTools.loadTextDoc( document = util.WriterTools.loadTextDoc(
UnoRuntime.queryInterface( UnoRuntime.queryInterface(
XMultiServiceFactory.class, XMultiServiceFactory.class,

View File

@ -779,7 +779,7 @@ public class Helper
} }
static protected HostConfiguration Login( URI aMainURL, String sWikiUser, String sWikiPass, XComponentContext xContext ) static protected HostConfiguration Login( URI aMainURL, String sWikiUser, String sWikiPass, XComponentContext xContext )
throws com.sun.star.uno.Exception, java.io.IOException, WikiCancelException throws java.io.IOException, WikiCancelException
{ {
HostConfiguration aHostConfig = null; HostConfiguration aHostConfig = null;

View File

@ -52,7 +52,7 @@ public class WikiArticle
/** Creates a new instance of WikiArticle */ /** Creates a new instance of WikiArticle */
public WikiArticle( XComponentContext xContext, String sTitle, Map<String,String> wikiSettings, boolean bLogin, WikiPropDialog aPropDialog ) public WikiArticle( XComponentContext xContext, String sTitle, Map<String,String> wikiSettings, boolean bLogin, WikiPropDialog aPropDialog )
throws java.net.MalformedURLException, com.sun.star.uno.Exception, java.io.IOException, WikiCancelException throws java.net.MalformedURLException, java.io.IOException, WikiCancelException
{ {
m_xContext = xContext; m_xContext = xContext;
@ -117,7 +117,7 @@ public class WikiArticle
} }
private String getArticleWiki() private String getArticleWiki()
throws com.sun.star.uno.Exception, java.io.IOException, WikiCancelException throws java.io.IOException, WikiCancelException
{ {
String sWikiCode = null; String sWikiCode = null;
@ -161,7 +161,7 @@ public class WikiArticle
} }
private void InitArticleHTML() private void InitArticleHTML()
throws com.sun.star.uno.Exception, java.io.IOException, WikiCancelException throws java.io.IOException, WikiCancelException
{ {
if ( m_aHostConfig != null ) if ( m_aHostConfig != null )
{ {
@ -197,7 +197,7 @@ public class WikiArticle
} }
protected boolean setArticle( String sWikiCode, String sWikiComment, boolean bMinorEdit ) protected boolean setArticle( String sWikiCode, String sWikiComment, boolean bMinorEdit )
throws com.sun.star.uno.Exception, java.io.IOException, WikiCancelException throws java.io.IOException, WikiCancelException
{ {
boolean bResult = false; boolean bResult = false;
@ -238,7 +238,7 @@ public class WikiArticle
} }
protected boolean Login() protected boolean Login()
throws com.sun.star.uno.Exception, java.io.IOException, WikiCancelException throws java.io.IOException, WikiCancelException
{ {
m_aHostConfig = Helper.Login( m_aMainURI, m_sWikiUser, m_sWikiPass, m_xContext ); m_aHostConfig = Helper.Login( m_aMainURI, m_sWikiUser, m_sWikiPass, m_xContext );
return ( m_aHostConfig != null ); return ( m_aHostConfig != null );

View File

@ -476,7 +476,7 @@ class AccessibleTextHandler extends NodeHandler
/** /**
* Display a dialog with a text field and a pair of cancel/do-it buttons * Display a dialog with a text field and a pair of cancel/do-it buttons
*/ */
class TextActionDialog extends JDialog abstract class TextActionDialog extends JDialog
implements ActionListener implements ActionListener
{ {
AccTreeNode aNode; AccTreeNode aNode;
@ -588,11 +588,8 @@ class TextActionDialog extends JDialog
/** override this for dialog-specific action */ /** override this for dialog-specific action */
boolean action( JTextComponent aText, AccTreeNode aNode ) abstract boolean action( JTextComponent aText, AccTreeNode aNode )
throws IndexOutOfBoundsException throws IndexOutOfBoundsException;
{
return false;
}
} }

View File

@ -36,7 +36,7 @@ public class SpreadsheetDocument extends OfficeDocument
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public SpreadsheetDocument( XMultiServiceFactory orb, XComponent document ) throws com.sun.star.uno.Exception public SpreadsheetDocument( XMultiServiceFactory orb, XComponent document )
{ {
super( orb, document ); super( orb, document );
} }
@ -44,7 +44,7 @@ public class SpreadsheetDocument extends OfficeDocument
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/** returns the sheets collection /** returns the sheets collection
*/ */
public XSpreadsheets getSheets() throws com.sun.star.uno.Exception public XSpreadsheets getSheets()
{ {
XSpreadsheetDocument spreadsheetDoc = UnoRuntime.queryInterface( XSpreadsheetDocument.class, getDocument() ); XSpreadsheetDocument spreadsheetDoc = UnoRuntime.queryInterface( XSpreadsheetDocument.class, getDocument() );
return spreadsheetDoc.getSheets(); return spreadsheetDoc.getSheets();

View File

@ -201,7 +201,7 @@ public class FileAccess
return ResultPath; return ResultPath;
} }
public static ArrayList<String> getOfficePaths(XMultiServiceFactory xMSF, String _sPath, String sType, String sSearchDir) throws NoValidPathException public static ArrayList<String> getOfficePaths(XMultiServiceFactory xMSF, String _sPath, String sType, String sSearchDir)
{ {
//This method currently only works with sPath="Template" //This method currently only works with sPath="Template"
@ -317,7 +317,7 @@ public class FileAccess
return _sPath; return _sPath;
} }
public static void combinePaths(XMultiServiceFactory xMSF, ArrayList<String> _aFirstPath, String _sSecondPath) throws NoValidPathException public static void combinePaths(XMultiServiceFactory xMSF, ArrayList<String> _aFirstPath, String _sSecondPath)
{ {
for (int i = 0; i < _aFirstPath.size(); ++i) for (int i = 0; i < _aFirstPath.size(); ++i)
{ {

View File

@ -122,7 +122,7 @@ public class SQLQueryComposer
} }
} }
public void appendFilterConditions() throws SQLException public void appendFilterConditions()
{ {
try try
{ {

View File

@ -24,7 +24,6 @@ import com.sun.star.sdb.application.DatabaseObject;
import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.JavaTools;
import com.sun.star.wizards.common.NoValidPathException;
import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.db.DatabaseObjectWizard; import com.sun.star.wizards.db.DatabaseObjectWizard;
import com.sun.star.wizards.db.RelationController; import com.sun.star.wizards.db.RelationController;
@ -219,7 +218,7 @@ public class FormWizard extends DatabaseObjectWizard
} }
} }
public void buildSteps() throws NoValidPathException public void buildSteps()
{ {
curDBCommandFieldSelection = new CommandFieldSelection(this, curFormDocument.oMainFormDBMetaData, 92, slblFields, slblSelFields, slblTables, true, 34411); curDBCommandFieldSelection = new CommandFieldSelection(this, curFormDocument.oMainFormDBMetaData, 92, slblFields, slblSelFields, slblTables, true, 34411);
curDBCommandFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); curDBCommandFieldSelection.addFieldSelectionListener(new FieldSelectionListener());

View File

@ -64,7 +64,7 @@ public class StyleApplier
private final static int SOBORDERCOLOR = 5; private final static int SOBORDERCOLOR = 5;
private Short IBorderValue = new Short((short) 1); private Short IBorderValue = new Short((short) 1);
public StyleApplier(WizardDialog _CurUnoDialog, FormDocument _curFormDocument) throws NoValidPathException public StyleApplier(WizardDialog _CurUnoDialog, FormDocument _curFormDocument)
{ {
this.curFormDocument = _curFormDocument; this.curFormDocument = _curFormDocument;
xMSF = curFormDocument.xMSF; xMSF = curFormDocument.xMSF;

View File

@ -26,7 +26,6 @@ import com.sun.star.awt.XRadioButton;
import com.sun.star.lang.EventObject; import com.sun.star.lang.EventObject;
import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.NoValidPathException;
import com.sun.star.wizards.document.Control; import com.sun.star.wizards.document.Control;
import com.sun.star.wizards.ui.ButtonList; import com.sun.star.wizards.ui.ButtonList;
import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UIConsts;
@ -51,7 +50,7 @@ public class UIControlArranger
private final int SOIMAGELISTHEIGHT = 60; private final int SOIMAGELISTHEIGHT = 60;
private final String SOALIGNMETHOD = "alignLabelControls"; private final String SOALIGNMETHOD = "alignLabelControls";
public UIControlArranger(FormWizard _CurUnoDialog, FormDocument _curFormDocument) throws NoValidPathException public UIControlArranger(FormWizard _CurUnoDialog, FormDocument _curFormDocument)
{ {
this.CurUnoDialog = _CurUnoDialog; this.CurUnoDialog = _CurUnoDialog;
this.curFormDocument = _curFormDocument; this.curFormDocument = _curFormDocument;

View File

@ -68,23 +68,23 @@ public class DBColumn
RecordTable CurRecordTable; RecordTable CurRecordTable;
TextTableHandler oTextTableHandler; TextTableHandler oTextTableHandler;
public DBColumn(TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i) throws Exception public DBColumn(TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i)
{ {
CurRecordTable = new RecordTable(_oTextTableHandler); CurRecordTable = new RecordTable(_oTextTableHandler);
initializeRecordTableMembers(CurRecordTable, _oTextTableHandler, _CurDBMetaData, i, false); initializeRecordTableMembers(CurRecordTable, _oTextTableHandler, _CurDBMetaData, i, false);
} }
public DBColumn(RecordTable _CurRecordTable, TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i, boolean _bforce) throws Exception public DBColumn(RecordTable _CurRecordTable, TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i, boolean _bforce)
{ {
initializeRecordTableMembers(_CurRecordTable, _oTextTableHandler, _CurDBMetaData, i, _bforce); initializeRecordTableMembers(_CurRecordTable, _oTextTableHandler, _CurDBMetaData, i, _bforce);
} }
public DBColumn(RecordTable _CurRecordTable, TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i) throws Exception public DBColumn(RecordTable _CurRecordTable, TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i)
{ {
initializeRecordTableMembers(_CurRecordTable, _oTextTableHandler, _CurDBMetaData, i, false); initializeRecordTableMembers(_CurRecordTable, _oTextTableHandler, _CurDBMetaData, i, false);
} }
private void initializeRecordTableMembers(RecordTable _CurRecordTable, TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i, boolean _bForce) throws Exception private void initializeRecordTableMembers(RecordTable _CurRecordTable, TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i, boolean _bForce)
{ {
this.oTextTableHandler = _oTextTableHandler; this.oTextTableHandler = _oTextTableHandler;
this.CurDBMetaData = _CurDBMetaData; this.CurDBMetaData = _CurDBMetaData;
@ -137,8 +137,7 @@ public class DBColumn
return false; return false;
} }
public DBColumn(TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, String _FieldName, int GroupIndex, String TableName, DBColumn OldDBColumn) throws Exception public DBColumn(TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, String _FieldName, int GroupIndex, String TableName, DBColumn OldDBColumn) {
{
this.oTextTableHandler = _oTextTableHandler; this.oTextTableHandler = _oTextTableHandler;
this.CurDBMetaData = _CurDBMetaData; this.CurDBMetaData = _CurDBMetaData;
CurDBField = CurDBMetaData.getFieldColumnByDisplayName(_FieldName); CurDBField = CurDBMetaData.getFieldColumnByDisplayName(_FieldName);

View File

@ -346,7 +346,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
} }
} }
public void updateTextSections(String[] SelGroupNames) throws Exception public void updateTextSections(String[] SelGroupNames)
{ {
String TableName; String TableName;
DBColumn OldDBColumn; DBColumn OldDBColumn;
@ -395,47 +395,40 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
public void insertColumnstoRecordTable() public void insertColumnstoRecordTable()
{ {
try int GroupCount = CurDBMetaData.GroupFieldNames.length;
DBColumn CurDBColumn;
// Note for some reason the table might lose its name and has to be renamed therefor
String OldTableName = CurRecordTable.xTableName.getName();
if (OldTableName.compareTo(TBLRECORDSECTION) != 0)
{ {
int GroupCount = CurDBMetaData.GroupFieldNames.length; CurRecordTable = new RecordTable(oTextTableHandler);
DBColumn CurDBColumn;
// Note for some reason the table might lose its name and has to be renamed therefor
String OldTableName = CurRecordTable.xTableName.getName();
if (OldTableName.compareTo(TBLRECORDSECTION) != 0)
{
CurRecordTable = new RecordTable(oTextTableHandler);
}
com.sun.star.table.XTableColumns xColumns = CurRecordTable.xTextTable.getColumns();
int ColCount = xColumns.getCount();
int RecordCount = CurDBMetaData.getRecordFieldNames().length;
if (ColCount > RecordCount)
{
int RemoveCount = ColCount - RecordCount;
xColumns.removeByIndex(0, RemoveCount);
}
else if (ColCount < RecordCount)
{
int AddCount = RecordCount - ColCount;
CurRecordTable.xTextTable.getColumns().insertByIndex(ColCount, AddCount);
}
for (int i = 0; i < RecordCount; i++)
{
CurDBColumn = new DBColumn(CurRecordTable, oTextTableHandler, CurDBMetaData, i, true);
CurDBColumn.initializeNumberFormat();
CurDBColumn.insertColumnData(oTextFieldHandler, this.bIsCurLandscape);
if (DBColumnsVector.size() <= (i + GroupCount))
{
DBColumnsVector.add(CurDBColumn);
}
else
{
DBColumnsVector.set(i + GroupCount, CurDBColumn);
}
}
} }
catch (Exception exception) com.sun.star.table.XTableColumns xColumns = CurRecordTable.xTextTable.getColumns();
int ColCount = xColumns.getCount();
int RecordCount = CurDBMetaData.getRecordFieldNames().length;
if (ColCount > RecordCount)
{ {
showCommonReportErrorBox(exception); int RemoveCount = ColCount - RecordCount;
xColumns.removeByIndex(0, RemoveCount);
}
else if (ColCount < RecordCount)
{
int AddCount = RecordCount - ColCount;
CurRecordTable.xTextTable.getColumns().insertByIndex(ColCount, AddCount);
}
for (int i = 0; i < RecordCount; i++)
{
CurDBColumn = new DBColumn(CurRecordTable, oTextTableHandler, CurDBMetaData, i, true);
CurDBColumn.initializeNumberFormat();
CurDBColumn.insertColumnData(oTextFieldHandler, this.bIsCurLandscape);
if (DBColumnsVector.size() <= (i + GroupCount))
{
DBColumnsVector.add(CurDBColumn);
}
else
{
DBColumnsVector.set(i + GroupCount, CurDBColumn);
}
} }
} }
@ -473,23 +466,16 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
removeGroupNamesofRecordTable(NewSelGroupNames.length + 1); removeGroupNamesofRecordTable(NewSelGroupNames.length + 1);
FieldColumn CurFieldColumn = CurDBMetaData.getFieldColumnByTitle(CurGroupTitle); FieldColumn CurFieldColumn = CurDBMetaData.getFieldColumnByTitle(CurGroupTitle);
GroupFieldVector.remove(CurFieldColumn.getFieldName()); GroupFieldVector.remove(CurFieldColumn.getFieldName());
try oTextSectionHandler.removeLastTextSection();
oTextTableHandler.removeLastTextTable();
// if the previously selected item is somewhere in the middle of the listbox (and not at the end) the
// Textsections have to be updated
if (JavaTools.FieldInList(NewSelGroupNames, CurGroupTitle) == -1)
{ {
oTextSectionHandler.removeLastTextSection(); updateTextSections(NewSelGroupNames);
oTextTableHandler.removeLastTextTable();
// if the previously selected item is somewhere in the middle of the listbox (and not at the end) the
// Textsections have to be updated
if (JavaTools.FieldInList(NewSelGroupNames, CurGroupTitle) == -1)
{
updateTextSections(NewSelGroupNames);
}
int iSelItemCount = NewSelGroupNames.length;
DBColumnsVector.remove(iSelItemCount);
}
catch (Exception exception)
{
showCommonReportErrorBox(exception);
} }
int iSelItemCount = NewSelGroupNames.length;
DBColumnsVector.remove(iSelItemCount);
} }
public void removeGroupNamesofRecordTable(int GroupFieldCount) public void removeGroupNamesofRecordTable(int GroupFieldCount)

View File

@ -37,7 +37,6 @@ import com.sun.star.ucb.XCommandProcessor;
import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.XModifiable; import com.sun.star.util.XModifiable;
import com.sun.star.util.XURLTransformer; import com.sun.star.util.XURLTransformer;
import com.sun.star.wizards.common.NoValidPathException;
import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.db.FieldColumn; import com.sun.star.wizards.db.FieldColumn;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
@ -504,16 +503,9 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
{ {
if (m_aReportPath == null) if (m_aReportPath == null)
{ {
try // Check general availability of office paths
{ m_aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard");
// Check general availability of office paths FileAccess.combinePaths(getMSF(), m_aReportPath, "/wizard/report");
m_aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard");
FileAccess.combinePaths(getMSF(), m_aReportPath, "/wizard/report");
}
catch (NoValidPathException ex)
{
Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex);
}
} }
return m_aReportPath; return m_aReportPath;
} }

View File

@ -123,7 +123,7 @@ public class TextFieldHandler
return xPSet; return xPSet;
} }
private XDependentTextField[] getTextFieldsByProperty(String _PropertyName, Object _aPropertyValue, String _TypeName) throws Exception private XDependentTextField[] getTextFieldsByProperty(String _PropertyName, Object _aPropertyValue, String _TypeName)
{ {
try try
{ {
@ -285,21 +285,14 @@ public class TextFieldHandler
public void removeUserFieldByContent(String _FieldContent) public void removeUserFieldByContent(String _FieldContent)
{ {
try XDependentTextField[] xDependentTextFields = getTextFieldsByProperty("Content", _FieldContent, "String");
if (xDependentTextFields != null)
{ {
XDependentTextField[] xDependentTextFields = getTextFieldsByProperty("Content", _FieldContent, "String"); for (int i = 0; i < xDependentTextFields.length; i++)
if (xDependentTextFields != null)
{ {
for (int i = 0; i < xDependentTextFields.length; i++) xDependentTextFields[i].dispose();
{
xDependentTextFields[i].dispose();
}
} }
} }
catch (Exception e)
{
e.printStackTrace(System.err);
}
} }
public void changeExtendedUserFieldContent(short UserDataPart, String _FieldContent) public void changeExtendedUserFieldContent(short UserDataPart, String _FieldContent)

View File

@ -64,7 +64,7 @@ public class DocumentPreview
createPreviewFrame(xmsf, xControl); createPreviewFrame(xmsf, xControl);
} }
protected XComponent setDocument(String url_, String[] propNames, Object[] propValues) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException protected XComponent setDocument(String url_, String[] propNames, Object[] propValues) throws com.sun.star.lang.IllegalArgumentException, IOException
{ {
url = url_; url = url_;
@ -77,7 +77,7 @@ public class DocumentPreview
return setDocument(url, ps.getProperties()); return setDocument(url, ps.getProperties());
} }
protected XComponent setDocument(String url, PropertyValue[] lArgs) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException protected XComponent setDocument(String url, PropertyValue[] lArgs) throws com.sun.star.lang.IllegalArgumentException, IOException
{ {
loadArgs = lArgs; loadArgs = lArgs;
XComponentLoader xCompLoader = UnoRuntime.queryInterface(XComponentLoader.class, xFrame); XComponentLoader xCompLoader = UnoRuntime.queryInterface(XComponentLoader.class, xFrame);
@ -100,7 +100,7 @@ public class DocumentPreview
} }
} }
public XComponent setDocument(String url, int mode) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException public XComponent setDocument(String url, int mode) throws com.sun.star.lang.IllegalArgumentException, IOException
{ {
switch (mode) switch (mode)
{ {

View File

@ -458,42 +458,26 @@ public class UnoDialog implements EventNames
public XRadioButton insertRadioButton(String sName, int iControlKey, XItemListener xItemListener, String[] sProperties, Object[] sValues) public XRadioButton insertRadioButton(String sName, int iControlKey, XItemListener xItemListener, String[] sProperties, Object[] sValues)
{ {
try XRadioButton xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues);
if (xItemListener != null)
{ {
XRadioButton xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues); xRadioButton.addItemListener(xItemListener);
if (xItemListener != null)
{
xRadioButton.addItemListener(xItemListener);
}
return xRadioButton;
}
catch (com.sun.star.uno.Exception exception)
{
exception.printStackTrace(System.err);
return null;
} }
return xRadioButton;
} }
public XButton insertRadioButton(String sName, int iControlKey, XActionListener xActionListener, String[] sProperties, Object[] sValues) public XButton insertRadioButton(String sName, int iControlKey, XActionListener xActionListener, String[] sProperties, Object[] sValues)
{ {
try XRadioButton xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues);
XButton xButton = UnoRuntime.queryInterface(XButton.class, xRadioButton);
if (xActionListener != null)
{ {
XRadioButton xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues); xButton.addActionListener(xActionListener);
XButton xButton = UnoRuntime.queryInterface(XButton.class, xRadioButton);
if (xActionListener != null)
{
xButton.addActionListener(xActionListener);
}
return xButton;
}
catch (com.sun.star.uno.Exception exception)
{
exception.printStackTrace(System.err);
return null;
} }
return xButton;
} }
public XRadioButton insertRadioButton(String sName, int iControlKey, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception public XRadioButton insertRadioButton(String sName, int iControlKey, String[] sProperties, Object[] sValues)
{ {
XRadioButton xRadioButton = insertRadioButton(sName, sProperties, sValues); XRadioButton xRadioButton = insertRadioButton(sName, sProperties, sValues);
Integer ControlKey = new Integer(iControlKey); Integer ControlKey = new Integer(iControlKey);

View File

@ -20,7 +20,6 @@ package org.openoffice.xmerge.converter.xml.xslt;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.util.Iterator; import java.util.Iterator;
@ -28,7 +27,6 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Source; import javax.xml.transform.Source;
import javax.xml.transform.Transformer; import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactory;
import javax.xml.transform.URIResolver; import javax.xml.transform.URIResolver;
@ -138,18 +136,14 @@ public final class DocumentDeserializerImpl
return null; return null;
} }
/* /**
* This method performs the xslt transformation on the supplied Dom Tree. * This method performs the xslt transformation on the supplied Dom Tree.
* *
* Xslt transformation code * Xslt transformation code
* *
* @throws TransformerException,TransformerConfigurationException
* , FileNotFoundException,IOException
*
*/ */
private ByteArrayOutputStream transform(org.w3c.dom.Document xmlDoc) private ByteArrayOutputStream transform(org.w3c.dom.Document xmlDoc)
throws TransformerException,TransformerConfigurationException {
, FileNotFoundException,IOException{
log("\nTransforming..."); log("\nTransforming...");
ConverterInfo ci = pluginFactory.getConverterInfo(); ConverterInfo ci = pluginFactory.getConverterInfo();

View File

@ -42,16 +42,12 @@ import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.dom.DOMSource; import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.URIResolver; import javax.xml.transform.URIResolver;
import javax.xml.transform.Source; import javax.xml.transform.Source;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
// Imported java classes
import java.io.FileNotFoundException;
/** /**
* <p>Xslt implementation of * <p>Xslt implementation of
* org.openoffice.xmerge.DocumentSerializer * org.openoffice.xmerge.DocumentSerializer
@ -227,7 +223,7 @@ public final class DocumentSerializerImpl
} }
/* /**
* This method performs the sxl transformation on the supplied <code> * This method performs the sxl transformation on the supplied <code>
* Document</code> and returns a <code>DOMResult</code> object. * Document</code> and returns a <code>DOMResult</code> object.
* *
@ -235,15 +231,9 @@ public final class DocumentSerializerImpl
* *
* @return baos A <code>ByteArrayOutputStream</code> object containing * @return baos A <code>ByteArrayOutputStream</code> object containing
* the result of the Xslt transformation. * the result of the Xslt transformation.
* @throws TransformerException,TransformerConfigurationException
* , FileNotFoundException,IOException
*
*/ */
private ByteArrayOutputStream transform(org.w3c.dom.Document domDoc) private ByteArrayOutputStream transform(org.w3c.dom.Document domDoc)
throws TransformerException,TransformerConfigurationException {
, FileNotFoundException,IOException{
ConverterInfo ci = pluginFactory.getConverterInfo(); ConverterInfo ci = pluginFactory.getConverterInfo();
ByteArrayOutputStream baos= new ByteArrayOutputStream(); ByteArrayOutputStream baos= new ByteArrayOutputStream();
try{ try{