summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-07-05 09:04:35 +0000
committerOliver Bolte <obo@openoffice.org>2005-07-05 09:04:35 +0000
commitdd089d61a9a6731872f76f4b07e8c091a3e2cbce (patch)
tree3f161a65b7592cf81160fe45090e1cbdf5311e60 /svx
parentc1cd70bdb5fb80a2ccc9c41c9d4258746fb8b8a8 (diff)
INTEGRATION: CWS mmeeks09 (1.66.156); FILE MERGED
2005/07/04 11:04:42 mmeeks 1.66.156.1: #i51304# speedup startup
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmshimp.cxx36
1 files changed, 28 insertions, 8 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index dead91ba9a7a..495c2647d6fa 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fmshimp.cxx,v $
*
- * $Revision: 1.66 $
+ * $Revision: 1.67 $
*
- * last change: $Author: rt $ $Date: 2005-03-30 11:54:21 $
+ * last change: $Author: obo $ $Date: 2005-07-05 10:04:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -687,6 +687,31 @@ FmXFormShell::~FmXFormShell()
DBG_DTOR(FmXFormShell,NULL);
}
+Reference< XModel > FmXFormShell::getContextDocument() const
+{
+ Reference< XModel > xModel;
+
+ // determine the type of document we live in
+ Reference< XController > xController;
+ if ( !m_xAttachedFrame.is() )
+ return xModel;
+
+ xController = m_xAttachedFrame->getController();
+ if ( !xController.is() )
+ return xModel;
+
+ return xController->getModel();
+}
+
+bool
+FmXFormShell::isEnhancedForm() const
+{
+ if ( m_eDocumentType != eUnknownDocumentType )
+ return m_eDocumentType == eEnhancedForm;
+
+ return DocumentClassification::isEnhancedForm( getContextDocument() );
+}
+
//------------------------------------------------------------------
::svxform::DocumentType FmXFormShell::getDocumentType() const
{
@@ -694,12 +719,7 @@ FmXFormShell::~FmXFormShell()
return m_eDocumentType;
// determine the type of document we live in
- Reference< XController > xController;
- if ( m_xAttachedFrame.is() )
- xController = m_xAttachedFrame->getController();
- Reference< XModel > xModel;
- if ( xController.is() )
- xModel = xController->getModel();
+ Reference< XModel > xModel = getContextDocument();
if ( xModel.is() )
m_eDocumentType = DocumentClassification::classifyDocument( xModel );
else