weld impress navigator

complicated by the effort to keep the non-standard behaviour of

commit f3c68cdf8f
Date:   Wed Feb 21 17:27:53 2018 +0100

    tdf#115873 sd navigator: allow selecting but not focusing on objects

and the self-dnd code

Change-Id: I29c224739463d1d44690f30ed29db3fe2b16b4a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89045
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2020-02-19 13:22:19 +00:00
parent 96513a30a8
commit 42f281c56e
19 changed files with 805 additions and 1551 deletions

View File

@@ -52,9 +52,6 @@
<glade-widget-class title="Animation ListBox" name="sdlo-CustomAnimationList" <glade-widget-class title="Animation ListBox" name="sdlo-CustomAnimationList"
generic-name="Animation ListBox" parent="GtkTreeView" generic-name="Animation ListBox" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/> icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Page Objs ListBox" name="sdlo-SdPageObjsTLB"
generic-name="SdPageObjsTLB" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Page List Control" name="sduilo-SdPageListControl" <glade-widget-class title="Page List Control" name="sduilo-SdPageListControl"
generic-name="Page List Control" parent="GtkTreeView" generic-name="Page List Control" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/> icon-name="widget-gtk-treeview"/>

View File

@@ -24,13 +24,8 @@
#define HID_SDGRAPHICVIEWSHELL "SD_HID_SDGRAPHICVIEWSHELL" #define HID_SDGRAPHICVIEWSHELL "SD_HID_SDGRAPHICVIEWSHELL"
#define HID_SDOUTLINEVIEWSHELL "SD_HID_SDOUTLINEVIEWSHELL" #define HID_SDOUTLINEVIEWSHELL "SD_HID_SDOUTLINEVIEWSHELL"
#define HID_SD_NAVIGATOR_MENU1 "SD_HID_SD_NAVIGATOR_MENU1"
#define HID_SD_NAVIGATOR_MENU2 "SD_HID_SD_NAVIGATOR_MENU2"
#define HID_SD_NAVIGATOR_MENU3 "SD_HID_SD_NAVIGATOR_MENU3"
#define HID_SD_WIN_PRESENTATION "SD_HID_SD_WIN_PRESENTATION" #define HID_SD_WIN_PRESENTATION "SD_HID_SD_WIN_PRESENTATION"
#define HID_SD_HTMLEXPORT_PAGE1 "SD_HID_SD_HTMLEXPORT_PAGE1" #define HID_SD_HTMLEXPORT_PAGE1 "SD_HID_SD_HTMLEXPORT_PAGE1"
#define HID_SD_HTMLEXPORT_PAGE2 "SD_HID_SD_HTMLEXPORT_PAGE2" #define HID_SD_HTMLEXPORT_PAGE2 "SD_HID_SD_HTMLEXPORT_PAGE2"
#define HID_SD_HTMLEXPORT_PAGE3 "SD_HID_SD_HTMLEXPORT_PAGE3" #define HID_SD_HTMLEXPORT_PAGE3 "SD_HID_SD_HTMLEXPORT_PAGE3"
@@ -38,19 +33,13 @@
#define HID_SD_HTMLEXPORT_PAGE5 "SD_HID_SD_HTMLEXPORT_PAGE5" #define HID_SD_HTMLEXPORT_PAGE5 "SD_HID_SD_HTMLEXPORT_PAGE5"
#define HID_SD_HTMLEXPORT_PAGE6 "SD_HID_SD_HTMLEXPORT_PAGE6" #define HID_SD_HTMLEXPORT_PAGE6 "SD_HID_SD_HTMLEXPORT_PAGE6"
#define HID_SD_TABBAR_PAGES "SD_HID_SD_TABBAR_PAGES" #define HID_SD_TABBAR_PAGES "SD_HID_SD_TABBAR_PAGES"
#define HID_SD_TABBAR_LAYERS "SD_HID_SD_TABBAR_LAYERS" #define HID_SD_TABBAR_LAYERS "SD_HID_SD_TABBAR_LAYERS"
#define HID_SD_NAMEDIALOG_OBJECT "SD_HID_SD_NAMEDIALOG_OBJECT" #define HID_SD_NAMEDIALOG_OBJECT "SD_HID_SD_NAMEDIALOG_OBJECT"
#define HID_SD_NAMEDIALOG_PAGE "SD_HID_SD_NAMEDIALOG_PAGE" #define HID_SD_NAMEDIALOG_PAGE "SD_HID_SD_NAMEDIALOG_PAGE"
#define HID_SD_NAMEDIALOG_LINEEND "SD_HID_SD_NAMEDIALOG_LINEEND" #define HID_SD_NAMEDIALOG_LINEEND "SD_HID_SD_NAMEDIALOG_LINEEND"
#define HID_SD_TASK_PANE_PREVIEW_CURRENT "SD_HID_SD_TASK_PANE_PREVIEW_CURRENT" #define HID_SD_TASK_PANE_PREVIEW_CURRENT "SD_HID_SD_TASK_PANE_PREVIEW_CURRENT"
#define HID_SD_TASK_PANE_PREVIEW_RECENT "SD_HID_SD_TASK_PANE_PREVIEW_RECENT" #define HID_SD_TASK_PANE_PREVIEW_RECENT "SD_HID_SD_TASK_PANE_PREVIEW_RECENT"
#define HID_SD_TASK_PANE_PREVIEW_ALL "SD_HID_SD_TASK_PANE_PREVIEW_ALL" #define HID_SD_TASK_PANE_PREVIEW_ALL "SD_HID_SD_TASK_PANE_PREVIEW_ALL"

View File

@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it). also fixes all possible problems, so it's usually better to use it).
Generated on 2020-02-13 21:37:42 using: Generated on 2020-02-25 20:28:15 using:
./bin/update_pch sd sd --cutoff=4 --exclude:system --exclude:module --include:local ./bin/update_pch sd sd --cutoff=4 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers: If after updating build fails, use the following command to locate conflicting headers:
@@ -32,6 +32,7 @@
#include <map> #include <map>
#include <memory> #include <memory>
#include <new> #include <new>
#include <optional>
#include <ostream> #include <ostream>
#include <set> #include <set>
#include <stddef.h> #include <stddef.h>
@@ -72,7 +73,7 @@
#include <sal/typesizes.h> #include <sal/typesizes.h>
#include <vcl/EnumContext.hxx> #include <vcl/EnumContext.hxx>
#include <vcl/bitmapex.hxx> #include <vcl/bitmapex.hxx>
#include <vcl/builderfactory.hxx> #include <vcl/builder.hxx>
#include <vcl/commandevent.hxx> #include <vcl/commandevent.hxx>
#include <vcl/commandinfoprovider.hxx> #include <vcl/commandinfoprovider.hxx>
#include <vcl/ctrl.hxx> #include <vcl/ctrl.hxx>
@@ -166,6 +167,7 @@
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawView.hpp> #include <com/sun/star/drawing/XDrawView.hpp>
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp> #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/framework/ResourceId.hpp> #include <com/sun/star/drawing/framework/ResourceId.hpp>
#include <com/sun/star/drawing/framework/XConfiguration.hpp> #include <com/sun/star/drawing/framework/XConfiguration.hpp>
#include <com/sun/star/drawing/framework/XConfigurationController.hpp> #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
@@ -294,7 +296,6 @@
#include <model/SlsPageEnumerationProvider.hxx> #include <model/SlsPageEnumerationProvider.hxx>
#include <o3tl/cow_wrapper.hxx> #include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.hxx> #include <o3tl/deleter.hxx>
#include <optional>
#include <o3tl/safeint.hxx> #include <o3tl/safeint.hxx>
#include <o3tl/strong_int.hxx> #include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx> #include <o3tl/typed_flags_set.hxx>

View File

@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it). also fixes all possible problems, so it's usually better to use it).
Generated on 2020-02-01 11:00:25 using: Generated on 2020-02-25 20:28:19 using:
./bin/update_pch sd sdui --cutoff=4 --exclude:system --include:module --include:local ./bin/update_pch sd sdui --cutoff=4 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers: If after updating build fails, use the following command to locate conflicting headers:
@@ -39,6 +39,7 @@
#include <math.h> #include <math.h>
#include <memory> #include <memory>
#include <new> #include <new>
#include <optional>
#include <ostream> #include <ostream>
#include <set> #include <set>
#include <sstream> #include <sstream>
@@ -100,7 +101,6 @@
#include <vcl/ITiledRenderable.hxx> #include <vcl/ITiledRenderable.hxx>
#include <vcl/NotebookBarAddonsMerger.hxx> #include <vcl/NotebookBarAddonsMerger.hxx>
#include <vcl/Scanline.hxx> #include <vcl/Scanline.hxx>
#include <vcl/accel.hxx>
#include <vcl/alpha.hxx> #include <vcl/alpha.hxx>
#include <vcl/animate/Animation.hxx> #include <vcl/animate/Animation.hxx>
#include <vcl/animate/AnimationBitmap.hxx> #include <vcl/animate/AnimationBitmap.hxx>
@@ -133,12 +133,10 @@
#include <vcl/menu.hxx> #include <vcl/menu.hxx>
#include <vcl/metaactiontypes.hxx> #include <vcl/metaactiontypes.hxx>
#include <vcl/metric.hxx> #include <vcl/metric.hxx>
#include <vcl/mnemonicengine.hxx>
#include <vcl/outdev.hxx> #include <vcl/outdev.hxx>
#include <vcl/outdevmap.hxx> #include <vcl/outdevmap.hxx>
#include <vcl/outdevstate.hxx> #include <vcl/outdevstate.hxx>
#include <vcl/ptrstyle.hxx> #include <vcl/ptrstyle.hxx>
#include <vcl/quickselectionengine.hxx>
#include <vcl/region.hxx> #include <vcl/region.hxx>
#include <vcl/salgtype.hxx> #include <vcl/salgtype.hxx>
#include <vcl/salnativewidgets.hxx> #include <vcl/salnativewidgets.hxx>
@@ -150,8 +148,6 @@
#include <vcl/textfilter.hxx> #include <vcl/textfilter.hxx>
#include <vcl/timer.hxx> #include <vcl/timer.hxx>
#include <vcl/transfer.hxx> #include <vcl/transfer.hxx>
#include <vcl/treelist.hxx>
#include <vcl/treelistentries.hxx>
#include <vcl/uitest/factory.hxx> #include <vcl/uitest/factory.hxx>
#include <vcl/vclenum.hxx> #include <vcl/vclenum.hxx>
#include <vcl/vclevent.hxx> #include <vcl/vclevent.hxx>
@@ -327,14 +323,11 @@
#include <editeng/paragraphdata.hxx> #include <editeng/paragraphdata.hxx>
#include <editeng/svxenum.hxx> #include <editeng/svxenum.hxx>
#include <editeng/svxfont.hxx> #include <editeng/svxfont.hxx>
#include <helper/simplereferencecomponent.hxx>
#include <i18nlangtag/i18nlangtagdllapi.h> #include <i18nlangtag/i18nlangtagdllapi.h>
#include <i18nlangtag/lang.h> #include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/cow_wrapper.hxx> #include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.hxx> #include <o3tl/deleter.hxx>
#include <o3tl/enumarray.hxx> #include <o3tl/enumarray.hxx>
#include <optional>
#include <o3tl/safeint.hxx> #include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx> #include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx> #include <o3tl/strong_int.hxx>
@@ -429,7 +422,6 @@
#include <svx/xpoly.hxx> #include <svx/xpoly.hxx>
#include <svx/xtable.hxx> #include <svx/xtable.hxx>
#include <tools/color.hxx> #include <tools/color.hxx>
#include <tools/contnr.hxx>
#include <tools/date.hxx> #include <tools/date.hxx>
#include <tools/datetime.hxx> #include <tools/datetime.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>

