diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2009-11-25 13:27:22 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2009-11-25 13:27:22 +0100 |
commit | 33f21809ca208713191cca2d35a7879163e75909 (patch) | |
tree | f256b381afb8c1796e1e96d4af6f4884b18955df /svx/source/form/fmmodel.cxx | |
parent | 27107b0d9f88117373b50fef948a8919ea49288e (diff) | |
parent | fcac7b7672113ec68f90ab4443bc8a920a59ab34 (diff) |
CWS-TOOLING: integrate CWS controltextrendering
Diffstat (limited to 'svx/source/form/fmmodel.cxx')
-rw-r--r-- | svx/source/form/fmmodel.cxx | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index 09008ae220b9..a09d0f78173a 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -30,30 +30,27 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" + +#include "fmundo.hxx" +#include "fmdocumentclassification.hxx" +#include "fmcontrollayout.hxx" + +#include <svx/fmmodel.hxx> +#include <svx/fmpage.hxx> +#include <svx/svdobj.hxx> #include <tools/debug.hxx> #ifndef SVX_LIGHT -#ifndef _SFX_OBJSH_HXX //autogen #include <sfx2/objsh.hxx> -#endif #else class SfxObjectShell; #endif -#ifndef _FM_FMMODEL_HXX -#include <svx/fmmodel.hxx> -#endif - -#ifndef _FM_PAGE_HXX -#include <svx/fmpage.hxx> -#endif -#include "fmundo.hxx" -#ifndef _SVX_SVDOBJ_HXX -#include <svx/svdobj.hxx> -#endif +#include <boost/optional.hpp> using ::com::sun::star::uno::Reference; using ::com::sun::star::container::XNameContainer; +using namespace svxform; TYPEINIT1(FmFormModel, SdrModel); @@ -62,11 +59,14 @@ struct FmFormModelImplData FmXUndoEnvironment* pUndoEnv; sal_Bool bOpenInDesignIsDefaulted; sal_Bool bMovingPage; + ::boost::optional< sal_Bool > + aControlsUseRefDevice; FmFormModelImplData() :pUndoEnv( NULL ) ,bOpenInDesignIsDefaulted( sal_True ) ,bMovingPage( sal_False ) + ,aControlsUseRefDevice() { } }; @@ -314,6 +314,19 @@ sal_Bool FmFormModel::OpenInDesignModeIsDefaulted( ) #endif //------------------------------------------------------------------------ +sal_Bool FmFormModel::ControlsUseRefDevice() const +{ + if ( !m_pImpl->aControlsUseRefDevice ) + { + DocumentType eDocType = eUnknownDocumentType; + if ( m_pObjShell ) + eDocType = DocumentClassification::classifyHostDocument( m_pObjShell->GetModel() ); + m_pImpl->aControlsUseRefDevice.reset( ControlLayouter::useDocumentReferenceDevice( eDocType ) ); + } + return *m_pImpl->aControlsUseRefDevice; +} + +//------------------------------------------------------------------------ void FmFormModel::SetAutoControlFocus( sal_Bool _bAutoControlFocus ) { #ifndef SVX_LIGHT |