Kaydet (Commit) 55fe8bf2 authored tarafından Caolán McNamara's avatar Caolán McNamara

IconBox checkbox is always hidden and always disabled

Change-Id: I4aad1568501e4ecb2758c19ee62f78388abb6fcf

Change icon button is always hidden, and hooked to nothing

Change-Id: I8b8e290908223467b76b0a861a8285e9a87e9fe4

ShouldLink never called...

so bLink is never used
so the always hidden aRbPasteLink is unneccessary

Change-Id: Ic48c9856a8750706262c883a079e0374fc9bb59c

GetAspect never called...

so nAspect is unnecessary,
so SetDefault becomes a no-op and unnecessary

Change-Id: I4a2d0af2eae2a822ecc2d71c84b26b8a2a2de210

aRbPaste is always hidden

Change-Id: I2b1c6eefee5dada29ad5952010b7121e5bcadcde
üst 1f32864f
...@@ -41,10 +41,6 @@ SvPasteObjectDialog::SvPasteObjectDialog( Window* pParent ) ...@@ -41,10 +41,6 @@ SvPasteObjectDialog::SvPasteObjectDialog( Window* pParent )
: ModalDialog( pParent, CUI_RES( MD_PASTE_OBJECT ) ), : ModalDialog( pParent, CUI_RES( MD_PASTE_OBJECT ) ),
aFtSource( this, CUI_RES( FT_SOURCE ) ), aFtSource( this, CUI_RES( FT_SOURCE ) ),
aFtObjectSource( this, CUI_RES( FT_OBJECT_SOURCE ) ), aFtObjectSource( this, CUI_RES( FT_OBJECT_SOURCE ) ),
aRbPaste( this, CUI_RES( RB_PASTE ) ),
aRbPasteLink( this, CUI_RES( RB_PASTE_LINK ) ),
aCbDisplayAsIcon( this, CUI_RES( CB_DISPLAY_AS_ICON ) ),
aPbChangeIcon( this, CUI_RES( PB_CHANGE_ICON ) ),
aFlChoice( this, CUI_RES( FL_CHOICE ) ), aFlChoice( this, CUI_RES( FL_CHOICE ) ),
aLbInsertList( this, CUI_RES( LB_INSERT_LIST ) ), aLbInsertList( this, CUI_RES( LB_INSERT_LIST ) ),
aOKButton1( this, CUI_RES( 1 ) ), aOKButton1( this, CUI_RES( 1 ) ),
...@@ -62,15 +58,13 @@ SvPasteObjectDialog::SvPasteObjectDialog( Window* pParent ) ...@@ -62,15 +58,13 @@ SvPasteObjectDialog::SvPasteObjectDialog( Window* pParent )
ObjectLB().SetSelectHdl( LINK( this, SvPasteObjectDialog, SelectHdl ) ); ObjectLB().SetSelectHdl( LINK( this, SvPasteObjectDialog, SelectHdl ) );
ObjectLB().SetDoubleClickHdl( LINK( this, SvPasteObjectDialog, DoubleClickHdl ) ); ObjectLB().SetDoubleClickHdl( LINK( this, SvPasteObjectDialog, DoubleClickHdl ) );
SetDefault();
aLbInsertList.SetAccessibleName(aFlChoice.GetText()); aLbInsertList.SetAccessibleName(aFlChoice.GetText());
} }
void SvPasteObjectDialog::SelectObject() void SvPasteObjectDialog::SelectObject()
{ {
if ( aLbInsertList.GetEntryCount() && if (m_pLbInsertList->GetEntryCount())
!aRbPaste.IsVisible() && !aRbPasteLink.IsVisible() )
{ {
aLbInsertList.SelectEntryPos(0); aLbInsertList.SelectEntryPos(0);
SelectHdl( &aLbInsertList ); SelectHdl( &aLbInsertList );
...@@ -95,12 +89,6 @@ IMPL_LINK_INLINE_START( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox ...@@ -95,12 +89,6 @@ IMPL_LINK_INLINE_START( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox
} }
IMPL_LINK_INLINE_END( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox ) IMPL_LINK_INLINE_END( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox )
void SvPasteObjectDialog::SetDefault()
{
bLink = sal_False;
nAspect = (sal_uInt16)::com::sun::star::embed::Aspects::MSOLE_CONTENT;
}
SvPasteObjectDialog::~SvPasteObjectDialog() SvPasteObjectDialog::~SvPasteObjectDialog()
{ {
} }
...@@ -177,7 +165,6 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, ...@@ -177,7 +165,6 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper,
} }
else if( SOT_FORMATSTR_ID_LINK_SOURCE == nFormat ) else if( SOT_FORMATSTR_ID_LINK_SOURCE == nFormat )
{ {
PasteLink().Enable();
continue; continue;
} }
else if( !aName.Len() ) else if( !aName.Len() )
...@@ -221,15 +208,8 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, ...@@ -221,15 +208,8 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper,
ObjectSource().SetText( aTypeName ); ObjectSource().SetText( aTypeName );
SetDefault();
if( Dialog::Execute() == RET_OK ) if( Dialog::Execute() == RET_OK )
{ {
bLink = PasteLink().IsChecked();
if( AsIconBox().IsChecked() )
nAspect = (sal_uInt16)com::sun::star::embed::Aspects::MSOLE_ICON;
nSelFormat = (sal_uLong)ObjectLB().GetEntryData( ObjectLB().GetSelectEntryPos() ); nSelFormat = (sal_uLong)ObjectLB().GetEntryData( ObjectLB().GetSelectEntryPos() );
} }
......
...@@ -22,10 +22,6 @@ ...@@ -22,10 +22,6 @@
#define TB_LINKS 32014 #define TB_LINKS 32014
// gemeinsame Id's
#define CB_DISPLAY_AS_ICON 12
#define PB_CHANGE_ICON 14
#define STR_AUTOLINK 32006 #define STR_AUTOLINK 32006
#define STR_MANUALLINK 32007 #define STR_MANUALLINK 32007
#define STR_BROKENLINK 32008 #define STR_BROKENLINK 32008
...@@ -41,8 +37,6 @@ ...@@ -41,8 +37,6 @@
#define MD_PASTE_OBJECT 32001 #define MD_PASTE_OBJECT 32001
#define S_OBJECT 1 #define S_OBJECT 1
#define RB_PASTE 20
#define RB_PASTE_LINK 21
#define FT_OBJECT_SOURCE 22 #define FT_OBJECT_SOURCE 22
#define FT_SOURCE 23 #define FT_SOURCE 23
......
...@@ -40,23 +40,6 @@ ModalDialog MD_PASTE_OBJECT ...@@ -40,23 +40,6 @@ ModalDialog MD_PASTE_OBJECT
Size = MAP_APPFONT ( 166 , 20 ) ; Size = MAP_APPFONT ( 166 , 20 ) ;
WordBreak = TRUE ; WordBreak = TRUE ;
}; };
RadioButton RB_PASTE
{
HelpID = "cui:RadioButton:MD_PASTE_OBJECT:RB_PASTE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 48 ) ;
Size = MAP_APPFONT ( 63 , 10 ) ;
Text [ en-US ] = "~Insert as" ;
Check = TRUE ;
};
RadioButton RB_PASTE_LINK
{
HelpID = "cui:RadioButton:MD_PASTE_OBJECT:RB_PASTE_LINK";
Hide = TRUE ;
Pos = MAP_APPFONT ( 78 , 48 ) ;
Size = MAP_APPFONT ( 63 , 10 ) ;
Text [ en-US ] = "Link to" ;
};
ListBox LB_INSERT_LIST ListBox LB_INSERT_LIST
{ {
HelpID = "cui:ListBox:MD_PASTE_OBJECT:LB_INSERT_LIST"; HelpID = "cui:ListBox:MD_PASTE_OBJECT:LB_INSERT_LIST";
...@@ -64,23 +47,6 @@ ModalDialog MD_PASTE_OBJECT ...@@ -64,23 +47,6 @@ ModalDialog MD_PASTE_OBJECT
Pos = MAP_APPFONT ( 12 , 49 ) ; Pos = MAP_APPFONT ( 12 , 49 ) ;
Size = MAP_APPFONT ( 202 , 74 ) ; Size = MAP_APPFONT ( 202 , 74 ) ;
}; };
CheckBox CB_DISPLAY_AS_ICON
{
HelpID = "cui:CheckBox:MD_PASTE_OBJECT:CB_DISPLAY_AS_ICON";
Hide = TRUE ;
Disable = TRUE ;
Pos = MAP_APPFONT ( 150 , 62 ) ;
Size = MAP_APPFONT ( 64 , 10 ) ;
Text [ en-US ] = "~As icon" ;
};
PushButton PB_CHANGE_ICON
{
HelpID = "cui:PushButton:MD_PASTE_OBJECT:PB_CHANGE_ICON";
Hide = TRUE ;
Pos = MAP_APPFONT ( 150 , 111 ) ;
Size = MAP_APPFONT ( 64 , 14 ) ;
Text [ en-US ] = "~Other Icon..." ;
};
FixedLine FL_CHOICE FixedLine FL_CHOICE
{ {
Pos = MAP_APPFONT ( 6 , 38 ) ; Pos = MAP_APPFONT ( 6 , 38 ) ;
......
...@@ -41,10 +41,6 @@ class SvPasteObjectDialog : public ModalDialog ...@@ -41,10 +41,6 @@ class SvPasteObjectDialog : public ModalDialog
{ {
FixedText aFtSource; FixedText aFtSource;
FixedText aFtObjectSource; FixedText aFtObjectSource;
RadioButton aRbPaste;
RadioButton aRbPasteLink;
CheckBox aCbDisplayAsIcon;
PushButton aPbChangeIcon;
FixedLine aFlChoice; FixedLine aFlChoice;
ListBox aLbInsertList; ListBox aLbInsertList;
OKButton aOKButton1; OKButton aOKButton1;
...@@ -53,20 +49,13 @@ class SvPasteObjectDialog : public ModalDialog ...@@ -53,20 +49,13 @@ class SvPasteObjectDialog : public ModalDialog
::std::map< SotFormatStringId, String > aSupplementMap; ::std::map< SotFormatStringId, String > aSupplementMap;
SvGlobalName aObjClassName; SvGlobalName aObjClassName;
String aObjName; String aObjName;
sal_uInt16 nAspect;
sal_Bool bLink;
ListBox& ObjectLB() { return aLbInsertList; } ListBox& ObjectLB() { return aLbInsertList; }
FixedText& ObjectSource() { return aFtObjectSource; } FixedText& ObjectSource() { return aFtObjectSource; }
RadioButton& PasteLink() { return aRbPasteLink; }
CheckBox& AsIconBox() { return aCbDisplayAsIcon; }
void SelectObject(); void SelectObject();
DECL_LINK( SelectHdl, ListBox * ); DECL_LINK( SelectHdl, ListBox * );
DECL_LINK( DoubleClickHdl, ListBox * ); DECL_LINK( DoubleClickHdl, ListBox * );
void SetDefault();
sal_uInt16 GetAspect() const { return nAspect; }
sal_Bool ShouldLink() const { return bLink; }
public: public:
SvPasteObjectDialog( Window* pParent ); SvPasteObjectDialog( Window* pParent );
......
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