View File

@@ -157,9 +157,6 @@
// Strings for animation effects // Strings for animation effects
#define STR_INSERT_TEXT NC_("STR_INSERT_TEXT", "Insert Text") #define STR_INSERT_TEXT NC_("STR_INSERT_TEXT", "Insert Text")
#define STR_LOAD_PRESENTATION_LAYOUT NC_("STR_LOAD_PRESENTATION_LAYOUT", "Load Master Slide") #define STR_LOAD_PRESENTATION_LAYOUT NC_("STR_LOAD_PRESENTATION_LAYOUT", "Load Master Slide")
#define STR_DRAGTYPE_URL NC_("STR_DRAGTYPE_URL", "Insert as Hyperlink")
#define STR_DRAGTYPE_EMBEDDED NC_("STR_DRAGTYPE_EMBEDDED", "Insert as Copy")
#define STR_DRAGTYPE_LINK NC_("STR_DRAGTYPE_LINK", "Insert as Link")
#define STR_GLUE_ESCDIR_SMART NC_("STR_GLUE_ESCDIR_SMART", "Smart") #define STR_GLUE_ESCDIR_SMART NC_("STR_GLUE_ESCDIR_SMART", "Smart")
#define STR_GLUE_ESCDIR_LEFT NC_("STR_GLUE_ESCDIR_LEFT", "Left") #define STR_GLUE_ESCDIR_LEFT NC_("STR_GLUE_ESCDIR_LEFT", "Left")
#define STR_GLUE_ESCDIR_RIGHT NC_("STR_GLUE_ESCDIR_RIGHT", "Right") #define STR_GLUE_ESCDIR_RIGHT NC_("STR_GLUE_ESCDIR_RIGHT", "Right")
@@ -263,8 +260,6 @@
#define STR_GRAPHICS_STYLE_FAMILY NC_("STR_GRAPHICS_STYLE_FAMILY", "Drawing Styles") #define STR_GRAPHICS_STYLE_FAMILY NC_("STR_GRAPHICS_STYLE_FAMILY", "Drawing Styles")
#define STR_PRESENTATIONS_STYLE_FAMILY NC_("STR_PRESENTATIONS_STYLE_FAMILY", "Presentation Styles") #define STR_PRESENTATIONS_STYLE_FAMILY NC_("STR_PRESENTATIONS_STYLE_FAMILY", "Presentation Styles")
#define STR_CELL_STYLE_FAMILY NC_("STR_CELL_STYLE_FAMILY", "Cell Styles") #define STR_CELL_STYLE_FAMILY NC_("STR_CELL_STYLE_FAMILY", "Cell Styles")
#define STR_NAVIGATOR_SHOW_NAMED_SHAPES NC_("STR_NAVIGATOR_SHOW_NAMED_SHAPES", "Named shapes")
#define STR_NAVIGATOR_SHOW_ALL_SHAPES NC_("STR_NAVIGATOR_SHOW_ALL_SHAPES", "All shapes")
#define STR_NAVIGATOR_SHAPE_BASE_NAME NC_("STR_NAVIGATOR_SHAPE_BASE_NAME", "Shape %1") #define STR_NAVIGATOR_SHAPE_BASE_NAME NC_("STR_NAVIGATOR_SHAPE_BASE_NAME", "Shape %1")
#define STR_SET_BACKGROUND_PICTURE NC_("STR_SET_BACKGROUND_PICTURE", "Set Background Image" ) #define STR_SET_BACKGROUND_PICTURE NC_("STR_SET_BACKGROUND_PICTURE", "Set Background Image" )
#define RID_ANNOTATIONS_START NC_("RID_ANNOTATIONS_START", "Comments") #define RID_ANNOTATIONS_START NC_("RID_ANNOTATIONS_START", "Comments")
@@ -277,7 +272,6 @@
#define STRING_DRAG_AND_DROP_SLIDES NC_("STRING_DRAG_AND_DROP_SLIDES", "Drag and Drop Slides" ) #define STRING_DRAG_AND_DROP_SLIDES NC_("STRING_DRAG_AND_DROP_SLIDES", "Drag and Drop Slides" )
#define STR_PHOTO_ALBUM_EMPTY_WARNING NC_("STR_PHOTO_ALBUM_EMPTY_WARNING", "Please add Images to the Album." ) #define STR_PHOTO_ALBUM_EMPTY_WARNING NC_("STR_PHOTO_ALBUM_EMPTY_WARNING", "Please add Images to the Album." )
#define STR_PHOTO_ALBUM_TEXTBOX NC_("STR_PHOTO_ALBUM_TEXTBOX", "Text Slide") #define STR_PHOTO_ALBUM_TEXTBOX NC_("STR_PHOTO_ALBUM_TEXTBOX", "Text Slide")
#define STR_OBJECTS_TREE NC_("STR_OBJECTS_TREE", "Page Tree")
#define STR_OVERWRITE_WARNING NC_("STR_OVERWRITE_WARNING", "The local target directory '%FILENAME' is not empty. Some files might be overwritten. Do you want to continue?") #define STR_OVERWRITE_WARNING NC_("STR_OVERWRITE_WARNING", "The local target directory '%FILENAME' is not empty. Some files might be overwritten. Do you want to continue?")
#define STR_LAYER_BCKGRND NC_("STR_LAYER_BCKGRND", "Background" ) #define STR_LAYER_BCKGRND NC_("STR_LAYER_BCKGRND", "Background" )

View File

@@ -2114,8 +2114,9 @@ void SdTiledRenderingTest::testTdf115873()
ScopedVclPtrInstance<SdNavigatorWin> pNavigator(nullptr, &rBindings); ScopedVclPtrInstance<SdNavigatorWin> pNavigator(nullptr, &rBindings);
pNavigator->InitTreeLB(pXImpressDocument->GetDoc()); pNavigator->InitTreeLB(pXImpressDocument->GetDoc());
pNavigator->Show(); pNavigator->Show();
VclPtr<SdPageObjsTLB> pObjects = pNavigator->GetObjects(); SdPageObjsTLV& rObjects = pNavigator->GetObjects();
pObjects->Select(pObjects->GetEntry(0)); rObjects.SelectEntry("Slide 1");
rObjects.Select();
sd::ViewShell* pSdViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); sd::ViewShell* pSdViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
SdrView* pSdrView = pSdViewShell->GetView(); SdrView* pSdrView = pSdViewShell->GetView();
pSdrView->UnmarkAllObj(pSdrView->GetSdrPageView()); pSdrView->UnmarkAllObj(pSdrView->GetSdrPageView());
@@ -2126,13 +2127,11 @@ void SdTiledRenderingTest::testTdf115873()
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), rMarkList.GetMarkCount()); CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), rMarkList.GetMarkCount());
// Single-click with the mouse. // Single-click with the mouse.
short nHeight = pObjects->GetEntryHeight(); MouseEvent aMouseEvent(Point(0, 0), /*nClicks=*/1, MouseEventModifiers::NONE, MOUSE_LEFT);
// Position of the center of the 2nd entry (first is the slide, second is rObjects.MousePressHdl(aMouseEvent);
// the shape). rObjects.SelectEntry("Rectangle");
Point aPoint(pObjects->GetOutputWidthPixel() / 2, nHeight * 1.5); rObjects.Select();
MouseEvent aMouseEvent(aPoint, /*nClicks=*/1, MouseEventModifiers::NONE, MOUSE_LEFT); rObjects.MouseReleaseHdl(aMouseEvent);
pObjects->MouseButtonDown(aMouseEvent);
pObjects->MouseButtonUp(aMouseEvent);
Scheduler::ProcessEventsToIdle(); Scheduler::ProcessEventsToIdle();
// This failed, single-click did not result in a shape selection (only // This failed, single-click did not result in a shape selection (only
// double-click did). // double-click did).
@@ -2148,10 +2147,10 @@ void SdTiledRenderingTest::testTdf115873Group()
SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
ScopedVclPtrInstance<SdNavigatorWin> pNavigator(nullptr, &rBindings); ScopedVclPtrInstance<SdNavigatorWin> pNavigator(nullptr, &rBindings);
pNavigator->InitTreeLB(pXImpressDocument->GetDoc()); pNavigator->InitTreeLB(pXImpressDocument->GetDoc());
VclPtr<SdPageObjsTLB> pObjects = pNavigator->GetObjects(); SdPageObjsTLV& rObjects = pNavigator->GetObjects();
// This failed, Fill() and IsEqualToDoc() were out of sync for group // This failed, Fill() and IsEqualToDoc() were out of sync for group
// shapes. // shapes.
CPPUNIT_ASSERT(pObjects->IsEqualToDoc(pXImpressDocument->GetDoc())); CPPUNIT_ASSERT(rObjects.IsEqualToDoc(pXImpressDocument->GetDoc()));
} }
void SdTiledRenderingTest::testCutSelectionChange() void SdTiledRenderingTest::testCutSelectionChange()

View File

