[Libreoffice-commits] core.git: filter/inc filter/source sd/source

2013-03-08 Thread Muthu Subramanian
 filter/inc/filter/msfilter/msdffimp.hxx |4 +++-
 filter/source/msfilter/msdffimp.cxx |   31 ++-
 sd/source/ui/unoidl/unoobj.cxx  |3 +--
 3 files changed, 34 insertions(+), 4 deletions(-)

New commits:
commit 2f3e1c77b2e2304f9a718d35f6b12daef261e2c1
Author: Muthu Subramanian sumu...@suse.com
Date:   Fri Mar 8 17:30:40 2013 +0530

n#699334: Legacy diagram import (PPTX).

Minimalistic implementation.
Had to rework on some parts because of the rebasing.

diff --git a/filter/inc/filter/msfilter/msdffimp.hxx 
b/filter/inc/filter/msfilter/msdffimp.hxx
index 8e625d4..6359277 100644
--- a/filter/inc/filter/msfilter/msdffimp.hxx
+++ b/filter/inc/filter/msfilter/msdffimp.hxx
@@ -67,6 +67,7 @@ struct SvxMSDffShapeOrder;
 class SvxMSDffManager;
 class SfxItemSet;
 class SdrObject;
+class SdrTextObj;
 struct DffObjData;
 
 class MSFILTER_DLLPUBLIC DffPropertyReader : public DffPropSet
@@ -503,7 +504,7 @@ protected :
 
 // Fontwork objects use a new implementation of ReadObjText because the old
 // one does not properly import multiple paragraphs.
