[Libreoffice-commits] .: dbaccess/source reportdesign/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Nov 8 08:32:37 PST 2010
dbaccess/source/ui/browser/brwctrlr.cxx | 15 -----
dbaccess/source/ui/dlg/queryfilter.src | 9 ---
dbaccess/source/ui/misc/WNameMatch.cxx | 13 ----
dbaccess/source/ui/tabledesign/TableController.cxx | 11 ----
reportdesign/source/ui/dlg/GroupsSorting.cxx | 55 ---------------------
reportdesign/source/ui/dlg/Navigator.cxx | 7 --
6 files changed, 3 insertions(+), 107 deletions(-)
New commits:
commit 5752e5b28e75158de8babe09e7b43adb63209028
Author: Ricardo Moreno <parcero.cubano at gmail.com>
Date: Mon Nov 8 11:31:02 2010 -0500
Removed commented-out code.
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 999a6bc..94178b4 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2708,22 +2708,7 @@ void SbaXDataBrowserController::initializeParser() const
{ // (only if the statement isn't native)
// (it is allowed to use the PROPERTY_ISPASSTHROUGH : _after_ loading a form it is valid)
xFormSet->getPropertyValue(PROPERTY_SINGLESELECTQUERYCOMPOSER) >>= m_xParser;
-/*
- const Reference<XMultiServiceFactory> xFactory(::dbtools::getConnection(getRowSet()),UNO_QUERY);
- if ( xFactory.is() )
- m_xParser.set(xFactory->createInstance(SERVICE_NAME_SINGLESELECTQUERYCOMPOSER),UNO_QUERY);
-*/
}
-/*
- // initialize the parser with the current sql-statement of the form
- if ( m_xParser.is() )
- {
- m_xParser->setElementaryQuery(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_ACTIVECOMMAND)));
- m_xParser->setFilter(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_FILTER)));
- m_xParser->setHavingClause(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_HAVING_CLAUSE)));
- m_xParser->setOrder(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_ORDER)));
- }
-*/
}
catch(Exception&)
{
diff --git a/dbaccess/source/ui/dlg/queryfilter.src b/dbaccess/source/ui/dlg/queryfilter.src
index fcabfdc..d916100 100644
--- a/dbaccess/source/ui/dlg/queryfilter.src
+++ b/dbaccess/source/ui/dlg/queryfilter.src
@@ -30,15 +30,6 @@
#endif
#include "dbaccess_helpid.hrc"
-/*
-#define STRLST_AND_OR \
- StringList [ en-US ] = \
- {\
- < "AND" ; Default ; > ; \
- < "OR" ; Default ; > ; \
- };\
-*/
-
ModalDialog DLG_FILTERCRIT
{
OutputSize = TRUE ;
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 12a6744..9c2e653 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -111,7 +111,6 @@ void OWizNameMatching::Reset()
m_bFirstTime = sal_False;
}
- // m_CTRL_LEFT.Clear();
}
// -----------------------------------------------------------------------
void OWizNameMatching::ActivatePage( )
@@ -228,7 +227,6 @@ IMPL_LINK( OWizNameMatching, ButtonClickHdl, Button *, pButton )
if(pButton == &m_ibColumn_down && (nThumbPos+nVisibleSize+1) < nPos)
{
m_CTRL_LEFT.GetVScroll()->DoScrollAction(SCROLL_LINEDOWN);
- // m_CTRL_LEFT.MakeVisible(pEntry,sal_True);
}
TableListClickHdl(&m_CTRL_LEFT);
@@ -357,18 +355,7 @@ public:
}
virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
- //virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData);
};
-
-
-
-//------------------------------------------------------------------------
-/*
-void OColumnString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData)
-{
- SvLBoxString::InitViewData(pView,pEntry,pViewData);
-}
-*/
//------------------------------------------------------------------------
void OColumnString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ )
{
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 702d2c6..cb4d9af 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -349,7 +349,6 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
{
String aName = String(ModuleRes(STR_TBL_TITLE));
aDefaultName = aName.GetToken(0,' ');
- //aDefaultName = getPrivateTitle();
aDefaultName = ::dbtools::createUniqueName(xTables,aDefaultName);
}
@@ -582,8 +581,6 @@ sal_Bool OTableController::Construct(Window* pParent)
{
setView( * new OTableDesignView( pParent, getORB(), *this ) );
OTableController_BASE::Construct(pParent);
-// m_pView->Construct();
-// m_pView->Show();
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -646,10 +643,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
}
}
}
-/*
- if ( bCheck )
- OSingleDocumentController::suspend(_bSuspend);
-*/
+
return bCheck;
}
// -----------------------------------------------------------------------------
@@ -912,7 +906,6 @@ void OTableController::loadData()
{
pActFieldDescr->SetName(sName);
pActFieldDescr->SetFormatKey(nFormatKey);
- // pActFieldDescr->SetPrimaryKey(pPrimary->GetValue());
pActFieldDescr->SetDescription(sDescription);
pActFieldDescr->SetHelpText(sHelpText);
pActFieldDescr->SetAutoIncrement(bIsAutoIncrement);
@@ -1110,7 +1103,6 @@ void OTableController::alterColumns()
// Normally, sdbcx::Column objects are expected to have a TypeName property
}
- // xColumn->getPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(pField->IsCurrency()));
// check if something changed
if((nType != pField->GetType() ||
sTypeName != pField->GetTypeName() ||
@@ -1458,7 +1450,6 @@ void OTableController::assignTable()
}
}
}
- //updateTitle();
}
// -----------------------------------------------------------------------------
sal_Bool OTableController::isAddAllowed() const
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 8996e0f..8609e8a 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -108,7 +108,6 @@ class OFieldExpressionControl : public TContainerListenerBase
OGroupsSortingDialog* m_pParent;
bool m_bIgnoreEvent;
-
void fillListBox(const uno::Reference< beans::XPropertySet>& _xDest,long nRow,USHORT nColumnId);
BOOL SaveModified(bool _bAppend);
@@ -137,7 +136,6 @@ public:
inline ::svt::ComboBoxControl* getExpressionControl() const { return m_pComboCell; }
-
/** returns the sequence with the selected groups
*/
uno::Sequence<uno::Any> fillSelectedGroups();
@@ -151,7 +149,6 @@ public:
protected:
virtual BOOL IsTabAllowed(BOOL bForward) const;
-
virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol );
virtual ::svt::CellController* GetController( long nRow, USHORT nCol );
virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const;
@@ -676,13 +673,6 @@ void SAL_CALL OFieldExpressionControl::elementInserted(const container::Containe
for(++aFind;aFind != aEnd;++aFind)
if ( *aFind != NO_GROUP )
++*aFind;
-
- //::std::vector<sal_Int32>::reverse_iterator aRIter = m_aGroupPositions.rbegin();
- //::std::vector<sal_Int32>::reverse_iterator aREnd = m_aGroupPositions.rend();
- //for (; aRIter != aREnd && *aRIter != NO_GROUP; ++aRIter)
- // continue;
- //if ( aRIter != aREnd )
- // m_aGroupPositions.erase(m_aGroupPositions.begin() + (m_aGroupPositions.size() - 1 - (aRIter - m_aGroupPositions.rbegin())));
}
}
Invalidate();
@@ -712,7 +702,6 @@ void SAL_CALL OFieldExpressionControl::elementRemoved(const container::Container
for(++aFind;aFind != aEnd;++aFind)
if ( *aFind != NO_GROUP )
--*aFind;
- //PaintCell(*this,GetFieldRect(FIELD_EXPRESSION),FIELD_EXPRESSION);
Invalidate();
}
}
@@ -754,7 +743,6 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
if ( nColId == HANDLE_ID )
{
- //long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
PopupMenu aContextMenu(ModuleRes(RID_GROUPSROWPOPUPMENU));
sal_Bool bEnable = sal_False;
long nIndex = FirstSelectedRow();
@@ -764,10 +752,6 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
bEnable = sal_True;
nIndex = NextSelectedRow();
}
- //aContextMenu.EnableItem( SID_CUT, IsDeleteAllowed() && bEnable);
- //aContextMenu.EnableItem( SID_COPY, bEnable);
- //TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent()));
- //aContextMenu.EnableItem( SID_PASTE, aTransferData.HasFormat(SOT_FORMATSTR_ID_RPT_GRPED) );
aContextMenu.EnableItem( SID_DELETE, IsDeleteAllowed() && bEnable );
switch (aContextMenu.Execute(this, rEvt.GetMousePosPixel()))
{
@@ -985,11 +969,6 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
,OPropertyChangeListener(m_aMutex)
,m_aFL2(this, ModuleRes(FL_SEPARATOR2) )
,m_aMove(this, ModuleRes(FT_MOVELABEL) )
-/*
- ,m_aPB_Up(this, ModuleRes(PB_UP) )
- ,m_aPB_Down(this, ModuleRes(PB_DOWN) )
- ,m_aPB_Delete(this, ModuleRes(PB_DELETE) )
-*/
,m_aToolBox(this, ModuleRes(TB_TOOLBOX) )
,m_aFL3(this, ModuleRes(FL_SEPARATOR3) )
@@ -1015,7 +994,6 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
{
DBG_CTOR( rpt_OGroupsSortingDialog,NULL);
-
Control* pControlsLst[] = { &m_aHeaderLst, &m_aFooterLst, &m_aGroupOnLst, &m_aKeepTogetherLst, &m_aOrderLst, &m_aGroupIntervalEd};
for (size_t i = 0; i < SAL_N_ELEMENTS(pControlsLst); ++i)
{
@@ -1049,7 +1027,6 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
Size aOutSize(nMaxTextWidth + m_aHeader.GetSizePixel().Width() + 3*aSpace.Width(),aSpace.Height());
SetMinOutputSizePixel(aOutSize);
SetOutputSizePixel(aOutSize);
-// Resize();
m_pReportListener = new OPropertyChangeMultiplexer(this,m_pController->getReportDefinition().get());
m_pReportListener->addProperty(PROPERTY_COMMAND);
@@ -1059,20 +1036,11 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
fillColumns();
m_pFieldExpression->Show();
- //m_aHelpWindow.SetReadOnly();
m_aHelpWindow.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() );
- //BTN m_aPB_Up.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
- //BTN m_aPB_Down.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
- //BTN m_aPB_Delete.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
m_pFieldExpression->SetZOrder(&m_aFL2, WINDOW_ZORDER_BEHIND);
m_aMove.SetZOrder(m_pFieldExpression, WINDOW_ZORDER_BEHIND);
- //BTN m_aPB_Up.SetZOrder(&m_aMove, WINDOW_ZORDER_BEHIND);
- //BTN m_aPB_Down.SetZOrder(&m_aPB_Up, WINDOW_ZORDER_BEHIND);
- // set Hi contrast bitmaps
- //BTN m_aPB_Up.SetModeImage( ModuleRes(IMG_UP_H),BMP_COLOR_HIGHCONTRAST);
- //BTN m_aPB_Down.SetModeImage( ModuleRes(IMG_DOWN_H),BMP_COLOR_HIGHCONTRAST);
m_aToolBox.SetStyle(m_aToolBox.GetStyle()|WB_LINESPACING);
m_aToolBox.SetSelectHdl(LINK(this, OGroupsSortingDialog, OnFormatAction));
m_aToolBox.SetImageListProvider(this);
@@ -1264,9 +1232,7 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
//BTN if ( _pButton == &m_aPB_Delete )
if ( nCommand == SID_RPT_GROUPSORT_DELETE )
{
- // m_pFieldExpression->DeleteCurrentRow();
Application::PostUserEvent( LINK(m_pFieldExpression, OFieldExpressionControl, DelayedDelete) );
- // UpdateData( );
}
else
{
@@ -1276,7 +1242,6 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
m_pFieldExpression->moveGroups(aClipboardList,nIndex,sal_False);
m_pFieldExpression->DeactivateCell();
m_pFieldExpression->GoToRow(nIndex);
- //long nCurRow = m_pFieldExpression->GetCurRow();
m_pFieldExpression->ActivateCell(nIndex, m_pFieldExpression->GetCurColumnId());
DisplayData(nIndex);
}
@@ -1460,15 +1425,6 @@ void OGroupsSortingDialog::Resize()
m_aFL.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL.GetSizePixel().Height()));
m_aFL2.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL2.GetSizePixel().Height()));
m_aFL3.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL3.GetSizePixel().Height()));
-
-//BTN sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aPB_Up.GetSizePixel().Width();
-//BTN m_aPB_Delete.SetPosPixel(Point(nPos,m_aPB_Delete.GetPosPixel().Y()));
-//BTN
-//BTN nPos -= (m_aPB_Up.GetSizePixel().Width() + LogicToPixel( Size( UNRELATED_CONTROLS, 0 ), MAP_APPFONT ).Width());
-//BTN m_aPB_Down.SetPosPixel(Point(nPos,m_aPB_Down.GetPosPixel().Y()));
-//BTN
-//BTN nPos -= (m_aPB_Up.GetSizePixel().Width() + LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ).Width());
-//BTN m_aPB_Up.SetPosPixel(Point(nPos,m_aPB_Up.GetPosPixel().Y()));
sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aToolBox.GetSizePixel().Width();
m_aToolBox.SetPosPixel(Point(nPos,m_aToolBox.GetPosPixel().Y()));
@@ -1482,7 +1438,7 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow)
sal_Int32 nRowCount = m_pFieldExpression->GetRowCount();
sal_Bool bEnabled = nGroupCount > 1;
- if (bEnabled && _nRow > 0 /* && _nRow < nGroupCount */ )
+ if (bEnabled && _nRow > 0 )
{
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_UP, sal_True);
}
@@ -1490,7 +1446,7 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow)
{
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_UP, sal_False);
}
- if (bEnabled && _nRow < (nRowCount - 1) /* && _nRow < (nGroupCount - 1) */ )
+ if (bEnabled && _nRow < (nRowCount - 1) )
{
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, sal_True);
}
@@ -1498,20 +1454,15 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow)
{
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, sal_False);
}
- //BTN m_aPB_Up.Enable(bEnable && _nRow > 0 );
- //BTN m_aPB_Down.Enable(bEnable && _nRow < (m_pFieldExpression->GetRowCount()-1) );
- // m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, bEnable && _nRow < (-1) );
sal_Int32 nGroupPos = m_pFieldExpression->getGroupPosition(_nRow);
if ( nGroupPos != NO_GROUP )
{
sal_Bool bEnableDelete = nGroupCount > 0;
- //BTN m_aPB_Delete.Enable(bEnableDelete );
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_DELETE, bEnableDelete);
}
else
{
- //BTN m_aPB_Delete.Enable( sal_False );
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_DELETE, sal_False);
}
}
@@ -1557,8 +1508,6 @@ ImageList OGroupsSortingDialog::getImageList(vcl::ImageListType _eType) SAL_THRO
}
}
-
-
// =============================================================================
} // rptui
// =============================================================================
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 0c1760b..f12a225 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -419,7 +419,6 @@ sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& _rEvt )
// -------------------------------------------------------------------------
sal_Int8 NavigatorTree::ExecuteDrop( const ExecuteDropEvent& /*_rEvt*/ )
{
- // _rEvt.mnAction;
return DND_ACTION_NONE;
}
// -------------------------------------------------------------------------
@@ -852,8 +851,6 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent&
++nPos;
m_pTree->traverseSection(pMemFunSection(&aGroupHelper),pEntry,bFooterOn ? SID_GROUPFOOTER : SID_GROUPHEADER,nPos);
}
- //else
- // m_pTree->removeEntry(m_pTree->GetEntry(pEntry,nPos));
}
else if ( PROPERTY_EXPRESSION == _rEvent.PropertyName)
{
@@ -937,10 +934,6 @@ ONavigator::ONavigator( Window* _pParent
m_pImpl.reset(new ONavigatorImpl(_rController,this));
- //Size aSpace = LogicToPixel( Size( 7, 120), MAP_APPFONT );
- //Size aOutSize(nMaxTextWidth + m_aHeader.GetSizePixel().Width() + 3*aSpace.Width(),aSpace.Height());
- //SetMinOutputSizePixel(aOutSize);
- //SetOutputSizePixel(aOutSize);
FreeResource();
m_pImpl->m_pNavigatorTree->Show();
m_pImpl->m_pNavigatorTree->GrabFocus();
More information about the Libreoffice-commits
mailing list