summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/textanim.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/textanim.cxx')
-rw-r--r--cui/source/tabpages/textanim.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 64bf0e17da0c..5c9ba06dedb7 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -27,6 +27,8 @@
#include "textattr.hxx"
#include <dialmgr.hxx>
#include "svx/dlgutil.hxx"
+#include "svx/svdmark.hxx"
+#include "svx/svdview.hxx"
const sal_uInt16 SvxTextAnimationPage::pRanges[] =
{
@@ -63,10 +65,21 @@ SvxTextTabDialog::SvxTextTabDialog( vcl::Window* pParent,
void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if (nId == m_nTextId)
+ {
+ const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
+ bool bHasMarked = rMarkList.GetMarkCount() > 0;
+ SdrObjKind eKind = OBJ_NONE;
+ if (bHasMarked)
{
- static_cast<SvxTextAttrPage&>(rPage).SetView( pView );
- static_cast<SvxTextAttrPage&>(rPage).Construct();
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ eKind = (SdrObjKind)pObj->GetObjIdentifier();
+ }
}
+ static_cast<SvxTextAttrPage&>(rPage).SetObjKind(eKind);
+ static_cast<SvxTextAttrPage&>(rPage).Construct();
+ }
}