summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@novell.com>2011-08-23 14:01:37 +0530
committerMuthu Subramanian <sumuthu@novell.com>2011-08-23 14:14:43 +0530
commitb6768c50736c6994e28de51c5f54cdadfd6f45f1 (patch)
tree68309f18ef3a7dc464ee2b666118cf295d4e0494 /sd
parentgb_MINGWLIBDIR is not used anywhere (diff)
downloadcore-b6768c50736c6994e28de51c5f54cdadfd6f45f1.tar.gz
core-b6768c50736c6994e28de51c5f54cdadfd6f45f1.zip
n#699334: Legacy Diagram Text import.
- Imports Legacy Text. - Formatting info is not imported.
Diffstat (limited to 'sd')
-rw-r--r--sd/CppunitTest_sd_uimpress.mk1
-rw-r--r--sd/Library_sd.mk1
-rw-r--r--sd/source/ui/inc/unoprnms.hxx1
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx21
4 files changed, 21 insertions, 3 deletions
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index ef1079de2e43..43352bc3738c 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -57,6 +57,7 @@ $(eval $(call gb_CppunitTest_add_linked_libs,sd_uimpress,\
drawinglayer \
editeng \
i18nisolang1 \
+ msfilter \
sal \
salhelper \
sb \
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index b4a667c0db2c..0db115335d1c 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -75,6 +75,7 @@ $(eval $(call gb_Library_add_linked_libs,sd,\
drawinglayer \
editeng \
i18nisolang1 \
+ msfilter \
oox \
sal \
salhelper \
diff --git a/sd/source/ui/inc/unoprnms.hxx b/sd/source/ui/inc/unoprnms.hxx
index 79bad24858bc..60d68e28919a 100644
--- a/sd/source/ui/inc/unoprnms.hxx
+++ b/sd/source/ui/inc/unoprnms.hxx
@@ -69,6 +69,7 @@
#define UNO_NAME_OBJ_STYLE "Style"
#define UNO_NAME_OBJ_MASTERDEPENDENT "IsPlaceholderDependent"
#define UNO_NAME_OBJ_ANIMATIONPATH "AnimationPath"
+#define UNO_NAME_OBJ_LEGACYFRAGMENT "LegacyFragment"
#define UNO_NAME_LAYER_LOCKED "IsLocked"
#define UNO_NAME_LAYER_PRINTABLE "IsPrintable"
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index cd3e5a518027..98369509968f 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -56,6 +56,8 @@
#include <svx/svdopath.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdograf.hxx>
+#include <filter/msfilter/msdffimp.hxx>
+#include <svl/instrm.hxx>
#include <editeng/outlobj.hxx>
#include "CustomAnimationPreset.hxx"
#include "Outliner.hxx"
@@ -133,19 +135,19 @@ static SdTypesCache gImplTypesCache;
#define WID_ANIMPATH 16
#define WID_IMAGEMAP 17
#define WID_ISANIMATION 18
+#define WID_THAT_NEED_ANIMINFO 19
#define WID_ISEMPTYPRESOBJ 20
#define WID_ISPRESOBJ 21
#define WID_MASTERDEPEND 22
#define WID_NAVORDER 23
-
-#define WID_THAT_NEED_ANIMINFO 19
-
#define WID_PLACEHOLDERTEXT 24
+#define WID_LEGACYFRAGMENT 25
#define IMPRESS_MAP_ENTRIES \
+ { MAP_CHAR_LEN(UNO_NAME_OBJ_LEGACYFRAGMENT),WID_LEGACYFRAGMENT, &ITYPE(drawing::XShape), 0, 0},\
{ MAP_CHAR_LEN(UNO_NAME_OBJ_ANIMATIONPATH), WID_ANIMPATH, &ITYPE(drawing::XShape), 0, 0},\
{ MAP_CHAR_LEN(UNO_NAME_OBJ_BOOKMARK), WID_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},\
{ MAP_CHAR_LEN(UNO_NAME_OBJ_DIMCOLOR), WID_DIMCOLOR, &::getCppuType((const sal_Int32*)0), 0, 0},\
@@ -632,6 +634,18 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName,
SetMasterDepend( ::cppu::any2bool(aValue) );
break;
+ case WID_LEGACYFRAGMENT:
+ {
+ uno::Reference< io::XInputStream > xInputStream;
+ aValue >>= xInputStream;
+ if( xInputStream.is() )
+ {
+ SvInputStream aStream( xInputStream );
+ SdrObject* pObject = mpShape->GetSdrObject();
+ SvxMSDffManager::ReadObjText( aStream, pObject );
+ }
+ }
+ break;
// TODO: WID_ANIMPATH
case WID_IMAGEMAP:
{
@@ -658,6 +672,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName,
}
}
}
+ break;
}
}
}