-void ReadObjText( const OUString rText, SdrObject* pObj ) const;
+static void ReadObjText( const OUString rText, SdrObject* pObj );
 
 // the following method needs to be overridden for the import of OLE objects
 virtual sal_Bool GetOLEStorageName( long nOLEId,
@@ -600,6 +601,7 @@ public:
 voidSetSvxMSDffSettings( sal_uInt32 nSettings ) { nSvxMSDffSettings = 
nSettings; };
 
 static sal_Bool MakeContentStream( SotStorage * pStor, const 
GDIMetaFile  );
+static void ReadObjText( SvStream rStream, SdrObject* pObj );
 static sal_Bool ConvertToOle2( SvStream rStm,
sal_uInt32 nLen,
const GDIMetaFile*,
diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 41fe692..6ead1ee 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3444,10 +3444,39 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 
nColorCode, sal_uInt16 nConte
 return aColor;
 }
 
+void SvxMSDffManager::ReadObjText( SvStream rStream, SdrObject* pObj )
+{
+DffRecordHeader aRecHd;
+rStream  aRecHd;
+if( aRecHd.nRecType == DFF_msofbtClientTextbox || aRecHd.nRecType == 
0x1022 )
+{
+while( rStream.GetError() == 0  rStream.Tell()  
aRecHd.GetRecEndFilePos() )
+{
+DffRecordHeader aHd;
+rStream  aHd;
+switch( aHd.nRecType )
+{
+case DFF_PST_TextBytesAtom:
+case DFF_PST_TextCharsAtom:
+{
+bool bUniCode = ( aHd.nRecType == 
DFF_PST_TextCharsAtom );
+sal_uInt32 nBytes = aHd.nRecLen;
+String aStr = MSDFFReadZString( rStream, nBytes, 
bUniCode );
+ReadObjText( aStr, pObj );
+}
+break;
+default:
+break;
+}
+aHd.SeekToEndOfRecord( rStream );
+}
+}
+}
+
 // sj: I just want to set a string for a text object that may contain multiple
 // paragraphs. If I now take a look at the follwing code I get the impression 
that
 // our outliner is too complicate to be used properly,
-void SvxMSDffManager::ReadObjText( const OUString rText, SdrObject* pObj ) 
const
+void SvxMSDffManager::ReadObjText( const OUString rText, SdrObject* pObj )
 {
 SdrTextObj* pText = PTR_CAST( SdrTextObj, pObj );
 if ( pText )
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index d46264d..856f64f 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -623,7 +623,6 @@ void SAL_CALL SdXShape::setPropertyValue( const 
::rtl::OUString aPropertyName,
 SetMasterDepend( ::cppu::any2bool(aValue) );
 break;
 
-#ifdef FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
 case WID_LEGACYFRAGMENT:
 {
 uno::Reference io::XInputStream  xInputStream;
@@ -636,7 +635,7 @@ void SAL_CALL SdXShape::setPropertyValue( const 
::rtl::OUString aPropertyName,
 }
 }
 break;
-#endif
+
 case WID_ANIMPATH:
 {
 uno::Reference drawing::XShape  xShape( aValue, 
uno::UNO_QUERY );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: filter/inc filter/source sd/source

2013-02-22 Thread Ricardo Montania
 filter/inc/filter/msfilter/svdfppt.hxx |   28 +++---
 filter/source/msfilter/svdfppt.cxx |  138 -
 sd/source/filter/ppt/pptin.cxx |   48 +--
 sd/source/filter/ppt/propread.cxx  |   18 ++--
 sd/source/filter/ppt/propread.hxx  |2 
 5 files changed, 117 insertions(+), 117 deletions(-)

New commits:
commit e904749eb8e1109f9a884b309fad6de5f78ad623
Author: Ricardo Montania rica...@linuxafundo.com.br
Date:   Sun Feb 3 00:02:38 2013 -0200

String cleanup in filter

Change-Id: If9fac2f277550cc786baffe4f89c7181b2d10dfd
Reviewed-on: https://gerrit.libreoffice.org/1970
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/filter/inc/filter/msfilter/svdfppt.hxx 
b/filter/inc/filter/msfilter/svdfppt.hxx
index 79272f5..fcc704f 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -63,7 +63,7 @@ struct MSFILTER_DLLPUBLIC PptCurrentUserAtom
 sal_uInt16  nDocFileVersion;
 sal_uInt8   nMajorVersion;
 sal_uInt8   nMinorVersion;
-String  aCurrentUser;
+OUStringaCurrentUser;
 
 public:
 
@@ -92,13 +92,13 @@ struct SdHyperlinkEntry
 sal_Int32   nPrivate2;
 sal_Int32   nPrivate3;
 sal_Int32   nInfo;
-String  aTarget;
-String  aSubAdress;
+OUStringaTarget;
+OUStringaSubAdress;
 
 sal_Int32   nStartPos;
 sal_Int32   nEndPos;
 
-String  aConvSubString;
+OUStringaConvSubString;
 ESelection  aESelection;
 sal_BoolbSelection;
 };
@@ -260,7 +260,7 @@ public:
 
 struct PptFontEntityAtom
 {
-String  aName;
+OUStringaName;
 double  fScaling;
 sal_uInt8   lfClipPrecision;
 sal_uInt8   lfQuality;
@@ -416,7 +416,7 @@ protected:
 sal_BoolbTimesNewRomanChecked   : 1;
 sal_BoolbTimesNewRomanAvailable : 1;
 
-sal_BoolReadString( rtl::OUString rStr ) const;
+sal_BoolReadString( OUString rStr ) const;
 // nur fuer PowerPoint-Filter:
 virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const;
 
@@ -425,7 +425,7 @@ public:
 
 PowerPointImportParam rImportParam;
 
-SdrEscherImport( PowerPointImportParam, const String 
rBaseURL );
+SdrEscherImport( PowerPointImportParam, const 
OUString rBaseURL );
 virtual ~SdrEscherImport();
 virtual boolGetColorFromPalette( sal_uInt16 nNum, Color rColor ) 
const;
 virtual sal_BoolSeekToShape( SvStream rSt, void* pClientData, 
sal_uInt32 nId ) const;
@@ -453,7 +453,7 @@ struct MSFILTER_DLLPUBLIC PPTFieldEntry
 sal_uInt16  nTextRangeEnd;
 SvxFieldItem*   pField1;
 SvxFieldItem*   pField2;
-String* pString;
+OUString*   pString;
 
 PPTFieldEntry() : nPos( 0 ), nTextRangeEnd( 0 ), pField1( NULL ), pField2( 
NULL ), pString( NULL ) {};
 ~PPTFieldEntry();
@@ -471,7 +471,7 @@ struct MSFILTER_DLLPUBLIC PPTFieldEntry
 struct MSFILTER_DLLPUBLIC HeaderFooterEntry
 {
 const PptSlidePersistEntry* pMasterPersist;
-String  pPlaceholder[ 4 ];
+OUStringpPlaceholder[ 4 ];
 sal_uInt32  nAtom;
 
 sal_uInt32  GetMaskForInstance( sal_uInt32 nInstance );
@@ -575,7 +575,7 @@ protected:
 voidSeekOle( SfxObjectShell* pShell, sal_uInt32 
nFilterOptions );
 
 public:
-SdrPowerPointImport( PowerPointImportParam, const 
String rBaseURL );
+SdrPowerPointImport( PowerPointImportParam, const 
OUString rBaseURL );
 virtual ~SdrPowerPointImport();
 sal_uInt16  GetPageCount( PptPageKind eKind = PPT_SLIDEPAGE ) 
const;
 voidSetPageNum( sal_uInt16 nPageNum, PptPageKind = 
PPT_SLIDEPAGE );
@@ -916,7 +916,7 @@ struct PPTCharPropSet
 
 sal_uInt32  mnOriginalTextPos;
 sal_uInt32  mnParagraph;
-String  maString;
+OUStringmaString;
 SvxFieldItem*   mpFieldItem;
 sal_uInt16  mnLanguage[ 3 ];
 
@@ -1049,7 +1049,7 @@ struct PPTStyleTextPropReader
 SvStream rIn,
 SdrPowerPointImport rMan,
 const DffRecordHeader rTextHeader,
-const String aString,
+const OUString aString,
 PPTTextRulerInterpreter rRuler,
 sal_uInt32 nCharCount,
 sal_Bool bTextPropAtom
@@ -1057,7 +1057,7 @@ struct PPTStyleTextPropReader
 voidReadCharProps(
 SvStream rIn,
 PPTCharPropSet aCharPropSet,
-const String aString,
+const OUString aString,
 sal_uInt32 nCharCount,
 sal_uInt32 nCharAnzRead,