[Libreoffice-commits] .: dbaccess/inc dbaccess/source reportdesign/source
Joseph Powers
jpowers at kemper.freedesktop.org
Tue Nov 16 21:21:10 PST 2010
dbaccess/inc/ToolBoxHelper.hxx | 8 +--
dbaccess/source/ui/app/AppIconControl.cxx | 18 +++----
dbaccess/source/ui/control/dbtreelistbox.cxx | 16 +++----
dbaccess/source/ui/control/toolboxcontroller.cxx | 6 --
dbaccess/source/ui/imagelists/dbimagelists.src | 2
dbaccess/source/ui/inc/dbu_resource.hrc | 4 -
dbaccess/source/ui/misc/ToolBoxHelper.cxx | 19 +++-----
reportdesign/source/ui/report/ReportSection.cxx | 52 ++++++++++++-----------
8 files changed, 57 insertions(+), 68 deletions(-)
New commits:
commit 51392ec4319478b14dc33e6d2684e7e6d1063fc6
Author: Joseph Powers <jpowers27 at cox.net>
Date: Tue Nov 16 21:20:50 2010 -0800
HC Cleanup - base
diff --git a/dbaccess/inc/ToolBoxHelper.hxx b/dbaccess/inc/ToolBoxHelper.hxx
index f2afce8..1adf494 100644
--- a/dbaccess/inc/ToolBoxHelper.hxx
+++ b/dbaccess/inc/ToolBoxHelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,6 @@ namespace dbaui
{
class DBACCESS_DLLPUBLIC OToolBoxHelper
{
- sal_Bool m_bIsHiContrast;// true when the toolbox is in hi contrast mode
sal_Int16 m_nSymbolsSize; // shows the toolbox large or small bitmaps
ToolBox* m_pToolBox; // our toolbox (may be NULL)
public:
@@ -72,13 +71,12 @@ namespace dbaui
*/
virtual void setToolBox(ToolBox* _pTB);
- inline ToolBox* getToolBox() const { return m_pToolBox; }
+ inline ToolBox* getToolBox() const { return m_pToolBox; }
/** checks if the toolbox needs a new imagelist.
*/
void checkImageList();
-
- inline sal_Bool isToolBoxHiContrast() const { return m_bIsHiContrast; }
+
protected:
DECL_LINK(ConfigOptionsChanged, SvtMiscOptions*);
DECL_LINK(SettingsChanged, VclWindowEvent* );
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index 7000db6..293d65f 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@ using namespace ::dbaui;
// class OApplicationIconControl
DBG_NAME(OApplicationIconControl)
//==================================================================
-OApplicationIconControl::OApplicationIconControl(Window* _pParent)
+OApplicationIconControl::OApplicationIconControl(Window* _pParent)
: SvtIconChoiceCtrl(_pParent,WB_ICON | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | /*!WB_NOSELECTION |*/
WB_TABSTOP | WB_CLIPCHILDREN | WB_NOVSCROLL | WB_SMART_ARRANGE | WB_NOHSCROLL | WB_CENTER)
,DropTargetHelper(this)
@@ -57,17 +57,17 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent)
ElementType eType;
USHORT nImageResId;
} aCategories[] = {
- { RID_STR_TABLES_CONTAINER, E_TABLE, IMG_TABLEFOLDER_TREE_L },
- { RID_STR_QUERIES_CONTAINER, E_QUERY, IMG_QUERYFOLDER_TREE_L },
- { RID_STR_FORMS_CONTAINER, E_FORM, IMG_FORMFOLDER_TREE_L },
+ { RID_STR_TABLES_CONTAINER, E_TABLE, IMG_TABLEFOLDER_TREE_L },
+ { RID_STR_QUERIES_CONTAINER, E_QUERY, IMG_QUERYFOLDER_TREE_L },
+ { RID_STR_FORMS_CONTAINER, E_FORM, IMG_FORMFOLDER_TREE_L },
{ RID_STR_REPORTS_CONTAINER, E_REPORT, IMG_REPORTFOLDER_TREE_L }
};
for ( size_t i=0; i < SAL_N_ELEMENTS(aCategories); ++i)
{
SvxIconChoiceCtrlEntry* pEntry = InsertEntry(
- String( ModuleRes( aCategories[i].nLabelResId ) ),
- Image( ModuleRes( aCategories[i].nImageResId ) ) );
- if ( pEntry )
+ String( ModuleRes( aCategories[i].nLabelResId ) ) ,
+ Image( ModuleRes( aCategories[i].nImageResId ) ) );
+ if ( pEntry )
pEntry->SetUserData( new ElementType( aCategories[i].eType ) );
}
@@ -96,7 +96,7 @@ sal_Int8 OApplicationIconControl::AcceptDrop( const AcceptDropEvent& _rEvt )
sal_Int8 nDropOption = DND_ACTION_NONE;
if ( m_pActionListener )
{
-
+
SvxIconChoiceCtrlEntry* pEntry = GetEntry(_rEvt.maPosPixel);
if ( pEntry )
{
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index e763517..1ddba15 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -92,7 +92,7 @@ DBTreeListBox::DBTreeListBox( Window* pParent, const Reference< XMultiServiceFac
,m_xORB(_rxORB)
{
DBG_CTOR(DBTreeListBox,NULL);
- init();
+ init();
}
// -----------------------------------------------------------------------------
void DBTreeListBox::init()
@@ -407,7 +407,7 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
// 2002-12-02 - 105831 - fs at openoffice.org
}
- if ( !bHandled )
+ if ( !bHandled )
SvTreeListBox::KeyInput(rKEvt);
}
// -----------------------------------------------------------------------------
@@ -427,7 +427,7 @@ BOOL DBTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText
m_aSelectedEntries.erase( pEntry );
}
SetEntryText(pEntry,aEntry.aNewText);
-
+
return FALSE; // we never want that the base change our text
}
@@ -590,20 +590,20 @@ namespace
throw IllegalArgumentException();
// API bug: this should be a NoSupportException
}
-
+
//--------------------------------------------------------------------
Any SAL_CALL SelectionSupplier::getSelection( ) throw (RuntimeException)
{
return m_aSelection;
}
-
+
//--------------------------------------------------------------------
void SAL_CALL SelectionSupplier::addSelectionChangeListener( const Reference< XSelectionChangeListener >& /*_Listener*/ ) throw (RuntimeException)
{
OSL_ENSURE( false, "SelectionSupplier::removeSelectionChangeListener: no support!" );
// API bug: this should be a NoSupportException
}
-
+
//--------------------------------------------------------------------
void SAL_CALL SelectionSupplier::removeSelectionChangeListener( const Reference< XSelectionChangeListener >& /*_Listener*/ ) throw (RuntimeException)
{
@@ -709,7 +709,7 @@ IMPL_LINK(DBTreeListBox, OnTimeOut, void*, /*EMPTY_ARG*/)
{
implStopSelectionTimer();
- m_aSelChangeHdl.Call( NULL );
+ m_aSelChangeHdl.Call( NULL );
return 0L;
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index ad90d8a..78632ef 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -192,8 +192,6 @@ namespace dbaui
{
pMenu.reset( new PopupMenu( ModuleRes( RID_MENU_APP_NEW ) ) );
- sal_Bool bHighContrast = isHighContrast();
-
try
{
Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(getServiceManager()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))),UNO_QUERY);
@@ -202,8 +200,6 @@ namespace dbaui
short nImageType = hasBigImages() ? ImageType::SIZE_LARGE : ImageType::SIZE_DEFAULT;
- if ( bHighContrast )
- nImageType |= ImageType::COLOR_HIGHCONTRAST;
Sequence< ::rtl::OUString> aSeq(1);
USHORT nCount = pMenu->GetItemCount();
diff --git a/dbaccess/source/ui/imagelists/dbimagelists.src b/dbaccess/source/ui/imagelists/dbimagelists.src
index e296c6d..9c5d4d7 100644
--- a/dbaccess/source/ui/imagelists/dbimagelists.src
+++ b/dbaccess/source/ui/imagelists/dbimagelists.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index af22fc4..c5f2afa 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -260,10 +260,6 @@
#define IMG_REPORTFOLDER_TREE_L RID_IMAGE_START + 40
#define IMG_QUERYFOLDER_TREE_L RID_IMAGE_START + 41
#define IMG_TABLEFOLDER_TREE_L RID_IMAGE_START + 42
-// free
-// free
-// free
-// free
#define IMG_NAVIGATION_BTN_UP_SC RID_IMAGE_START + 47
#define IMG_NAVIGATION_CREATEFOLDER_SC RID_IMAGE_START + 49
#define FORM_TREE_ICON RID_IMAGE_START + 51
diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
index 91d2d46..7c1f774 100644
--- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx
+++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,9 +40,8 @@ namespace dbaui
{
DBG_NAME(OToolBoxHelper)
OToolBoxHelper::OToolBoxHelper()
- : m_bIsHiContrast(sal_False)
- ,m_nSymbolsSize(-1 )
- ,m_pToolBox(NULL)
+ : m_nSymbolsSize(-1 )
+ , m_pToolBox(NULL)
{
DBG_CTOR(OToolBoxHelper,NULL);
@@ -56,21 +55,18 @@ namespace dbaui
SvtMiscOptions().RemoveListenerLink( LINK( this, OToolBoxHelper, ConfigOptionsChanged ) );
Application::RemoveEventListener( LINK( this, OToolBoxHelper, SettingsChanged ) );
DBG_DTOR(OToolBoxHelper,NULL);
- }
-
+ }
+
// -----------------------------------------------------------------------------
void OToolBoxHelper::checkImageList()
{
if ( m_pToolBox )
{
sal_Int16 nCurSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize();
- if ( nCurSymbolsSize != m_nSymbolsSize ||
- m_bIsHiContrast != m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if ( nCurSymbolsSize != m_nSymbolsSize )
{
m_nSymbolsSize = nCurSymbolsSize;
- m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode();
-
m_pToolBox->SetImageList( getImageList(m_nSymbolsSize) );
Size aTbOldSize = m_pToolBox->GetSizePixel();
adjustToolBoxSize(m_pToolBox);
@@ -105,7 +101,7 @@ namespace dbaui
( pData->GetType() == DATACHANGED_DISPLAY )) &&
( pData->GetFlags() & SETTINGS_STYLE )))
// check if imagelist changed
- checkImageList();
+ checkImageList();
}
return 0L;
@@ -117,7 +113,6 @@ namespace dbaui
m_pToolBox = _pTB;
if ( m_pToolBox )
{
- // m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode();
ConfigOptionsChanged(NULL);
if ( bFirstTime )
adjustToolBoxSize(m_pToolBox);
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 06d4768..e366be7 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -85,7 +85,7 @@ sal_Int32 lcl_getOverlappedControlColor(/*const uno::Reference <lang::XMultiServ
}
//------------------------------------------------------------------------------
DBG_NAME( rpt_OReportSection )
-OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< report::XSection >& _xSection)
+OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< report::XSection >& _xSection)
: Window(_pParent,WB_DIALOGCONTROL)
, ::comphelper::OPropertyChangeListener(m_aMutex)
, DropTargetHelper(this)
@@ -104,7 +104,7 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
EnableChildTransparentMode();
SetHelpId(HID_REPORTSECTION);
SetMapMode( MapMode( MAP_100TH_MM ) );
-
+
try
{
fill();
@@ -125,11 +125,11 @@ OReportSection::~OReportSection()
//m_pModel->GetUndoEnv().RemoveSection(m_xSection.get());
if ( m_pMulti.is() )
m_pMulti->dispose();
-
+
if ( m_pReportListener.is() )
m_pReportListener->dispose();
m_pFunc = ::std::auto_ptr<DlgEdFunc>();
-
+
{
::std::auto_ptr<OSectionView> aTemp( m_pView);
if ( m_pView )
@@ -227,7 +227,7 @@ void OReportSection::fill()
const Fraction aY(aGridSizeFine.B());
m_pView->SetSnapGridWidth(aX, aY);
- m_pView->SetGridSnap( pDesignView->isGridSnap() );
+ m_pView->SetGridSnap( pDesignView->isGridSnap() );
m_pView->SetGridFront( FALSE );
m_pView->SetDragStripes( TRUE );
m_pView->SetPageVisible();
@@ -244,7 +244,7 @@ void OReportSection::fill()
// LLA: TODO
// m_pPage->SetUppBorder(-10000);
- m_pView->SetDesignMode( TRUE );
+ m_pView->SetDesignMode( TRUE );
m_pView->StartListening( *m_pModel );
/*Resize();*/
@@ -290,7 +290,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
SvxShape* pShape = SvxShape::getImplementation( *pCopiesIter );
SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL;
if ( pObject )
- {
+ {
SdrObject* pNeuObj = pObject->Clone();
pNeuObj->SetPage( m_pPage );
@@ -354,16 +354,16 @@ void OReportSection::SetMode( DlgEdMode eNewMode )
m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( ) );
m_pModel->SetReadOnly(eNewMode == RPTUI_READONLY);
m_eMode = eNewMode;
- }
+ }
}
// -----------------------------------------------------------------------------
void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedObjects)
-{
+{
Copy(_rAllreadyCopiedObjects,false);
}
//----------------------------------------------------------------------------
void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedObjects,bool _bEraseAnddNoClone)
-{
+{
OSL_ENSURE(m_xSection.is(),"Why is the section here NULL!");
if( !m_pView->AreObjectsMarked() || !m_xSection.is() )
return;
@@ -379,7 +379,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
aCopies.reserve(nMark);
SdrUndoFactory& rUndo = m_pView->GetModel()->GetSdrUndoFactory();
-
+
for( ULONG i = nMark; i > 0; )
{
--i;
@@ -452,16 +452,20 @@ void OReportSection::SelectAll(const sal_uInt16 _nObjectType)
{
m_pView->UnmarkAll();
SdrObjListIter aIter(*m_pPage,IM_DEEPNOGROUPS);
- SdrObject* pObjIter = NULL;
+ SdrObject* pObjIter = NULL;
while( (pObjIter = aIter.Next()) != NULL )
{
if ( pObjIter->GetObjIdentifier() == _nObjectType )
m_pView->MarkObj( pObjIter, m_pView->GetSdrPageView() );
}
- }
+ }
}
}
-void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rController,const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame)
+void lcl_insertMenuItemImages(
+ PopupMenu& rContextMenu,
+ OReportController& rController,
+ const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame
+)
{
const USHORT nCount = rContextMenu.GetItemCount();
for (USHORT i = 0; i < nCount; ++i)
@@ -504,9 +508,9 @@ void OReportSection::Command( const CommandEvent& _rCEvt )
{
OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController();
uno::Reference<frame::XFrame> xFrame = rController.getFrame();
- PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
+ PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
uno::Reference< report::XReportDefinition> xReportDefinition = getSection()->getReportDefinition();
-
+
lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame);
Point aPos = _rCEvt.GetMousePosPixel();
@@ -593,7 +597,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
}
if ( aPos.Y < 0 )
aPos.Y = 0;
- if ( bChanged )
+ if ( bChanged )
{
xReportComponent->setPosition(aPos);
correctOverlapping(pObject,*this,false);
@@ -614,7 +618,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
Resize();
}
- }
+ }
}
//------------------------------------------------------------------------------
sal_Bool OReportSection::handleKeyEvent(const KeyEvent& _rEvent)
@@ -777,7 +781,7 @@ sal_Int8 OReportSection::AcceptDrop( const AcceptDropEvent& _rEvt )
if ( ::svx::OMultiColumnTransferable::canExtractDescriptor(rFlavors)
|| ::svx::OColumnTransferable::canExtractColumnDescriptor(rFlavors, CTF_FIELD_DESCRIPTOR | CTF_CONTROL_EXCHANGE | CTF_COLUMN_DESCRIPTOR) )
return _rEvt.mnAction;
-
+
const sal_Int8 nDropOption = ( OReportExchange::canExtract(rFlavors) ) ? DND_ACTION_COPYMOVE : DND_ACTION_NONE;
return nDropOption;
@@ -825,13 +829,13 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt )
if ( !bMultipleFormat )
{
::svx::ODataAccessDescriptor aDescriptor = ::svx::OColumnTransferable::extractColumnDescriptor(aDropped);
-
+
aValues.realloc(1);
aValues[0].Value <<= aDescriptor.createPropertyValueSequence();
} // if ( !bMultipleFormat )
- else
+ else
aValues = ::svx::OMultiColumnTransferable::extractDescriptor(aDropped);
-
+
beans::PropertyValue* pIter = aValues.getArray();
beans::PropertyValue* pEnd = pIter + aValues.getLength();
for(;pIter != pEnd; ++pIter)
@@ -844,7 +848,7 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt )
aCurrent.realloc(nLength + 3);
aCurrent[nLength].Name = PROPERTY_POSITION;
aCurrent[nLength++].Value <<= AWTPoint(aDropPos);
- // give also the DND Action (Shift|Ctrl) Key to really say what we want
+ // give also the DND Action (Shift|Ctrl) Key to really say what we want
aCurrent[nLength].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DNDAction"));
aCurrent[nLength++].Value <<= _rEvt.mnAction;
More information about the Libreoffice-commits
mailing list