adapt code to use paste special .ui
Change-Id: Iaac28f442aa38dd6610c89ba04ea2d1ccfca35c5
This commit is contained in:
@@ -55,6 +55,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
|
|||||||
cui/uiconfig/ui/optuserpage \
|
cui/uiconfig/ui/optuserpage \
|
||||||
cui/uiconfig/ui/optviewpage \
|
cui/uiconfig/ui/optviewpage \
|
||||||
cui/uiconfig/ui/pageformatpage \
|
cui/uiconfig/ui/pageformatpage \
|
||||||
|
cui/uiconfig/ui/pastespecial \
|
||||||
cui/uiconfig/ui/personalization_tab \
|
cui/uiconfig/ui/personalization_tab \
|
||||||
cui/uiconfig/ui/pickbulletpage \
|
cui/uiconfig/ui/pickbulletpage \
|
||||||
cui/uiconfig/ui/pickgraphicpage \
|
cui/uiconfig/ui/pickgraphicpage \
|
||||||
|
@@ -28,7 +28,6 @@
|
|||||||
#include <vcl/group.hxx>
|
#include <vcl/group.hxx>
|
||||||
#include <vcl/lstbox.hxx>
|
#include <vcl/lstbox.hxx>
|
||||||
#include <vcl/msgbox.hxx>
|
#include <vcl/msgbox.hxx>
|
||||||
#include "svuidlg.hrc"
|
|
||||||
#include <sot/formats.hxx>
|
#include <sot/formats.hxx>
|
||||||
#include <sot/stg.hxx>
|
#include <sot/stg.hxx>
|
||||||
#include <svtools/sores.hxx>
|
#include <svtools/sores.hxx>
|
||||||
@@ -37,37 +36,26 @@
|
|||||||
#include <dialmgr.hxx>
|
#include <dialmgr.hxx>
|
||||||
|
|
||||||
SvPasteObjectDialog::SvPasteObjectDialog( Window* pParent )
|
SvPasteObjectDialog::SvPasteObjectDialog( Window* pParent )
|
||||||
|
: ModalDialog(pParent, "PasteSpecialDialog", "cui/ui/pastespecial.ui")
|
||||||
: ModalDialog( pParent, CUI_RES( MD_PASTE_OBJECT ) ),
|
|
||||||
aFtSource( this, CUI_RES( FT_SOURCE ) ),
|
|
||||||
aFtObjectSource( this, CUI_RES( FT_OBJECT_SOURCE ) ),
|
|
||||||
aFlChoice( this, CUI_RES( FL_CHOICE ) ),
|
|
||||||
aLbInsertList( this, CUI_RES( LB_INSERT_LIST ) ),
|
|
||||||
aOKButton1( this, CUI_RES( 1 ) ),
|
|
||||||
aCancelButton1( this, CUI_RES( 1 ) ),
|
|
||||||
aHelpButton1( this, CUI_RES( 1 ) )
|
|
||||||
{
|
{
|
||||||
FreeResource();
|
get(m_pFtObjectSource, "source");
|
||||||
SetHelpId( HID_PASTE_DLG );
|
get(m_pLbInsertList, "list");
|
||||||
SetUniqueId( HID_PASTE_DLG );
|
get(m_pOKButton, "ok");
|
||||||
|
|
||||||
Font aFont = aFtObjectSource.GetFont();
|
m_pLbInsertList->SetDropDownLineCount(8);
|
||||||
aFont.SetWeight( WEIGHT_LIGHT );
|
m_pLbInsertList->set_width_request(m_pLbInsertList->approximate_char_width() * 32);
|
||||||
aFtObjectSource.SetFont( aFont );
|
m_pOKButton->Disable();
|
||||||
aOKButton1.Disable();
|
|
||||||
|
|
||||||
ObjectLB().SetSelectHdl( LINK( this, SvPasteObjectDialog, SelectHdl ) );
|
ObjectLB().SetSelectHdl( LINK( this, SvPasteObjectDialog, SelectHdl ) );
|
||||||
ObjectLB().SetDoubleClickHdl( LINK( this, SvPasteObjectDialog, DoubleClickHdl ) );
|
ObjectLB().SetDoubleClickHdl( LINK( this, SvPasteObjectDialog, DoubleClickHdl ) );
|
||||||
|
|
||||||
aLbInsertList.SetAccessibleName(aFlChoice.GetText());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SvPasteObjectDialog::SelectObject()
|
void SvPasteObjectDialog::SelectObject()
|
||||||
{
|
{
|
||||||
if (m_pLbInsertList->GetEntryCount())
|
if (m_pLbInsertList->GetEntryCount())
|
||||||
{
|
{
|
||||||
aLbInsertList.SelectEntryPos(0);
|
m_pLbInsertList->SelectEntryPos(0);
|
||||||
SelectHdl( &aLbInsertList );
|
SelectHdl(m_pLbInsertList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,8 +63,8 @@ IMPL_LINK( SvPasteObjectDialog, SelectHdl, ListBox *, pListBox )
|
|||||||
{
|
{
|
||||||
(void)pListBox;
|
(void)pListBox;
|
||||||
|
|
||||||
if ( !aOKButton1.IsEnabled() )
|
if ( !m_pOKButton->IsEnabled() )
|
||||||
aOKButton1.Enable();
|
m_pOKButton->Enable();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,14 +32,6 @@
|
|||||||
#define STR_WAITINGLINK 32028
|
#define STR_WAITINGLINK 32028
|
||||||
|
|
||||||
|
|
||||||
#define FL_CHOICE 15
|
|
||||||
#define LB_INSERT_LIST 7
|
|
||||||
|
|
||||||
#define MD_PASTE_OBJECT 32001
|
|
||||||
#define S_OBJECT 1
|
|
||||||
#define FT_OBJECT_SOURCE 22
|
|
||||||
#define FT_SOURCE 23
|
|
||||||
|
|
||||||
#define MD_UPDATE_BASELINKS 32002
|
#define MD_UPDATE_BASELINKS 32002
|
||||||
#define LB_LINKS 30
|
#define LB_LINKS 30
|
||||||
#define FT_FILES 31
|
#define FT_FILES 31
|
||||||
|
@@ -20,60 +20,6 @@
|
|||||||
#include <svtools/controldims.hrc>
|
#include <svtools/controldims.hrc>
|
||||||
#include "svuidlg.hrc"
|
#include "svuidlg.hrc"
|
||||||
|
|
||||||
ModalDialog MD_PASTE_OBJECT
|
|
||||||
{
|
|
||||||
HelpID = "cui:ModalDialog:MD_PASTE_OBJECT";
|
|
||||||
OutputSize = TRUE ;
|
|
||||||
SVLook = TRUE ;
|
|
||||||
Moveable = TRUE ;
|
|
||||||
Size = MAP_APPFONT ( 282 , 135 ) ; // 12 under listbox
|
|
||||||
Text [ en-US ] = "Paste Special" ;
|
|
||||||
FixedText FT_SOURCE
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 6 , 11 ) ;
|
|
||||||
Size = MAP_APPFONT ( 30 , 10 ) ;
|
|
||||||
Text [ en-US ] = "Source:" ;
|
|
||||||
};
|
|
||||||
FixedText FT_OBJECT_SOURCE
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 42 , 11 ) ;
|
|
||||||
Size = MAP_APPFONT ( 166 , 20 ) ;
|
|
||||||
WordBreak = TRUE ;
|
|
||||||
};
|
|
||||||
ListBox LB_INSERT_LIST
|
|
||||||
{
|
|
||||||
HelpID = "cui:ListBox:MD_PASTE_OBJECT:LB_INSERT_LIST";
|
|
||||||
Border = TRUE ;
|
|
||||||
Pos = MAP_APPFONT ( 12 , 49 ) ;
|
|
||||||
Size = MAP_APPFONT ( 202 , 74 ) ;
|
|
||||||
};
|
|
||||||
FixedLine FL_CHOICE
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 6 , 38 ) ;
|
|
||||||
Size = MAP_APPFONT ( 214 , RSC_CD_FIXEDLINE_HEIGHT ) ;
|
|
||||||
Text [ en-US ] = "Selection" ;
|
|
||||||
};
|
|
||||||
OKButton 1
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 226 , 6 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
|
||||||
DefButton = TRUE ;
|
|
||||||
};
|
|
||||||
CancelButton 1
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 226 , 23 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
|
||||||
};
|
|
||||||
HelpButton 1
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 226 , 43 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
|
||||||
};
|
|
||||||
String S_OBJECT
|
|
||||||
{
|
|
||||||
Text [ en-US ] = "Object" ;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
ModalDialog MD_UPDATE_BASELINKS
|
ModalDialog MD_UPDATE_BASELINKS
|
||||||
{
|
{
|
||||||
HelpID = "cui:ModalDialog:MD_UPDATE_BASELINKS";
|
HelpID = "cui:ModalDialog:MD_UPDATE_BASELINKS";
|
||||||
|
@@ -285,7 +285,6 @@
|
|||||||
#define HID_HYPERLINK_MARKWND_CLOSE "CUI_HID_HYPERLINK_MARKWND_CLOSE"
|
#define HID_HYPERLINK_MARKWND_CLOSE "CUI_HID_HYPERLINK_MARKWND_CLOSE"
|
||||||
#define HID_HYPERLINK_MARKWND_TREE "CUI_HID_HYPERLINK_MARKWND_TREE"
|
#define HID_HYPERLINK_MARKWND_TREE "CUI_HID_HYPERLINK_MARKWND_TREE"
|
||||||
#define HID_GRFFILTER_EMBOSS_LIGHT "CUI_HID_GRFFILTER_EMBOSS_LIGHT"
|
#define HID_GRFFILTER_EMBOSS_LIGHT "CUI_HID_GRFFILTER_EMBOSS_LIGHT"
|
||||||
#define HID_PASTE_DLG "CUI_HID_PASTE_DLG"
|
|
||||||
#define HID_LINKDLG_TABLB "CUI_HID_LINKDLG_TABLB"
|
#define HID_LINKDLG_TABLB "CUI_HID_LINKDLG_TABLB"
|
||||||
#define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX"
|
#define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX"
|
||||||
#define HID_GALLERY_TITLE_EDIT "CUI_HID_GALLERY_TITLE_EDIT"
|
#define HID_GALLERY_TITLE_EDIT "CUI_HID_GALLERY_TITLE_EDIT"
|
||||||
|
@@ -39,19 +39,15 @@ class TransferableDataHelper;
|
|||||||
|
|
||||||
class SvPasteObjectDialog : public ModalDialog
|
class SvPasteObjectDialog : public ModalDialog
|
||||||
{
|
{
|
||||||
FixedText aFtSource;
|
FixedText* m_pFtObjectSource;
|
||||||
FixedText aFtObjectSource;
|
ListBox* m_pLbInsertList;
|
||||||
FixedLine aFlChoice;
|
OKButton* m_pOKButton;
|
||||||
ListBox aLbInsertList;
|
|
||||||
OKButton aOKButton1;
|
|
||||||
CancelButton aCancelButton1;
|
|
||||||
HelpButton aHelpButton1;
|
|
||||||
::std::map< SotFormatStringId, String > aSupplementMap;
|
::std::map< SotFormatStringId, String > aSupplementMap;
|
||||||
SvGlobalName aObjClassName;
|
SvGlobalName aObjClassName;
|
||||||
String aObjName;
|
String aObjName;
|
||||||
|
|
||||||
ListBox& ObjectLB() { return aLbInsertList; }
|
ListBox& ObjectLB() { return *m_pLbInsertList; }
|
||||||
FixedText& ObjectSource() { return aFtObjectSource; }
|
FixedText& ObjectSource() { return *m_pFtObjectSource; }
|
||||||
|
|
||||||
void SelectObject();
|
void SelectObject();
|
||||||
DECL_LINK( SelectHdl, ListBox * );
|
DECL_LINK( SelectHdl, ListBox * );
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.0 -->
|
<!-- interface-requires gtk+ 3.0 -->
|
||||||
<object class="GtkDialog" id="PasteSpecial">
|
<object class="GtkDialog" id="PasteSpecialDialog">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="border_width">6</property>
|
<property name="border_width">6</property>
|
||||||
<property name="title" translatable="yes">Paste Special</property>
|
<property name="title" translatable="yes">Paste Special</property>
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="has_default">True</property>
|
<property name="has_default">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="use_action_appearance">False</property>
|
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -38,7 +37,6 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="use_action_appearance">False</property>
|
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -53,7 +51,6 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="use_action_appearance">False</property>
|
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -74,11 +71,15 @@
|
|||||||
<object class="GtkBox" id="box1">
|
<object class="GtkBox" id="box1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="box2">
|
<object class="GtkBox" id="box2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label2">
|
<object class="GtkLabel" id="label2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -92,10 +93,10 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label3">
|
<object class="GtkLabel" id="source">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">label</property>
|
<property name="wrap">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@@ -134,9 +135,11 @@
|
|||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
<property name="shadow_type">in</property>
|
<property name="shadow_type">in</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeView" id="treeview">
|
<object class="GtkTreeView" id="list">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
<child internal-child="selection">
|
<child internal-child="selection">
|
||||||
<object class="GtkTreeSelection" id="treeview-selection"/>
|
<object class="GtkTreeSelection" id="treeview-selection"/>
|
||||||
</child>
|
</child>
|
||||||
@@ -150,7 +153,7 @@
|
|||||||
<object class="GtkLabel" id="label1">
|
<object class="GtkLabel" id="label1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">Selection:</property>
|
<property name="label" translatable="yes">Selection</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"/>
|
||||||
</attributes>
|
</attributes>
|
Reference in New Issue
Block a user