@@ -49,52 +49,46 @@
#include <helpids.h> #include <helpids.h>
#include <Window.hxx> #include <Window.hxx>
namespace {
static const sal_uInt16 nShowNamedShapesFilter=1;
static const sal_uInt16 nShowAllShapesFilter=2;
}
/** /**
* SdNavigatorWin - FloatingWindow * SdNavigatorWin - FloatingWindow
*/ */
SdNavigatorWin::SdNavigatorWin(vcl::Window* pParent, SfxBindings* pInBindings) SdNavigatorWin::SdNavigatorWin(vcl::Window* pParent, SfxBindings* pInBindings)
: PanelLayout(pParent, "NavigatorPanel", "modules/simpress/ui/navigatorpanel.ui", nullptr) : PanelLayout(pParent, "NavigatorPanel", "modules/simpress/ui/navigatorpanel.ui", nullptr, true)
, mxToolbox(m_xBuilder->weld_toolbar("toolbox"))
, mxTlbObjects(new SdPageObjsTLV(m_xBuilder->weld_tree_view("tree")))
, mxLbDocs(m_xBuilder->weld_combo_box("documents"))
, mxDragModeMenu(m_xBuilder->weld_menu("dragmodemenu"))
, mxShapeMenu(m_xBuilder->weld_menu("shapemenu"))
, mbDocImported ( false ) , mbDocImported ( false )
// On changes of the DragType: adjust SelectionMode of TLB! // On changes of the DragType: adjust SelectionMode of TLB!
, meDragType ( NAVIGATOR_DRAGTYPE_EMBEDDED ) , meDragType ( NAVIGATOR_DRAGTYPE_EMBEDDED )
, mpBindings ( pInBindings ) , mpBindings ( pInBindings )
{ {
get(maToolbox, "toolbox"); Size aSize(LogicToPixel(Size(97, 67), MapMode(MapUnit::MapAppFont)));
get(maTlbObjects, "tree"); mxTlbObjects->set_size_request(aSize.Width(), aSize.Height());
Size aSize(maTlbObjects->LogicToPixel(Size(97, 67), MapMode(MapUnit::MapAppFont))); mxTlbObjects->SetViewFrame( mpBindings->GetDispatcher()->GetFrame() );
maTlbObjects->set_height_request(aSize.Width());
maTlbObjects->set_width_request(aSize.Height());
get(maLbDocs, "documents");
maTlbObjects->SetViewFrame( mpBindings->GetDispatcher()->GetFrame() ); mxTlbObjects->connect_row_activated(LINK(this, SdNavigatorWin, ClickObjectHdl));
mxTlbObjects->set_selection_mode(SelectionMode::Single);
maTlbObjects->SetAccessibleName(SdResId(STR_OBJECTS_TREE)); mxToolbox->connect_clicked(LINK(this, SdNavigatorWin, SelectToolboxHdl));
mxToolbox->connect_menu_toggled(LINK(this, SdNavigatorWin, DropdownClickToolBoxHdl));
maTlbObjects->SetDoubleClickHdl(LINK(this, SdNavigatorWin, ClickObjectHdl)); mxToolbox->set_item_menu("dragmode", mxDragModeMenu.get());
maTlbObjects->SetSelectionMode(SelectionMode::Single); mxDragModeMenu->connect_activate(LINK(this, SdNavigatorWin, MenuSelectHdl));
maToolbox->SetSelectHdl( LINK( this, SdNavigatorWin, SelectToolboxHdl ) );
maToolbox->SetDropdownClickHdl( LINK(this, SdNavigatorWin, DropdownClickToolBoxHdl) );
const sal_uInt16 nDragTypeId = maToolbox->GetItemId("dragmode");
maToolbox->SetItemBits(nDragTypeId, maToolbox->GetItemBits(nDragTypeId) | ToolBoxItemBits::DROPDOWNONLY);
// Shape filter drop down menu. // Shape filter drop down menu.
const sal_uInt16 nShapeId = maToolbox->GetItemId("shapes"); mxToolbox->set_item_menu("shapes", mxShapeMenu.get());
maToolbox->SetItemBits(nShapeId, maToolbox->GetItemBits(nShapeId) | ToolBoxItemBits::DROPDOWNONLY); mxShapeMenu->connect_activate(LINK(this, SdNavigatorWin, ShapeFilterCallback));
// set focus to listbox, otherwise it is in the toolbox which is only useful // set focus to listbox, otherwise it is in the toolbox which is only useful
// for keyboard navigation // for keyboard navigation
maTlbObjects->GrabFocus(); mxTlbObjects->grab_focus();
maTlbObjects->SetSdNavigator(this); mxTlbObjects->SetSdNavigator(this);
// DragTypeListBox // DragTypeListBox
maLbDocs->setMaxWidthChars(20); mxLbDocs->set_size_request(42, -1); // set a nominal width so it takes width of surroundings
maLbDocs->SetSelectHdl( LINK( this, SdNavigatorWin, SelectDocumentHdl ) ); mxLbDocs->connect_changed(LINK(this, SdNavigatorWin, SelectDocumentHdl));
SetDragImage(); SetDragImage();
} }
@@ -118,9 +112,11 @@ void SdNavigatorWin::dispose()
{ {
mpNavigatorCtrlItem.reset(); mpNavigatorCtrlItem.reset();
mpPageNameCtrlItem.reset(); mpPageNameCtrlItem.reset();
maToolbox.clear(); mxDragModeMenu.reset();
maTlbObjects.clear(); mxShapeMenu.reset();
maLbDocs.clear(); mxToolbox.reset();
mxTlbObjects.reset();
mxLbDocs.reset();
PanelLayout::dispose(); PanelLayout::dispose();
} }
@@ -131,17 +127,9 @@ void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc )
sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh(); sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh();
const OUString& aDocShName( pDocShell->GetName() ); const OUString& aDocShName( pDocShell->GetName() );
OUString aDocName = pDocShell->GetMedium()->GetName(); OUString aDocName = pDocShell->GetMedium()->GetName();
maTlbObjects->SetSaveTreeItemStateFlag(true); //Added by yanjun for sym2_6385 mxTlbObjects->Fill( pDoc, false, aDocName ); // Only normal pages
maTlbObjects->Clear();
maTlbObjects->Fill( pDoc, false, aDocName ); // Only normal pages
maTlbObjects->SetSaveTreeItemStateFlag(false); //Added by yanjun for sym2_6385
RefreshDocumentLB(); RefreshDocumentLB();
maLbDocs->SelectEntry( aDocShName ); mxLbDocs->set_active_text(aDocShName);
}
void SdNavigatorWin::FreshEntry( )
{
maTlbObjects->Invalidate();
} }
void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc ) void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
@@ -157,36 +145,35 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
{ {
::sd::FrameView* pFrameView = pViewShell->GetFrameView(); ::sd::FrameView* pFrameView = pViewShell->GetFrameView();
if (pFrameView != nullptr) if (pFrameView != nullptr)
maTlbObjects->SetShowAllShapes(pFrameView->IsNavigatorShowingAllShapes(), false); mxTlbObjects->SetShowAllShapes(pFrameView->IsNavigatorShowingAllShapes(), false);
} }
// Disable the shape filter drop down menu when there is a running slide // Disable the shape filter drop down menu when there is a running slide
// show. // show.
const sal_uInt16 nShapeId = maToolbox->GetItemId("shapes");
if (pViewShell!=nullptr && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() )) if (pViewShell!=nullptr && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ))
maToolbox->EnableItem(nShapeId, false); mxToolbox->set_item_sensitive("shapes", false);
else else
maToolbox->EnableItem(nShapeId); mxToolbox->set_item_sensitive("shapes", true);
if( !maTlbObjects->IsEqualToDoc( pDoc ) ) if( !mxTlbObjects->IsEqualToDoc( pDoc ) )
{ {
OUString aDocName = pDocShell->GetMedium()->GetName(); OUString aDocName = pDocShell->GetMedium()->GetName();
maTlbObjects->Clear(); mxTlbObjects->clear();
maTlbObjects->Fill( pDoc, false, aDocName ); // only normal pages mxTlbObjects->Fill( pDoc, false, aDocName ); // only normal pages
RefreshDocumentLB(); RefreshDocumentLB();
maLbDocs->SelectEntry( aDocShName ); mxLbDocs->set_active_text(aDocShName);
} }
else else
{ {
maLbDocs->SetNoSelection(); mxLbDocs->set_active(-1);
maLbDocs->SelectEntry( aDocShName ); mxLbDocs->set_active_text(aDocShName);
// commented in order to fix 30246 // commented in order to fix 30246
// if( maLbDocs->GetSelectedEntryCount() == 0 ) // if( mxLbDocs->get_active() == -1 )
{ {
RefreshDocumentLB(); RefreshDocumentLB();
maLbDocs->SelectEntry( aDocShName ); mxLbDocs->set_active_text(aDocShName);
} }
} }
@@ -204,45 +191,33 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType()
NavigatorDragType eDT = meDragType; NavigatorDragType eDT = meDragType;
NavDocInfo* pInfo = GetDocInfo(); NavDocInfo* pInfo = GetDocInfo();
if( ( eDT == NAVIGATOR_DRAGTYPE_LINK ) && ( ( pInfo && !pInfo->HasName() ) || !maTlbObjects->IsLinkableSelected() ) ) if( ( eDT == NAVIGATOR_DRAGTYPE_LINK ) && ( ( pInfo && !pInfo->HasName() ) || !mxTlbObjects->IsLinkableSelected() ) )
eDT = NAVIGATOR_DRAGTYPE_NONE; eDT = NAVIGATOR_DRAGTYPE_NONE;
return eDT; return eDT;
} }
VclPtr<SdPageObjsTLB> const & SdNavigatorWin::GetObjects() const SdPageObjsTLV& SdNavigatorWin::GetObjects()
{ {
return maTlbObjects; return *mxTlbObjects;
} }
IMPL_LINK_NOARG(SdNavigatorWin, SelectToolboxHdl, ToolBox *, void) IMPL_LINK(SdNavigatorWin, SelectToolboxHdl, const OString&, rCommand, void)
{ {
sal_uInt16 nId = maToolbox->GetCurItemId();
const OUString sCommand = maToolbox->GetItemCommand(nId);
PageJump ePage = PAGE_NONE; PageJump ePage = PAGE_NONE;
if (sCommand == "first") if (rCommand == "first")
{
ePage = PAGE_FIRST; ePage = PAGE_FIRST;
maTlbObjects->Select( maTlbObjects->GetFirstEntryInView() ); else if (rCommand == "previous")
}
else if (sCommand == "previous")
{
ePage = PAGE_PREVIOUS; ePage = PAGE_PREVIOUS;
if( maTlbObjects->GetPrevEntryInView( maTlbObjects->GetCurEntry() ) != nullptr ) else if (rCommand == "next")
maTlbObjects->Select( maTlbObjects->GetPrevEntryInView( maTlbObjects->GetCurEntry() ) );
}
else if (sCommand == "next")
{
ePage = PAGE_NEXT; ePage = PAGE_NEXT;
if( maTlbObjects->GetNextEntryInView( maTlbObjects->GetCurEntry() ) != nullptr ) else if (rCommand == "last")
maTlbObjects->Select( maTlbObjects->GetNextEntryInView( maTlbObjects->GetCurEntry() ) );
}
else if (sCommand == "last")
{
ePage = PAGE_LAST; ePage = PAGE_LAST;
maTlbObjects->Select( maTlbObjects->GetLastEntryInView() ); else if (rCommand == "dragmode")
} mxToolbox->set_menu_item_active("dragmode", !mxToolbox->get_menu_item_active("dragmode"));
else if (rCommand == "shapes")
mxToolbox->set_menu_item_active("shapes", !mxToolbox->get_menu_item_active("shapes"));
if (ePage != PAGE_NONE) if (ePage != PAGE_NONE)
{ {
@@ -252,84 +227,41 @@ IMPL_LINK_NOARG(SdNavigatorWin, SelectToolboxHdl, ToolBox *, void)
} }
} }
IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void ) IMPL_LINK(SdNavigatorWin, DropdownClickToolBoxHdl, const OString&, rCommand, void)
{ {
sal_uInt16 nId = maToolbox->GetCurItemId(); if (!mxToolbox->get_menu_item_active(rCommand))
const OUString sCommand = maToolbox->GetItemCommand(nId); return;
if (sCommand == "dragmode") if (rCommand == "dragmode")
{ {
// Popup menu is created depending if the document is saved or not
ScopedVclPtrInstance<PopupMenu> pMenu;
static const char* aHIDs[] =
{
HID_SD_NAVIGATOR_MENU1,
HID_SD_NAVIGATOR_MENU2,
HID_SD_NAVIGATOR_MENU3,
nullptr
};
for (sal_uInt16 nID = NAVIGATOR_DRAGTYPE_URL; nID < NAVIGATOR_DRAGTYPE_COUNT; ++nID)
{
const char* pRId = GetDragTypeSdStrId(static_cast<NavigatorDragType>(nID));
if (pRId)
{
DBG_ASSERT(aHIDs[nID-NAVIGATOR_DRAGTYPE_URL],"HelpId not added!");
pMenu->InsertItem(nID, SdResId(pRId), MenuItemBits::RADIOCHECK);
pMenu->SetHelpId(nID, aHIDs[nID - NAVIGATOR_DRAGTYPE_URL]);
}
}
NavDocInfo* pInfo = GetDocInfo(); NavDocInfo* pInfo = GetDocInfo();
if( ( pInfo && !pInfo->HasName() ) || !mxTlbObjects->IsLinkableSelected() )
if( ( pInfo && !pInfo->HasName() ) || !maTlbObjects->IsLinkableSelected() )
{ {
pMenu->EnableItem( NAVIGATOR_DRAGTYPE_LINK, false ); mxDragModeMenu->set_sensitive(OString::number(NAVIGATOR_DRAGTYPE_LINK), false);
pMenu->EnableItem( NAVIGATOR_DRAGTYPE_URL, false ); mxDragModeMenu->set_sensitive(OString::number(NAVIGATOR_DRAGTYPE_URL), false);
meDragType = NAVIGATOR_DRAGTYPE_EMBEDDED; meDragType = NAVIGATOR_DRAGTYPE_EMBEDDED;
} }
pMenu->CheckItem( static_cast<sal_uInt16>(meDragType) ); mxDragModeMenu->set_active(OString::number(meDragType), true);
pMenu->SetSelectHdl( LINK( this, SdNavigatorWin, MenuSelectHdl ) );
pMenu->Execute( this, maToolbox->GetItemRect( nId ), PopupMenuFlags::ExecuteDown );
pBox->EndSelection();
} }
else if (sCommand == "shapes") else if (rCommand == "shapes")
{ {
ScopedVclPtrInstance<PopupMenu> pMenu; bool bAll = mxTlbObjects->GetShowAllShapes();
mxShapeMenu->set_active("named", !bAll);
pMenu->InsertItem( mxShapeMenu->set_active("all", bAll);
nShowNamedShapesFilter,
SdResId(STR_NAVIGATOR_SHOW_NAMED_SHAPES),
MenuItemBits::RADIOCHECK);
pMenu->InsertItem(
nShowAllShapesFilter,
SdResId(STR_NAVIGATOR_SHOW_ALL_SHAPES),
MenuItemBits::RADIOCHECK);
if (maTlbObjects->GetShowAllShapes())
pMenu->CheckItem(nShowAllShapesFilter);
else
pMenu->CheckItem(nShowNamedShapesFilter);
pMenu->SetSelectHdl( LINK( this, SdNavigatorWin, ShapeFilterCallback ) );
pMenu->Execute( this, maToolbox->GetItemRect( nId ), PopupMenuFlags::ExecuteDown );
pBox->EndSelection();
} }
} }
IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, SvTreeListBox*, bool) IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, weld::TreeView&, bool)
{ {
if( !mbDocImported || maLbDocs->GetSelectedEntryPos() != 0 ) if( !mbDocImported || mxLbDocs->get_active() != 0 )
{ {
NavDocInfo* pInfo = GetDocInfo(); NavDocInfo* pInfo = GetDocInfo();
// if it is the active window, we jump to the page // if it is the active window, we jump to the page
if( pInfo && pInfo->IsActive() ) if( pInfo && pInfo->IsActive() )
{ {
OUString aStr( maTlbObjects->GetSelectedEntry() ); OUString aStr(mxTlbObjects->get_selected_text());
if( !aStr.isEmpty() ) if( !aStr.isEmpty() )
{ {
@@ -337,8 +269,6 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, SvTreeListBox*, bool)
mpBindings->GetDispatcher()->ExecuteList( mpBindings->GetDispatcher()->ExecuteList(
SID_NAVIGATOR_OBJECT, SID_NAVIGATOR_OBJECT,
SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem }); SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem });
//set sign variable
maTlbObjects->Invalidate();
// moved here from SetGetFocusHdl. Reset the // moved here from SetGetFocusHdl. Reset the
// focus only if something has been selected in the // focus only if something has been selected in the
@@ -368,20 +298,20 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, SvTreeListBox*, bool)
} }
} }
if (!maTlbObjects->IsNavigationGrabsFocus()) if (!mxTlbObjects->IsNavigationGrabsFocus())
// This is the case when keyboard navigation inside the // This is the case when keyboard navigation inside the
// navigator should continue to work. // navigator should continue to work.
maTlbObjects->GrabFocus(); mxTlbObjects->grab_focus();
} }
} }
} }
return false; return false;
} }
IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl, ListBox&, void) IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl, weld::ComboBox&, void)
{ {
OUString aStrLb = maLbDocs->GetSelectedEntry(); OUString aStrLb = mxLbDocs->get_active_text();
long nPos = maLbDocs->GetSelectedEntryPos(); long nPos = mxLbDocs->get_active();
bool bFound = false; bool bFound = false;
::sd::DrawDocShell* pDocShell = nullptr; ::sd::DrawDocShell* pDocShell = nullptr;
NavDocInfo* pInfo = GetDocInfo(); NavDocInfo* pInfo = GetDocInfo();
@@ -402,18 +332,18 @@ IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl, ListBox&, void)
if( bFound ) if( bFound )
{ {
SdDrawDocument* pDoc = pDocShell->GetDoc(); SdDrawDocument* pDoc = pDocShell->GetDoc();
if( !maTlbObjects->IsEqualToDoc( pDoc ) ) if( !mxTlbObjects->IsEqualToDoc( pDoc ) )
{ {
SdDrawDocument* pNonConstDoc = pDoc; // const as const can... SdDrawDocument* pNonConstDoc = pDoc; // const as const can...
::sd::DrawDocShell* pNCDocShell = pNonConstDoc->GetDocSh(); ::sd::DrawDocShell* pNCDocShell = pNonConstDoc->GetDocSh();
OUString aDocName = pNCDocShell->GetMedium()->GetName(); OUString aDocName = pNCDocShell->GetMedium()->GetName();
maTlbObjects->Clear(); mxTlbObjects->clear();
maTlbObjects->Fill( pDoc, false, aDocName ); // only normal pages mxTlbObjects->Fill( pDoc, false, aDocName ); // only normal pages
} }
} }
// check if link or url is possible // check if link or url is possible
if( ( pInfo && !pInfo->HasName() ) || !maTlbObjects->IsLinkableSelected() || ( meDragType != NAVIGATOR_DRAGTYPE_EMBEDDED ) ) if( ( pInfo && !pInfo->HasName() ) || !mxTlbObjects->IsLinkableSelected() || ( meDragType != NAVIGATOR_DRAGTYPE_EMBEDDED ) )
{ {
meDragType = NAVIGATOR_DRAGTYPE_EMBEDDED; meDragType = NAVIGATOR_DRAGTYPE_EMBEDDED;
SetDragImage(); SetDragImage();
@@ -422,84 +352,60 @@ IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl, ListBox&, void)
/** /**
* Set DrageType and set image accordingly to it. * Set DrageType and set image accordingly to it.
* If the handler is called with NULL, the default (URL) is set.
*/ */
IMPL_LINK( SdNavigatorWin, MenuSelectHdl, Menu *, pMenu, bool ) IMPL_LINK(SdNavigatorWin, MenuSelectHdl, const OString&, rIdent, void)
{ {
sal_uInt16 nMenuId; sal_uInt32 nMenuId = rIdent.toUInt32();
if( pMenu )
nMenuId = pMenu->GetCurItemId();
else
nMenuId = NAVIGATOR_DRAGTYPE_URL;
if( nMenuId != USHRT_MAX ) // Necessary ? NavigatorDragType eDT = static_cast<NavigatorDragType>(nMenuId);
if( meDragType != eDT )
{ {
NavigatorDragType eDT = static_cast<NavigatorDragType>(nMenuId); meDragType = eDT;
if( meDragType != eDT ) SetDragImage();
if( meDragType == NAVIGATOR_DRAGTYPE_URL )
{ {
meDragType = eDT; // patch, prevents endless loop
SetDragImage(); if (mxTlbObjects->count_selected_rows() > 1)
mxTlbObjects->unselect_all();
if( meDragType == NAVIGATOR_DRAGTYPE_URL ) mxTlbObjects->set_selection_mode(SelectionMode::Single);
{
// patch, prevents endless loop
if( maTlbObjects->GetSelectionCount() > 1 )
maTlbObjects->SelectAll( false );
maTlbObjects->SetSelectionMode( SelectionMode::Single );
}
else
maTlbObjects->SetSelectionMode( SelectionMode::Multiple );
} }
else
mxTlbObjects->set_selection_mode(SelectionMode::Multiple);
} }
return false;
} }
IMPL_LINK( SdNavigatorWin, ShapeFilterCallback, Menu *, pMenu, bool ) IMPL_LINK( SdNavigatorWin, ShapeFilterCallback, const OString&, rIdent, void )
{ {
if (pMenu != nullptr) bool bShowAllShapes(mxTlbObjects->GetShowAllShapes());
if (rIdent == "named")
bShowAllShapes = false;
else if (rIdent == "all")
bShowAllShapes = true;
else
OSL_FAIL("SdNavigatorWin::ShapeFilterCallback called for unknown menu entry");
mxTlbObjects->SetShowAllShapes(bShowAllShapes, true);
// Remember the selection in the FrameView.
NavDocInfo* pInfo = GetDocInfo();
if (pInfo != nullptr)
{ {
bool bShowAllShapes (maTlbObjects->GetShowAllShapes()); ::sd::DrawDocShell* pDocShell = pInfo->mpDocShell;
sal_uInt16 nMenuId (pMenu->GetCurItemId()); if (pDocShell != nullptr)
switch (nMenuId)
{ {
case nShowNamedShapesFilter: ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
bShowAllShapes = false; if (pViewShell != nullptr)
break;
case nShowAllShapesFilter:
bShowAllShapes = true;
break;
default:
OSL_FAIL(
"SdNavigatorWin::ShapeFilterCallback called for unknown menu entry");
break;
}
maTlbObjects->SetShowAllShapes(bShowAllShapes, true);
// Remember the selection in the FrameView.
NavDocInfo* pInfo = GetDocInfo();
if (pInfo != nullptr)
{
::sd::DrawDocShell* pDocShell = pInfo->mpDocShell;
if (pDocShell != nullptr)
{ {
::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); ::sd::FrameView* pFrameView = pViewShell->GetFrameView();
if (pViewShell != nullptr) if (pFrameView != nullptr)
{ {
::sd::FrameView* pFrameView = pViewShell->GetFrameView(); pFrameView->SetIsNavigatorShowingAllShapes(bShowAllShapes);
if (pFrameView != nullptr)
{
pFrameView->SetIsNavigatorShowingAllShapes(bShowAllShapes);
}
} }
} }
} }
} }
return false;
} }
bool SdNavigatorWin::InsertFile(const OUString& rFileName) bool SdNavigatorWin::InsertFile(const OUString& rFileName)
@@ -545,19 +451,19 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
if (xMedium->IsStorage()) if (xMedium->IsStorage())
{ {
// Now depending on mode: // Now depending on mode:
// maTlbObjects->SetSelectionMode(SelectionMode::Multiple); // mxTlbObjects->set_selection_mode(SelectionMode::Multiple);
// handover of ownership of xMedium; // handover of ownership of xMedium;
SdDrawDocument* pDropDoc = maTlbObjects->GetBookmarkDoc(xMedium.release()); SdDrawDocument* pDropDoc = mxTlbObjects->GetBookmarkDoc(xMedium.release());
if (pDropDoc) if (pDropDoc)
{ {
maTlbObjects->Clear(); mxTlbObjects->clear();
maDropFileName = aFileName; maDropFileName = aFileName;
if( !maTlbObjects->IsEqualToDoc( pDropDoc ) ) if( !mxTlbObjects->IsEqualToDoc( pDropDoc ) )
{ {
// only normal pages // only normal pages
maTlbObjects->Fill(pDropDoc, false, maDropFileName); mxTlbObjects->Fill(pDropDoc, false, maDropFileName);
RefreshDocumentLB( &maDropFileName ); RefreshDocumentLB( &maDropFileName );
} }
} }
@@ -583,28 +489,28 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName )
if( pDocName ) if( pDocName )
{ {
if( mbDocImported ) if( mbDocImported )
maLbDocs->RemoveEntry( 0 ); mxLbDocs->remove(0);
maLbDocs->InsertEntry( *pDocName, 0 ); mxLbDocs->insert_text(0, *pDocName);
mbDocImported = true; mbDocImported = true;
} }
else else
{ {
nPos = maLbDocs->GetSelectedEntryPos(); nPos = mxLbDocs->get_active();
if( nPos == LISTBOX_ENTRY_NOTFOUND ) if (nPos == -1)
nPos = 0; nPos = 0;
OUString aStr; OUString aStr;
if( mbDocImported ) if( mbDocImported )
aStr = maLbDocs->GetEntry( 0 ); aStr = mxLbDocs->get_text(0);
maLbDocs->Clear(); mxLbDocs->clear();
// delete list of DocInfos // delete list of DocInfos
maDocList.clear(); maDocList.clear();
if( mbDocImported ) if( mbDocImported )
maLbDocs->InsertEntry( aStr, 0 ); mxLbDocs->insert_text(0, aStr);
::sd::DrawDocShell* pCurrentDocShell = ::sd::DrawDocShell* pCurrentDocShell =
dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
@@ -628,7 +534,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName )
// is shown in url notation! // is shown in url notation!
aStr = pDocShell->GetName(); aStr = pDocShell->GetName();
maLbDocs->InsertEntry( aStr ); mxLbDocs->append_text(aStr);
if( pDocShell == pCurrentDocShell ) if( pDocShell == pCurrentDocShell )
aInfo.SetActive( true ); aInfo.SetActive( true );
@@ -640,24 +546,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName )
pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, [](const SfxObjectShell*){return true;}, false ); pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, [](const SfxObjectShell*){return true;}, false );
} }
} }
maLbDocs->SelectEntryPos( nPos ); mxLbDocs->set_active(nPos);
}
const char* SdNavigatorWin::GetDragTypeSdStrId(NavigatorDragType eDT)
{
switch( eDT )
{
case NAVIGATOR_DRAGTYPE_NONE:
return STR_SD_NONE;
case NAVIGATOR_DRAGTYPE_URL:
return STR_DRAGTYPE_URL;
case NAVIGATOR_DRAGTYPE_EMBEDDED:
return STR_DRAGTYPE_EMBEDDED;
case NAVIGATOR_DRAGTYPE_LINK:
return STR_DRAGTYPE_LINK;
default: OSL_FAIL( "No resource for DragType available!" );
}
return nullptr;
} }
OUString SdNavigatorWin::GetDragTypeSdBmpId(NavigatorDragType eDT) OUString SdNavigatorWin::GetDragTypeSdBmpId(NavigatorDragType eDT)
@@ -679,7 +568,7 @@ OUString SdNavigatorWin::GetDragTypeSdBmpId(NavigatorDragType eDT)
NavDocInfo* SdNavigatorWin::GetDocInfo() NavDocInfo* SdNavigatorWin::GetDocInfo()
{ {
sal_uInt32 nPos = maLbDocs->GetSelectedEntryPos(); sal_uInt32 nPos = mxLbDocs->get_active();
if( mbDocImported ) if( mbDocImported )
{ {
@@ -705,7 +594,7 @@ bool SdNavigatorWin::EventNotify(NotifyEvent& rNEvt)
{ {
if( KEY_ESCAPE == pKEvt->GetKeyCode().GetCode() ) if( KEY_ESCAPE == pKEvt->GetKeyCode().GetCode() )
{ {
if( SdPageObjsTLB::IsInDrag() ) if( SdPageObjsTLV::IsInDrag() )
{ {
// during drag'n'drop we just stop the drag but do not close the navigator // during drag'n'drop we just stop the drag but do not close the navigator
bOK = true; bOK = true;
@@ -741,7 +630,7 @@ void SdNavigatorWin::KeyInput( const KeyEvent& rKEvt )
if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE) if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
{ {
if( SdPageObjsTLB::IsInDrag() ) if( SdPageObjsTLV::IsInDrag() )
{ {
// during drag'n'drop we just stop the drag but do not close the navigator // during drag'n'drop we just stop the drag but do not close the navigator
bOK = true; bOK = true;
@@ -764,8 +653,7 @@ void SdNavigatorWin::KeyInput( const KeyEvent& rKEvt )
void SdNavigatorWin::SetDragImage() void SdNavigatorWin::SetDragImage()
{ {
const sal_uInt16 nDragTypeId = maToolbox->GetItemId("dragmode"); mxToolbox->set_item_icon_name("dragmode", GetDragTypeSdBmpId(meDragType));
maToolbox->SetItemImage(nDragTypeId, Image(StockImage::Yes, GetDragTypeSdBmpId(meDragType)));
} }
/** /**
@@ -796,42 +684,37 @@ void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId,
if( !(pInfo && pInfo->IsActive()) ) if( !(pInfo && pInfo->IsActive()) )
return; return;
sal_uInt16 nFirstId = pNavigatorWin->maToolbox->GetItemId("first");
sal_uInt16 nPrevId = pNavigatorWin->maToolbox->GetItemId("previous");
sal_uInt16 nLastId = pNavigatorWin->maToolbox->GetItemId("last");
sal_uInt16 nNextId = pNavigatorWin->maToolbox->GetItemId("next");
// First // First
if (nState & NavState::BtnFirstEnabled && if (nState & NavState::BtnFirstEnabled &&
!pNavigatorWin->maToolbox->IsItemEnabled(nFirstId)) !pNavigatorWin->mxToolbox->get_item_sensitive("first"))
pNavigatorWin->maToolbox->EnableItem(nFirstId); pNavigatorWin->mxToolbox->set_item_sensitive("first", true);
if (nState & NavState::BtnFirstDisabled && if (nState & NavState::BtnFirstDisabled &&
pNavigatorWin->maToolbox->IsItemEnabled(nFirstId)) pNavigatorWin->mxToolbox->get_item_sensitive("first"))
pNavigatorWin->maToolbox->EnableItem(nFirstId, false); pNavigatorWin->mxToolbox->set_item_sensitive("first", false);
// Prev // Prev
if (nState & NavState::BtnPrevEnabled && if (nState & NavState::BtnPrevEnabled &&
!pNavigatorWin->maToolbox->IsItemEnabled(nPrevId)) !pNavigatorWin->mxToolbox->get_item_sensitive("previous"))
pNavigatorWin->maToolbox->EnableItem(nPrevId); pNavigatorWin->mxToolbox->set_item_sensitive("previous", true);
if (nState & NavState::BtnPrevDisabled && if (nState & NavState::BtnPrevDisabled &&
pNavigatorWin->maToolbox->IsItemEnabled(nPrevId)) pNavigatorWin->mxToolbox->get_item_sensitive("previous"))
pNavigatorWin->maToolbox->EnableItem(nPrevId, false); pNavigatorWin->mxToolbox->set_item_sensitive("previous", false);
// Last // Last
if (nState & NavState::BtnLastEnabled && if (nState & NavState::BtnLastEnabled &&
!pNavigatorWin->maToolbox->IsItemEnabled(nLastId)) !pNavigatorWin->mxToolbox->get_item_sensitive("last"))
pNavigatorWin->maToolbox->EnableItem(nLastId); pNavigatorWin->mxToolbox->set_item_sensitive("last", true);
if (nState & NavState::BtnLastDisabled && if (nState & NavState::BtnLastDisabled &&
pNavigatorWin->maToolbox->IsItemEnabled(nLastId)) pNavigatorWin->mxToolbox->get_item_sensitive("last"))
pNavigatorWin->maToolbox->EnableItem(nLastId, false); pNavigatorWin->mxToolbox->set_item_sensitive("last", false);
// Next // Next
if (nState & NavState::BtnNextEnabled && if (nState & NavState::BtnNextEnabled &&
!pNavigatorWin->maToolbox->IsItemEnabled(nNextId)) !pNavigatorWin->mxToolbox->get_item_sensitive("next"))
pNavigatorWin->maToolbox->EnableItem(nNextId); pNavigatorWin->mxToolbox->set_item_sensitive("next", true);
if (nState & NavState::BtnNextDisabled && if (nState & NavState::BtnNextDisabled &&
pNavigatorWin->maToolbox->IsItemEnabled(nNextId)) pNavigatorWin->mxToolbox->get_item_sensitive("next"))
pNavigatorWin->maToolbox->EnableItem(nNextId, false); pNavigatorWin->mxToolbox->set_item_sensitive("next", false);
if (nState & NavState::TableUpdate) if (nState & NavState::TableUpdate)
{ {
@@ -867,14 +750,14 @@ void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId,
const SfxStringItem& rStateItem = dynamic_cast<const SfxStringItem&>(*pItem); const SfxStringItem& rStateItem = dynamic_cast<const SfxStringItem&>(*pItem);
const OUString& aPageName = rStateItem.GetValue(); const OUString& aPageName = rStateItem.GetValue();
if( !pNavigatorWin->maTlbObjects->HasSelectedChildren( aPageName ) ) if( !pNavigatorWin->mxTlbObjects->HasSelectedChildren( aPageName ) )
{ {
if( pNavigatorWin->maTlbObjects->GetSelectionMode() == SelectionMode::Multiple ) if (pNavigatorWin->mxTlbObjects->get_selection_mode() == SelectionMode::Multiple)
{ {
// because otherwise it is always additional select // because otherwise it is always additional select
pNavigatorWin->maTlbObjects->SelectAll( false ); pNavigatorWin->mxTlbObjects->unselect_all();
} }
pNavigatorWin->maTlbObjects->SelectEntry( aPageName ); pNavigatorWin->mxTlbObjects->SelectEntry( aPageName );
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -350,7 +350,7 @@ void SdTPAction::UpdateTree()
{ {
if( !bTreeUpdated && mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() ) if( !bTreeUpdated && mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() )
{ {
m_xLbTree->Fill( mpDoc, mpDoc->GetDocSh()->GetMedium()->GetName() ); m_xLbTree->Fill( mpDoc, true, mpDoc->GetDocSh()->GetMedium()->GetName() );
bTreeUpdated = true; bTreeUpdated = true;
} }
} }
@@ -645,7 +645,7 @@ IMPL_LINK_NOARG(SdTPAction, CheckFileHdl, weld::Widget&, void)
aLastFile = aFile; aLastFile = aFile;
m_xLbTreeDocument->clear(); m_xLbTreeDocument->clear();
m_xLbTreeDocument->Fill(pBookmarkDoc, aFile); m_xLbTreeDocument->Fill(pBookmarkDoc, true, aFile);
mpDoc->CloseBookmarkDoc(); mpDoc->CloseBookmarkDoc();
m_xLbTreeDocument->show(); m_xLbTreeDocument->show();
bHideTreeDocument = false; bHideTreeDocument = false;

View File

@@ -259,7 +259,6 @@ public:
//Realize multi-selection of objects, If object is marked, the //Realize multi-selection of objects, If object is marked, the
//corresponding entry is set true, else the corresponding entry is set //corresponding entry is set true, else the corresponding entry is set
//false. //false.
void FreshNavigatrEntry();
void FreshNavigatrTree(); void FreshNavigatrTree();
void MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin); void MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin);

View File

@@ -20,7 +20,6 @@
#ifndef INCLUDED_SD_SOURCE_UI_INC_NAVIGATR_HXX #ifndef INCLUDED_SD_SOURCE_UI_INC_NAVIGATR_HXX
#define INCLUDED_SD_SOURCE_UI_INC_NAVIGATR_HXX #define INCLUDED_SD_SOURCE_UI_INC_NAVIGATR_HXX
#include <vcl/lstbox.hxx>
#include <vcl/toolbox.hxx> #include <vcl/toolbox.hxx>
#include <sfx2/ctrlitem.hxx> #include <sfx2/ctrlitem.hxx>
#include <svx/sidebar/PanelLayout.hxx> #include <svx/sidebar/PanelLayout.hxx>
@@ -102,7 +101,7 @@ public:
bool InsertFile(const OUString& rFileName); bool InsertFile(const OUString& rFileName);
NavigatorDragType GetNavigatorDragType(); NavigatorDragType GetNavigatorDragType();
VclPtr<SdPageObjsTLB> const & GetObjects() const; SdPageObjsTLV& GetObjects();
protected: protected:
virtual bool EventNotify(NotifyEvent& rNEvt) override; virtual bool EventNotify(NotifyEvent& rNEvt) override;
@@ -112,9 +111,11 @@ private:
friend class SdNavigatorControllerItem; friend class SdNavigatorControllerItem;
friend class SdPageNameControllerItem; friend class SdPageNameControllerItem;
VclPtr<ToolBox> maToolbox; std::unique_ptr<weld::Toolbar> mxToolbox;
VclPtr<SdPageObjsTLB> maTlbObjects; std::unique_ptr<SdPageObjsTLV> mxTlbObjects;
VclPtr<ListBox> maLbDocs; std::unique_ptr<weld::ComboBox> mxLbDocs;
std::unique_ptr<weld::Menu> mxDragModeMenu;
std::unique_ptr<weld::Menu> mxShapeMenu;
bool mbDocImported; bool mbDocImported;
OUString maDropFileName; OUString maDropFileName;
@@ -129,23 +130,21 @@ private:
*/ */
// bool mbShowAllShapes; // bool mbShowAllShapes;
static const char* GetDragTypeSdStrId(NavigatorDragType eDT);
static OUString GetDragTypeSdBmpId(NavigatorDragType eDT); static OUString GetDragTypeSdBmpId(NavigatorDragType eDT);
NavDocInfo* GetDocInfo(); NavDocInfo* GetDocInfo();
DECL_LINK( SelectToolboxHdl, ToolBox *, void ); DECL_LINK( SelectToolboxHdl, const OString&, void );
DECL_LINK( DropdownClickToolBoxHdl, ToolBox *, void ); DECL_LINK( DropdownClickToolBoxHdl, const OString&, void );
DECL_LINK( ClickObjectHdl, SvTreeListBox*, bool ); DECL_LINK( ClickObjectHdl, weld::TreeView&, bool );
DECL_LINK( SelectDocumentHdl, ListBox&, void ); DECL_LINK( SelectDocumentHdl, weld::ComboBox&, void );
DECL_LINK( MenuSelectHdl, Menu *, bool ); DECL_LINK( MenuSelectHdl, const OString&, void );
DECL_LINK( ShapeFilterCallback, Menu *, bool ); DECL_LINK( ShapeFilterCallback, const OString&, void );
void SetDragImage(); void SetDragImage();
public: public:
//when object is marked , fresh the corresponding entry tree . //when object is marked , fresh the corresponding entry tree .
void FreshTree ( const SdDrawDocument* pDoc ); void FreshTree ( const SdDrawDocument* pDoc );
void FreshEntry( );
}; };
/** /**

View File

@@ -22,7 +22,6 @@
#include <pres.hxx> #include <pres.hxx>
#include <sddllapi.h> #include <sddllapi.h>
#include <vcl/treelistbox.hxx>
#include <vcl/weld.hxx> #include <vcl/weld.hxx>
#include <svl/urlbmk.hxx> #include <svl/urlbmk.hxx>
#include <tools/ref.hxx> #include <tools/ref.hxx>
@@ -52,96 +51,59 @@ namespace svt {
class AcceleratorExecute; class AcceleratorExecute;
} }
/** class SdPageObjsTLVDropTarget : public DropTargetHelper
* Effect-Tab-Dialog
*/
class SD_DLLPUBLIC SdPageObjsTLB final : public SvTreeListBox
{ {
static bool SAL_DLLPRIVATE bIsInDrag; ///< static, in the case the navigator is deleted in ExecuteDrag private:
weld::TreeView& m_rTreeView;
::std::unique_ptr< ::svt::AcceleratorExecute> m_pAccel; virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
public: public:
SdPageObjsTLVDropTarget(weld::TreeView& rTreeView);
};
// nested class to implement the TransferableHelper class SD_DLLPUBLIC SdPageObjsTLV
class SAL_DLLPRIVATE SdPageObjsTransferable : public SdTransferable {
{
public:
SdPageObjsTransferable(
SdPageObjsTLB& rParent,
const INetBookmark& rBookmark,
::sd::DrawDocShell& rDocShell,
NavigatorDragType eDragType );
::sd::DrawDocShell& GetDocShell() const { return mrDocShell;}
NavigatorDragType GetDragType() const { return meDragType;}
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
static SdPageObjsTransferable* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxData ) throw();
/** Return a temporary transferable data flavor that is used
internally in the navigator for reordering entries. Its
lifetime ends with the office application.
*/
static SotClipboardFormatId GetListBoxDropFormatId();
private:
/** Temporary drop flavor id that is used internally in the
navigator.
*/
static SotClipboardFormatId mnListBoxDropFormatId;
SdPageObjsTLB& mrParent;
INetBookmark const maBookmark;
::sd::DrawDocShell& mrDocShell;
NavigatorDragType const meDragType;
virtual ~SdPageObjsTransferable() override;
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
virtual void DragFinished( sal_Int8 nDropAction ) override;
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
};
friend class SdPageObjsTLB::SdPageObjsTransferable;
/** Determine whether the specified page belongs to the current show
which is either the standard show or a custom show.
@param pPage
Pointer to the page for which to check whether it belongs to the
show.
@return
Returns <FALSE/> if there is no custom show or if the current
show does not contain the specified page at least once.
*/
bool PageBelongsToCurrentShow (const SdPage* pPage) const;
private: private:
static bool SAL_DLLPRIVATE bIsInDrag; ///< static, in the case the navigator is deleted in ExecuteDrag
VclPtr<SdNavigatorWin> mpNavigator; std::unique_ptr<weld::TreeView> m_xTreeView;
const SdDrawDocument* mpDoc; std::unique_ptr<SdPageObjsTLVDropTarget> m_xDropTargetHelper;
SdDrawDocument* mpBookmarkDoc; std::unique_ptr<::svt::AcceleratorExecute> m_xAccel;
SfxMedium* mpMedium; VclPtr<SdNavigatorWin> m_xNavigator;
SfxMedium* mpOwnMedium; const SdDrawDocument* m_pDoc;
Image const maImgOle; SdDrawDocument* m_pBookmarkDoc;
Image const maImgGraphic; SfxMedium* m_pMedium;
bool mbLinkableSelected; SfxMedium* m_pOwnMedium;
OUString maDocName; bool m_bLinkableSelected;
::sd::DrawDocShellRef mxBookmarkDocShRef; ///< for the loading of bookmarks bool m_bShowAllShapes;
std::vector<OUString> maTreeItem;
bool mbSaveTreeItemState;
OUString maSelectionEntryText;
// DragSourceHelper /** This flag controls whether to show all pages.
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override; */
bool m_bShowAllPages;
// DropTargetHelper /**
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override; * If changing the selection should also result in navigating to the
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override; * relevant shape.
*/
bool m_bSelectionHandlerNavigates;
virtual void RequestingChildren( SvTreeListEntry* pParent ) override; /**
* If navigation should not only select the relevant shape but also change
* focus to it.
*/
bool m_bNavigationGrabsFocus;
void DoDrag(); SelectionMode m_eSelectionMode;
void OnDragFinished();
ImplSVEvent* m_nSelectEventId;
ImplSVEvent* m_nRowActivateEventId;
OUString m_aDocName;
::sd::DrawDocShellRef m_xBookmarkDocShRef; ///< for the loading of bookmarks
Link<weld::TreeView&, void> m_aChangeHdl;
Link<weld::TreeView&, bool> m_aRowActivatedHdl;
/** Return the name of the object. When the object has no user supplied /** Return the name of the object. When the object has no user supplied
name and the bCreate flag is <TRUE/> then a name is created name and the bCreate flag is <TRUE/> then a name is created
@@ -159,169 +121,16 @@ private:
OUString GetObjectName ( OUString GetObjectName (
const SdrObject* pObject, const SdrObject* pObject,
const bool bCreate = true) const; const bool bCreate = true) const;
void CloseBookmarkDoc();
DECL_LINK(ExecDragHdl, void*, void);
/** Handle the reordering of entries in the navigator. This method
reorders both the involved shapes in their page as well as the
associated list box entries.
*/
virtual TriState NotifyMoving(
SvTreeListEntry* pTarget,
SvTreeListEntry* pEntry,
SvTreeListEntry*& rpNewParent,
sal_uLong& rNewChildPos) override;
using Window::GetDropTarget;
virtual SvTreeListEntry* GetDropTarget (const Point& rLocation) override;
virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&) override;
public:
SdPageObjsTLB(vcl::Window* pParent, WinBits nStyle);
virtual ~SdPageObjsTLB() override;
virtual void dispose() override;
// helper function for GetEntryAltText and GetEntryLongDescription
OUString getAltLongDescText( SvTreeListEntry* pEntry , bool isAltText) const;
OUString GetEntryAltText( SvTreeListEntry* pEntry ) const override;
OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override;
virtual void SelectHdl() override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
void MouseButtonDown(const MouseEvent& rMEvt) override;
void SetViewFrame( const SfxViewFrame* pViewFrame );
void Fill( const SdDrawDocument*, bool bAllPages, const OUString& rDocName );
void Fill( const SdDrawDocument*, SfxMedium* pSfxMedium, const OUString& rDocName );
void SetShowAllShapes (const bool bShowAllShapes, const bool bFill);
bool GetShowAllShapes() const { return mbShowAllShapes;}
bool IsNavigationGrabsFocus() const { return mbNavigationGrabsFocus; }
bool IsEqualToDoc( const SdDrawDocument* pInDoc );
/// Visits rList recursively and tries to advance pEntry accordingly.
bool IsEqualToShapeList(SvTreeListEntry*& pEntry, const SdrObjList& rList,
const OUString& rListName);
bool HasSelectedChildren( const OUString& rName );
bool SelectEntry( const OUString& rName );
OUString GetSelectedEntry() const;
//Mark Current Entry
void SetSdNavigator(SdNavigatorWin* pNavigator);
void Clear();
void SetSaveTreeItemStateFlag(bool bState){mbSaveTreeItemState = bState;}
void SaveExpandedTreeItemState(SvTreeListEntry* pEntry, std::vector<OUString>& vectTreeItem);
SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = nullptr);
bool IsLinkableSelected() const { return mbLinkableSelected; }
static bool IsInDrag();
using SvTreeListBox::ExecuteDrop;
using SvTreeListBox::SelectEntry;
/** Return the view shell that is linked to the given doc shell.
Call this method when the there is a chance that the doc shell
has been disconnected from the view shell (but not the other
way round.)
@return
May return <NULL/> when the link between view shell and
doc shell has been severed.
*/
static ::sd::ViewShell* GetViewShellForDocShell (::sd::DrawDocShell &rDocShell);
private:
/** This flag controls whether all shapes are shown as children of pages
and group shapes or only the named shapes.
*/
bool mbShowAllShapes;
/** This flag controls whether to show all pages.
*/
bool mbShowAllPages;
/**
* If changing the selection should also result in navigating to the
* relevant shape.
*/
bool mbSelectionHandlerNavigates;
/**
* If navigation should not only select the relevant shape but also change
* focus to it.
*/
bool mbNavigationGrabsFocus;
/** Return <TRUE/> when the current transferable may be dropped at the
given list box entry.
*/
bool IsDropAllowed (SvTreeListEntry const * pEntry);
/** This inner class is defined in sdtreelb.cxx and is basically a
container for the icons used in the list box for the entries.
*/
class SAL_DLLPRIVATE IconProvider;
/** Add one list box entry for the parent of the given shapes and one child entry for
each of the given shapes.
@param rList
The container of shapes that are to be inserted.
@param pShape
The parent shape or NULL when the parent is a page.
@param rsName
The name to be displayed for the new parent node.
@param bIsExcluded
Some pages can be excluded (from the show?).
@param pParentEntry
The parent entry of the new parent entry.
@param rIconProvider
Icons used to visualize the different shape and page types.
*/
void AddShapeList (
const SdrObjList& rList,
SdrObject* pShape,
const OUString& rsName,
const bool bIsExcluded,
SvTreeListEntry* pParentEntry,
const IconProvider& rIconProvider);
/** Add the given object to a transferable object so that the object can
be dragged and dropped without having a name.
*/
void AddShapeToTransferable (
SdTransferable& rTransferable,
SdrObject& rObject) const;
};
class SD_DLLPUBLIC SdPageObjsTLV
{
private:
std::unique_ptr<weld::TreeView> m_xTreeView;
std::unique_ptr<::svt::AcceleratorExecute> m_xAccel;
const SdDrawDocument* m_pDoc;
SdDrawDocument* m_pBookmarkDoc;
SfxMedium* m_pMedium;
bool m_bLinkableSelected;
/** This flag controls whether to show all pages.
*/
bool m_bShowAllPages;
OUString m_aDocName;
::sd::DrawDocShellRef m_xBookmarkDocShRef; ///< for the loading of bookmarks
Link<weld::TreeView&, void> m_aChangeHdl;
/** Return the name of the object. When the object has no user supplied
name and the bCreate flag is <TRUE/> then a name is created
automatically. Additionally the mbShowAllShapes flag is taken into
account when there is no user supplied name. When this flag is
<FALSE/> then no name is created.
@param pObject
When this is NULL then an empty string is returned, regardless
of the value of bCreate.
*/
static OUString GetObjectName (const SdrObject* pObject);
void CloseBookmarkDoc(); void CloseBookmarkDoc();
DECL_LINK(RequestingChildrenHdl, const weld::TreeIter&, bool); DECL_LINK(RequestingChildrenHdl, const weld::TreeIter&, bool);
DECL_LINK(SelectHdl, weld::TreeView&, void); DECL_LINK(SelectHdl, weld::TreeView&, void);
DECL_LINK(AsyncSelectHdl, void*, void);
DECL_LINK(RowActivatedHdl, weld::TreeView&, bool);
DECL_LINK(AsyncRowActivatedHdl, void*, void);
DECL_LINK(DragBeginHdl, weld::TreeView&, bool);
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
/** Determine whether the specified page belongs to the current show /** Determine whether the specified page belongs to the current show
which is either the standard show or a custom show. which is either the standard show or a custom show.
@@ -334,6 +143,12 @@ private:
*/ */
bool PageBelongsToCurrentShow (const SdPage* pPage) const; bool PageBelongsToCurrentShow (const SdPage* pPage) const;
bool DoDrag();
static void OnDragFinished();
// DragSourceHelper
bool StartDrag();
public: public:
SdPageObjsTLV(std::unique_ptr<weld::TreeView> xTreeview); SdPageObjsTLV(std::unique_ptr<weld::TreeView> xTreeview);
@@ -349,6 +164,11 @@ public:
m_xTreeView->show(); m_xTreeView->show();
} }
void grab_focus()
{
m_xTreeView->grab_focus();
}
void set_size_request(int nWidth, int nHeight) void set_size_request(int nWidth, int nHeight)
{ {
m_xTreeView->set_size_request(nWidth, nHeight); m_xTreeView->set_size_request(nWidth, nHeight);
@@ -359,6 +179,11 @@ public:
return m_xTreeView->get_approximate_digit_width(); return m_xTreeView->get_approximate_digit_width();
} }
DECL_LINK(MousePressHdl, const MouseEvent&, bool);
DECL_LINK(MouseReleaseHdl, const MouseEvent&, bool);
void Select();
int get_height_rows(int nRows) const int get_height_rows(int nRows) const
{ {
return m_xTreeView->get_height_rows(nRows); return m_xTreeView->get_height_rows(nRows);
@@ -366,9 +191,21 @@ public:
void set_selection_mode(SelectionMode eMode) void set_selection_mode(SelectionMode eMode)
{ {
m_eSelectionMode = eMode;
m_xTreeView->set_selection_mode(eMode); m_xTreeView->set_selection_mode(eMode);
} }
SelectionMode get_selection_mode() const
{
return m_eSelectionMode;
}
void connect_row_activated(const Link<weld::TreeView&, bool>& rLink)
{
m_aRowActivatedHdl = rLink;
}
bool HasSelectedChildren(const OUString& rName);
bool SelectEntry(const OUString& rName); bool SelectEntry(const OUString& rName);
OUString get_selected_text() const OUString get_selected_text() const
@@ -381,6 +218,11 @@ public:
return m_xTreeView->get_selected(nullptr); return m_xTreeView->get_selected(nullptr);
} }
int count_selected_rows() const
{
return m_xTreeView->count_selected_rows();
}
void connect_changed(const Link<weld::TreeView&, void>& rLink) void connect_changed(const Link<weld::TreeView&, void>& rLink)
{ {
m_aChangeHdl = rLink; m_aChangeHdl = rLink;
@@ -413,9 +255,30 @@ public:
void SetViewFrame(const SfxViewFrame* pViewFrame); void SetViewFrame(const SfxViewFrame* pViewFrame);
void Fill(const SdDrawDocument*, const OUString& rDocName); void Fill(const SdDrawDocument*, bool bAllPages, const OUString& rDocName);
void Fill(const SdDrawDocument*, SfxMedium* pSfxMedium, const OUString& rDocName); void Fill(const SdDrawDocument*, SfxMedium* pSfxMedium, const OUString& rDocName);
void SetShowAllShapes (const bool bShowAllShapes, const bool bFill);
bool GetShowAllShapes() const { return m_bShowAllShapes; }
bool IsNavigationGrabsFocus() const { return m_bNavigationGrabsFocus; }
bool IsEqualToDoc(const SdDrawDocument* pInDoc);
/// Visits rList recursively and tries to advance rEntry accordingly.
bool IsEqualToShapeList(std::unique_ptr<weld::TreeIter>& rEntry, const SdrObjList& rList,
const OUString& rListName);
static bool IsInDrag();
/** Return the view shell that is linked to the given doc shell.
Call this method when the there is a chance that the doc shell
has been disconnected from the view shell (but not the other
way round.)
@return
May return <NULL/> when the link between view shell and
doc shell has been severed.
*/
static ::sd::ViewShell* GetViewShellForDocShell (::sd::DrawDocShell &rDocShell);
/** Add one list box entry for the parent of the given shapes and one child entry for /** Add one list box entry for the parent of the given shapes and one child entry for
each of the given shapes. each of the given shapes.
@param rList @param rList
@@ -436,13 +299,20 @@ public:
const bool bIsExcluded, const bool bIsExcluded,
const weld::TreeIter* pParentEntry); const weld::TreeIter* pParentEntry);
/** Add the given object to a transferable object so that the object can
be dragged and dropped without having a name.
*/
void AddShapeToTransferable (
SdTransferable& rTransferable,
SdrObject& rObject) const;
/** return selected entries /** return selected entries
nDepth == 0 -> pages nDepth == 0 -> pages
nDepth == 1 -> objects */ nDepth == 1 -> objects */
std::vector<OUString> GetSelectEntryList(const int nDepth) const; std::vector<OUString> GetSelectEntryList(const int nDepth) const;
SdDrawDocument* GetBookmarkDoc(); SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = nullptr);
bool IsLinkableSelected() const { return m_bLinkableSelected; } bool IsLinkableSelected() const { return m_bLinkableSelected; }
@@ -456,10 +326,55 @@ public:
m_xTreeView->insert(pParent, -1, &rName, &rId, nullptr, nullptr, &rExpander, false, pEntry); m_xTreeView->insert(pParent, -1, &rName, &rId, nullptr, nullptr, &rExpander, false, pEntry);
} }
//Mark Current Entry
void SetSdNavigator(SdNavigatorWin* pNavigator);
void clear() void clear()
{ {
m_xTreeView->clear(); m_xTreeView->clear();
} }
// nested class to implement the TransferableHelper
class SAL_DLLPRIVATE SdPageObjsTransferable : public SdTransferable
{
public:
SdPageObjsTransferable(
const INetBookmark& rBookmark,
::sd::DrawDocShell& rDocShell,
NavigatorDragType eDragType );
::sd::DrawDocShell& GetDocShell() const { return mrDocShell;}
NavigatorDragType GetDragType() const { return meDragType;}
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
static SdPageObjsTransferable* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxData ) throw();
/** Return a temporary transferable data flavor that is used
internally in the navigator for reordering entries. Its
lifetime ends with the office application.
*/
static SotClipboardFormatId GetListBoxDropFormatId();
private:
/** Temporary drop flavor id that is used internally in the
navigator.
*/
static SotClipboardFormatId mnListBoxDropFormatId;
INetBookmark const maBookmark;
::sd::DrawDocShell& mrDocShell;
NavigatorDragType const meDragType;
virtual ~SdPageObjsTransferable() override;
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
virtual void DragFinished( sal_Int8 nDropAction ) override;
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
};
friend class SdPageObjsTLV::SdPageObjsTransferable;
private:
rtl::Reference<SdPageObjsTransferable> m_xHelper;
}; };
#endif // INCLUDED_SD_SOURCE_UI_INC_SDTREELB_HXX #endif // INCLUDED_SD_SOURCE_UI_INC_SDTREELB_HXX

View File

@@ -481,14 +481,14 @@ std::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData
{ {
do do
{ {
SdPageObjsTLB::SdPageObjsTransferable* pTreeListBoxTransferable SdPageObjsTLV::SdPageObjsTransferable* pTreeListBoxTransferable
= dynamic_cast<SdPageObjsTLB::SdPageObjsTransferable*>(pTransferable); = dynamic_cast<SdPageObjsTLV::SdPageObjsTransferable*>(pTransferable);
if (pTreeListBoxTransferable == nullptr) if (pTreeListBoxTransferable == nullptr)
break; break;
// Find view shell for the document of the transferable. // Find view shell for the document of the transferable.
::sd::ViewShell* pViewShell ::sd::ViewShell* pViewShell
= SdPageObjsTLB::GetViewShellForDocShell(pTreeListBoxTransferable->GetDocShell()); = SdPageObjsTLV::GetViewShellForDocShell(pTreeListBoxTransferable->GetDocShell());
if (pViewShell == nullptr) if (pViewShell == nullptr)
break; break;
@@ -844,8 +844,8 @@ Clipboard::DropType Clipboard::IsDropAccepted() const
return DT_NONE; return DT_NONE;
} }
const SdPageObjsTLB::SdPageObjsTransferable* pPageObjsTransferable const SdPageObjsTLV::SdPageObjsTransferable* pPageObjsTransferable
= dynamic_cast<const SdPageObjsTLB::SdPageObjsTransferable*>(pDragTransferable); = dynamic_cast<const SdPageObjsTLV::SdPageObjsTransferable*>(pDragTransferable);
if (pPageObjsTransferable != nullptr) if (pPageObjsTransferable != nullptr)
return DT_PAGE_FROM_NAVIGATOR; return DT_PAGE_FROM_NAVIGATOR;

View File

@@ -45,8 +45,8 @@ DragAndDropContext::DragAndDropContext (SlideSorter& rSlideSorter)
// need additional information. For this a user data object is // need additional information. For this a user data object is
// created that contains the necessary information. // created that contains the necessary information.
SdTransferable* pTransferable = SD_MOD()->pTransferDrag; SdTransferable* pTransferable = SD_MOD()->pTransferDrag;
SdPageObjsTLB::SdPageObjsTransferable* pTreeListBoxTransferable SdPageObjsTLV::SdPageObjsTransferable* pTreeListBoxTransferable
= dynamic_cast<SdPageObjsTLB::SdPageObjsTransferable*>(pTransferable); = dynamic_cast<SdPageObjsTLV::SdPageObjsTransferable*>(pTransferable);
if (pTreeListBoxTransferable!=nullptr && !TransferableData::GetFromTransferable(pTransferable)) if (pTreeListBoxTransferable!=nullptr && !TransferableData::GetFromTransferable(pTransferable))
{ {
pTransferable->AddUserData( pTransferable->AddUserData(

View File

@@ -248,19 +248,6 @@ void DrawViewShell::StartRulerDrag (
} }
} }
//If object is marked , the corresponding entry is set true ,
//else the corresponding entry is set false .
void DrawViewShell::FreshNavigatrEntry()
{
SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( SID_NAVIGATOR );
if( pWindow )
{
SdNavigatorWin* pNavWin = static_cast<SdNavigatorWin*>( pWindow->GetContextWindow( SD_MOD() ) );
if( pNavWin )
pNavWin->FreshEntry();
}
}
void DrawViewShell::FreshNavigatrTree() void DrawViewShell::FreshNavigatrTree()
{ {
SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( SID_NAVIGATOR ); SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( SID_NAVIGATOR );

View File

@@ -581,7 +581,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
// For entries from the navigator, change action copy. // For entries from the navigator, change action copy.
if (bBookmark if (bBookmark
&& rTargetHelper.IsDropFormatSupported( && rTargetHelper.IsDropFormatSupported(
SdPageObjsTLB::SdPageObjsTransferable::GetListBoxDropFormatId()) SdPageObjsTLV::SdPageObjsTransferable::GetListBoxDropFormatId())
&& (nDropAction & DND_ACTION_MOVE)!=0) && (nDropAction & DND_ACTION_MOVE)!=0)
{ {
nRet = DND_ACTION_COPY; nRet = DND_ACTION_COPY;
@@ -697,7 +697,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
if( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) && if( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) &&
aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) )
{ {
SdPageObjsTLB::SdPageObjsTransferable* pPageObjsTransferable = SdPageObjsTLB::SdPageObjsTransferable::getImplementation( aDataHelper.GetXTransferable() ); SdPageObjsTLV::SdPageObjsTransferable* pPageObjsTransferable = SdPageObjsTLV::SdPageObjsTransferable::getImplementation( aDataHelper.GetXTransferable() );
if( pPageObjsTransferable && if( pPageObjsTransferable &&
( NAVIGATOR_DRAGTYPE_LINK == pPageObjsTransferable->GetDragType() || ( NAVIGATOR_DRAGTYPE_LINK == pPageObjsTransferable->GetDragType() ||
@@ -793,7 +793,7 @@ IMPL_LINK( View, ExecuteNavigatorDrop, void*, p, void )
{ {
SdNavigatorDropEvent* pSdNavigatorDropEvent = static_cast<SdNavigatorDropEvent*>(p); SdNavigatorDropEvent* pSdNavigatorDropEvent = static_cast<SdNavigatorDropEvent*>(p);
TransferableDataHelper aDataHelper( pSdNavigatorDropEvent->maDropEvent.Transferable ); TransferableDataHelper aDataHelper( pSdNavigatorDropEvent->maDropEvent.Transferable );
SdPageObjsTLB::SdPageObjsTransferable* pPageObjsTransferable = SdPageObjsTLB::SdPageObjsTransferable::getImplementation( aDataHelper.GetXTransferable() ); SdPageObjsTLV::SdPageObjsTransferable* pPageObjsTransferable = SdPageObjsTLV::SdPageObjsTransferable::getImplementation( aDataHelper.GetXTransferable() );
INetBookmark aINetBookmark; INetBookmark aINetBookmark;
if( pPageObjsTransferable && aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) if( pPageObjsTransferable && aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) )

View File

@@ -98,8 +98,6 @@ void TabControl::MouseButtonDown(const MouseEvent& rMEvt)
sal_uInt16 aPageId = GetPageId(aPos); sal_uInt16 aPageId = GetPageId(aPos);
//initialize //initialize
if(RrePageID!=aPageId)
pDrViewSh->FreshNavigatrEntry();
RrePageID=aPageId; RrePageID=aPageId;
if (aPageId == 0) if (aPageId == 0)
{ {

View File

@@ -1,10 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 --> <!-- Generated with glade 3.22.1 -->
<interface domain="sd"> <interface domain="sd">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<object class="GtkMenu" id="dragmodemenu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkRadioMenuItem" id="1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="navigatorpanelSTR_DRAGTYPE_URL">Insert as Hyperlink</property>
<property name="draw_as_radio">True</property>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="navigatorpanel|STR_DRAGTYPE_LINK">Insert as Link</property>
<property name="draw_as_radio">True</property>
<property name="group">1</property>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="navigatorpanel|STR_DRAGTYPE_EMBEDDED">Insert as Copy</property>
<property name="draw_as_radio">True</property>
<property name="group">1</property>
</object>
</child>
</object>
<object class="GtkTreeStore" id="liststore2">
<columns>
<!-- column-name expander -->
<column type="GdkPixbuf"/>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkGrid" id="NavigatorPanel"> <object class="GtkGrid" id="NavigatorPanel">
<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="border_width">6</property> <property name="border_width">6</property>
<child> <child>
<object class="GtkGrid"> <object class="GtkGrid">
@@ -16,7 +58,7 @@
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child> <child>
<object class="GtkComboBox" id="documents"> <object class="GtkComboBoxText" id="documents">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="navigatorpanel|documents|tooltip_text">Document</property> <property name="tooltip_text" translatable="yes" context="navigatorpanel|documents|tooltip_text">Document</property>
@@ -32,13 +74,51 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="sdlo-SdPageObjsTLB" id="tree:border"> <object class="GtkScrolledWindow">
<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="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<child internal-child="selection"> <property name="shadow_type">in</property>
<object class="GtkTreeSelection" id="SdPageObjsTLB-selection1"/> <child>
<object class="GtkTreeView" id="tree">
<property name="width_request">-1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore2</property>
<property name="headers_visible">False</property>
<property name="reorderable">True</property>
<property name="search_column">1</property>
<property name="enable_tree_lines">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection11"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn21">
<property name="spacing">6</property>
<child>
<object class="GtkCellRendererPixbuf" id="cellrenderertext44"/>
<attributes>
<attribute name="pixbuf">0</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText" id="cellrenderertext22"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="tree-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="navigatorpanel|STR_OBJECTS_TREE">Page Tree</property>
</object>
</child>
</object>
</child> </child>
</object> </object>
<packing> <packing>
@@ -51,17 +131,17 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="toolbar_style">icons</property> <property name="toolbar_style">icons</property>
<property name="icon_size">2</property>
<child> <child>
<object class="GtkToolButton" id="first"> <object class="GtkToolButton" id="first">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="navigatorpanel|first|tooltip_text">First Slide</property> <property name="tooltip_text" translatable="yes" context="navigatorpanel|first|tooltip_text">First Slide</property>
<property name="action_name">first</property>
<property name="icon_name">sd/res/nv03.png</property> <property name="icon_name">sd/res/nv03.png</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@@ -69,12 +149,11 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="navigatorpanel|previous|tooltip_text">Previous Slide</property> <property name="tooltip_text" translatable="yes" context="navigatorpanel|previous|tooltip_text">Previous Slide</property>
<property name="action_name">previous</property>
<property name="icon_name">sd/res/nv04.png</property> <property name="icon_name">sd/res/nv04.png</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@@ -82,12 +161,11 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="navigatorpanel|next|tooltip_text">Next Slide</property> <property name="tooltip_text" translatable="yes" context="navigatorpanel|next|tooltip_text">Next Slide</property>
<property name="action_name">next</property>
<property name="icon_name">sd/res/nv05.png</property> <property name="icon_name">sd/res/nv05.png</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@@ -95,12 +173,11 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="navigatorpanel|last|tooltip_text">Last Slide</property> <property name="tooltip_text" translatable="yes" context="navigatorpanel|last|tooltip_text">Last Slide</property>
<property name="action_name">last</property>
<property name="icon_name">sd/res/nv06.png</property> <property name="icon_name">sd/res/nv06.png</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@@ -110,7 +187,7 @@
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@@ -118,12 +195,11 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="navigatorpanel|dragmode|tooltip_text">Drag Mode</property> <property name="tooltip_text" translatable="yes" context="navigatorpanel|dragmode|tooltip_text">Drag Mode</property>
<property name="action_name">dragmode</property>
<property name="icon_name">sd/res/nv09.png</property> <property name="icon_name">sd/res/nv09.png</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@@ -131,12 +207,11 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="navigatorpanel|shapes|tooltip_text">Show Shapes</property> <property name="tooltip_text" translatable="yes" context="navigatorpanel|shapes|tooltip_text">Show Shapes</property>
<property name="action_name">shapes</property>
<property name="icon_name">sd/res/graphic.png</property> <property name="icon_name">sd/res/graphic.png</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">False</property>
</packing> </packing>
</child> </child>
</object> </object>
@@ -152,4 +227,27 @@
</packing> </packing>
</child> </child>
</object> </object>
<object class="GtkMenu" id="shapemenu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkRadioMenuItem" id="named">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="navigatorpanel|STR_NAVIGATOR_SHOW_NAMED_SHAPES">Named shapes</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="all">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="navigatorpanel|STR_NAVIGATOR_SHOW_ALL_SHAPES">All shapes</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
<property name="group">named</property>
</object>
</child>
</object>
</interface> </interface>

View File

@@ -511,7 +511,6 @@ custom_widgets = [
'PropertyControl', 'PropertyControl',
'RecentDocsView', 'RecentDocsView',
'RowEdit', 'RowEdit',
'SdPageObjsTLB',
'SearchBox', 'SearchBox',
'SearchResultsBox', 'SearchResultsBox',
'SidebarToolBox', 'SidebarToolBox',