Kaydet (Commit) f7b87015 authored tarafından Oliver Bolte's avatar Oliver Bolte

INTEGRATION: CWS dba20 (1.38.142); FILE MERGED

2004/11/29 11:25:44 oj 1.38.142.3: RESYNC: (1.38-1.39); FILE MERGED
2004/11/26 13:39:43 fs 1.38.142.2: #i37434# let ControlLayouter decide about initial control layout (border/color, visual effect)
2004/11/18 12:03:33 fs 1.38.142.1: #i37017# no gray border color for grid controls - this looks ugly
üst bfcc6e1c
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: fmvwimp.cxx,v $ * $RCSfile: fmvwimp.cxx,v $
* *
* $Revision: 1.39 $ * $Revision: 1.40 $
* *
* last change: $Author: obo $ $Date: 2004-11-16 11:25:57 $ * last change: $Author: obo $ $Date: 2005-01-05 12:21:48 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -88,6 +88,9 @@ ...@@ -88,6 +88,9 @@
#ifndef SVX_SOURCE_INC_FMDOCUMENTCLASSIFICATION_HXX #ifndef SVX_SOURCE_INC_FMDOCUMENTCLASSIFICATION_HXX
#include "fmdocumentclassification.hxx" #include "fmdocumentclassification.hxx"
#endif #endif
#ifndef SVX_SOURCE_INC_FMCONTROLLAYOUT_HXX
#include "fmcontrollayout.hxx"
#endif
/** === begin UNO includes === **/ /** === begin UNO includes === **/
#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_ #ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
...@@ -1219,39 +1222,10 @@ sal_Int16 FmXFormView::implInitializeNewControlModel( const Reference< XProperty ...@@ -1219,39 +1222,10 @@ sal_Int16 FmXFormView::implInitializeNewControlModel( const Reference< XProperty
try try
{ {
DocumentType eDocType = DocumentClassification::classifyHostDocument( _rxModel.get() ); DocumentType eDocumentType = GetFormShell() ? GetFormShell()->GetImpl()->getDocumentType() : eUnknownDocumentType;
ControlLayouter::initializeControlLayout( _rxModel, eDocumentType );
// if the control lives in an eForm or database, give it some nicer layout
// Notice that in such documents, and FmXFormController will additionally enable
// dynamic control border colors (i.e. the color changes when the mouse hovers over
// the control, or the control has the focus)
Reference< XPropertySetInfo > xPSI( _rxModel->getPropertySetInfo() );
if ( xPSI.is() && xPSI->hasPropertyByName( FM_PROP_BORDER ) )
{
sal_Int16 nCurrentBorder = VisualEffect::NONE;
OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_BORDER ) >>= nCurrentBorder );
if ( nCurrentBorder != VisualEffect::NONE )
{
if ( ( eDocType == eEnhancedForm ) || ( eDocType == eDatabaseForm ) )
{
_rxModel->setPropertyValue( FM_PROP_BORDER, makeAny( VisualEffect::FLAT ) );
OSL_ENSURE( xPSI->hasPropertyByName( FM_PROP_BORDERCOLOR ), "FmXFormView::implInitializeNewControlModel: Border, but no border color?" );
if ( xPSI->hasPropertyByName( FM_PROP_BORDERCOLOR ) )
_rxModel->setPropertyValue( FM_PROP_BORDERCOLOR, makeAny( (sal_Int32)0x00C0C0C0 ) ); // light gray
}
}
}
// same for the VisualEffect of radios and check boxes
if ( xPSI.is() && xPSI->hasPropertyByName( FM_PROP_VISUALEFFECT ) )
{
if ( ( eDocType == eEnhancedForm ) || ( eDocType == eDatabaseForm ) )
{
_rxModel->setPropertyValue( FM_PROP_VISUALEFFECT, makeAny( VisualEffect::FLAT ) );
}
}
_rxModel->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId; _rxModel->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId;
switch ( nClassId ) switch ( nClassId )
{ {
case FormComponentType::SCROLLBAR: case FormComponentType::SCROLLBAR:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment