summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2002-05-17 07:41:57 +0000
committerFrank Schönheit <fs@openoffice.org>2002-05-17 07:41:57 +0000
commit59ef0a32b9065f5b2d5a5289ff832f49bf3f759a (patch)
tree488e061d0dce749b59e5127dd1c83c49fc4fd9b9 /svx
parentbcb7da39e2c8a0e6efa98aa8cca765b91aca6537 (diff)
high contrast support #99375#
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/filtnav.cxx71
-rw-r--r--svx/source/form/fmexpl.cxx35
-rw-r--r--svx/source/form/fmexpl.src82
-rw-r--r--svx/source/form/navigatortree.cxx81
-rw-r--r--svx/source/form/navigatortreemodel.cxx26
-rw-r--r--svx/source/inc/filtnav.hxx13
-rw-r--r--svx/source/inc/fmexpl.hxx50
7 files changed, 225 insertions, 133 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 62614e283aaa..f9a6223522e5 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: filtnav.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: fs $ $Date: 2002-05-08 15:57:13 $
+ * last change: $Author: fs $ $Date: 2002-05-17 08:40:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -227,7 +227,10 @@ OLocalExchange* OFilterExchangeHelper::createExchange() const
//========================================================================
TYPEINIT0(FmFilterData);
-Image FmFilterData::GetImage() const {return Image();}
+Image FmFilterData::GetImage( BmpColorMode _eMode ) const
+{
+ return Image();
+}
//========================================================================
TYPEINIT1(FmParentData, FmFilterData);
@@ -242,15 +245,20 @@ FmParentData::~FmParentData()
//========================================================================
TYPEINIT1(FmFormItem, FmParentData);
//------------------------------------------------------------------------
-Image FmFormItem::GetImage() const
+Image FmFormItem::GetImage( BmpColorMode _eMode ) const
{
static Image aImage;
+ static Image aImage_HC;
+
if (!aImage)
{
- ImageList aNavigatorImages(SVX_RES(RID_SVXIMGLIST_FMEXPL));
+ ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ ImageList aNavigatorImages_HC( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) );
+
aImage = aNavigatorImages.GetImage( RID_SVXIMG_FORM );
+ aImage_HC = aNavigatorImages_HC.GetImage( RID_SVXIMG_FORM );
}
- return aImage;
+ return ( BMP_COLOR_HIGHCONTRAST == _eMode ) ? aImage_HC : aImage;
}
//========================================================================
@@ -270,15 +278,20 @@ FmFilterItem* FmFilterItems::Find(const Reference< ::com::sun::star::awt::XTextC
}
//------------------------------------------------------------------------
-Image FmFilterItems::GetImage() const
+Image FmFilterItems::GetImage( BmpColorMode _eMode ) const
{
static Image aImage;
+ static Image aImage_HC;
+
if (!aImage)
{
- ImageList aNavigatorImages(SVX_RES(RID_SVXIMGLIST_FMEXPL));
+ ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ ImageList aNavigatorImages_HC( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) );
+
aImage = aNavigatorImages.GetImage( RID_SVXIMG_FILTER );
+ aImage_HC = aNavigatorImages_HC.GetImage( RID_SVXIMG_FILTER );
}
- return aImage;
+ return ( BMP_COLOR_HIGHCONTRAST == _eMode ) ? aImage_HC : aImage;
}
//========================================================================
@@ -296,15 +309,20 @@ FmFilterItem::FmFilterItem(const Reference< ::com::sun::star::lang::XMultiServic
}
//------------------------------------------------------------------------
-Image FmFilterItem::GetImage() const
+Image FmFilterItem::GetImage( BmpColorMode _eMode ) const
{
static Image aImage;
+ static Image aImage_HC;
+
if (!aImage)
{
- ImageList aNavigatorImages(SVX_RES(RID_SVXIMGLIST_FMEXPL));
+ ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ ImageList aNavigatorImages_HC( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) );
+
aImage = aNavigatorImages.GetImage( RID_SVXIMG_FIELD );
+ aImage_HC = aNavigatorImages_HC.GetImage( RID_SVXIMG_FIELD );
}
- return aImage;
+ return ( BMP_COLOR_HIGHCONTRAST == _eMode ) ? aImage_HC : aImage;
}
//========================================================================
@@ -1256,10 +1274,24 @@ FmFilterNavigator::FmFilterNavigator( Window* pParent )
{
SetHelpId( HID_FILTER_NAVIGATOR );
- ImageList aNavigatorImages(SVX_RES(RID_SVXIMGLIST_FMEXPL));
- Image aCollapsedNodeImg = aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE );
- Image aExpandedNodeImg = aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE );
- SetNodeBitmaps( aCollapsedNodeImg, aExpandedNodeImg );
+ {
+ {
+ ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ SetNodeBitmaps(
+ aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
+ aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ),
+ BMP_COLOR_NORMAL
+ );
+ }
+ {
+ ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) );
+ SetNodeBitmaps(
+ aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
+ aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ),
+ BMP_COLOR_HIGHCONTRAST
+ );
+ }
+ }
m_pModel = new FmFilterModel(comphelper::getProcessServiceFactory());
StartListening( *m_pModel );
@@ -1720,7 +1752,12 @@ void FmFilterNavigator::Insert(FmFilterData* pItem, sal_Int32 nPos)
// insert the item
SvLBoxEntry* pParentEntry = FindEntry(pParent);
- InsertEntry(pItem->GetText(), pItem->GetImage(), pItem->GetImage(), pParentEntry, sal_False, nPos, pItem );
+ SvLBoxEntry* pNewEntry = InsertEntry(pItem->GetText(), pItem->GetImage(), pItem->GetImage(), pParentEntry, sal_False, nPos, pItem );
+ if ( pNewEntry )
+ {
+ SetExpandedEntryBmp( pNewEntry, pItem->GetImage( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
+ SetCollapsedEntryBmp( pNewEntry, pItem->GetImage( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
+ }
}
//------------------------------------------------------------------------
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index b8ded26200ab..29d53fcc326b 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fmexpl.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: fs $ $Date: 2002-05-16 15:09:05 $
+ * last change: $Author: fs $ $Date: 2002-05-17 08:39:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -386,8 +386,8 @@ FmEntryData::FmEntryData( const FmEntryData& rEntryData )
{
pChildList = new FmEntryDataList();
aText = rEntryData.GetText();
- aCollapsedImage = rEntryData.GetCollapsedImage();
- aExpandedImage = rEntryData.GetExpandedImage();
+ m_aNormalImage = rEntryData.GetNormalImage();
+ m_aHCImage = rEntryData.GetHCImage();
pParent = rEntryData.GetParent();
FmEntryData* pChildData;
@@ -442,16 +442,16 @@ sal_Bool FmEntryData::IsEqualWithoutChilds( FmEntryData* pEntryData )
TYPEINIT1( FmFormData, FmEntryData );
DBG_NAME(FmFormData);
//------------------------------------------------------------------------
-FmFormData::FmFormData( Reference< XForm > xForm, const ImageList& ilNavigatorImages, FmFormData* pParent )
- :FmEntryData( pParent )
- ,m_xForm( xForm )
+FmFormData::FmFormData( const Reference< XForm >& _rxForm, const ImageList& _rNormalImages, const ImageList& _rHCImages, FmFormData* _pParent )
+ :FmEntryData( _pParent )
+ ,m_xForm( _rxForm )
{
DBG_CTOR(FmEntryData,NULL);
//////////////////////////////////////////////////////////////////////
// Images setzen
- aCollapsedImage = ilNavigatorImages.GetImage( RID_SVXIMG_FORM );
- aExpandedImage = ilNavigatorImages.GetImage( RID_SVXIMG_FORM );
+ m_aNormalImage = _rNormalImages.GetImage( RID_SVXIMG_FORM );
+ m_aHCImage = _rHCImages.GetImage( RID_SVXIMG_FORM );
//////////////////////////////////////////////////////////////////////
// Titel setzen
@@ -509,15 +509,15 @@ sal_Bool FmFormData::IsEqualWithoutChilds( FmEntryData* pEntryData )
TYPEINIT1( FmControlData, FmEntryData );
DBG_NAME(FmControlData);
//------------------------------------------------------------------------
-FmControlData::FmControlData( Reference< XFormComponent > xFormComponent, const ImageList& ilNavigatorImages, FmFormData* pParent )
- :FmEntryData( pParent )
- ,m_xFormComponent( xFormComponent )
+FmControlData::FmControlData( const Reference< XFormComponent >& _rxComponent, const ImageList& _rNormalImages, const ImageList& _rHCImages, FmFormData* _pParent )
+ :FmEntryData( _pParent )
+ ,m_xFormComponent( _rxComponent )
{
DBG_CTOR(FmControlData,NULL);
//////////////////////////////////////////////////////////////////////
// Images setzen
- aCollapsedImage = GetImage(ilNavigatorImages);
- aExpandedImage = GetImage(ilNavigatorImages);
+ m_aNormalImage = GetImage( _rNormalImages );
+ m_aHCImage = GetImage( _rHCImages );
//////////////////////////////////////////////////////////////////////
// Titel setzen
@@ -666,11 +666,12 @@ sal_Bool FmControlData::IsEqualWithoutChilds( FmEntryData* pEntryData )
}
//------------------------------------------------------------------------
-void FmControlData::ModelReplaced(const Reference< XFormComponent > & xNew, const ImageList& ilNavigatorImages)
+void FmControlData::ModelReplaced( const Reference< XFormComponent >& _rxNew, const ImageList& _rNormalImages, const ImageList& _rHCImages )
{
- m_xFormComponent = xNew;
+ m_xFormComponent = _rxNew;
// Images neu setzen
- aCollapsedImage = aExpandedImage = GetImage(ilNavigatorImages);
+ m_aNormalImage = GetImage( _rNormalImages );
+ m_aHCImage = GetImage( _rHCImages );
}
//............................................................................
diff --git a/svx/source/form/fmexpl.src b/svx/source/form/fmexpl.src
index 848044a76235..e0bfab64eddf 100644
--- a/svx/source/form/fmexpl.src
+++ b/svx/source/form/fmexpl.src
@@ -2,9 +2,9 @@
*
* $RCSfile: fmexpl.src,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: fs $ $Date: 2002-05-16 15:17:08 $
+ * last change: $Author: fs $ $Date: 2002-05-17 08:41:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -832,46 +832,54 @@ Menu RID_FMSHELL_CONVERSIONMENU
};
};
+#define NAVIGATOR_IMAGEIDS \
+ IdList = \
+ { \
+ RID_SVXIMG_BUTTON ; \
+ RID_SVXIMG_RADIOBUTTON ; \
+ RID_SVXIMG_CHECKBOX ; \
+ RID_SVXIMG_FIXEDTEXT ; \
+ RID_SVXIMG_GROUPBOX ; \
+ RID_SVXIMG_EDIT ; \
+ RID_SVXIMG_LISTBOX ; \
+ RID_SVXIMG_COMBOBOX ; \
+ RID_SVXIMG_URLBUTTON ; \
+ RID_SVXIMG_CONTROL ; \
+ RID_SVXIMG_FORM ; \
+ RID_SVXIMG_FORMS ; \
+ RID_SVXIMG_COLLAPSEDNODE ; \
+ RID_SVXIMG_EXPANDEDNODE ; \
+ RID_SVXIMG_IMAGEBUTTON ; \
+ RID_SVXIMG_FILECONTROL ; \
+ RID_SVXIMG_DATEFIELD ; \
+ RID_SVXIMG_TIMEFIELD ; \
+ RID_SVXIMG_NUMERICFIELD ; \
+ RID_SVXIMG_CURRENCYFIELD ; \
+ RID_SVXIMG_PATTERNFIELD ; \
+ RID_SVXIMG_HIDDEN ; \
+ RID_SVXIMG_IMAGECONTROL ; \
+ RID_SVXIMG_GRID ; \
+ RID_SVXIMG_FILTER ; \
+ RID_SVXIMG_FORMATTEDFIELD ; \
+ RID_SVXIMG_DATE_N_TIME_FIELDS ; \
+ RID_SVXIMG_FIELD ; \
+ }; \
+ IdCount = 28
+
ImageList RID_SVXIMGLIST_FMEXPL
{
ImageBitmap = Bitmap { File = "sx_form.bmp" ; };
MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
- IdList =
- {
- RID_SVXIMG_BUTTON ;
- RID_SVXIMG_RADIOBUTTON ;
- RID_SVXIMG_CHECKBOX ;
- RID_SVXIMG_FIXEDTEXT ;
- RID_SVXIMG_GROUPBOX ;
- RID_SVXIMG_EDIT ;
- RID_SVXIMG_LISTBOX ;
- RID_SVXIMG_COMBOBOX ;
- RID_SVXIMG_URLBUTTON ;
- RID_SVXIMG_CONTROL ;
- RID_SVXIMG_FORM ;
- RID_SVXIMG_FORMS ;
- RID_SVXIMG_COLLAPSEDNODE ;
- RID_SVXIMG_EXPANDEDNODE ;
- RID_SVXIMG_IMAGEBUTTON ;
- RID_SVXIMG_FILECONTROL ;
- RID_SVXIMG_DATEFIELD ;
- RID_SVXIMG_TIMEFIELD ;
- RID_SVXIMG_NUMERICFIELD ;
- RID_SVXIMG_CURRENCYFIELD ;
- RID_SVXIMG_PATTERNFIELD ;
- RID_SVXIMG_HIDDEN ;
- RID_SVXIMG_IMAGECONTROL ;
- RID_SVXIMG_GRID ;
- RID_SVXIMG_FILTER ;
- RID_SVXIMG_FORMATTEDFIELD ;
- RID_SVXIMG_DATE_N_TIME_FIELDS ;
- RID_SVXIMG_FIELD ;
- RID_SVXIMG_ERROR ;
- RID_SVXIMG_WARNING ;
- RID_SVXIMG_INFO ;
- };
- IdCount = 31 ;
+ NAVIGATOR_IMAGEIDS;
+};
+
+ImageList RID_SVXIMGLIST_FMEXPL_HC
+{
+ ImageBitmap = Bitmap { File = "sxh_form.bmp" ; };
+ MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
+ NAVIGATOR_IMAGEIDS;
};
+
ModalDialog RID_SVXDLG_SETFORM
{
OutputSize = TRUE ;
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 08e01f30be64..5aeb18b5d8f0 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: navigatortree.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fs $ $Date: 2002-05-16 15:05:59 $
+ * last change: $Author: fs $ $Date: 2002-05-17 08:41:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -189,7 +189,6 @@ namespace svxform
,m_pEditEntry(NULL)
,m_nSelectLock(0)
,m_aTimerTriggered(-1,-1)
- ,m_ilNavigatorImages( SVX_RES(RID_SVXIMGLIST_FMEXPL) )
,m_bRootSelected(sal_False)
,m_nFormsSelected(0)
,m_nControlsSelected(0)
@@ -205,15 +204,31 @@ namespace svxform
{
SetHelpId( HID_FORM_NAVIGATOR );
- m_aRootImg = m_ilNavigatorImages.GetImage( RID_SVXIMG_FORMS );
- Image m_aCollapsedNodeImg = m_ilNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE );
- Image m_aExpandedNodeImg = m_ilNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE );
- SetNodeBitmaps( m_aCollapsedNodeImg, m_aExpandedNodeImg );
+ {
+ ImageList aNodeBmps( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ SetNodeBitmaps(
+ m_aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
+ m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ),
+ BMP_COLOR_NORMAL
+ );
+ }
+ {
+ ImageList aNodeBmps( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) );
+ SetNodeBitmaps(
+ m_aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
+ m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ),
+ BMP_COLOR_HIGHCONTRAST
+ );
+ }
+
+ m_aNavigatorImages = ImageList( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ m_aNavigatorImagesHC = ImageList( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) );
+
SetDragDropMode(0xFFFF);
EnableInplaceEditing( sal_True );
SetSelectionMode(MULTIPLE_SELECTION);
- m_pNavModel = new NavigatorTreeModel(m_ilNavigatorImages);
+ m_pNavModel = new NavigatorTreeModel( m_aNavigatorImages, m_aNavigatorImagesHC );
Clear();
StartListening( *m_pNavModel );
@@ -428,8 +443,8 @@ namespace svxform
// 'Neu'\'Formular' unter genau den selben Bedingungen
pSubMenuNew->EnableItem( SID_FM_NEW_FORM, bSingleSelection && (m_nFormsSelected || m_bRootSelected) );
- pSubMenuNew->SetItemImage(SID_FM_NEW_FORM, m_ilNavigatorImages.GetImage(RID_SVXIMG_FORM));
- pSubMenuNew->SetItemImage(SID_FM_NEW_HIDDEN, m_ilNavigatorImages.GetImage(RID_SVXIMG_HIDDEN));
+ pSubMenuNew->SetItemImage(SID_FM_NEW_FORM, m_aNavigatorImages.GetImage(RID_SVXIMG_FORM));
+ pSubMenuNew->SetItemImage(SID_FM_NEW_HIDDEN, m_aNavigatorImages.GetImage(RID_SVXIMG_HIDDEN));
// 'Neu'\'verstecktes...', wenn genau ein Formular selektiert ist
pSubMenuNew->EnableItem( SID_FM_NEW_HIDDEN, bSingleSelection && m_nFormsSelected );
@@ -438,15 +453,9 @@ namespace svxform
aContextMenu.EnableItem( SID_FM_DELETE, !m_bRootSelected );
// 'Cut', 'Copy' and 'Paste'
-#ifdef FS_PRIV_DEBUG_
aContextMenu.EnableItem( SID_CUT, implAllowExchange( DND_ACTION_MOVE ) );
aContextMenu.EnableItem( SID_COPY, implAllowExchange( DND_ACTION_COPY ) );
aContextMenu.EnableItem( SID_PASTE, implAcceptPaste( ) );
-#else
- aContextMenu.EnableItem( SID_CUT, sal_False );
- aContextMenu.EnableItem( SID_COPY, sal_False );
- aContextMenu.EnableItem( SID_PASTE, sal_False );
-#endif
// der TabDialog, wenn es genau ein Formular ist ...
aContextMenu.EnableItem( SID_FM_TAB_DIALOG, bSingleSelection && m_nFormsSelected );
@@ -647,8 +656,11 @@ namespace svxform
SvLBoxEntry* pEntry = FindEntry( pData );
if (pEntry)
{ // das Image neu setzen
- SetCollapsedEntryBmp(pEntry, pData->GetCollapsedImage());
- SetExpandedEntryBmp(pEntry, pData->GetExpandedImage());
+ SetCollapsedEntryBmp( pEntry, pData->GetNormalImage(), BMP_COLOR_NORMAL );
+ SetExpandedEntryBmp( pEntry, pData->GetNormalImage(), BMP_COLOR_NORMAL );
+
+ SetCollapsedEntryBmp( pEntry, pData->GetHCImage(), BMP_COLOR_HIGHCONTRAST );
+ SetExpandedEntryBmp( pEntry, pData->GetHCImage(), BMP_COLOR_HIGHCONTRAST );
}
}
@@ -665,8 +677,16 @@ namespace svxform
//////////////////////////////////////////////////////////////////////
// Default-Eintrag "Formulare"
- m_pRootEntry = InsertEntry( SVX_RES(RID_STR_FORMS), m_aRootImg, m_aRootImg,
+ Image aRootImage( m_aNavigatorImages.GetImage( RID_SVXIMG_FORMS ) );
+ m_pRootEntry = InsertEntry( SVX_RES(RID_STR_FORMS), aRootImage, aRootImage,
NULL, sal_False, 0, NULL );
+
+ if ( m_pRootEntry )
+ {
+ Image aHCRootImage( m_aNavigatorImagesHC.GetImage( RID_SVXIMG_FORMS ) );
+ SetExpandedEntryBmp( m_pRootEntry, aHCRootImage, BMP_COLOR_HIGHCONTRAST );
+ SetCollapsedEntryBmp( m_pRootEntry, aHCRootImage, BMP_COLOR_HIGHCONTRAST );
+ }
}
else if (!m_bMarkingObjects && rHint.ISA(FmNavRequestSelectHint))
{ // wenn m_bMarkingObjects sal_True ist, markiere ich gerade selber Objekte, und da der ganze Mechanismus dahinter synchron ist,
@@ -692,14 +712,20 @@ namespace svxform
if( !pParentEntry )
pNewEntry = InsertEntry( pEntryData->GetText(),
- pEntryData->GetExpandedImage(), pEntryData->GetCollapsedImage(),
+ pEntryData->GetNormalImage(), pEntryData->GetNormalImage(),
m_pRootEntry, sal_False, nRelPos, pEntryData );
else
pNewEntry = InsertEntry( pEntryData->GetText(),
- pEntryData->GetExpandedImage(), pEntryData->GetCollapsedImage(),
+ pEntryData->GetNormalImage(), pEntryData->GetNormalImage(),
pParentEntry, sal_False, nRelPos, pEntryData );
+ if ( pNewEntry )
+ {
+ SetExpandedEntryBmp( pNewEntry, pEntryData->GetHCImage(), BMP_COLOR_HIGHCONTRAST );
+ SetCollapsedEntryBmp( pNewEntry, pEntryData->GetHCImage(), BMP_COLOR_HIGHCONTRAST );
+ }
+
//////////////////////////////////////////////////////////////////////
// Wenn Root-Eintrag Root expandieren
if( !pParentEntry )
@@ -1312,7 +1338,6 @@ namespace svxform
return;
}
-#ifdef FS_PRIV_DEBUG_
// copy'n'paste?
switch ( rCode.GetFunction() )
{
@@ -1329,7 +1354,6 @@ namespace svxform
doCopy();
break;
}
-#endif
SvTreeListBox::KeyInput(rKEvt);
}
@@ -1360,7 +1384,7 @@ namespace svxform
if (!xNewForm.is())
return;
- FmFormData* pNewFormData = new FmFormData( xNewForm, m_ilNavigatorImages, pParentFormData );
+ FmFormData* pNewFormData = new FmFormData( xNewForm, m_aNavigatorImages, m_aNavigatorImagesHC, pParentFormData );
//////////////////////////////////////////////////////////////////////
// Namen setzen
@@ -1373,10 +1397,10 @@ namespace svxform
try
{
xPropertySet->setPropertyValue( FM_PROP_NAME, makeAny(aName) );
- // a form should always have the command type table as default
+ // a form should always have the command type table as default
xPropertySet->setPropertyValue( FM_PROP_COMMANDTYPE, makeAny(sal_Int32(CommandType::TABLE)));
}
- catch(...)
+ catch ( const Exception& )
{
DBG_ERROR("NavigatorTree::NewForm : could not set esssential properties !");
}
@@ -1423,7 +1447,7 @@ namespace svxform
if (!xNewComponent.is())
return NULL;
- FmControlData* pNewFormControlData = new FmControlData( xNewComponent, m_ilNavigatorImages, pParentFormData );
+ FmControlData* pNewFormControlData = new FmControlData( xNewComponent, m_aNavigatorImages, m_aNavigatorImagesHC, pParentFormData );
//////////////////////////////////////////////////////////////////////
// Namen setzen
@@ -2149,6 +2173,9 @@ namespace svxform
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.2 2002/05/16 15:05:59 fs
+ * some major changes in preparation of #98725# (not enabled, yet)
+ *
* Revision 1.1 2002/05/08 07:06:03 fs
* initial checkin - outsourced the tree view from fmexpl.cxx
*
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index 62ccd814747e..b8e936d0f08d 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: navigatortreemodel.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fs $ $Date: 2002-05-16 15:05:59 $
+ * last change: $Author: fs $ $Date: 2002-05-17 08:41:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -269,11 +269,12 @@ namespace svxform
//========================================================================
//------------------------------------------------------------------------
- NavigatorTreeModel::NavigatorTreeModel(const ImageList& ilNavigatorImages)
+ NavigatorTreeModel::NavigatorTreeModel( const ImageList& _rNormalImages, const ImageList& _rHCImages )
:m_pFormShell(NULL)
,m_pFormPage(NULL)
,m_pFormModel(NULL)
- ,m_ilNavigatorImages(ilNavigatorImages)
+ ,m_aNormalImages( _rNormalImages )
+ ,m_aHCImages( _rHCImages )
{
m_pPropChangeList = new OFormComponentObserver(this);
m_pPropChangeList->acquire();
@@ -598,7 +599,7 @@ namespace svxform
"NavigatorTreeModel::FillBranch : the root container should supply only elements of type XForm");
xForms->getByIndex(i) >>= xSubForm;
- pSubFormData = new FmFormData( xSubForm, m_ilNavigatorImages, pFormData );
+ pSubFormData = new FmFormData( xSubForm, m_aNormalImages, m_aHCImages, pFormData );
Insert( pSubFormData, LIST_APPEND );
//////////////////////////////////////////////////////////////
@@ -628,7 +629,7 @@ namespace svxform
if (xSubForm.is())
{ // die aktuelle Component ist eine Form
- pSubFormData = new FmFormData(xSubForm, m_ilNavigatorImages, pFormData);
+ pSubFormData = new FmFormData(xSubForm, m_aNormalImages, m_aHCImages, pFormData);
Insert(pSubFormData, LIST_APPEND);
//////////////////////////////////////////////////////////////
@@ -637,7 +638,7 @@ namespace svxform
}
else
{
- pNewControlData = new FmControlData(xCurrentComponent, m_ilNavigatorImages, pFormData);
+ pNewControlData = new FmControlData(xCurrentComponent, m_aNormalImages, m_aHCImages, pFormData);
Insert(pNewControlData, LIST_APPEND);
}
}
@@ -659,7 +660,7 @@ namespace svxform
if (xParentForm.is())
pParentData = (FmFormData*)FindData( xParentForm, GetRootList() );
- pFormData = new FmFormData( xForm, m_ilNavigatorImages, pParentData );
+ pFormData = new FmFormData( xForm, m_aNormalImages, m_aHCImages, pParentData );
Insert( pFormData, nRelPos );
}
@@ -676,7 +677,7 @@ namespace svxform
FmFormData* pParentData = (FmFormData*)FindData( xForm, GetRootList() );
if( !pParentData )
{
- pParentData = new FmFormData( xForm, m_ilNavigatorImages, NULL );
+ pParentData = new FmFormData( xForm, m_aNormalImages, m_aHCImages, NULL );
Insert( pParentData, LIST_APPEND );
}
@@ -684,7 +685,7 @@ namespace svxform
{
//////////////////////////////////////////////////////////
// Neue EntryData setzen
- FmEntryData* pNewEntryData = new FmControlData( xComp, m_ilNavigatorImages, pParentData );
+ FmEntryData* pNewEntryData = new FmControlData( xComp, m_aNormalImages, m_aHCImages, pParentData );
//////////////////////////////////////////////////////////
// Neue EntryData einfuegen
@@ -697,7 +698,7 @@ namespace svxform
{
FmEntryData* pData = FindData(xOld, GetRootList(), sal_True);
DBG_ASSERT(pData && pData->ISA(FmControlData), "NavigatorTreeModel::ReplaceFormComponent : invalid argument !");
- ((FmControlData*)pData)->ModelReplaced(xNew, m_ilNavigatorImages);
+ ((FmControlData*)pData)->ModelReplaced( xNew, m_aNormalImages, m_aHCImages );
FmNavModelReplacedHint aReplacedHint( pData );
Broadcast( aReplacedHint );
@@ -1116,6 +1117,9 @@ namespace svxform
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.2 2002/05/16 15:05:59 fs
+ * some major changes in preparation of #98725# (not enabled, yet)
+ *
* Revision 1.1 2002/05/08 07:06:16 fs
* initial checkin - outsourced the tree model from fmexpl.cxx
*
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index d380cfcb450f..69d0854824f7 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: filtnav.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: fs $ $Date: 2002-05-16 15:04:58 $
+ * last change: $Author: fs $ $Date: 2002-05-17 08:35:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -169,7 +169,8 @@ public:
void SetText( const ::rtl::OUString& rText ){ m_aText = rText; }
::rtl::OUString GetText() const { return m_aText; }
FmParentData* GetParent() const {return m_pParent;}
- virtual Image GetImage() const;
+
+ virtual Image GetImage( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
};
//========================================================================
@@ -208,7 +209,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & GetController(){return m_xController;}
void SetCurrentPosition(sal_Int32 nCurrent){m_nCurrent = nCurrent;}
sal_Int32 GetCurrentPosition() const {return m_nCurrent;}
- virtual Image GetImage() const;
+ virtual Image GetImage( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
};
//========================================================================
@@ -220,7 +221,7 @@ public:
FmFilterItems(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,FmFormItem* pParent, const ::rtl::OUString& rText ):FmParentData(_rxFactory,pParent, rText){}
FmFilterItem* Find(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & xText) const;
- virtual Image GetImage() const;
+ virtual Image GetImage( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
};
//========================================================================
@@ -240,7 +241,7 @@ public:
const ::rtl::OUString& GetFieldName() const {return m_aFieldName;}
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & GetTextComponent() const {return m_xText;}
- virtual Image GetImage() const;
+ virtual Image GetImage( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
};
//========================================================================
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 1efc9ab6efd9..2e93ee13e682 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fmexpl.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: fs $ $Date: 2002-05-16 15:04:04 $
+ * last change: $Author: fs $ $Date: 2002-05-17 08:35:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -240,9 +240,9 @@ class FmEntryDataList;
class FmEntryData
{
protected:
- Image aCollapsedImage;
- Image aExpandedImage;
- ::rtl::OUString aText;
+ Image m_aNormalImage;
+ Image m_aHCImage;
+ ::rtl::OUString aText;
FmEntryDataList* pChildList;
FmEntryData* pParent;
@@ -258,8 +258,9 @@ public:
void SetText( const ::rtl::OUString& rText ){ aText = rText; }
void SetParent( FmEntryData* pParentData ){ pParent = pParentData; }
- Image GetCollapsedImage() const { return aCollapsedImage; }
- Image GetExpandedImage() const { return aExpandedImage; }
+ const Image& GetNormalImage() const { return m_aNormalImage; }
+ const Image& GetHCImage() const { return m_aHCImage; }
+
::rtl::OUString GetText() const { return aText; }
FmEntryData* GetParent() const { return pParent; }
FmEntryDataList* GetChildList() const { return pChildList; }
@@ -310,7 +311,13 @@ class FmFormData : public FmEntryData
public:
TYPEINFO();
- FmFormData( ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm, const ImageList& ilNavigatorImages, FmFormData* pParent=NULL );
+ FmFormData(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
+ const ImageList& _rNormalImages,
+ const ImageList& _rHCImages,
+ FmFormData* _pParent = NULL
+ );
+
FmFormData( const FmFormData& rFormData );
virtual ~FmFormData();
@@ -334,7 +341,12 @@ class FmControlData : public FmEntryData
public:
TYPEINFO();
- FmControlData( ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent, const ImageList& ilNavigatorImages, FmFormData* pParent );
+ FmControlData(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& _rxComponent,
+ const ImageList& _rNormalImages,
+ const ImageList& _rHCImages,
+ FmFormData* _pParent
+ );
FmControlData( const FmControlData& rControlData );
virtual ~FmControlData();
@@ -343,7 +355,11 @@ public:
virtual FmEntryData* Clone();
virtual const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& GetElement() const { return m_xFormComponent;}
- void ModelReplaced(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xNew, const ImageList& ilNavigatorImages);
+ void ModelReplaced(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& _rxNew,
+ const ImageList& _rNormalImages,
+ const ImageList& _rHCImages
+ );
};
@@ -404,9 +420,10 @@ namespace svxform
FmFormShell* m_pFormShell;
FmFormPage* m_pFormPage;
FmFormModel* m_pFormModel;
- OFormComponentObserver* m_pPropChangeList;
+ OFormComponentObserver* m_pPropChangeList;
- const ImageList m_ilNavigatorImages;
+ ImageList m_aNormalImages;
+ ImageList m_aHCImages;
void Update( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xForms );
FmControlData* CreateControlData( ::com::sun::star::form::XFormComponent* pFormComponent );
@@ -428,7 +445,7 @@ namespace svxform
// Rueckgabe sal_True, wenn das Objekt eine FormComponent ist (oder rekursiv nur aus solchen besteht)
public:
- NavigatorTreeModel(const ImageList& ilNavigatorImages);
+ NavigatorTreeModel( const ImageList& _rNormalImages, const ImageList& _rHCImages );
virtual ~NavigatorTreeModel();
void FillBranch( FmFormData* pParentData );
@@ -473,7 +490,8 @@ namespace svxform
// die Meta-Daten ueber meine aktuelle Selektion
SvLBoxEntrySortedArray m_arrCurrentSelection;
// die Images, die ich brauche (und an FormDatas und EntryDatas weiterreiche)
- ImageList m_ilNavigatorImages;
+ ImageList m_aNavigatorImages;
+ ImageList m_aNavigatorImagesHC;
::svxform::OControlExchangeHelper m_aControlExchange;
@@ -484,10 +502,6 @@ namespace svxform
sal_uInt32 nEditEvent;
- Image m_aCollapsedNodeImg;
- Image m_aExpandedNodeImg;
- Image m_aRootImg;
-
SELDATA_ITEMS m_sdiState;
Point m_aTimerTriggered; // die Position, an der der DropTimer angeschaltet wurde
DROP_ACTION m_aDropActionType;