Kaydet (Commit) 2b162f80 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

INTEGRATION: CWS warnings01 (1.10.8); FILE MERGED

2006/02/15 13:28:00 fs 1.10.8.1: #i55991# warning-free code
üst 8c975474
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: datanavi.cxx,v $ * $RCSfile: datanavi.cxx,v $
* *
* $Revision: 1.10 $ * $Revision: 1.11 $
* *
* last change: $Author: obo $ $Date: 2006-01-19 15:39:23 $ * last change: $Author: hr $ $Date: 2006-06-19 15:51:58 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -245,15 +245,15 @@ namespace svxform ...@@ -245,15 +245,15 @@ namespace svxform
DeleteAndClear(); DeleteAndClear();
} }
sal_Int8 DataTreeListBox::AcceptDrop( const AcceptDropEvent& rEvt ) sal_Int8 DataTreeListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
{ {
return DND_ACTION_NONE; return DND_ACTION_NONE;
} }
sal_Int8 DataTreeListBox::ExecuteDrop( const ExecuteDropEvent& rEvt ) sal_Int8 DataTreeListBox::ExecuteDrop( const ExecuteDropEvent& /*rEvt*/ )
{ {
return DND_ACTION_NONE; return DND_ACTION_NONE;
} }
void DataTreeListBox::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) void DataTreeListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ )
{ {
SvLBoxEntry* pSelected = FirstSelected(); SvLBoxEntry* pSelected = FirstSelected();
if ( !pSelected ) if ( !pSelected )
...@@ -694,8 +694,8 @@ namespace svxform ...@@ -694,8 +694,8 @@ namespace svxform
{ {
if ( RET_OK == nReturn ) if ( RET_OK == nReturn )
{ {
SvLBoxEntry* pEntry = AddEntry( xNewBinding ); SvLBoxEntry* pNewEntry = AddEntry( xNewBinding );
m_aItemList.Select( pEntry, TRUE ); m_aItemList.Select( pNewEntry, TRUE );
bIsDocModified = true; bIsDocModified = true;
} }
else else
...@@ -1046,7 +1046,6 @@ namespace svxform ...@@ -1046,7 +1046,6 @@ namespace svxform
? m_pNaviWin->GetItemHCImageList() ? m_pNaviWin->GetItemHCImageList()
: m_pNaviWin->GetItemImageList(); : m_pNaviWin->GetItemImageList();
Image aImage = rImageList.GetImage( IID_ELEMENT ); Image aImage = rImageList.GetImage( IID_ELEMENT );
String sDelim( RTL_CONSTASCII_STRINGPARAM( ": " ) );
ItemNode* pNode = new ItemNode( _rEntry ); ItemNode* pNode = new ItemNode( _rEntry );
rtl::OUString sTemp; rtl::OUString sTemp;
...@@ -1094,7 +1093,7 @@ namespace svxform ...@@ -1094,7 +1093,7 @@ namespace svxform
try try
{ {
String sDelim( RTL_CONSTASCII_STRINGPARAM( ": " ) ); String sDelim( RTL_CONSTASCII_STRINGPARAM( ": " ) );
::rtl::OUString sTemp, sName; ::rtl::OUString sName;
_rEntry->getPropertyValue( PN_BINDING_ID ) >>= sTemp; _rEntry->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
sName += String( sTemp ); sName += String( sTemp );
sName += sDelim; sName += sDelim;
...@@ -1116,7 +1115,6 @@ namespace svxform ...@@ -1116,7 +1115,6 @@ namespace svxform
void XFormsPage::EditEntry( const Reference< XPropertySet >& _rEntry ) void XFormsPage::EditEntry( const Reference< XPropertySet >& _rEntry )
{ {
SvLBoxEntry* pEntry = NULL; SvLBoxEntry* pEntry = NULL;
ItemNode* pNode = new ItemNode( _rEntry );
rtl::OUString sTemp; rtl::OUString sTemp;
if ( DGTSubmission == m_eGroup ) if ( DGTSubmission == m_eGroup )
...@@ -1430,6 +1428,9 @@ namespace svxform ...@@ -1430,6 +1428,9 @@ namespace svxform
} }
break; break;
} }
default:
DBG_ERROR( "XFormsPage::SetModel: unknown group!" );
break;
} }
EnableMenuItems( NULL ); EnableMenuItems( NULL );
...@@ -1466,12 +1467,13 @@ namespace svxform ...@@ -1466,12 +1467,13 @@ namespace svxform
if ( xTarget.is() ) if ( xTarget.is() )
m_pNaviWin->AddEventBroadcaster( xTarget ); m_pNaviWin->AddEventBroadcaster( xTarget );
css::xml::dom::NodeType eNodeType = xRoot->getNodeType(); #if OSL_DEBUG_LEVEL > 0
css::xml::dom::NodeType eNodeType = xRoot->getNodeType(); (void)eNodeType;
#endif
::rtl::OUString sNodeName = ::rtl::OUString sNodeName =
m_xUIHelper->getNodeDisplayName( xRoot, m_pNaviWin->IsShowDetails() ); m_xUIHelper->getNodeDisplayName( xRoot, m_pNaviWin->IsShowDetails() );
if ( sNodeName.getLength() == 0 ) if ( sNodeName.getLength() == 0 )
sNodeName = xRoot->getNodeName(); sNodeName = xRoot->getNodeName();
ItemNode* pNode = new ItemNode( xRoot );
if ( xRoot->hasChildNodes() ) if ( xRoot->hasChildNodes() )
AddChildren( NULL, _rImgLst, xRoot ); AddChildren( NULL, _rImgLst, xRoot );
} }
...@@ -1717,12 +1719,12 @@ namespace svxform ...@@ -1717,12 +1719,12 @@ namespace svxform
{ {
bool bIsDocModified = false; bool bIsDocModified = false;
Reference< css::xforms::XFormsUIHelper1 > xUIHelper; Reference< css::xforms::XFormsUIHelper1 > xUIHelper;
USHORT nPos = m_aModelsBox.GetSelectEntryPos(); USHORT nSelectedPos = m_aModelsBox.GetSelectEntryPos();
rtl::OUString sModel( m_aModelsBox.GetEntry( nPos ) ); ::rtl::OUString sSelectedModel( m_aModelsBox.GetEntry( nSelectedPos ) );
Reference< css::xforms::XModel > xModel; Reference< css::xforms::XModel > xModel;
try try
{ {
Any aAny = m_xDataContainer->getByName( sModel ); Any aAny = m_xDataContainer->getByName( sSelectedModel );
if ( aAny >>= xModel ) if ( aAny >>= xModel )
xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( xModel, UNO_QUERY ); xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( xModel, UNO_QUERY );
} }
...@@ -1767,8 +1769,8 @@ namespace svxform ...@@ -1767,8 +1769,8 @@ namespace svxform
xUIHelper->newModel( m_xFrameModel, sNewName ); xUIHelper->newModel( m_xFrameModel, sNewName );
if ( xNewModel.is() ) if ( xNewModel.is() )
{ {
nPos = m_aModelsBox.InsertEntry( sNewName ); USHORT nNewPos = m_aModelsBox.InsertEntry( sNewName );
m_aModelsBox.SelectEntryPos( nPos ); m_aModelsBox.SelectEntryPos( nNewPos );
ModelSelectHdl( &m_aModelsBox ); ModelSelectHdl( &m_aModelsBox );
bIsDocModified = true; bIsDocModified = true;
} }
...@@ -1785,20 +1787,18 @@ namespace svxform ...@@ -1785,20 +1787,18 @@ namespace svxform
case MID_MODELS_EDIT : case MID_MODELS_EDIT :
{ {
AddModelDialog aDlg( this, true ); AddModelDialog aDlg( this, true );
USHORT nPos = m_aModelsBox.GetSelectEntryPos(); aDlg.SetName( sSelectedModel );
rtl::OUString sModel( m_aModelsBox.GetEntry( nPos ) );
aDlg.SetName( sModel );
if ( aDlg.Execute() == RET_OK ) if ( aDlg.Execute() == RET_OK )
{ {
String sNewName = aDlg.GetName(); String sNewName = aDlg.GetName();
if ( sNewName.Len() > 0 && ( sNewName != String( sModel ) ) ) if ( sNewName.Len() > 0 && ( sNewName != String( sSelectedModel ) ) )
{ {
try try
{ {
xUIHelper->renameModel( m_xFrameModel, sModel, sNewName ); xUIHelper->renameModel( m_xFrameModel, sSelectedModel, sNewName );
m_aModelsBox.RemoveEntry( nPos ); m_aModelsBox.RemoveEntry( nSelectedPos );
nPos = m_aModelsBox.InsertEntry( sNewName ); nSelectedPos = m_aModelsBox.InsertEntry( sNewName );
m_aModelsBox.SelectEntryPos( nPos ); m_aModelsBox.SelectEntryPos( nSelectedPos );
bIsDocModified = true; bIsDocModified = true;
} }
catch ( Exception& ) catch ( Exception& )
...@@ -1813,22 +1813,22 @@ namespace svxform ...@@ -1813,22 +1813,22 @@ namespace svxform
{ {
QueryBox aQBox( this, SVX_RES( RID_QRY_REMOVE_MODEL ) ); QueryBox aQBox( this, SVX_RES( RID_QRY_REMOVE_MODEL ) );
String sText = aQBox.GetMessText(); String sText = aQBox.GetMessText();
sText.SearchAndReplace( MODELNAME, sModel ); sText.SearchAndReplace( MODELNAME, sSelectedModel );
aQBox.SetMessText( sText ); aQBox.SetMessText( sText );
if ( aQBox.Execute() == RET_YES ) if ( aQBox.Execute() == RET_YES )
{ {
try try
{ {
xUIHelper->removeModel( m_xFrameModel, sModel ); xUIHelper->removeModel( m_xFrameModel, sSelectedModel );
} }
catch ( Exception& ) catch ( Exception& )
{ {
DBG_ERRORFILE( "DataNavigatorWindow::MenuSelectHdl(): exception caught" ); DBG_ERRORFILE( "DataNavigatorWindow::MenuSelectHdl(): exception caught" );
} }
m_aModelsBox.RemoveEntry( nPos ); m_aModelsBox.RemoveEntry( nSelectedPos );
if ( m_aModelsBox.GetEntryCount() <= nPos ) if ( m_aModelsBox.GetEntryCount() <= nSelectedPos )
nPos = m_aModelsBox.GetEntryCount() - 1; nSelectedPos = m_aModelsBox.GetEntryCount() - 1;
m_aModelsBox.SelectEntryPos( nPos ); m_aModelsBox.SelectEntryPos( nSelectedPos );
ModelSelectHdl( &m_aModelsBox ); ModelSelectHdl( &m_aModelsBox );
bIsDocModified = true; bIsDocModified = true;
} }
...@@ -2191,8 +2191,7 @@ namespace svxform ...@@ -2191,8 +2191,7 @@ namespace svxform
if ( nIdx > nAlreadyLoadedCount ) if ( nIdx > nAlreadyLoadedCount )
{ {
Sequence< PropertyValue > xPropSeq; Sequence< PropertyValue > xPropSeq;
Any aAny = xNum->nextElement(); if ( xNum->nextElement() >>= xPropSeq )
if ( aAny >>= xPropSeq )
CreateInstancePage( xPropSeq ); CreateInstancePage( xPropSeq );
else else
{ {
...@@ -2392,13 +2391,13 @@ namespace svxform ...@@ -2392,13 +2391,13 @@ namespace svxform
//======================================================================== //========================================================================
DBG_NAME(DataNavigator) DBG_NAME(DataNavigator)
//------------------------------------------------------------------------ //------------------------------------------------------------------------
DataNavigator::DataNavigator( SfxBindings* pBindings, SfxChildWindow* pMgr, Window* pParent ) : DataNavigator::DataNavigator( SfxBindings* _pBindings, SfxChildWindow* _pMgr, Window* _pParent ) :
SfxDockingWindow( pBindings, pMgr, pParent, SfxDockingWindow( _pBindings, _pMgr, _pParent,
WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_ROLLABLE|WB_3DLOOK|WB_DOCKABLE) ), WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_ROLLABLE|WB_3DLOOK|WB_DOCKABLE) ),
SfxControllerItem( SID_FM_DATANAVIGATOR_CONTROL, *pBindings ), SfxControllerItem( SID_FM_DATANAVIGATOR_CONTROL, *_pBindings ),
m_aDataWin( this, pBindings ) m_aDataWin( this, _pBindings )
{ {
DBG_CTOR(DataNavigator,NULL); DBG_CTOR(DataNavigator,NULL);
...@@ -2420,7 +2419,7 @@ namespace svxform ...@@ -2420,7 +2419,7 @@ namespace svxform
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
void DataNavigator::Update( FmFormShell* pFormShell ) void DataNavigator::Update( FmFormShell* /*pFormShell*/ )
{ {
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
...@@ -2454,20 +2453,10 @@ namespace svxform ...@@ -2454,20 +2453,10 @@ namespace svxform
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
Size DataNavigator::CalcDockingSize( SfxChildAlignment eAlign ) Size DataNavigator::CalcDockingSize( SfxChildAlignment eAlign )
{ {
Size aSize = SfxDockingWindow::CalcDockingSize( eAlign ); if ( ( eAlign == SFX_ALIGN_TOP ) || ( eAlign == SFX_ALIGN_BOTTOM ) )
return Size();
switch( eAlign )
{
case SFX_ALIGN_TOP:
case SFX_ALIGN_BOTTOM:
return Size();
case SFX_ALIGN_LEFT: return SfxDockingWindow::CalcDockingSize( eAlign );
case SFX_ALIGN_RIGHT:
break;
}
return aSize;
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
...@@ -2479,8 +2468,9 @@ namespace svxform ...@@ -2479,8 +2468,9 @@ namespace svxform
case SFX_ALIGN_RIGHT: case SFX_ALIGN_RIGHT:
case SFX_ALIGN_NOALIGNMENT: case SFX_ALIGN_NOALIGNMENT:
return eAlign; return eAlign;
default:
break;
} }
return eActAlign; return eActAlign;
} }
...@@ -2510,15 +2500,15 @@ namespace svxform ...@@ -2510,15 +2500,15 @@ namespace svxform
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
DataNavigatorManager::DataNavigatorManager( DataNavigatorManager::DataNavigatorManager(
Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : Window* _pParent, sal_uInt16 _nId, SfxBindings* _pBindings, SfxChildWinInfo* _pInfo ) :
SfxChildWindow( pParent, nId ) SfxChildWindow( _pParent, _nId )
{ {
pWindow = new DataNavigator( pBindings, this, pParent ); pWindow = new DataNavigator( _pBindings, this, _pParent );
eChildAlignment = SFX_ALIGN_RIGHT; eChildAlignment = SFX_ALIGN_RIGHT;
pWindow->SetSizePixel( Size( 250, 400 ) ); pWindow->SetSizePixel( Size( 250, 400 ) );
( (SfxDockingWindow*)pWindow )->Initialize( pInfo ); ( (SfxDockingWindow*)pWindow )->Initialize( _pInfo );
} }
//======================================================================== //========================================================================
...@@ -2822,6 +2812,9 @@ namespace svxform ...@@ -2822,6 +2812,9 @@ namespace svxform
case css::xml::dom::NodeType_TEXT_NODE: case css::xml::dom::NodeType_TEXT_NODE:
m_eItemType = DITText; m_eItemType = DITText;
break; break;
default:
DBG_ERROR( "AddDataItemDialog::InitFronNode: cannot handle this node type!" );
break;
} }
/** Get binding of the node and clone it /** Get binding of the node and clone it
...@@ -2936,7 +2929,7 @@ namespace svxform ...@@ -2936,7 +2929,7 @@ namespace svxform
if ( DITText == m_eItemType ) if ( DITText == m_eItemType )
{ {
long nDelta = m_aButtonsFL.GetPosPixel().Y() - m_aSettingsFL.GetPosPixel().Y(); long nDelta = m_aButtonsFL.GetPosPixel().Y() - m_aSettingsFL.GetPosPixel().Y();
sal_Int32 i = 0; size_t i = 0;
Window* pWinsForHide[] = Window* pWinsForHide[] =
{ {
&m_aSettingsFL, &m_aDataTypeFT, &m_aDataTypeLB, &m_aRequiredCB, &m_aSettingsFL, &m_aDataTypeFT, &m_aDataTypeLB, &m_aRequiredCB,
...@@ -3588,7 +3581,6 @@ namespace svxform ...@@ -3588,7 +3581,6 @@ namespace svxform
// is found // is found
if( !m_xTempBinding.is() ) if( !m_xTempBinding.is() )
{ {
Reference<css::xforms::XModel> xModel( m_xUIHelper, UNO_QUERY_THROW );
m_xCreatedBinding = m_xUIHelper->getBindingForNode( m_xCreatedBinding = m_xUIHelper->getBindingForNode(
Reference<css::xml::dom::XNode>( Reference<css::xml::dom::XNode>(
xModel->getDefaultInstance()->getDocumentElement(), xModel->getDefaultInstance()->getDocumentElement(),
......
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