[Libreoffice-commits] core.git: 3 commits - chart2/source chart2/uiconfig dbaccess/AllLangResTarget_dbu.mk dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk sd/inc sd/source xmloff/source
Caolán McNamara
caolanm at redhat.com
Mon Feb 17 11:54:02 CET 2014
chart2/source/controller/dialogs/dlg_PropertyMapping.cxx | 5
chart2/uiconfig/ui/dlg_PropertyMapping.ui | 147 ++++++++------
dbaccess/AllLangResTarget_dbu.mk | 1
dbaccess/UIConfig_dbaccess.mk | 1
dbaccess/source/ui/dlg/dsselect.cxx | 65 +++---
dbaccess/source/ui/dlg/dsselect.hrc | 35 ---
dbaccess/source/ui/dlg/dsselect.hxx | 16 -
dbaccess/source/ui/dlg/dsselect.src | 98 ---------
dbaccess/source/ui/inc/dbu_resource.hrc | 1
dbaccess/uiconfig/ui/choosedatasourcedialog.ui | 125 ++++++++++++
sd/inc/EffectMigration.hxx | 2
sd/source/core/EffectMigration.cxx | 150 ++++++++++++++-
sd/source/ui/dlg/animobjs.cxx | 64 +++---
sd/source/ui/unoidl/unoobj.cxx | 35 +++
xmloff/source/draw/animimp.cxx | 5
15 files changed, 474 insertions(+), 276 deletions(-)
New commits:
commit 829a2f9b1f978db92d7cf50a30feead5128bce9f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Feb 17 10:43:52 2014 +0000
this dialog is unfinished, but fix it to not crash
Change-Id: Icb6d1d1bb14678eb711100644f3f60725db4b5db
diff --git a/chart2/source/controller/dialogs/dlg_PropertyMapping.cxx b/chart2/source/controller/dialogs/dlg_PropertyMapping.cxx
index c41859f..8022c5d 100644
--- a/chart2/source/controller/dialogs/dlg_PropertyMapping.cxx
+++ b/chart2/source/controller/dialogs/dlg_PropertyMapping.cxx
@@ -21,8 +21,9 @@ static long pListBoxTabs[] =
}
-PropertyMappingDlg::PropertyMappingDlg(Window* pParent):
- ModalDialog(pParent, "Property Mapping Dialog", "modules/schart/ui/dlg_PropertyMapping.ui")
+PropertyMappingDlg::PropertyMappingDlg(Window* pParent)
+ : ModalDialog(pParent, "PropertyMappingDialog",
+ "modules/schart/ui/dlg_PropertyMapping.ui")
{
get(mpMappingTable, "LST_PROPERTY_MAPPING");
diff --git a/chart2/uiconfig/ui/dlg_PropertyMapping.ui b/chart2/uiconfig/ui/dlg_PropertyMapping.ui
index 55ae428..cbdd35b 100644
--- a/chart2/uiconfig/ui/dlg_PropertyMapping.ui
+++ b/chart2/uiconfig/ui/dlg_PropertyMapping.ui
@@ -3,50 +3,20 @@
<interface>
<requires lib="gtk+" version="3.10"/>
<!-- interface-requires LibreOffice 1.0 -->
- <object class="GtkWindow" id="window1">
+ <object class="GtkDialog" id="PropertyMappingDialog">
<property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Add Property Mapping</property>
<property name="type_hint">dialog</property>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="LB_TITLE">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Select property mapping:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="svtlo-SvTabListBox" id="LST_PROPERTY_MAPPING">
- <property name="width_request">110</property>
- <property name="height_request">110</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Tab List-selection2"/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButtonBox" id="buttonbox1">
- <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
- <property name="margin_top">6</property>
- <property name="margin_bottom">6</property>
- <property name="spacing">6</property>
- <property name="layout_style">start</property>
+ <property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label" translatable="yes">Ok</property>
@@ -77,40 +47,87 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="LB_COLOR">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Color</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="LB_FILLCOLOR">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">FillColor</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="LB_BORDERCOLOR">
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">BorderColor</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="LB_TITLE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select property mapping:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">LST_PROPERTY_MAPPING:border</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svtlo-SvTabListBox" id="LST_PROPERTY_MAPPING:border">
+ <property name="width_request">110</property>
+ <property name="height_request">110</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Tab List-selection"/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LB_COLOR">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Color</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LB_FILLCOLOR">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">FillColor</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LB_BORDERCOLOR">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">BorderColor</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
commit 41630e9aed81220ce77088826d62cf17ae2adb85
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Feb 17 10:12:08 2014 +0000
convert select data source dialog to .ui
Change-Id: I1506f59dc6e6b6bd2b9cb1a7dd36044bef7f40e2
diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk
index f0b87a0..af9c757 100644
--- a/dbaccess/AllLangResTarget_dbu.mk
+++ b/dbaccess/AllLangResTarget_dbu.mk
@@ -45,7 +45,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
dbaccess/source/ui/dlg/dbadmin.src \
dbaccess/source/ui/dlg/dbfindex.src \
dbaccess/source/ui/dlg/directsql.src \
- dbaccess/source/ui/dlg/dsselect.src \
dbaccess/source/ui/dlg/indexdialog.src \
dbaccess/source/ui/dlg/paramdialog.src \
dbaccess/source/ui/dlg/RelationDlg.src \
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 0d5ff65..ce70f56 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UIConfig_UIConfig,dbaccess))
$(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/admindialog \
dbaccess/uiconfig/ui/advancedsettingsdialog \
+ dbaccess/uiconfig/ui/choosedatasourcedialog \
dbaccess/uiconfig/ui/colwidthdialog \
dbaccess/uiconfig/ui/directsqldialog \
dbaccess/uiconfig/ui/fielddialog \
diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx
index e127037..45c5605 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -18,7 +18,6 @@
*/
#include "dsselect.hxx"
-#include "dsselect.hrc"
#include "dbu_dlg.hrc"
#include <vcl/msgbox.hxx>
#include "localresaccess.hxx"
@@ -49,26 +48,26 @@ using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::ui::dialogs;
using namespace ::comphelper;
ODatasourceSelectDialog::ODatasourceSelectDialog(Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet)
- :ModalDialog(_pParent, ModuleRes(DLG_DATASOURCE_SELECTION))
- ,m_aDescription (this, ModuleRes(FT_DESCRIPTION))
- ,m_aDatasource (this, ModuleRes(LB_DATASOURCE))
- ,m_aOk (this, ModuleRes(PB_OK))
- ,m_aCancel (this, ModuleRes(PB_CANCEL))
- ,m_aHelp (this, ModuleRes(PB_HELP))
-#ifdef HAVE_ODBC_ADMINISTRATION
- ,m_aManageDatasources (this, ModuleRes(PB_MANAGE))
-#endif
- ,m_pOutputSet(_pOutputSet)
+ : ModalDialog(_pParent, "ChooseDataSourceDialog",
+ "dbaccess/ui/choosedatasourcedialog.ui")
+ , m_pOutputSet(_pOutputSet)
{
+ get(m_pDatasource, "treeview");
+ m_pDatasource->set_height_request(m_pDatasource->GetTextHeight() * 6);
+ get(m_pOk, "ok");
+ get(m_pCancel, "cancel");
+
fillListBox(_rDatasources);
#ifdef HAVE_ODBC_ADMINISTRATION
+ get(m_pManageDatasources, "organize");
+ m_pManageDatasources->Show();
+
// allow ODBC datasource managenment
- m_aManageDatasources.Show();
- m_aManageDatasources.Enable();
- m_aManageDatasources.SetClickHdl(LINK(this,ODatasourceSelectDialog,ManageClickHdl));
+ m_pManageDatasources->Show();
+ m_pManageDatasources->Enable();
+ m_pManageDatasources->SetClickHdl(LINK(this,ODatasourceSelectDialog,ManageClickHdl));
#endif
- m_aDatasource.SetDoubleClickHdl(LINK(this,ODatasourceSelectDialog,ListDblClickHdl));
- FreeResource();
+ m_pDatasource->SetDoubleClickHdl(LINK(this,ODatasourceSelectDialog,ListDblClickHdl));
}
ODatasourceSelectDialog::~ODatasourceSelectDialog()
@@ -101,15 +100,15 @@ IMPL_LINK_NOARG(ODatasourceSelectDialog, ManageClickHdl)
if ( !m_pODBCManagement->manageDataSources_async() )
{
// TODO: error message
- m_aDatasource.GrabFocus();
- m_aManageDatasources.Disable();
+ m_pDatasource->GrabFocus();
+ m_pManageDatasources->Disable();
return 1L;
}
- m_aDatasource.Disable();
- m_aOk.Disable();
- m_aCancel.Disable();
- m_aManageDatasources.Disable();
+ m_pDatasource->Disable();
+ m_pOk->Disable();
+ m_pCancel->Disable();
+ m_pManageDatasources->Disable();
OSL_POSTCOND( m_pODBCManagement->isRunning(), "ODatasourceSelectDialog::ManageClickHdl: success, but not running - you were *fast*!" );
return 0L;
@@ -122,10 +121,10 @@ IMPL_LINK( ODatasourceSelectDialog, ManageProcessFinished, void*, /**/ )
aEnumeration.getDatasourceNames( aOdbcDatasources );
fillListBox( aOdbcDatasources );
- m_aDatasource.Enable();
- m_aOk.Enable();
- m_aCancel.Enable();
- m_aManageDatasources.Enable();
+ m_pDatasource->Enable();
+ m_pOk->Enable();
+ m_pCancel->Enable();
+ m_pManageDatasources->Enable();
return 0L;
}
@@ -134,24 +133,24 @@ IMPL_LINK( ODatasourceSelectDialog, ManageProcessFinished, void*, /**/ )
void ODatasourceSelectDialog::fillListBox(const StringBag& _rDatasources)
{
OUString sSelected;
- if (m_aDatasource.GetEntryCount())
- sSelected = m_aDatasource.GetSelectEntry();
- m_aDatasource.Clear();
+ if (m_pDatasource->GetEntryCount())
+ sSelected = m_pDatasource->GetSelectEntry();
+ m_pDatasource->Clear();
// fill the list
for ( StringBag::const_iterator aDS = _rDatasources.begin();
aDS != _rDatasources.end();
++aDS
)
{
- m_aDatasource.InsertEntry( *aDS );
+ m_pDatasource->InsertEntry( *aDS );
}
- if (m_aDatasource.GetEntryCount())
+ if (m_pDatasource->GetEntryCount())
{
if (!sSelected.isEmpty())
- m_aDatasource.SelectEntry(sSelected);
+ m_pDatasource->SelectEntry(sSelected);
else // select the first entry
- m_aDatasource.SelectEntryPos(0);
+ m_pDatasource->SelectEntryPos(0);
}
}
diff --git a/dbaccess/source/ui/dlg/dsselect.hrc b/dbaccess/source/ui/dlg/dsselect.hrc
deleted file mode 100644
index f0058ce..0000000
--- a/dbaccess/source/ui/dlg/dsselect.hrc
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _DBAUI_DSSELECT_HRC_
-#define _DBAUI_DSSELECT_HRC_
-
-#define LB_DATASOURCE 1
-#define PB_OK 2
-#define PB_CANCEL 3
-#define PB_HELP 4
-#define PB_MANAGE 5
-#define FT_DESCRIPTION 6
-#define STR_LOCAL_DATASOURCES 7
-#define PB_CREATE 9
-#define STR_DESCRIPTION2 10
-
-#endif // _DBAUI_DSSELECT_HRC_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx
index 338eb34..6623766 100644
--- a/dbaccess/source/ui/dlg/dsselect.hxx
+++ b/dbaccess/source/ui/dlg/dsselect.hxx
@@ -41,16 +41,12 @@ namespace dbaui
class ODatasourceSelectDialog : public ModalDialog
{
protected:
- FixedText m_aDescription;
- ListBox m_aDatasource;
- OKButton m_aOk;
- CancelButton m_aCancel;
- HelpButton m_aHelp;
-#ifdef HAVE_ODBC_ADMINISTRATION
- PushButton m_aManageDatasources;
-#endif
+ ListBox* m_pDatasource;
+ OKButton* m_pOk;
+ CancelButton* m_pCancel;
SfxItemSet* m_pOutputSet;
#ifdef HAVE_ODBC_ADMINISTRATION
+ PushButton* m_pManageDatasources;
::std::auto_ptr< OOdbcManagement >
m_pODBCManagement;
#endif
@@ -59,8 +55,8 @@ public:
ODatasourceSelectDialog( Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet = NULL );
~ODatasourceSelectDialog();
- inline OUString GetSelected() const { return m_aDatasource.GetSelectEntry();}
- void Select( const OUString& _rEntry ) { m_aDatasource.SelectEntry(_rEntry); }
+ OUString GetSelected() const { return m_pDatasource->GetSelectEntry();}
+ void Select( const OUString& _rEntry ) { m_pDatasource->SelectEntry(_rEntry); }
virtual sal_Bool Close();
diff --git a/dbaccess/source/ui/dlg/dsselect.src b/dbaccess/source/ui/dlg/dsselect.src
deleted file mode 100644
index ee89e6a..0000000
--- a/dbaccess/source/ui/dlg/dsselect.src
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "dsselect.hrc"
-#include "dbu_dlg.hrc"
-
-ModalDialog DLG_DATASOURCE_SELECTION
-{
- HelpID = "dbaccess:ModalDialog:DLG_DATASOURCE_SELECTION";
- OutputSize = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 218 , 118 ) ;
- Text [ en-US ] = "Data Source" ;
-
- FixedText FT_DESCRIPTION
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 154 , 10 ) ;
- Text [ en-US ] = "Choose a data source:";
- };
- ListBox LB_DATASOURCE
- {
- HelpID = "dbaccess:ListBox:DLG_DATASOURCE_SELECTION:LB_DATASOURCE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 19 ) ;
- Size = MAP_APPFONT ( 154 , 94 ) ;
- TabStop = TRUE ;
- HScroll = TRUE ;
- Sort = TRUE ;
- };
-
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 166 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 166 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 166 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- PushButton PB_MANAGE
- {
- HelpID = "dbaccess:PushButton:DLG_DATASOURCE_SELECTION:PB_MANAGE";
- Pos = MAP_APPFONT ( 166 , 99 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- Hide = TRUE ;
- Text [ en-US ] = "Organize..." ;
- };
- PushButton PB_CREATE
- {
- HelpID = "dbaccess:PushButton:DLG_DATASOURCE_SELECTION:PB_CREATE";
- Pos = MAP_APPFONT ( 166 , 99 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Hide = TRUE ;
- Text [ en-US ] = "Create..." ;
- };
- String STR_LOCAL_DATASOURCES
- {
- Text [ en-US ] = "Local Databases" ;
- };
- String STR_DESCRIPTION2
- {
- Text [ en-US ] = "Choose a database";
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 1532133..e766ed7 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -78,7 +78,6 @@
#define DLG_DBASE_INDEXES RID_DIALOG_START + 1
#define DLG_SQLEXCEPTIONCHAIN RID_DIALOG_START + 3
-#define DLG_DATASOURCE_SELECTION RID_DIALOG_START + 4
#define DLG_PARAMETERS RID_DIALOG_START + 5
#define DLG_JOIN_TABADD RID_DIALOG_START + 14
diff --git a/dbaccess/uiconfig/ui/choosedatasourcedialog.ui b/dbaccess/uiconfig/ui/choosedatasourcedialog.ui
new file mode 100644
index 0000000..b6202f8
--- /dev/null
+++ b/dbaccess/uiconfig/ui/choosedatasourcedialog.ui
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="ChooseDataSourceDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Data Source</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="organize">
+ <property name="label" translatable="yes">Or_ganize...</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTreeView" id="treeview:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Choose a data source:</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+</interface>
commit a51929600789af4d67e4f52226f8f5ae13ed58ba
Author: Armin Le Grand <alg at apache.org>
Date: Sat Feb 15 01:16:09 2014 +0000
Resolves: #i42894# added support for <presentation:animations>...
at import and creation
(cherry picked from commit 0f11a9d487744af6c50e9f1d547c22cd4bdeab48)
Conflicts:
sd/source/core/EffectMigration.cxx
sd/source/ui/dlg/animobjs.cxx
sd/source/ui/unoidl/unoobj.cxx
Change-Id: Ib498bf718d40501cbab71a700342343df68a6ee9
diff --git a/sd/inc/EffectMigration.hxx b/sd/inc/EffectMigration.hxx
index 0cd2f9d..62c6a35 100644
--- a/sd/inc/EffectMigration.hxx
+++ b/sd/inc/EffectMigration.hxx
@@ -29,6 +29,7 @@ class SvxShape;
class SdAnimationInfo;
class SdrObject;
class SdrPathObj;
+class SdrObjGroup;
namespace sd {
@@ -71,6 +72,7 @@ public:
static sal_Bool GetSoundOn( SvxShape* pShape );
static void SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj );
+ static void CreateAnimatedGroup(SdrObjGroup& rGroupObj, SdPage& rPage);
};
} // end of namespace sd
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 0a496a3..b919a54 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -21,9 +21,18 @@
#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
#include <com/sun/star/presentation/TextAnimationType.hpp>
#include <com/sun/star/presentation/ParagraphTarget.hpp>
+#include <com/sun/star/animations/Event.hpp>
+#include <com/sun/star/animations/EventTrigger.hpp>
+#include <com/sun/star/animations/Timing.hpp>
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/animations/AnimationFill.hpp>
+#include <com/sun/star/animations/XAnimate.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
#include <svx/unoshape.hxx>
#include <svx/svdotext.hxx>
#include <svx/svdopath.hxx>
+#include <svx/svdogrp.hxx>
+#include <svx/svditer.hxx>
#include "drawdoc.hxx"
#include "sdpage.hxx"
#include <CustomAnimationPreset.hxx>
@@ -35,14 +44,17 @@ using namespace ::sd;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::animations;
using namespace ::com::sun::star::presentation;
-
using ::com::sun::star::drawing::XShape;
+using ::com::sun::star::lang::XMultiServiceFactory;
+using ::com::sun::star::drawing::XShape;
+using ::com::sun::star::beans::NamedValue;
struct deprecated_FadeEffect_conversion_table_entry
{
FadeEffect meFadeEffect;
const sal_Char* mpPresetId;
}
+
deprecated_FadeEffect_conversion_table[] =
{
// OOo 1.x transitions
@@ -1332,4 +1344,140 @@ void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj )
}
}
+// #i42894# helper which creates the needed XAnimate for changing visibility and all the (currently) needed embeddings
+void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, SdrObject& rCandidate, bool bVisible, bool bOnClick, double fDuration)
+{
+ Reference< XMultiServiceFactory > xMsf(::comphelper::getProcessServiceFactory());
+ Any aAny;
+
+ // create par container node
+ Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW);
+
+ // set begin
+ aAny <<= (double)(0.0);
+ xOuterSeqTimeContainer->setBegin(aAny);
+
+ // set fill
+ xOuterSeqTimeContainer->setFill(AnimationFill::HOLD);
+
+ // set named values
+ Sequence< NamedValue > aUserDataSequence;
+ aUserDataSequence.realloc(1);
+
+ aUserDataSequence[0].Name = OUString("node-type");
+ aUserDataSequence[0].Value <<= bOnClick ? EffectNodeType::ON_CLICK : EffectNodeType::AFTER_PREVIOUS;
+
+ xOuterSeqTimeContainer->setUserData(aUserDataSequence);
+
+ // create animate set to change visibility for rCandidate
+ Reference< XAnimationNode > xAnimateSetForLast(xMsf->createInstance("com.sun.star.animations.AnimateSet"), UNO_QUERY_THROW);
+
+ // set begin
+ aAny <<= (double)(0.0);
+ xAnimateSetForLast->setBegin(aAny);
+
+ // set duration
+ aAny <<= fDuration;
+ xAnimateSetForLast->setDuration(aAny);
+
+ // set fill
+ xAnimateSetForLast->setFill(AnimationFill::HOLD);
+
+ // set target
+ Reference< XAnimate > xAnimate(xAnimateSetForLast, UNO_QUERY);
+ Reference< XShape > xTargetShape(rCandidate.getUnoShape(), UNO_QUERY);
+ aAny <<= xTargetShape;
+ xAnimate->setTarget(aAny);
+
+ // set AttributeName
+ xAnimate->setAttributeName(OUString("Visibility"));
+
+ // set attribute value
+ aAny <<= bVisible ? sal_True : sal_False;
+ xAnimate->setTo(aAny);
+
+ // ad set node to par node
+ Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW);
+ xParentContainer->appendChild(xAnimateSetForLast);
+
+ // add node
+ rxParentContainer->appendChild(xOuterSeqTimeContainer);
+}
+
+// #i42894# older native formats supported animated group objects, that means all members of the group
+// were shown animated by showing one after the other. This is no longer supported, but the following
+// fallback will create the needed SMIL animation stuff. Unfortunately the members of the group
+// have to be moved directly to the page, else the (explained to be generic, thus I expected this to
+// work) animations will not work in slideshow
+void EffectMigration::CreateAnimatedGroup(SdrObjGroup& rGroupObj, SdPage& rPage)
+{
+ // aw080 will give a vector immeditately
+ SdrObjListIter aIter(rGroupObj);
+
+ if(aIter.Count())
+ {
+ boost::shared_ptr< sd::MainSequence > pMainSequence(rPage.getMainSequence());
+
+ if(pMainSequence.get())
+ {
+ std::vector< SdrObject* > aObjects;
+ aObjects.reserve(aIter.Count());
+
+ while(aIter.IsMore())
+ {
+ // do move to page rough with old/current stuff, will be different in aw080 anyways
+ SdrObject* pCandidate = aIter.Next();
+ rGroupObj.GetSubList()->NbcRemoveObject(pCandidate->GetOrdNum());
+ rPage.NbcInsertObject(pCandidate);
+ aObjects.push_back(pCandidate);
+ }
+
+ // create main node
+ Reference< XMultiServiceFactory > xMsf(::comphelper::getProcessServiceFactory());
+ Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW);
+ Any aAny;
+
+ // set begin
+ aAny <<= (double)(0.0);
+ xOuterSeqTimeContainer->setBegin(aAny);
+
+ // prepare parent container
+ Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW);
+
+ // prepare loop over objects
+ SdrObject* pLast = 0;
+ SdrObject* pNext = 0;
+ const double fDurationShow(0.2);
+ const double fDurationHide(0.001);
+
+ for(sal_uInt32 a(0); a < aObjects.size(); a++)
+ {
+ pLast = pNext;
+ pNext = aObjects[a];
+
+ // create node
+ if(pLast)
+ {
+ createVisibilityOnOffNode(xParentContainer, *pLast, false, false, fDurationHide);
+ }
+
+ if(pNext)
+ {
+ createVisibilityOnOffNode(xParentContainer, *pNext, true, !a, fDurationShow);
+ }
+ }
+
+ // create end node
+ if(pNext)
+ {
+ createVisibilityOnOffNode(xParentContainer, *pNext, false, false, fDurationHide);
+ }
+
+ // add to main sequence and rebuild
+ pMainSequence->createEffects(xOuterSeqTimeContainer);
+ pMainSequence->rebuild();
+ }
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index d4ae25c..9fe24b3 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -42,6 +42,9 @@
#include <vcl/svapp.hxx>
+// #i42894#
+#include <EffectMigration.hxx>
+
#include <string>
#include <algorithm>
@@ -1199,36 +1202,43 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
pClone->NbcMove( aMoveSize );
}
- // create animation group
- SdrObjGroup* pGroup = new SdrObjGroup;
- SdrObjList* pObjList = pGroup->GetSubList();
+ // #i42894# Caution(!) variable pPage looks right, but it is a page from the local
+ // document the dialog is using (!), so get the target page from the target view
+ SdPage* pTargetSdPage = dynamic_cast< SdPage* >(rView.GetSdrPageView() ? rView.GetSdrPageView()->GetPage() : 0);
- for (size_t i = 0; i < nCount; i++)
+ if(pTargetSdPage)
{
- // the clone remains in the animatior; we insert a clone of the
- // clone into the group
- pClone = pPage->GetObj(i);
- SdrObject* pCloneOfClone = pClone->Clone();
- //SdrObject* pCloneOfClone = pPage->GetObj(i)->Clone();
- pObjList->InsertObject(pCloneOfClone, LIST_APPEND);
- }
+ // create animation group
+ SdrObjGroup* pGroup = new SdrObjGroup;
+ SdrObjList* pObjList = pGroup->GetSubList();
+
+ for (size_t i = 0; i < nCount; i++)
+ {
+ // the clone remains in the animatior; we insert a clone of the
+ // clone into the group
+ pClone = pPage->GetObj(i);
+ SdrObject* pCloneOfClone = pClone->Clone();
+ //SdrObject* pCloneOfClone = pPage->GetObj(i)->Clone();
+ pObjList->InsertObject(pCloneOfClone, LIST_APPEND);
+ }
+
+ // until now the top left corner of the group is in the window center;
+ // correct the position by half of the size of the group
+ aTemp = aMaxSizeLog;
+ aTemp.Height() = - aTemp.Height() / 2;
+ aTemp.Width() = - aTemp.Width() / 2;
+ pGroup->NbcMove(aTemp);
+
+ // #i42894# create needed SMIL stuff and move child objects to page directly (see
+ // comments at EffectMigration::CreateAnimatedGroup why this has to be done).
+ EffectMigration::CreateAnimatedGroup(*pGroup, *pTargetSdPage);
- // until now the top left corner of the group is in the window center;
- // correct the position by half of the size of the group
- aTemp = aMaxSizeLog;
- aTemp.Height() = - aTemp.Height() / 2;
- aTemp.Width() = - aTemp.Width() / 2;
- pGroup->NbcMove(aTemp);
-
- // create animation information
- SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pGroup,true);
- pInfo->meEffect = presentation::AnimationEffect_NONE;
- pInfo->meSpeed = presentation::AnimationSpeed_MEDIUM;
- pInfo->mbActive = sal_True;
- pInfo->mbIsMovie = sal_True;
- pInfo->maBlueScreen = COL_WHITE;
-
- rView.InsertObjectAtView( pGroup, *pPV, SDRINSERT_SETDEFLAYER);
+ // #i42894# if that worked, delete the group again
+ if(!pGroup->GetSubList()->GetObjCount())
+ {
+ delete pGroup;
+ }
+ }
}
ClickFirstHdl( this );
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index c3a3433..9ee4eb0 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -55,6 +55,7 @@
#include "Outliner.hxx"
#include "sdresid.hxx"
#include <comphelper/serviceinfohelper.hxx>
+#include <svx/svdogrp.hxx>
#include "anminfo.hxx"
#include "unohelp.hxx"
@@ -531,7 +532,39 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const :
EffectMigration::SetAnimationSpeed( mpShape, eSpeed );
break;
}
-// TODO: WID_ISANIMATION
+ case WID_ISANIMATION:
+ {
+ sal_Bool bIsAnimation(sal_False);
+
+ if(!(aValue >>= bIsAnimation))
+ {
+ throw lang::IllegalArgumentException();
+ }
+
+ if(bIsAnimation)
+ {
+ SdrObjGroup* pGroup = dynamic_cast< SdrObjGroup* >(pObj);
+ SdPage* pPage = dynamic_cast< SdPage* >(pGroup->GetPage());
+
+ if(pGroup && pPage)
+ {
+ // #i42894# Animated Group object, migrate that effect
+ EffectMigration::CreateAnimatedGroup(*pGroup, *pPage);
+
+ // #i42894# unfortunately when doing this all group members have to
+ // be moved to the page as direct members, else the currently
+ // available forms of animation do not work. If it succeeds,
+ // the group is empty and can be removed and deleted
+ if(!pGroup->GetSubList()->GetObjCount())
+ {
+ pPage->NbcRemoveObject(pGroup->GetOrdNum());
+ delete pGroup;
+ }
+ }
+ }
+ //pInfo->mbIsMovie = bIsAnimation;
+ break;
+ }
case WID_BOOKMARK:
{
OUString aString;
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 9a90f0b..8c5deb9 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -597,8 +597,9 @@ void XMLAnimationsEffectContext::EndElement()
aAny <<= (sal_Bool)sal_True;
xSet->setPropertyValue( mpImpl->msIsAnimation, aAny );
- aAny <<= meSpeed;
- xSet->setPropertyValue( mpImpl->msSpeed, aAny );
+ // #i42894# speed is not supported for the old group animation fallback, so no need to set it
+ // aAny <<= meSpeed;
+ // xSet->setPropertyValue( mpImpl->msSpeed, aAny );
}
else
{
More information about the Libreoffice-commits
mailing list