summaryrefslogtreecommitdiff
path: root/sw/source/filter/rtf/rtffly.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2010-11-14 02:05:55 +0100
committerMiklos Vajna <vmiklos@frugalware.org>2010-11-14 03:38:42 +0100
commit9a5dda7b01638919dda3093f77135e5d5584d191 (patch)
tree4e30888b0cc202d8c103efd5ced7f9f8ebd2d6d7 /sw/source/filter/rtf/rtffly.cxx
parentd53b289cd7dc817cdb069005437851353b35448f (diff)
RTF: port last changes from CWS
Diffstat (limited to 'sw/source/filter/rtf/rtffly.cxx')
-rw-r--r--sw/source/filter/rtf/rtffly.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 35e8d46d5a96..c4cb74b422fc 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -61,6 +61,7 @@
#include <txtflcnt.hxx>
#include <fmtflcnt.hxx>
#include <fltini.hxx>
+#include <unoframe.hxx>
#include <deque>
#include <map>
#include <utility>
@@ -1293,7 +1294,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
aFlySet.Put(aSurroundItem);
}
- SwFrmFmt* pFlyFmt = pDoc->Insert( *pPam,
+ SwFlyFrmFmt* pFlyFmt = pDoc->Insert( *pPam,
rGrfNm, aEmptyStr, // Name der Graphic !!
pGrf,
&aFlySet, // Attribute fuer den FlyFrm
@@ -1305,6 +1306,26 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
_SetPictureSize( *pGrfNd, pPos->nNode,
(SfxItemSet&)pFlyFmt->GetAttrSet(),
pPicType );
+ if( pPicType )
+ {
+ PictPropertyNameValuePairs::const_iterator aIt = pPicType->aPropertyPairs.begin();
+ PictPropertyNameValuePairs::const_iterator aEnd = pPicType->aPropertyPairs.end();
+ while( aIt != aEnd)
+ {
+ if( aIt->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "wzDescription") ))
+ {
+ SwXFrame::GetOrCreateSdrObject( pFlyFmt );
+ pDoc->SetFlyFrmDescription( *(pFlyFmt), aIt->second );
+ }
+ else if( aIt->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "wzName") ))
+ {
+ SwXFrame::GetOrCreateSdrObject( pFlyFmt );
+ pDoc->SetFlyFrmTitle( *(pFlyFmt), aIt->second );
+ }
+ ++aIt;
+ }
+ }
+
}
if( pGrfAttrSet )