summaryrefslogtreecommitdiff
path: root/dbaccess/source/core/recovery
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-16 15:21:07 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-16 15:21:07 +0100
commit155487cc3f15c1db017e260c77f2e3d9041e0bb4 (patch)
tree81ac5bb55eceb44738c735ef0c3fe3a3caffacd8 /dbaccess/source/core/recovery
parent44ce7ccd50206e7784130ee418fc6a01bb8aa0cc (diff)
autorecovery: recover query designer settings
not yet finished: - query designer needs to be loaded hidden, and shown when the main window is shown - recovering table windows is not correct, yet (windows which have been added to the UI, but do not yet add to the "latest known" statement, are not restored (probably) - closing the recovered, and modified, query designer somehow does not ask for saving
Diffstat (limited to 'dbaccess/source/core/recovery')
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx36
1 files changed, 33 insertions, 3 deletions
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 4551c83083ee..bcfc3131892f 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -636,10 +636,40 @@ namespace dbaccess
aDesignInput.import( pDocHandler.get() );
const ::comphelper::NamedValueCollection& rSettings( pDocHandler->getSettings() );
+ const Any aCurrentQueryDesign = rSettings.get( lcl_getCurrentQueryDesignName() );
+#if OSL_DEBUG_LEVEL > 0
+ Sequence< PropertyValue > aQueryDesignLayout;
+ OSL_VERIFY( aCurrentQueryDesign >>= aQueryDesignLayout );
+#endif
- // TODO
- (void)i_rComponentName;
- (void)i_bForEditing;
+ // then load the query designer
+ ::comphelper::NamedValueCollection aLoadArgs;
+ aLoadArgs.put( "CurrentQueryDesign", aCurrentQueryDesign );
+
+ // TODO: load the thing hidden, and show when the main doc window is shown
+
+ if ( i_rComponentName.getLength() )
+ {
+ xSubComponent.set( m_xDocumentUI->loadComponentWithArguments(
+ m_eType,
+ i_rComponentName,
+ i_bForEditing,
+ aLoadArgs.getPropertyValues()
+ ),
+ UNO_SET_THROW
+ );
+ }
+ else
+ {
+ Reference< XComponent > xDummy;
+ xSubComponent.set( m_xDocumentUI->createComponentWithArguments(
+ m_eType,
+ aLoadArgs.getPropertyValues(),
+ xDummy
+ ),
+ UNO_SET_THROW
+ );
+ }
return xSubComponent;
}