unwind RID_SVXIMGLIST_RPTEXPL ImageList
Change-Id: I395dfb5e54f3196f59b5079c580714f57c992f2d
This commit is contained in:
@@ -214,8 +214,24 @@
|
||||
#define RID_MENU_REPORT ( RID_MENU_START + 0 )
|
||||
#define RID_GROUPSROWPOPUPMENU ( RID_MENU_START + 1 )
|
||||
#define RID_MENU_NAVIGATOR ( RID_MENU_START + 2 )
|
||||
|
||||
#define RID_SVXIMGLIST_RPTEXPL (RID_IMAGELIST_START + 4)
|
||||
// bitmaps
|
||||
#define RID_SVXBMP_SELECT_REPORT (RID_BITMAP_START + 0 )
|
||||
#define RID_SVXBMP_FM_FIXEDTEXT (RID_BITMAP_START + 1 )
|
||||
#define RID_SVXBMP_INSERT_HFIXEDLINE (RID_BITMAP_START + 2 )
|
||||
#define RID_SVXBMP_INSERT_VFIXEDLINE (RID_BITMAP_START + 3 )
|
||||
#define RID_SVXBMP_FM_IMAGECONTROL (RID_BITMAP_START + 4 )
|
||||
#define RID_SVXBMP_FM_EDIT (RID_BITMAP_START + 5 )
|
||||
#define RID_SVXBMP_RPT_NEW_FUNCTION (RID_BITMAP_START + 6 )
|
||||
#define RID_SVXBMP_REPORTHEADERFOOTER (RID_BITMAP_START + 7 )
|
||||
#define RID_SVXBMP_PAGEHEADERFOOTER (RID_BITMAP_START + 8 )
|
||||
#define RID_SVXBMP_GROUPHEADER (RID_BITMAP_START + 9 )
|
||||
#define RID_SVXBMP_GROUPFOOTER (RID_BITMAP_START + 10)
|
||||
#define RID_SVXBMP_COLLAPSEDNODE (RID_BITMAP_START + 11)
|
||||
#define RID_SVXBMP_EXPANDEDNODE (RID_BITMAP_START + 12)
|
||||
#define RID_SVXBMP_SORTINGANDGROUPING (RID_BITMAP_START + 13)
|
||||
#define RID_SVXBMP_DRAWTBX_CS_BASIC (RID_BITMAP_START + 14)
|
||||
#define RID_SVXBMP_GROUP (RID_BITMAP_START + 15)
|
||||
#define RID_SVXBMP_ICON_DETAIL (RID_BITMAP_START + 16)
|
||||
|
||||
// untyped ---------------------------------------------------------------------
|
||||
#define RID_STR_BOOL (RID_UNTYPED_START + 0 )
|
||||
|
@@ -50,8 +50,6 @@
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
|
||||
#define RID_SVXIMG_COLLAPSEDNODE (RID_FORMS_START + 2)
|
||||
#define RID_SVXIMG_EXPANDEDNODE (RID_FORMS_START + 3)
|
||||
#define DROP_ACTION_TIMER_INITIAL_TICKS 10
|
||||
#define DROP_ACTION_TIMER_SCROLL_TICKS 3
|
||||
#define DROP_ACTION_TIMER_TICK_BASE 10
|
||||
@@ -67,15 +65,15 @@ sal_uInt16 lcl_getImageId(const uno::Reference< report::XReportComponent>& _xEle
|
||||
sal_uInt16 nId = 0;
|
||||
uno::Reference< report::XFixedLine> xFixedLine(_xElement,uno::UNO_QUERY);
|
||||
if ( uno::Reference< report::XFixedText>(_xElement,uno::UNO_QUERY).is() )
|
||||
nId = SID_FM_FIXEDTEXT;
|
||||
nId = RID_SVXBMP_FM_FIXEDTEXT;
|
||||
else if ( xFixedLine.is() )
|
||||
nId = xFixedLine->getOrientation() ? SID_INSERT_VFIXEDLINE : SID_INSERT_HFIXEDLINE;
|
||||
nId = xFixedLine->getOrientation() ? RID_SVXBMP_INSERT_VFIXEDLINE : RID_SVXBMP_INSERT_HFIXEDLINE;
|
||||
else if ( uno::Reference< report::XFormattedField>(_xElement,uno::UNO_QUERY).is() )
|
||||
nId = SID_FM_EDIT;
|
||||
nId = RID_SVXBMP_FM_EDIT;
|
||||
else if ( uno::Reference< report::XImageControl>(_xElement,uno::UNO_QUERY).is() )
|
||||
nId = SID_FM_IMAGECONTROL;
|
||||
nId = RID_SVXBMP_FM_IMAGECONTROL;
|
||||
else if ( uno::Reference< report::XShape>(_xElement,uno::UNO_QUERY).is() )
|
||||
nId = SID_DRAWTBX_CS_BASIC;
|
||||
nId = RID_SVXBMP_DRAWTBX_CS_BASIC;
|
||||
return nId;
|
||||
}
|
||||
|
||||
@@ -143,7 +141,6 @@ class NavigatorTree : public ::cppu::BaseMutex
|
||||
|
||||
enum DROP_ACTION { DA_SCROLLUP, DA_SCROLLDOWN, DA_EXPANDNODE };
|
||||
AutoTimer m_aDropActionTimer;
|
||||
ImageList m_aNavigatorImages;
|
||||
Point m_aTimerTriggered; // position at which the DropTimer started
|
||||
DROP_ACTION m_aDropActionType;
|
||||
OReportController& m_rController;
|
||||
@@ -235,11 +232,9 @@ NavigatorTree::NavigatorTree( vcl::Window* pParent,OReportController& _rControll
|
||||
|
||||
SetHelpId( HID_REPORT_NAVIGATOR_TREE );
|
||||
|
||||
m_aNavigatorImages = ImageList( ModuleRes( RID_SVXIMGLIST_RPTEXPL ) );
|
||||
|
||||
SetNodeBitmaps(
|
||||
m_aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
|
||||
m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE )
|
||||
Image(BitmapEx(ModuleRes(RID_SVXBMP_COLLAPSEDNODE))),
|
||||
Image(BitmapEx(ModuleRes(RID_SVXBMP_EXPANDEDNODE)))
|
||||
);
|
||||
|
||||
SetDragDropMode(DragDropMode::ALL);
|
||||
@@ -507,7 +502,9 @@ SvTreeListEntry* NavigatorTree::insertEntry(const OUString& _sName,SvTreeListEnt
|
||||
SvTreeListEntry* pEntry = nullptr;
|
||||
if ( _nImageId )
|
||||
{
|
||||
const Image aImage( m_aNavigatorImages.GetImage( _nImageId ) );
|
||||
ModuleRes aRes(_nImageId);
|
||||
BitmapEx aBitmap(aRes);
|
||||
const Image aImage(aBitmap);
|
||||
pEntry = InsertEntry(_sName,aImage,aImage,_pParent,false,_nPosition,_pData);
|
||||
}
|
||||
else
|
||||
@@ -536,12 +533,12 @@ void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xS
|
||||
|
||||
void NavigatorTree::traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvTreeListEntry* _pParent)
|
||||
{
|
||||
SvTreeListEntry* pFunctions = insertEntry(OUString(ModuleRes(RID_STR_FUNCTIONS)), _pParent, SID_RPT_NEW_FUNCTION, TREELIST_APPEND, new UserData(this,_xFunctions));
|
||||
SvTreeListEntry* pFunctions = insertEntry(OUString(ModuleRes(RID_STR_FUNCTIONS)), _pParent, RID_SVXBMP_RPT_NEW_FUNCTION, TREELIST_APPEND, new UserData(this,_xFunctions));
|
||||
const sal_Int32 nCount = _xFunctions->getCount();
|
||||
for (sal_Int32 i = 0; i< nCount; ++i)
|
||||
{
|
||||
uno::Reference< report::XFunction> xElement(_xFunctions->getByIndex(i),uno::UNO_QUERY);
|
||||
insertEntry(xElement->getName(),pFunctions,SID_RPT_NEW_FUNCTION,TREELIST_APPEND,new UserData(this,xElement));
|
||||
insertEntry(xElement->getName(),pFunctions,RID_SVXBMP_RPT_NEW_FUNCTION,TREELIST_APPEND,new UserData(this,xElement));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,7 +567,7 @@ SvTreeListEntry* NavigatorTree::find(const uno::Reference< uno::XInterface >& _x
|
||||
|
||||
void NavigatorTree::traverseReport(const uno::Reference< report::XReportDefinition>& _xReport)
|
||||
{
|
||||
insertEntry(_xReport->getName(),m_pMasterReport,SID_SELECT_REPORT,TREELIST_APPEND,new UserData(this,_xReport));
|
||||
insertEntry(_xReport->getName(),m_pMasterReport,RID_SVXBMP_SELECT_REPORT,TREELIST_APPEND,new UserData(this,_xReport));
|
||||
}
|
||||
|
||||
void NavigatorTree::traverseReportFunctions(const uno::Reference< report::XFunctions>& _xFunctions)
|
||||
@@ -582,31 +579,31 @@ void NavigatorTree::traverseReportFunctions(const uno::Reference< report::XFunct
|
||||
void NavigatorTree::traverseReportHeader(const uno::Reference< report::XSection>& _xSection)
|
||||
{
|
||||
SvTreeListEntry* pReport = find(_xSection->getReportDefinition());
|
||||
traverseSection(_xSection,pReport,SID_REPORTHEADERFOOTER);
|
||||
traverseSection(_xSection,pReport,RID_SVXBMP_REPORTHEADERFOOTER);
|
||||
}
|
||||
|
||||
void NavigatorTree::traverseReportFooter(const uno::Reference< report::XSection>& _xSection)
|
||||
{
|
||||
SvTreeListEntry* pReport = find(_xSection->getReportDefinition());
|
||||
traverseSection(_xSection,pReport,SID_REPORTHEADERFOOTER);
|
||||
traverseSection(_xSection,pReport,RID_SVXBMP_REPORTHEADERFOOTER);
|
||||
}
|
||||
|
||||
void NavigatorTree::traversePageHeader(const uno::Reference< report::XSection>& _xSection)
|
||||
{
|
||||
SvTreeListEntry* pReport = find(_xSection->getReportDefinition());
|
||||
traverseSection(_xSection,pReport,SID_PAGEHEADERFOOTER);
|
||||
traverseSection(_xSection,pReport,RID_SVXBMP_PAGEHEADERFOOTER);
|
||||
}
|
||||
|
||||
void NavigatorTree::traversePageFooter(const uno::Reference< report::XSection>& _xSection)
|
||||
{
|
||||
SvTreeListEntry* pReport = find(_xSection->getReportDefinition());
|
||||
traverseSection(_xSection,pReport,SID_PAGEHEADERFOOTER);
|
||||
traverseSection(_xSection,pReport,RID_SVXBMP_PAGEHEADERFOOTER);
|
||||
}
|
||||
|
||||
void NavigatorTree::traverseGroups(const uno::Reference< report::XGroups>& _xGroups)
|
||||
{
|
||||
SvTreeListEntry* pReport = find(_xGroups->getReportDefinition());
|
||||
insertEntry(OUString(ModuleRes(RID_STR_GROUPS)), pReport, SID_SORTINGANDGROUPING, TREELIST_APPEND, new UserData(this,_xGroups));
|
||||
insertEntry(OUString(ModuleRes(RID_STR_GROUPS)), pReport, RID_SVXBMP_SORTINGANDGROUPING, TREELIST_APPEND, new UserData(this,_xGroups));
|
||||
}
|
||||
|
||||
void NavigatorTree::traverseGroup(const uno::Reference< report::XGroup>& _xGroup)
|
||||
@@ -614,7 +611,7 @@ void NavigatorTree::traverseGroup(const uno::Reference< report::XGroup>& _xGroup
|
||||
uno::Reference< report::XGroups> xGroups(_xGroup->getParent(),uno::UNO_QUERY);
|
||||
SvTreeListEntry* pGroups = find(xGroups);
|
||||
OSL_ENSURE(pGroups,"No Groups inserted so far. Why!");
|
||||
insertEntry(_xGroup->getExpression(),pGroups,SID_GROUP,rptui::getPositionInIndexAccess(xGroups.get(),_xGroup),new UserData(this,_xGroup));
|
||||
insertEntry(_xGroup->getExpression(),pGroups,RID_SVXBMP_GROUP,rptui::getPositionInIndexAccess(xGroups.get(),_xGroup),new UserData(this,_xGroup));
|
||||
}
|
||||
|
||||
void NavigatorTree::traverseGroupFunctions(const uno::Reference< report::XFunctions>& _xFunctions)
|
||||
@@ -627,21 +624,21 @@ void NavigatorTree::traverseGroupHeader(const uno::Reference< report::XSection>&
|
||||
{
|
||||
SvTreeListEntry* pGroup = find(_xSection->getGroup());
|
||||
OSL_ENSURE(pGroup,"No group found");
|
||||
traverseSection(_xSection,pGroup,SID_GROUPHEADER,1);
|
||||
traverseSection(_xSection,pGroup,RID_SVXBMP_GROUPHEADER,1);
|
||||
}
|
||||
|
||||
void NavigatorTree::traverseGroupFooter(const uno::Reference< report::XSection>& _xSection)
|
||||
{
|
||||
SvTreeListEntry* pGroup = find(_xSection->getGroup());
|
||||
OSL_ENSURE(pGroup,"No group found");
|
||||
traverseSection(_xSection,pGroup,SID_GROUPFOOTER);
|
||||
traverseSection(_xSection,pGroup,RID_SVXBMP_GROUPFOOTER);
|
||||
}
|
||||
|
||||
void NavigatorTree::traverseDetail(const uno::Reference< report::XSection>& _xSection)
|
||||
{
|
||||
uno::Reference< report::XReportDefinition> xReport = _xSection->getReportDefinition();
|
||||
SvTreeListEntry* pParent = find(xReport);
|
||||
traverseSection(_xSection,pParent,SID_ICON_DETAIL);
|
||||
traverseSection(_xSection,pParent,RID_SVXBMP_ICON_DETAIL);
|
||||
}
|
||||
|
||||
void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException)
|
||||
@@ -657,18 +654,18 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
|
||||
if ( _rEvent.PropertyName == PROPERTY_REPORTHEADERON )
|
||||
{
|
||||
sal_uLong nPos = xReport->getReportHeaderOn() ? 2 : 1;
|
||||
traverseSection(xReport->getReportHeader(),pParent,SID_REPORTHEADERFOOTER,nPos);
|
||||
traverseSection(xReport->getReportHeader(),pParent,RID_SVXBMP_REPORTHEADERFOOTER,nPos);
|
||||
}
|
||||
else if ( _rEvent.PropertyName == PROPERTY_PAGEHEADERON )
|
||||
{
|
||||
traverseSection(xReport->getPageHeader(),pParent, SID_PAGEHEADERFOOTER,1);
|
||||
traverseSection(xReport->getPageHeader(),pParent, RID_SVXBMP_PAGEHEADERFOOTER,1);
|
||||
}
|
||||
else if ( _rEvent.PropertyName == PROPERTY_PAGEFOOTERON )
|
||||
traverseSection(xReport->getPageFooter(),pParent, SID_PAGEHEADERFOOTER);
|
||||
traverseSection(xReport->getPageFooter(),pParent, RID_SVXBMP_PAGEHEADERFOOTER);
|
||||
else if ( _rEvent.PropertyName == PROPERTY_REPORTFOOTERON )
|
||||
{
|
||||
sal_uLong nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : TREELIST_APPEND;
|
||||
traverseSection(xReport->getReportFooter(),pParent,SID_REPORTHEADERFOOTER,nPos);
|
||||
traverseSection(xReport->getReportFooter(),pParent,RID_SVXBMP_REPORTHEADERFOOTER,nPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -698,7 +695,7 @@ void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent )
|
||||
uno::Reference< report::XReportComponent> xElement(xProp,uno::UNO_QUERY);
|
||||
if ( xProp.is() )
|
||||
sName = lcl_getName(xProp);
|
||||
insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),TREELIST_APPEND,new UserData(this,xProp));
|
||||
insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(RID_SVXBMP_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),TREELIST_APPEND,new UserData(this,xProp));
|
||||
}
|
||||
if ( !IsExpanded(pEntry) )
|
||||
Expand(pEntry);
|
||||
@@ -822,7 +819,7 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent&
|
||||
{
|
||||
if ( bFooterOn )
|
||||
++nPos;
|
||||
m_pTree->traverseSection(pMemFunSection(&aGroupHelper),pEntry,bFooterOn ? SID_GROUPFOOTER : SID_GROUPHEADER,nPos);
|
||||
m_pTree->traverseSection(pMemFunSection(&aGroupHelper),pEntry,bFooterOn ? RID_SVXBMP_GROUPFOOTER : RID_SVXBMP_GROUPHEADER,nPos);
|
||||
}
|
||||
}
|
||||
else if ( PROPERTY_EXPRESSION == _rEvent.PropertyName)
|
||||
|
@@ -22,47 +22,101 @@
|
||||
#include <svx/svxids.hrc>
|
||||
#include <svl/solar.hrc>
|
||||
|
||||
#define RID_SVXIMG_COLLAPSEDNODE (RID_FORMS_START + 2)
|
||||
#define RID_SVXIMG_EXPANDEDNODE (RID_FORMS_START + 3)
|
||||
#define RID_SVXIMG_FORMS (RID_FORMS_START +13)
|
||||
|
||||
#define NAVIGATOR_IMAGEIDS \
|
||||
IdList = \
|
||||
{ \
|
||||
SID_SELECT_REPORT;\
|
||||
SID_FM_FIXEDTEXT ; \
|
||||
SID_INSERT_HFIXEDLINE ; \
|
||||
SID_INSERT_VFIXEDLINE;\
|
||||
SID_FM_IMAGECONTROL ; \
|
||||
SID_FM_EDIT ; \
|
||||
SID_RPT_NEW_FUNCTION;\
|
||||
SID_REPORTHEADERFOOTER;\
|
||||
SID_PAGEHEADERFOOTER;\
|
||||
SID_GROUPHEADER;\
|
||||
SID_GROUPFOOTER;\
|
||||
RID_SVXIMG_COLLAPSEDNODE ; \
|
||||
RID_SVXIMG_EXPANDEDNODE ; \
|
||||
SID_SORTINGANDGROUPING;\
|
||||
SID_DRAWTBX_CS_BASIC;\
|
||||
SID_GROUP;\
|
||||
SID_ICON_DETAIL;\
|
||||
}; \
|
||||
IdCount = 17
|
||||
|
||||
ImageList RID_SVXIMGLIST_RPTEXPL
|
||||
Bitmap RID_SVXBMP_SELECT_REPORT
|
||||
{
|
||||
Prefix = "sx";
|
||||
NAVIGATOR_IMAGEIDS;
|
||||
File = "sx12464.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_FM_FIXEDTEXT
|
||||
{
|
||||
File = "sx10597.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_INSERT_HFIXEDLINE
|
||||
{
|
||||
File = "sx10928.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_INSERT_VFIXEDLINE
|
||||
{
|
||||
File = "sx10929.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_FM_IMAGECONTROL
|
||||
{
|
||||
File = "sx10710.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_FM_EDIT
|
||||
{
|
||||
File = "sx10599.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_RPT_NEW_FUNCTION
|
||||
{
|
||||
File = "sx12594.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_REPORTHEADERFOOTER
|
||||
{
|
||||
File = "sx12453.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_PAGEHEADERFOOTER
|
||||
{
|
||||
File = "sx12452.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_GROUPHEADER
|
||||
{
|
||||
File = "sx12466.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_GROUPFOOTER
|
||||
{
|
||||
File = "sx12468.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_COLLAPSEDNODE
|
||||
{
|
||||
File = "sx18002.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_EXPANDEDNODE
|
||||
{
|
||||
File = "sx18003.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_SORTINGANDGROUPING
|
||||
{
|
||||
File = "sx12454.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_DRAWTBX_CS_BASIC
|
||||
{
|
||||
File = "sx11047.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_GROUP
|
||||
{
|
||||
File = "sx10454.png";
|
||||
};
|
||||
|
||||
Bitmap RID_SVXBMP_ICON_DETAIL
|
||||
{
|
||||
File = "sx12603.png";
|
||||
};
|
||||
|
||||
String RID_STR_FUNCTIONS
|
||||
{
|
||||
Text [ en-US ] = "Functions" ;
|
||||
};
|
||||
|
||||
String RID_STR_GROUPS
|
||||
{
|
||||
Text [ en-US ] = "Groups" ;
|
||||
};
|
||||
|
||||
Menu RID_MENU_NAVIGATOR
|
||||
{
|
||||
ItemList =
|
||||
|
Reference in New Issue
Block a user