summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/inc/filter/msfilter/msdffimp.hxx18
-rw-r--r--filter/inc/filter/msfilter/msocximex.hxx441
-rw-r--r--filter/inc/filter/msfilter/svdfppt.hxx4
-rw-r--r--filter/source/config/cache/basecontainer.cxx12
-rw-r--r--filter/source/config/cache/configflush.cxx2
-rw-r--r--filter/source/config/cache/contenthandlerfactory.cxx4
-rw-r--r--filter/source/config/cache/filtercache.cxx52
-rw-r--r--filter/source/config/cache/filterfactory.cxx40
-rw-r--r--filter/source/config/cache/frameloaderfactory.cxx4
-rw-r--r--filter/source/config/cache/lateinitlistener.cxx4
-rw-r--r--filter/source/config/cache/lateinitthread.cxx5
-rw-r--r--filter/source/config/cache/lateinitthread.hxx2
-rw-r--r--filter/source/config/cache/registration.hxx2
-rw-r--r--filter/source/config/cache/typedetection.cxx10
-rw-r--r--filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu2
-rw-r--r--filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu2
-rw-r--r--filter/source/config/fragments/makefile.mk2
-rw-r--r--filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu2
-rw-r--r--filter/source/filtertracer/filtertracer.cxx2
-rw-r--r--filter/source/flash/swffilter.cxx4
-rw-r--r--filter/source/flash/swfuno.cxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx92
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.hxx34
-rw-r--r--filter/source/graphicfilter/icgm/bundles.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/bundles.hxx2
-rw-r--r--filter/source/graphicfilter/icgm/cgm.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/cgm.hxx4
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx12
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx25
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.hxx5
-rw-r--r--filter/source/graphicfilter/idxf/dxfgrprd.cxx6
-rw-r--r--filter/source/graphicfilter/idxf/dxfgrprd.hxx27
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx62
-rw-r--r--filter/source/msfilter/escherex.cxx6
-rw-r--r--filter/source/msfilter/eschesdo.cxx24
-rw-r--r--filter/source/msfilter/msdffimp.cxx54
-rw-r--r--filter/source/msfilter/msfiltertracer.cxx42
-rw-r--r--filter/source/msfilter/msocximex.cxx2268
-rw-r--r--filter/source/msfilter/msoleexp.cxx10
-rw-r--r--filter/source/msfilter/mstoolbar.cxx6
-rw-r--r--filter/source/msfilter/msvbahelper.cxx21
-rw-r--r--filter/source/msfilter/svdfppt.cxx32
-rw-r--r--filter/source/msfilter/svxmsbas.cxx4
-rw-r--r--filter/source/odfflatxml/odfflatxmlexport.xsl2
-rw-r--r--filter/source/odfflatxml/split-long-lines.xsl98
-rw-r--r--filter/source/pdf/pdfexport.cxx14
-rw-r--r--filter/source/pdf/pdfuno.cxx4
-rw-r--r--filter/source/placeware/tempfile.cxx2
-rw-r--r--filter/source/placeware/uno.cxx2
-rw-r--r--filter/source/svg/gfxtypes.hxx2
-rw-r--r--filter/source/svg/parserfragments.cxx26
-rw-r--r--filter/source/svg/svgfilter.cxx2
-rw-r--r--filter/source/svg/svgreader.cxx7
-rw-r--r--filter/source/svg/svguno.cxx2
-rw-r--r--filter/source/svg/svgwriter.cxx8
-rw-r--r--filter/source/svg/units.cxx14
-rw-r--r--filter/source/t602/filterenv.cxx4
-rw-r--r--filter/source/t602/t602filter.cxx6
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx26
-rw-r--r--filter/source/xmlfilteradaptor/genericfilter.cxx2
-rw-r--r--filter/source/xmlfilterdetect/fdcomp.cxx2
-rw-r--r--filter/source/xmlfilterdetect/filterdetect.cxx16
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl3
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx22
-rw-r--r--filter/source/xsltdialog/typedetectionimport.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfileview.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx4
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx8
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx14
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx4
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx50
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx42
74 files changed, 1847 insertions, 1905 deletions
diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx
index fdb8fed902af..a75b8e455f7d 100644
--- a/filter/inc/filter/msfilter/msdffimp.hxx
+++ b/filter/inc/filter/msfilter/msdffimp.hxx
@@ -74,7 +74,7 @@ public:
ULONG nFilePos;
public:
DffRecordHeader() : nRecVer(0), nRecInstance(0), nImpVerInst(0), nRecType(0), nRecLen(0), nFilePos(0) {}
- FASTBOOL IsContainer() const { return nRecVer == DFF_PSFLAG_CONTAINER; }
+ bool IsContainer() const { return nRecVer == DFF_PSFLAG_CONTAINER; }
ULONG GetRecBegFilePos() const { return nFilePos; }
ULONG GetRecEndFilePos() const { return nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; }
void SeekToEndOfRecord(SvStream& rIn) const { rIn.Seek(nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen ); }
@@ -472,7 +472,7 @@ protected :
long nEmuDiv;
long nPntMul;
long nPntDiv;
- FASTBOOL bNeedMap;
+ bool bNeedMap;
UINT32 nSvxMSDffSettings;
UINT32 nSvxMSDffOLEConvFlags;
@@ -501,7 +501,7 @@ protected :
ULONG nPosGroup,
const unsigned long nDrawingContainerId );
- FASTBOOL ReadGraphic( SvStream& rSt, ULONG nIndex, Graphic& rGraphic ) const;
+ bool ReadGraphic( SvStream& rSt, ULONG nIndex, Graphic& rGraphic ) const;
SdrObject* ImportFontWork( SvStream&, SfxItemSet&, Rectangle& rBoundRect ) const;
SdrObject* ImportGraphic( SvStream&, SfxItemSet&, const DffObjData& ) const;
// #i32596# - pass <nCalledByGroup> to method
@@ -531,10 +531,10 @@ protected :
virtual BOOL ProcessClientData( SvStream& rStData, ULONG nDatLen, char*& rpBuff, UINT32& rBuffLen ) const;
virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj = NULL);
virtual ULONG Calc_nBLIPPos( ULONG nOrgVal, ULONG nStreamPos ) const;
- virtual FASTBOOL GetColorFromPalette(USHORT nNum, Color& rColor) const;
+ virtual bool GetColorFromPalette(USHORT nNum, Color& rColor) const;
- FASTBOOL ReadDffString(SvStream& rSt, String& rTxt) const;
- FASTBOOL ReadObjText(SvStream& rSt, SdrObject* pObj) const;
+ bool ReadDffString(SvStream& rSt, String& rTxt) const;
+ bool ReadObjText(SvStream& rSt, SdrObject* pObj) const;
// SJ: New implementation of ReadObjText is used by Fontwork objects, because
// the old one does not properly import multiple paragraphs
@@ -573,10 +573,10 @@ public:
Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const;
Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const;
virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
- FASTBOOL SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
- FASTBOOL SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
+ bool SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
+ bool SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
- static void MSDFFReadZString( SvStream& rIn, String& rStr, ULONG nMaxLen, FASTBOOL bUniCode = FALSE );
+ static void MSDFFReadZString( SvStream& rIn, String& rStr, ULONG nMaxLen, bool bUniCode = FALSE );
static BOOL ReadCommonRecordHeader( DffRecordHeader& rRec, SvStream& rIn );
static BOOL ReadCommonRecordHeader( SvStream& rSt,
diff --git a/filter/inc/filter/msfilter/msocximex.hxx b/filter/inc/filter/msfilter/msocximex.hxx
index 7269b1f7f5bb..345e29a51000 100644
--- a/filter/inc/filter/msfilter/msocximex.hxx
+++ b/filter/inc/filter/msfilter/msocximex.hxx
@@ -294,6 +294,8 @@ public:
rtl::OUString msCtrlSource;
rtl::OUString msRowSource;
SfxObjectShell *pDocSh;
+ ::rtl::OUString sImageUrl;
+ com::sun::star::uno::Reference< com::sun::star::graphic::XGraphicObject> mxGrfObj;
protected:
sal_uInt32 ImportColor(sal_uInt32 nColorCode) const;
@@ -416,30 +418,31 @@ public:
sal_uInt8 pPictureHeader[20];
sal_uInt32 nPictureLen;
- ::rtl::OUString sImageUrl;
- com::sun::star::uno::Reference< com::sun::star::graphic::XGraphicObject> mxGrfObj;
};
class OCX_TabStrip : public OCX_Control
{
public:
- OCX_TabStrip() : OCX_Control( rtl::OUString::createFromAscii("TabStrip")) {}
+ OCX_TabStrip() : OCX_Control( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TabStrip" ))), nIdentifier(0), nFixedAreaLen(0), nNumTabs(0), bHasTabs(true) {}
+
virtual sal_Bool ReadFontData(SotStorageStream *pS);
virtual sal_Bool Read(SotStorageStream *pS);
+ std::vector< rtl::OUString > msItems;
sal_uInt16 nIdentifier;
sal_uInt16 nFixedAreaLen;
sal_uInt8 pBlockFlags[4];
- sal_uInt16 nNumTabs;
+ sal_Int32 nNumTabs;
+ bool bHasTabs;
};
class OCX_Image : public OCX_Control
{
public:
- OCX_Image() : OCX_Control(rtl::OUString::createFromAscii("Image")), fEnabled(1), fBackStyle(0), bPictureTiling(false), bAutoSize(false) {
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.DatabaseImageControl");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlImageControlModel");
+ OCX_Image() : OCX_Control(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Image" ))), fEnabled(1), fBackStyle(0), bPictureTiling(false), bAutoSize(false) {
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.DatabaseImageControl" ));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlImageControlModel" ));
}
~OCX_Image() { }
@@ -465,8 +468,6 @@ public:
sal_uInt8 nSpecialEffect;
bool bAutoSize;
- ::rtl::OUString sImageUrl;
- com::sun::star::uno::Reference< com::sun::star::graphic::XGraphicObject> mxGrfObj;
sal_Bool Read(SotStorageStream *pS);
using OCX_Control::Import; // to not hide the other two import methods
@@ -487,8 +488,7 @@ public:
};
struct ContainerRecord
{
- ContainerRecord():nTop(0), nLeft(0), nSubStorageId(0), nSubStreamLen(0), nTabPos(0), nTypeIdent(0), bVisible( true ) {}
-
+ ContainerRecord():nTop(0), nLeft(0), nSubStorageId(0), nSubStreamLen(0), nTabPos(0), nTypeIdent(0), bVisible( true ), bTabStop( true ) {}
::rtl::OUString cName;
::rtl::OUString controlTip;
::rtl::OUString sCtrlSource;
@@ -501,6 +501,7 @@ struct ContainerRecord
sal_uInt16 nTabPos;
sal_uInt16 nTypeIdent;
bool bVisible;
+ bool bTabStop;
};
typedef std::vector<OCX_Control*>::iterator CtrlIterator;
@@ -509,44 +510,32 @@ typedef std::vector<OCX_Control*> CtrlList;
class OCX_OptionButton;
-class OCX_ContainerControl : public OCX_Control
+class OCX_ParentControl : public OCX_Control
{
public:
- virtual ~OCX_ContainerControl();
- // sub class will process the control specific information
- // e.g frame or userform ( maybe tab, mulipage in the future )
- // Base (this) class will process the container specific information
- // e.g. the controls contained by this container
- // will
- // a) create the controls
- // b) read the controls
- // c) store these controls in a list for post processing
- // e.g. import
- //
virtual sal_Bool Read(SvStorageStream *pS);
- // No Font record
virtual sal_Bool ReadFontData(SvStorageStream* /*pS*/) { return sal_True; }
using OCX_Control::Import; // to not hide the other two import methods
+
virtual sal_Bool Import(com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet> &rPropSet);
SotStorageStreamRef getContainerStream() { return mContainerStream; }
+ SotStorageStreamRef getOStream() { return mContainedControlsStream; }
virtual void ProcessControl( OCX_Control* pControl, SvStorageStream* pS, ContainerRecord& rec );
- bool createFromContainerRecord( ContainerRecord& record,
+ bool createFromContainerRecord( const ContainerRecord& record,
OCX_Control*& );
SotStorageStreamRef getContainedControlsStream(){ return mContainedControlsStream; }
protected:
- // This class not meant to be instantiated
- // needs to be subclassed
- OCX_ContainerControl( SotStorageRef& parent,
+ OCX_ParentControl( SotStorageRef& parent,
const ::rtl::OUString& storageName,
const ::rtl::OUString& sN,
const com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer > &rParent,
+ com::sun::star::container::XNameContainer > &rDialog,
OCX_Control* pParent = NULL );
- rtl::OUString createSubStreamName( const sal_uInt32& subStorageID );
+ ~OCX_ParentControl();
com::sun::star::uno::Reference<
com::sun::star::container::XNameContainer > mxParent;
@@ -555,84 +544,56 @@ protected:
SotStorageRef mContainerStorage;
SotStorageStreamRef mContainerStream;
SotStorageStreamRef mContainedControlsStream;
- sal_uInt32 nNoRecords;
- sal_uInt32 nTotalLen;
- sal_uInt32 containerType;
-
-private:
- OCX_ContainerControl(); // not implemented
- OCX_ContainerControl(const OCX_ContainerControl&); // not implemented
-};
-
-
-class OCX_MultiPage : public OCX_ContainerControl
-{
-public:
- OCX_MultiPage( SotStorageRef& parent,
- const ::rtl::OUString& storageName,
- const ::rtl::OUString& sN,
- const com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer > &rDialog, OCX_Control* pParent = NULL);
- virtual ~OCX_MultiPage()
- {
- delete[] pCaption;
- delete[] pIcon;
- delete[] pPicture;
- }
- virtual sal_Bool Read(SvStorageStream *pS);
-
- using OCX_ContainerControl::Import; // to not hide the other two import methods
- virtual sal_Bool Import(com::sun::star::uno::Reference<
- com::sun::star::beans::XPropertySet> &rPropSet);
- virtual sal_Bool Import(com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer>
- &rDialog);
- virtual void ProcessControl( OCX_Control* pControl, SvStorageStream* pS, ContainerRecord& rec );
- /*sal_uInt8 for sal_uInt8 Word Struct*/
sal_uInt16 nIdentifier;
sal_uInt16 nFixedAreaLen;
sal_uInt8 pBlockFlags[4];
- sal_uInt32 fUnknown1;
+ sal_uInt32 nChildrenA;
+ sal_uInt32 nNextAvailableID;
+ sal_uInt32 nBooleanProperties;
+ sal_uInt32 nGroupCnt;
+ sal_uInt32 nZoom;
- sal_uInt8 fUnknown2:1;
+ sal_uInt8 fUnknown1:1;
sal_uInt8 fEnabled:1;
sal_uInt8 fLocked:1;
sal_uInt8 fBackStyle:1;
- sal_uInt8 fUnknown3:4;
+ sal_uInt8 fUnknown2:4;
- sal_uInt8 fUnknown4:8;
+ sal_uInt8 fUnknown3:8;
- sal_uInt8 fUnknown5:7;
+ sal_uInt8 fUnknown4:7;
sal_uInt8 fWordWrap:1;
- sal_uInt8 fUnknown6:4;
+ sal_uInt8 fUnknown5:4;
sal_uInt8 fAutoSize:1;
- sal_uInt8 fUnknown7:3;
+ sal_uInt8 fUnknown6:3;
sal_uInt32 nCaptionLen;
sal_uInt16 nVertPos;
sal_uInt16 nHorzPos;
- sal_uInt8 nMousePointer;
sal_uInt32 nBorderColor;
- sal_uInt32 fUnknown8;
- sal_uInt32 fUnknown9;
+ sal_uInt32 nDrawBuffer;
+ sal_uInt32 nShapeCookie;
sal_uInt8 nKeepScrollBarsVisible;
sal_uInt8 nCycle;
- sal_uInt16 nBorderStyle;
- sal_uInt16 nSpecialEffect;
+ sal_uInt8 nBorderStyle;
+ sal_uInt8 nMousePointer;
+ sal_uInt8 nSpecialEffect;
sal_uInt16 nPicture;
sal_uInt8 nPictureAlignment;
sal_uInt8 nPictureSizeMode;
bool bPictureTiling;
sal_uInt16 nAccelerator;
sal_uInt16 nIcon;
+ sal_uInt16 fUnknown7;
char *pCaption;
sal_uInt32 nScrollWidth;
sal_uInt32 nScrollHeight;
-
+ sal_uInt32 nScrollLeft;
+ sal_uInt32 nScrollTop;
sal_uInt8 pIconHeader[20];
sal_uInt32 nIconLen;
@@ -640,253 +601,91 @@ public:
sal_uInt8 pPictureHeader[20];
sal_uInt32 nPictureLen;
- sal_uInt8 *pPicture;
private:
- sal_Int32 mnCurrentPageStep;
-};
-
+ OCX_ParentControl(); // not implemented
+ OCX_ParentControl(const OCX_ParentControl&); // not implemented
+};
-class OCX_Page : public OCX_ContainerControl
+class OCX_Page;
+class OCX_MultiPage : public OCX_ParentControl
{
public:
- OCX_Page( SotStorageRef& parentStorage,
+ OCX_MultiPage( SotStorageRef& parent,
const ::rtl::OUString& storageName,
const ::rtl::OUString& sN,
const com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer > &rDialog, OCX_Control* parent = NULL);
- virtual ~OCX_Page()
- {
- delete[] pCaption;
- delete[] pIcon;
- delete[] pPicture;
- }
+ com::sun::star::container::XNameContainer > &rDialog, OCX_Control* pParent = NULL);
+
virtual sal_Bool Read(SvStorageStream *pS);
- using OCX_ContainerControl::Import; // to not hide the other two import methods
+ using OCX_ParentControl::Import; // to not hide the other two import methods
virtual sal_Bool Import(com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer>
- &rDialog);
-/* virtual sal_Bool Import(com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet> &rPropSet);
-*/
- /*sal_uInt8 for sal_uInt8 Word Struct*/
- sal_uInt16 nIdentifier;
- sal_uInt16 nFixedAreaLen;
- sal_uInt8 pBlockFlags[4];
-
- sal_uInt32 fUnknown1;
-
- sal_uInt8 fUnknown2:1;
- sal_uInt8 fEnabled:1;
- sal_uInt8 fLocked:1;
- sal_uInt8 fBackStyle:1;
- sal_uInt8 fUnknown3:4;
-
- sal_uInt8 fUnknown4:8;
-
- sal_uInt8 fUnknown5:7;
- sal_uInt8 fWordWrap:1;
-
- sal_uInt8 fUnknown6:4;
- sal_uInt8 fAutoSize:1;
- sal_uInt8 fUnknown7:3;
-
- sal_uInt32 nCaptionLen;
- sal_uInt16 nVertPos;
- sal_uInt16 nHorzPos;
- sal_uInt8 nMousePointer;
- sal_uInt32 nBorderColor;
- sal_uInt32 fUnknown8;
- sal_uInt32 fUnknown9;
- sal_uInt8 nKeepScrollBarsVisible;
- sal_uInt8 nCycle;
- sal_uInt16 nBorderStyle;
- sal_uInt16 nSpecialEffect;
- sal_uInt16 nPicture;
- sal_uInt8 nPictureAlignment;
- sal_uInt8 nPictureSizeMode;
- bool bPictureTiling;
- sal_uInt16 nAccelerator;
- sal_uInt16 nIcon;
-
- char *pCaption;
-
- sal_uInt32 nScrollWidth;
- sal_uInt32 nScrollHeight;
+ virtual void ProcessControl( OCX_Control* pControl, SvStorageStream* pS, ContainerRecord& rec );
+private:
+ sal_Int32 nActiveTab;
+ SotStorageStreamRef mXStream;
+ bool bHasTabs;
+ std::vector< rtl::OUString > sCaptions;
+ // order of Ids corrosponds to the order of captions above
+ std::vector< sal_Int32 > mPageIds;
+ std::hash_map< sal_Int32, OCX_Page* > idToPage;
+};
- sal_uInt8 pIconHeader[20];
- sal_uInt32 nIconLen;
- sal_uInt8 *pIcon;
+class OCX_Page : public OCX_ParentControl
+{
+public:
+ OCX_Page( SotStorageRef& parentStorage,
+ sal_Int32 nID,
+ const ::rtl::OUString& sN,
+ const com::sun::star::uno::Reference<
+ com::sun::star::container::XNameContainer > &rDialog, OCX_Control* parent = NULL);
+ virtual sal_Bool Read(SvStorageStream *pS);
- sal_uInt8 pPictureHeader[20];
- sal_uInt32 nPictureLen;
- sal_uInt8 *pPicture;
+ using OCX_ParentControl::Import; // to not hide the other two import methods
+ virtual sal_Bool Import(com::sun::star::uno::Reference<
+ com::sun::star::beans::XPropertySet> &rPropSet);
+ rtl::OUString msTitle; // #FIXME we should use the existing caption
+ sal_Int32 mnID;
private:
};
-class OCX_Frame : public OCX_ContainerControl
+class OCX_Frame : public OCX_ParentControl
{
public:
OCX_Frame( SotStorageRef& parent,
- const ::rtl::OUString& storageName,
- const ::rtl::OUString& sN,
- const com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer > &rDialog, OCX_Control* pParent = NULL);
- virtual ~OCX_Frame()
- {
- delete[] pCaption;
- delete[] pIcon;
- delete[] pPicture;
- }
+ const ::rtl::OUString& storageName,
+ const ::rtl::OUString& sN,
+ const com::sun::star::uno::Reference<
+ com::sun::star::container::XNameContainer > &rDialog, OCX_Control* pParent = NULL);
virtual sal_Bool Read(SvStorageStream *pS);
- using OCX_ContainerControl::Import; // to not hide the other two import methods
+ using OCX_ParentControl::Import; // to not hide the other two import methods
virtual sal_Bool Import(com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet> &rPropSet);
-
- /*sal_uInt8 for sal_uInt8 Word Struct*/
- sal_uInt16 nIdentifier;
- sal_uInt16 nFixedAreaLen;
- sal_uInt8 pBlockFlags[4];
-
- sal_uInt32 fUnknown1;
-
- sal_uInt8 fUnknown2:1;
- sal_uInt8 fEnabled:1;
- sal_uInt8 fLocked:1;
- sal_uInt8 fBackStyle:1;
- sal_uInt8 fUnknown3:4;
-
- sal_uInt8 fUnknown4:8;
-
- sal_uInt8 fUnknown5:7;
- sal_uInt8 fWordWrap:1;
-
- sal_uInt8 fUnknown6:4;
- sal_uInt8 fAutoSize:1;
- sal_uInt8 fUnknown7:3;
-
- sal_uInt32 nCaptionLen;
- sal_uInt16 nVertPos;
- sal_uInt16 nHorzPos;
- sal_uInt8 nMousePointer;
- sal_uInt32 nBorderColor;
- sal_uInt32 fUnknown8;
- sal_uInt32 fUnknown9;
- sal_uInt8 nKeepScrollBarsVisible;
- sal_uInt8 nCycle;
- sal_uInt16 nBorderStyle;
- sal_uInt16 nSpecialEffect;
- sal_uInt16 nPicture;
- sal_uInt8 nPictureAlignment;
- sal_uInt8 nPictureSizeMode;
- bool bPictureTiling;
- sal_uInt16 nAccelerator;
- sal_uInt16 nIcon;
-
- char *pCaption;
-
- sal_uInt32 nScrollWidth;
- sal_uInt32 nScrollHeight;
- sal_uInt32 nScrollLeft;
- sal_uInt32 nScrollTop;
-
-
- sal_uInt8 pIconHeader[20];
- sal_uInt32 nIconLen;
- sal_uInt8 *pIcon;
-
- sal_uInt8 pPictureHeader[20];
- sal_uInt32 nPictureLen;
- sal_uInt8 *pPicture;
-private:
};
-class OCX_UserForm : public OCX_ContainerControl
+
+class OCX_UserForm : public OCX_ParentControl
{
public:
OCX_UserForm( SotStorageRef& parent,
- const ::rtl::OUString& storageName,
- const ::rtl::OUString& sN,
- const com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer > &rDialog,
- const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rMsf);
- ~OCX_UserForm()
- {
- delete[] pCaption;
- delete[] pIcon;
- }
-
- virtual sal_Bool Read(SvStorageStream *pS);
-
- using OCX_ContainerControl::Import; // to not hide the other two import methods
+ const ::rtl::OUString& storageName,
+ const ::rtl::OUString& sN,
+ const com::sun::star::uno::Reference<
+ com::sun::star::container::XNameContainer > &rDialog,
+ const com::sun::star::uno::Reference<
+ com::sun::star::lang::XMultiServiceFactory >& rMsf);
+ using OCX_ParentControl::Import; // to not hide the other two import methods
virtual sal_Bool Import( com::sun::star::uno::Reference<
com::sun::star::container::XNameContainer>
&rDialog);
-
- /*sal_uInt8 for sal_uInt8 Word Struct*/
- sal_uInt16 nIdentifier;
- sal_uInt16 nFixedAreaLen;
- sal_uInt8 pBlockFlags[4];
-
- sal_uInt32 nChildrenA;
-
- sal_uInt8 fUnknown1:1;
- sal_uInt8 fEnabled:1;
- sal_uInt8 fLocked:1;
- sal_uInt8 fBackStyle:1;
- sal_uInt8 fUnknown2:4;
-
- sal_uInt8 fUnknown3:8;
-
- sal_uInt8 fUnknown4:7;
- sal_uInt8 fWordWrap:1;
-
- sal_uInt8 fUnknown5:4;
- sal_uInt8 fAutoSize:1;
- sal_uInt8 fUnknown6:3;
-
- sal_uInt32 nCaptionLen;
- sal_uInt16 nVertPos;
- sal_uInt16 nHorzPos;
- sal_uInt8 nMousePointer;
- sal_uInt32 nBorderColor;
- sal_uInt32 nDrawBuffer;
- sal_uInt32 nChildrenB;
- sal_uInt8 nKeepScrollBarsVisible;
- sal_uInt8 nCycle;
- sal_uInt16 nBorderStyle;
- sal_uInt8 nSpecialEffect;
- sal_uInt16 nPicture;
- sal_uInt8 nPictureAlignment;
- sal_uInt8 nPictureSizeMode;
- bool bPictureTiling;
- sal_uInt16 nAccelerator;
- sal_uInt16 nIcon;
- sal_uInt16 fUnknown7;
-
- char *pCaption;
-
- sal_uInt32 nScrollWidth;
- sal_uInt32 nScrollHeight;
- sal_uInt32 nScrollLeft;
- sal_uInt32 nScrollTop;
-
- sal_uInt8 pIconHeader[20];
- sal_uInt32 nIconLen;
- sal_uInt8 *pIcon;
-
- sal_uInt8 pPictureHeader[20];
- sal_uInt32 nPictureLen;
- ::rtl::OUString sImageUrl;
- com::sun::star::uno::Reference< com::sun::star::graphic::XGraphicObject> mxGrfObj;
private:
- com::sun::star::uno::Reference<
- com::sun::star::uno::XComponentContext> mxCtx;
+ com::sun::star::uno::Reference<
+ com::sun::star::uno::XComponentContext> mxCtx;
};
@@ -894,9 +693,9 @@ private:
class OCX_CheckBox : public OCX_ModernControl
{
public:
- OCX_CheckBox() : OCX_ModernControl(rtl::OUString::createFromAscii("CheckBox")){
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.CheckBox");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlCheckBoxModel");
+ OCX_CheckBox() : OCX_ModernControl(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CheckBox" ))){
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CheckBox" ));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlCheckBoxModel" ));
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
aFontData.SetHasAlign(TRUE);
@@ -919,11 +718,11 @@ public:
class OCX_OptionButton : public OCX_ModernControl
{
public:
- OCX_OptionButton() : OCX_ModernControl(rtl::OUString::createFromAscii("OptionButton"))
+ OCX_OptionButton() : OCX_ModernControl(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionButton" )))
{
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.RadioButton");
- //msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlRadioButtonModel");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.form.component.RadioButton");
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.RadioButton" ));
+ //msDialogType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlRadioButtonModel"));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.RadioButton" ));
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
aFontData.SetHasAlign(TRUE);
@@ -948,9 +747,9 @@ public:
class OCX_TextBox : public OCX_ModernControl
{
public:
- OCX_TextBox() : OCX_ModernControl(rtl::OUString::createFromAscii("TextBox")) {
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.TextField");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlEditModel");
+ OCX_TextBox() : OCX_ModernControl(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextBox" ))) {
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.TextField" ));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlEditModel" ));
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
nBorderColor = 0x80000006L;
@@ -975,7 +774,7 @@ public:
class OCX_FieldControl: public OCX_ModernControl
{
public:
- OCX_FieldControl() : OCX_ModernControl(rtl::OUString::createFromAscii("TextBox")) {
+ OCX_FieldControl() : OCX_ModernControl(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextBox" ))) {
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
nBorderColor = 0x80000006L;
@@ -995,9 +794,9 @@ public:
class OCX_ToggleButton : public OCX_ModernControl
{
public:
- OCX_ToggleButton() : OCX_ModernControl(rtl::OUString::createFromAscii("ToggleButton")) {
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.CommandButton");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlButtonModel");
+ OCX_ToggleButton() : OCX_ModernControl(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ToggleButton" ))) {
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CommandButton" ));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlButtonModel" ));
mnBackColor = 0x8000000F;
mnForeColor = 0x80000012;
@@ -1022,9 +821,9 @@ public:
class OCX_ComboBox : public OCX_ModernControl
{
public:
- OCX_ComboBox() : OCX_ModernControl(rtl::OUString::createFromAscii("ComboBox")){
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.ComboBox");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.form.component.ComboBox");
+ OCX_ComboBox() : OCX_ModernControl(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ComboBox" ))){
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ComboBox" ));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ComboBox" ));
mnBackColor = 0x80000005;
mnForeColor = 0x80000008;
nBorderColor = 0x80000006;
@@ -1047,10 +846,10 @@ public:
class OCX_ListBox : public OCX_ModernControl
{
public:
- OCX_ListBox() : OCX_ModernControl(rtl::OUString::createFromAscii("ListBox")){
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.ListBox");
- //msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlListBoxModel");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.form.component.ListBox");
+ OCX_ListBox() : OCX_ModernControl(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ListBox" ))){
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ListBox" ));
+ //msDialogType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel"));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ListBox" ));
mnBackColor = 0x80000005;
mnForeColor = 0x80000008;
nBorderColor = 0x80000006;
@@ -1080,8 +879,8 @@ public:
nAccelerator(0), nIcon(0), pCaption(0), nIconLen(0), pIcon(0), nPictureLen(0),
mbTakeFocus( true )
{
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.CommandButton");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlButtonModel");
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CommandButton" ));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlButtonModel" ));
mnForeColor = 0x80000012L;
mnBackColor = 0x8000000FL;
}
@@ -1131,8 +930,6 @@ public:
sal_uInt8 pPictureHeader[20];
sal_uInt32 nPictureLen;
- ::rtl::OUString sImageUrl;
- com::sun::star::uno::Reference< com::sun::star::graphic::XGraphicObject> mxGrfObj;
bool mbTakeFocus;
@@ -1189,15 +986,15 @@ public:
class OCX_Label : public OCX_Control
{
public:
- OCX_Label(OCX_Control* pParent = NULL ) : OCX_Control(rtl::OUString::createFromAscii("Label"), pParent ), fEnabled(1),
+ OCX_Label(OCX_Control* pParent = NULL ) : OCX_Control(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" )), pParent ), fEnabled(1),
fLocked(0),fBackStyle(1),fWordWrap(1),
fAutoSize(0),nCaptionLen(0),nVertPos(1),nHorzPos(7),nMousePointer(0),
nBorderColor(0x80000006),nBorderStyle(0),nSpecialEffect(0),
nPicture(0),nAccelerator(0),nIcon(0),pCaption(0),nIconLen(0),pIcon(0),
- nPictureLen(0),pPicture(0)
+ nPictureLen(0)
{
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.FixedText");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFixedTextModel");
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FixedText" ));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedTextModel" ));
mnForeColor = 0x80000008;
mnBackColor = 0x80000005;
aFontData.SetHasAlign(TRUE);
@@ -1206,7 +1003,6 @@ public:
~OCX_Label() {
if (pCaption) delete[] pCaption;
if (pIcon) delete[] pIcon;
- if (pPicture) delete[] pPicture;
}
sal_Bool Read(SotStorageStream *pS);
@@ -1250,7 +1046,6 @@ public:
sal_uInt8 pPictureHeader[20];
sal_uInt32 nPictureLen;
- sal_uInt8 *pPicture;
static OCX_Control *Create() { return new OCX_Label;}
@@ -1386,9 +1181,9 @@ public:
class HTML_TextBox : public OCX_ModernControl
{
public:
- HTML_TextBox() : OCX_ModernControl(rtl::OUString::createFromAscii("TextBox")) {
- msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.TextField");
- msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlEditModel");
+ HTML_TextBox() : OCX_ModernControl(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextBox" ))) {
+ msFormType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.TextField" ));
+ msDialogType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlEditModel" ));
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
nBorderColor = 0x80000006L;
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index c443f169e586..1bdf54fbb774 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -454,7 +454,7 @@ public:
SdrEscherImport( PowerPointImportParam&, const String& rBaseURL );
virtual ~SdrEscherImport();
- virtual FASTBOOL GetColorFromPalette( USHORT nNum, Color& rColor ) const;
+ virtual bool GetColorFromPalette( USHORT nNum, Color& rColor ) const;
virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
PptFontEntityAtom* GetFontEnityAtom( UINT32 nNum ) const;
CharSet GetCharSet( UINT32 nNum ) const;
@@ -598,7 +598,7 @@ public:
USHORT GetMasterPageIndex( USHORT nPageNum, PptPageKind ePageKind = PPT_SLIDEPAGE ) const;
void ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist = NULL );
- virtual FASTBOOL GetColorFromPalette(USHORT nNum, Color& rColor) const;
+ virtual bool GetColorFromPalette(USHORT nNum, Color& rColor) const;
virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
sal_Unicode PPTSubstitute( UINT16 nFont, sal_Unicode nChar,
UINT32& nMappedFontId, Font& rFont, char nDefault ) const;
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index 2653366a5b38..29cc0cc5d321 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -156,7 +156,7 @@ void BaseContainer::impl_initFlushMode()
m_pFlushCache = m_rCache->clone();
if (!m_pFlushCache)
throw css::uno::RuntimeException(
- ::rtl::OUString::createFromAscii("Cant create write copy of internal used cache on demand."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant create write copy of internal used cache on demand." )),
dynamic_cast< css::container::XNameAccess* >(this));
// <- SAFE
}
@@ -231,7 +231,7 @@ void SAL_CALL BaseContainer::insertByName(const ::rtl::OUString& sItem ,
{
if (!sItem.getLength())
throw css::lang::IllegalArgumentException(
- ::rtl::OUString::createFromAscii("empty value not allowed as item name."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "empty value not allowed as item name." )),
static_cast< css::container::XNameContainer* >(this),
1);
@@ -297,7 +297,7 @@ void SAL_CALL BaseContainer::replaceByName(const ::rtl::OUString& sItem ,
{
if (!sItem.getLength())
throw css::lang::IllegalArgumentException(
- ::rtl::OUString::createFromAscii("empty value not allowed as item name."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "empty value not allowed as item name." )),
static_cast< css::container::XNameContainer* >(this),
1);
@@ -338,7 +338,7 @@ css::uno::Any SAL_CALL BaseContainer::getByName(const ::rtl::OUString& sItem)
{
if (!sItem.getLength())
throw css::container::NoSuchElementException(
- ::rtl::OUString::createFromAscii("An empty item cant be part of this cache!"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "An empty item cant be part of this cache!" )),
css::uno::Reference< css::uno::XInterface >(static_cast< css::container::XNameAccess* >(this), css::uno::UNO_QUERY));
css::uno::Any aValue;
@@ -543,7 +543,7 @@ void SAL_CALL BaseContainer::flush()
if (!m_pFlushCache)
throw css::lang::WrappedTargetRuntimeException(
- ::rtl::OUString::createFromAscii("Cant guarantee cache consistency. Special flush container does not exists!"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant guarantee cache consistency. Special flush container does not exists!" )),
dynamic_cast< css::container::XNameAccess* >(this),
css::uno::Any());
@@ -566,7 +566,7 @@ void SAL_CALL BaseContainer::flush()
// later again ...
throw css::lang::WrappedTargetRuntimeException(
- ::rtl::OUString::createFromAscii("Flush rejected by internal container."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Flush rejected by internal container." )),
dynamic_cast< css::container::XNameAccess* >(this),
css::uno::makeAny(ex));
}
diff --git a/filter/source/config/cache/configflush.cxx b/filter/source/config/cache/configflush.cxx
index 426d3495d3c8..b675cee4312b 100644
--- a/filter/source/config/cache/configflush.cxx
+++ b/filter/source/config/cache/configflush.cxx
@@ -146,7 +146,7 @@ void SAL_CALL ConfigFlush::removeRefreshListener(const css::uno::Reference< css:
//-----------------------------------------------
::rtl::OUString ConfigFlush::impl_getImplementationName()
{
- static ::rtl::OUString IMPLNAME = ::rtl::OUString::createFromAscii("com.sun.star.comp.filter.config.ConfigFlush");
+ static ::rtl::OUString IMPLNAME( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.filter.config.ConfigFlush" ));
return IMPLNAME;
}
diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx
index 7e9bf1a4356d..c842df864f7a 100644
--- a/filter/source/config/cache/contenthandlerfactory.cxx
+++ b/filter/source/config/cache/contenthandlerfactory.cxx
@@ -176,7 +176,7 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL ContentHandlerFactory::getAvailab
-----------------------------------------------*/
::rtl::OUString ContentHandlerFactory::impl_getImplementationName()
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.filter.config.ContentHandlerFactory");
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.filter.config.ContentHandlerFactory" ));
}
/*-----------------------------------------------
@@ -185,7 +185,7 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL ContentHandlerFactory::getAvailab
css::uno::Sequence< ::rtl::OUString > ContentHandlerFactory::impl_getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > lServiceNames(1);
- lServiceNames[0] = ::rtl::OUString::createFromAscii("com.sun.star.frame.ContentHandlerFactory");
+ lServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ContentHandlerFactory" ));
return lServiceNames;
}
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index 31e7690cd0e1..b9688063a486 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -77,7 +77,7 @@ namespace css = ::com::sun::star;
// Error message in case filter config seems to be corrupted.
// Note: Dont tell user something about "setup -repair"!
// Its no longer supported by using native installers ...
-static ::rtl::OUString MESSAGE_CORRUPTED_FILTERCONFIG = ::rtl::OUString::createFromAscii("The filter configuration appears to be defective. Please install the office suite again.");
+static ::rtl::OUString MESSAGE_CORRUPTED_FILTERCONFIG( RTL_CONSTASCII_USTRINGPARAM( "The filter configuration appears to be defective. Please install the office suite again." ));
/*-----------------------------------------------
15.03.2004 08:59
@@ -550,14 +550,14 @@ void FilterCache::addStatePropsToItem( EItemType eType,
{
case E_TYPE :
{
- xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY);
+ xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
xPackage->getByName(CFGSET_TYPES) >>= xSet;
}
break;
case E_FILTER :
{
- xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY);
+ xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW);
xPackage->getByName(CFGSET_FILTERS) >>= xSet;
}
break;
@@ -585,14 +585,14 @@ void FilterCache::addStatePropsToItem( EItemType eType,
}
/* <-- HACK */
- xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY);
+ xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW);
xPackage->getByName(CFGSET_FRAMELOADERS) >>= xSet;
}
break;
case E_CONTENTHANDLER :
{
- xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY);
+ xPackage = css::uno::Reference< css::container::XNameAccess >(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW);
xPackage->getByName(CFGSET_CONTENTHANDLERS) >>= xSet;
}
break;
@@ -658,7 +658,7 @@ void FilterCache::flush()
if (m_lChangedTypes.size() > 0)
{
- css::uno::Reference< css::container::XNameAccess > xConfig(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY);
+ css::uno::Reference< css::container::XNameAccess > xConfig(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNameAccess > xSet ;
xConfig->getByName(CFGSET_TYPES) >>= xSet;
@@ -670,7 +670,7 @@ void FilterCache::flush()
if (m_lChangedFilters.size() > 0)
{
- css::uno::Reference< css::container::XNameAccess > xConfig(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY);
+ css::uno::Reference< css::container::XNameAccess > xConfig(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNameAccess > xSet ;
xConfig->getByName(CFGSET_FILTERS) >>= xSet;
@@ -717,7 +717,7 @@ void FilterCache::impl_flushByList(const css::uno::Reference< css::container::XN
// special case. no exception - but not a valid item => set must be finalized or mandatory!
// Reject flush operation by throwing an exception. At least one item couldnt be flushed.
if (!xItem.is())
- throw css::uno::Exception(::rtl::OUString::createFromAscii("Cant add item. Set is finalized or mandatory!"),
+ throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant add item. Set is finalized or mandatory!" )),
css::uno::Reference< css::uno::XInterface >() );
CacheItemList::const_iterator pItem = rCache.find(sItem);
@@ -734,7 +734,7 @@ void FilterCache::impl_flushByList(const css::uno::Reference< css::container::XN
// special case. no exception - but not a valid item => it must be finalized or mandatory!
// Reject flush operation by throwing an exception. At least one item couldnt be flushed.
if (!xItem.is())
- throw css::uno::Exception(::rtl::OUString::createFromAscii("Cant change item. Its finalized or mandatory!"),
+ throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant change item. Its finalized or mandatory!" )),
css::uno::Reference< css::uno::XInterface >() );
CacheItemList::const_iterator pItem = rCache.find(sItem);
@@ -831,7 +831,7 @@ CacheItemList& FilterCache::impl_getItemList(EItemType eType) const
case E_CONTENTHANDLER : return m_lContentHandlers;
case E_DETECTSERVICE : return m_lDetectServices ;
- default : throw css::uno::Exception(::rtl::OUString::createFromAscii("unknown sub container requested."),
+ default : throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown sub container requested." )),
css::uno::Reference< css::uno::XInterface >() );
}
@@ -901,7 +901,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
}
break;
- default : throw css::uno::Exception(::rtl::OUString::createFromAscii("These configuration node isnt supported here for open!"), 0);
+ default : throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "These configuration node isnt supported here for open!" )), 0);
}
{
@@ -1072,7 +1072,7 @@ void FilterCache::impl_validateAndOptimize()
throw css::document::CorruptedFilterConfigurationException(
MESSAGE_CORRUPTED_FILTERCONFIG,
css::uno::Reference< css::uno::XInterface >(),
- ::rtl::OUString::createFromAscii("The list of types or filters is empty."));
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The list of types or filters is empty." )));
}
// Create a log for all detected problems, which
@@ -1372,7 +1372,7 @@ void FilterCache::impl_addItem2FlushList( EItemType eType,
pList = &m_lChangedDetectServices;
break;
- default : throw css::uno::Exception(::rtl::OUString::createFromAscii("unsupported item type"), 0);
+ default : throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unsupported item type" )), 0);
}
OUStringList::const_iterator pItem = ::std::find(pList->begin(), pList->end(), sItem);
@@ -1453,7 +1453,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// Attention! If config couldnt be opened successfully
// and exception os thrown automaticly and must be forwarded
// to our calli ...
- css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY);
+ css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
{
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load std");
impl_loadSet(xTypes, E_TYPE, E_READ_STANDARD, &m_lTypes);
@@ -1470,7 +1470,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// Attention! If config couldnt be opened successfully
// and exception os thrown automaticly and must be forwarded
// to our calli ...
- css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY);
+ css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
{
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load all types");
impl_loadSet(xTypes, E_TYPE, E_READ_UPDATE, &m_lTypes);
@@ -1487,7 +1487,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// Attention! If config couldnt be opened successfully
// and exception os thrown automaticly and must be forwarded
// to our calli ...
- css::uno::Reference< css::container::XNameAccess > xFilters(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY);
+ css::uno::Reference< css::container::XNameAccess > xFilters(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW);
{
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load all filters");
impl_loadSet(xFilters, E_FILTER, E_READ_ALL, &m_lFilters);
@@ -1504,7 +1504,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// Attention! If config couldnt be opened successfully
// and exception os thrown automaticly and must be forwarded
// to our calli ...
- css::uno::Reference< css::container::XNameAccess > xLoaders(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY);
+ css::uno::Reference< css::container::XNameAccess > xLoaders(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW);
{
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load all frame loader");
impl_loadSet(xLoaders, E_FRAMELOADER, E_READ_ALL, &m_lFrameLoaders);
@@ -1521,7 +1521,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// Attention! If config couldnt be opened successfully
// and exception os thrown automaticly and must be forwarded
// to our calli ...
- css::uno::Reference< css::container::XNameAccess > xHandlers(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY);
+ css::uno::Reference< css::container::XNameAccess > xHandlers(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW);
{
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load all content handler");
impl_loadSet(xHandlers, E_CONTENTHANDLER, E_READ_ALL, &m_lContentHandlers);
@@ -1666,8 +1666,8 @@ void FilterCache::impl_readPatchUINames(const css::uno::Reference< css::containe
CacheItem& rItem)
throw(css::uno::Exception)
{
- static ::rtl::OUString FORMATNAME_VAR = ::rtl::OUString::createFromAscii("%productname%" );
- static ::rtl::OUString FORMATVERSION_VAR = ::rtl::OUString::createFromAscii("%formatversion%");
+ static ::rtl::OUString FORMATNAME_VAR( RTL_CONSTASCII_USTRINGPARAM( "%productname%" ));
+ static ::rtl::OUString FORMATVERSION_VAR( RTL_CONSTASCII_USTRINGPARAM( "%formatversion%" ));
// SAFE -> ----------------------------------
::osl::ResettableMutexGuard aLock(m_aLock);
@@ -2348,8 +2348,8 @@ void FilterCache::impl_interpretDataVal4Filter(const ::rtl::OUString& sValue,
void FilterCache::impl_readOldFormat()
throw(css::uno::Exception)
{
- static ::rtl::OUString TYPES_SET = ::rtl::OUString::createFromAscii("Types" );
- static ::rtl::OUString FILTER_SET = ::rtl::OUString::createFromAscii("Filters");
+ static ::rtl::OUString TYPES_SET( RTL_CONSTASCII_USTRINGPARAM( "Types" ));
+ static ::rtl::OUString FILTER_SET( RTL_CONSTASCII_USTRINGPARAM( "Filters" ));
// Attention: Opening/Reading of this old configuration format has to be handled gracefully.
// Its optional and shouldnt disturb our normal work!
@@ -2403,7 +2403,7 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe
xSet->getByName(sItem) >>= xItem;
if (!xItem.is())
throw css::uno::Exception(
- ::rtl::OUString::createFromAscii("Cant read old item."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant read old item." )),
css::uno::Reference< css::uno::XInterface >());
CacheItem aItem;
@@ -2418,7 +2418,7 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe
// Data
::rtl::OUString sData;
OUStringList lData;
- xItem->getByName(::rtl::OUString::createFromAscii("Data")) >>= sData;
+ xItem->getByName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Data" ))) >>= sData;
lData = impl_tokenizeString(sData, (sal_Unicode)',');
if (
(!sData.getLength()) ||
@@ -2426,7 +2426,7 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe
)
{
throw css::uno::Exception(
- ::rtl::OUString::createFromAscii("Cant read old item property DATA."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant read old item property DATA." )),
css::uno::Reference< css::uno::XInterface >());
}
@@ -2522,7 +2522,7 @@ sal_Bool FilterCache::impl_isModuleInstalled(const ::rtl::OUString& sModule)
m_xModuleCfg = css::uno::Reference< css::container::XNameAccess >(
::comphelper::ConfigurationHelper::openConfig(
m_xSMGR,
- ::rtl::OUString::createFromAscii("org.openoffice.Setup/Office/Factories"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office/Factories" )),
::comphelper::ConfigurationHelper::E_READONLY),
css::uno::UNO_QUERY_THROW);
}
diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx
index 9ce090ba4a9e..155bb5e79fc2 100644
--- a/filter/source/config/cache/filterfactory.cxx
+++ b/filter/source/config/cache/filterfactory.cxx
@@ -84,17 +84,17 @@ namespace css = ::com::sun::star;
#define SEPERATOR_QUERYPARAM ((sal_Unicode)':')
#define SEPERATOR_QUERYPARAMVALUE ((sal_Unicode)'=')
-#define QUERYPARAM_IFLAGS ::rtl::OUString::createFromAscii("iflags")
-#define QUERYPARAM_EFLAGS ::rtl::OUString::createFromAscii("eflags")
-#define QUERYPARAM_SORT_PROP ::rtl::OUString::createFromAscii("sort_prop")
+#define QUERYPARAM_IFLAGS ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "iflags" ))
+#define QUERYPARAM_EFLAGS ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "eflags" ))
+#define QUERYPARAM_SORT_PROP ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "sort_prop" ))
-#define QUERYPARAM_DESCENDING ::rtl::OUString::createFromAscii("descending")
-#define QUERYPARAM_USE_ORDER ::rtl::OUString::createFromAscii("use_order")
-#define QUERYPARAM_DEFAULT_FIRST ::rtl::OUString::createFromAscii("default_first")
-#define QUERYPARAM_CASE_SENSITIVE ::rtl::OUString::createFromAscii("case_sensitive")
+#define QUERYPARAM_DESCENDING ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "descending" ))
+#define QUERYPARAM_USE_ORDER ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "use_order" ))
+#define QUERYPARAM_DEFAULT_FIRST ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "default_first" ))
+#define QUERYPARAM_CASE_SENSITIVE ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "case_sensitive" ))
-#define QUERYPARAMVALUE_SORT_PROP_NAME ::rtl::OUString::createFromAscii("name")
-#define QUERYPARAMVALUE_SORT_PROP_UINAME ::rtl::OUString::createFromAscii("uiname")
+#define QUERYPARAMVALUE_SORT_PROP_NAME ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "name" ))
+#define QUERYPARAMVALUE_SORT_PROP_UINAME ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "uiname" ))
/*-----------------------------------------------
09.07.2003 07:43
@@ -249,7 +249,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL FilterFactory::crea
// convert "_query_xxx:..." to "getByDocService=xxx:..."
::rtl::OUString sNewQuery(sQuery);
- sal_Int32 pos = sNewQuery.indexOf(::rtl::OUString::createFromAscii("_query_"),0);
+ sal_Int32 pos = sNewQuery.indexOf(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_query_" )),0);
if (pos != -1)
{
OSL_ENSURE(sal_False, "DEPRECATED!\nPlease use new query format: 'matchByDocumentService=...'");
@@ -301,7 +301,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL FilterFactory::crea
//-------------------------------------------
// 1) getDefaultFilterForType=<internal_typename>
- pIt = lTokens.find(::rtl::OUString::createFromAscii("getDefaultFilterForType"));
+ pIt = lTokens.find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getDefaultFilterForType")));
if (pIt != lTokens.end())
{
// SAFE ->
@@ -354,43 +354,43 @@ OUStringList FilterFactory::impl_queryMatchByDocumentService(const QueryTokenize
if (sDocumentService.equalsAscii("writer"))
{
OSL_ENSURE(sal_False, "DEPRECATED!\nPlease use right document service for filter query!");
- sDocumentService = ::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument");
+ sDocumentService = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ));
}
else
if (sDocumentService.equalsAscii("web"))
{
OSL_ENSURE(sal_False, "DEPRECATED!\nPlease use right document service for filter query!");
- sDocumentService = ::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument");
+ sDocumentService = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.WebDocument" ));
}
else
if (sDocumentService.equalsAscii("global"))
{
OSL_ENSURE(sal_False, "DEPRECATED!\nPlease use right document service for filter query!");
- sDocumentService = ::rtl::OUString::createFromAscii("com.sun.star.text.GlobalDocument");
+ sDocumentService = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.GlobalDocument" ));
}
else
if (sDocumentService.equalsAscii("calc"))
{
OSL_ENSURE(sal_False, "DEPRECATED!\nPlease use right document service for filter query!");
- sDocumentService = ::rtl::OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument");
+ sDocumentService = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ));
}
else
if (sDocumentService.equalsAscii("draw"))
{
OSL_ENSURE(sal_False, "DEPRECATED!\nPlease use right document service for filter query!");
- sDocumentService = ::rtl::OUString::createFromAscii("com.sun.star.drawing.DrawingDocument");
+ sDocumentService = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" ));
}
else
if (sDocumentService.equalsAscii("impress"))
{
OSL_ENSURE(sal_False, "DEPRECATED!\nPlease use right document service for filter query!");
- sDocumentService = ::rtl::OUString::createFromAscii("com.sun.star.presentation.PresentationDocument");
+ sDocumentService = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ));
}
else
if (sDocumentService.equalsAscii("math"))
{
OSL_ENSURE(sal_False, "DEPRECATED!\nPlease use right document service for filter query!");
- sDocumentService = ::rtl::OUString::createFromAscii("com.sun.star.formula.FormulaProperties");
+ sDocumentService = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.formula.FormulaProperties" ));
}
#endif
@@ -699,7 +699,7 @@ OUStringList FilterFactory::impl_readSortedFilterListFromConfig(const ::rtl::OUS
-----------------------------------------------*/
::rtl::OUString FilterFactory::impl_getImplementationName()
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.filter.config.FilterFactory");
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.filter.config.FilterFactory" ));
}
/*-----------------------------------------------
@@ -708,7 +708,7 @@ OUStringList FilterFactory::impl_readSortedFilterListFromConfig(const ::rtl::OUS
css::uno::Sequence< ::rtl::OUString > FilterFactory::impl_getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > lServiceNames(1);
- lServiceNames[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.FilterFactory");
+ lServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ));
return lServiceNames;
}
diff --git a/filter/source/config/cache/frameloaderfactory.cxx b/filter/source/config/cache/frameloaderfactory.cxx
index 075b721b29b3..822d826d52bf 100644
--- a/filter/source/config/cache/frameloaderfactory.cxx
+++ b/filter/source/config/cache/frameloaderfactory.cxx
@@ -173,7 +173,7 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL FrameLoaderFactory::getAvailableS
-----------------------------------------------*/
::rtl::OUString FrameLoaderFactory::impl_getImplementationName()
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.filter.config.FrameLoaderFactory");
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.filter.config.FrameLoaderFactory" ));
}
/*-----------------------------------------------
@@ -182,7 +182,7 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL FrameLoaderFactory::getAvailableS
css::uno::Sequence< ::rtl::OUString > FrameLoaderFactory::impl_getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > lServiceNames(1);
- lServiceNames[0] = ::rtl::OUString::createFromAscii("com.sun.star.frame.FrameLoaderFactory");
+ lServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.FrameLoaderFactory" ));
return lServiceNames;
}
diff --git a/filter/source/config/cache/lateinitlistener.cxx b/filter/source/config/cache/lateinitlistener.cxx
index 0ac452760de8..5c022a0a0b41 100644
--- a/filter/source/config/cache/lateinitlistener.cxx
+++ b/filter/source/config/cache/lateinitlistener.cxx
@@ -60,8 +60,8 @@ LateInitListener::LateInitListener(const css::uno::Reference< css::lang::XMultiS
osl_incrementInterlockedCount( &m_refCount );
m_xBroadcaster = css::uno::Reference< css::document::XEventBroadcaster >(
- m_xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.GlobalEventBroadcaster")),
- css::uno::UNO_QUERY);
+ m_xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.GlobalEventBroadcaster" ))),
+ css::uno::UNO_QUERY_THROW);
m_xBroadcaster->addEventListener(static_cast< css::document::XEventListener* >(this));
diff --git a/filter/source/config/cache/lateinitthread.cxx b/filter/source/config/cache/lateinitthread.cxx
index 14309ca27f55..0812e3f280b3 100644
--- a/filter/source/config/cache/lateinitthread.cxx
+++ b/filter/source/config/cache/lateinitthread.cxx
@@ -77,6 +77,11 @@ void SAL_CALL LateInitThread::run()
rCache->load(FilterCache::E_CONTAINS_ALL, sal_True);
}
+void SAL_CALL LateInitThread::onTerminated()
+{
+ delete this;
+}
+
} // namespace config
} // namespace filter
diff --git a/filter/source/config/cache/lateinitthread.hxx b/filter/source/config/cache/lateinitthread.hxx
index c4162d2ef3ea..98c59b00972b 100644
--- a/filter/source/config/cache/lateinitthread.hxx
+++ b/filter/source/config/cache/lateinitthread.hxx
@@ -82,6 +82,8 @@ class LateInitThread : public ::osl::Thread
/** @short thread function.
*/
virtual void SAL_CALL run();
+
+ virtual void SAL_CALL onTerminated();
};
} // namespace config
diff --git a/filter/source/config/cache/registration.hxx b/filter/source/config/cache/registration.hxx
index fda49155492c..2c1ff3f79c0c 100644
--- a/filter/source/config/cache/registration.hxx
+++ b/filter/source/config/cache/registration.hxx
@@ -67,7 +67,7 @@ namespace comphelper{
MyClass::st_getServNames())
b) _COMPHELPER_COMPONENTINFO( MyClass,
- ::rtl::OUString::createFromAscii("css.MyClass"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "css.MyClass" )),
lServiceNames)
@param CLASS
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 0b28ee823ada..53ad148dd827 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -140,7 +140,7 @@ TypeDetection::~TypeDetection()
::rtl::OUString sURL = stlDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_URL(), ::rtl::OUString());
#if OSL_DEBUG_LEVEL > 0
- if (stlDescriptor.find(::rtl::OUString::createFromAscii("FileName")) != stlDescriptor.end())
+ if (stlDescriptor.find(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FileName" ))) != stlDescriptor.end())
OSL_ENSURE(sal_False, "Detect using of deprecated and already unsupported MediaDescriptor property \"FileName\"!");
#endif
@@ -266,7 +266,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(::comphelper::MediaDescrip
)
)
{
- sRealType = ::rtl::OUString::createFromAscii("calc_Text_txt_csv_StarCalc");
+ sRealType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "calc_Text_txt_csv_StarCalc" ));
}
else
if (
@@ -274,7 +274,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(::comphelper::MediaDescrip
(sRealType.equalsAscii("calc_Text_txt_csv_StarCalc" ))
)
{
- sRealType = ::rtl::OUString::createFromAscii("writer_Text");
+ sRealType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "writer_Text" ));
}
#endif // WORKAROUND_CSV_TXT_BUG_i60158
@@ -1230,7 +1230,7 @@ sal_Bool TypeDetection::impl_validateAndSetFilterOnDescriptor( ::comphelper
-----------------------------------------------*/
::rtl::OUString TypeDetection::impl_getImplementationName()
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.filter.config.TypeDetection");
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.filter.config.TypeDetection" ));
}
/*-----------------------------------------------
@@ -1239,7 +1239,7 @@ sal_Bool TypeDetection::impl_validateAndSetFilterOnDescriptor( ::comphelper
css::uno::Sequence< ::rtl::OUString > TypeDetection::impl_getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > lServiceNames(1);
- lServiceNames[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.TypeDetection");
+ lServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ));
return lServiceNames;
}
diff --git a/filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu b/filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu
index 7fdcbd702a54..138d449fcd24 100644
--- a/filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu
+++ b/filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu
@@ -1,5 +1,5 @@
<node oor:name="Impress MS PowerPoint 2007 XML" oor:op="replace">
- <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
+ <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"><value>com.sun.star.comp.Impress.oox.PowerPointImport</value></prop>
<prop oor:name="UserData"/>
diff --git a/filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu b/filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
index 28b9ea8b09f6..eb9fea60875c 100644
--- a/filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
+++ b/filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
@@ -1,5 +1,5 @@
<node oor:name="Impress MS PowerPoint 2007 XML Template" oor:op="replace">
- <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER TEMPLATE TEMPLATEPATH PREFERRED</value></prop>
+ <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER TEMPLATE TEMPLATEPATH PREFERRED</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"><value>com.sun.star.comp.Impress.oox.PowerPointImport</value></prop>
<prop oor:name="UserData"/>
diff --git a/filter/source/config/fragments/makefile.mk b/filter/source/config/fragments/makefile.mk
index d827b3496359..c97818bfdb97 100644
--- a/filter/source/config/fragments/makefile.mk
+++ b/filter/source/config/fragments/makefile.mk
@@ -182,7 +182,7 @@ $(ALL_FLAGS) : $(INCLUDE_FRAGMENTS)
.IF "$(SOLAR_JAVA)"==""
#cmc, hack to workaround the java build requirement
.IF "$(SYSTEM_PYTHON)" == "YES"
-MERGE:=python ../tools/merge/pyAltFCFGMerge
+MERGE:=$(PYTHON) ../tools/merge/pyAltFCFGMerge
.ELSE
MERGE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/python ../tools/merge/pyAltFCFGMerge
.ENDIF
diff --git a/filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu b/filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu
index 99f22ee47e7a..1cc12bf44b86 100644
--- a/filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu
+++ b/filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu
@@ -1,7 +1,7 @@
<node oor:name="MS PowerPoint 2007 XML" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>pptm pptx</value></prop>
+ <prop oor:name="Extensions"><value>pptx pptm</value></prop>
<prop oor:name="MediaType"/>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>Impress MS PowerPoint 2007 XML</value></prop>
diff --git a/filter/source/filtertracer/filtertracer.cxx b/filter/source/filtertracer/filtertracer.cxx
index 78bae8efe8f1..eb6ac53edfef 100644
--- a/filter/source/filtertracer/filtertracer.cxx
+++ b/filter/source/filtertracer/filtertracer.cxx
@@ -62,7 +62,7 @@ FilterTracer::FilterTracer( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr
mpStream ( NULL ),
mnLogLevel ( NMSP_LOGGING::LogLevel::ALL )
{
- REF( NMSP_UNO::XInterface ) xObj( rxMgr->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.util.TextSearch" ) ) );
+ REF( NMSP_UNO::XInterface ) xObj( rxMgr->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.TextSearch" )) ) );
mxTextSearch = REF( NMSP_UTIL::XTextSearch )( xObj, ::com::sun::star::uno::UNO_QUERY );
}
FilterTracer::~FilterTracer()
diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index 40b0295c391f..c412e5463525 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -155,8 +155,6 @@ class FlashExportFilter : public cppu::WeakImplHelper4
Reference< XMultiServiceFactory > mxMSF;
Reference< XStatusIndicator> mxStatusIndicator;
- osl::File* mpFile;
-
public:
FlashExportFilter( const Reference< XMultiServiceFactory > &rxMSF);
@@ -276,7 +274,7 @@ sal_Bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue
if(!xDrawPages.is())
return sal_False;
- Reference< XDesktop > rDesktop( mxMSF->createInstance(OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY);
+ Reference< XDesktop > rDesktop( mxMSF->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY);
if (!rDesktop.is())
return sal_False;
diff --git a/filter/source/flash/swfuno.cxx b/filter/source/flash/swfuno.cxx
index 875031bc8611..22f33980a898 100644
--- a/filter/source/flash/swfuno.cxx
+++ b/filter/source/flash/swfuno.cxx
@@ -80,12 +80,12 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
{
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( FlashExportFilter_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
singlecomponent_writeInfo( xNewKey, FlashExportFilter_getSupportedServiceNames() );
xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SWFDialog_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
singlecomponent_writeInfo( xNewKey, SWFDialog_getSupportedServiceNames() );
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index ae09da181e18..5e68fc04fb4b 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -2121,7 +2121,7 @@ Reference < XBreakIterator > Writer::Impl_GetBreakIterator()
if ( !mxBreakIterator.is() )
{
Reference< XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- mxBreakIterator.set( xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ), UNO_QUERY );
+ mxBreakIterator.set( xMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.BreakIterator" )) ), UNO_QUERY );
}
return mxBreakIterator;
}
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index 8ea437c45f12..ce0d5f191238 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -130,11 +130,11 @@ void CGMImpressOutAct::ImplSetOrientation( FloatPoint& rRefPoint, double& rOrien
{
uno::Any aAny;
aAny <<= (sal_Int32)rRefPoint.X;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointX"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointX" )), aAny );
aAny <<= (sal_Int32)rRefPoint.Y;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointY"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointY" )), aAny );
aAny <<= (sal_Int32)( rOrientation * 100.0 );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotateAngle"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" )), aAny );
}
// ---------------------------------------------------------------
@@ -162,10 +162,10 @@ void CGMImpressOutAct::ImplSetLineBundle()
fLineWidth = mpCGM->pElement->aLineBundle.nLineWidth;
aAny <<= (sal_Int32)nLineColor;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny );
aAny <<= (sal_Int32)fLineWidth;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny );
switch( eLineType )
{
@@ -186,12 +186,12 @@ void CGMImpressOutAct::ImplSetLineBundle()
break;
}
aAny <<= eLS;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineStyle"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" )), aAny );
if ( eLS == drawing::LineStyle_DASH )
{
drawing::LineDash aLineDash( drawing::DashStyle_RECTRELATIVE, 1, 50, 3, 33, 100 );
aAny <<= aLineDash;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineDash"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineDash" )), aAny );
}
};
@@ -249,7 +249,7 @@ void CGMImpressOutAct::ImplSetFillBundle()
nPatternIndex = mpCGM->pElement->aFillBundle.nFillPatternIndex;
aAny <<= (sal_Int32)nFillColor;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillColor"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillColor" )), aAny );
switch ( eFillStyle )
{
@@ -297,27 +297,27 @@ void CGMImpressOutAct::ImplSetFillBundle()
if ( eFS == drawing::FillStyle_GRADIENT )
{
aAny <<= *mpGradient;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillGradient"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillGradient" )), aAny );
}
aAny <<= eFS;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), aAny );
eLS = drawing::LineStyle_NONE;
if ( eFillStyle == FIS_HOLLOW )
{
eLS = drawing::LineStyle_SOLID;
aAny <<= (sal_Int32)nFillColor;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny );
aAny <<= (sal_Int32)0;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny );
}
else if ( eEdgeType != ET_NONE )
{
aAny <<= (sal_Int32)nEdgeColor;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny );
aAny <<= (sal_Int32)fEdgeWidth;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny );
switch( eEdgeType )
{
@@ -346,7 +346,7 @@ void CGMImpressOutAct::ImplSetFillBundle()
}
aAny <<= eLS;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineStyle"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" )), aAny );
if ( eFS == drawing::FillStyle_HATCH )
{
@@ -375,7 +375,7 @@ void CGMImpressOutAct::ImplSetFillBundle()
aHatch.Angle = 15 * ( ( nHatchIndex & 0x1f ) - 5 );
}
aAny <<= aHatch;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillHatch"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillHatch" )), aAny );
}
};
@@ -412,7 +412,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty
nTextColor = mpCGM->pElement->aTextBundle.GetColor();
aAny <<= (sal_Int32)nTextColor;
- rProperty->setPropertyValue( rtl::OUString::createFromAscii("CharColor"), aAny );
+ rProperty->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" )), aAny );
sal_uInt32 nFontType = 0;
awt::FontDescriptor aFontDescriptor;
@@ -435,7 +435,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty
aFontDescriptor.Underline = awt::FontUnderline::SINGLE;
}
aAny <<= aFontDescriptor;
- rProperty->setPropertyValue( rtl::OUString::createFromAscii("FontDescriptor"), aAny );
+ rProperty->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" )), aAny );
};
// ---------------------------------------------------------------
@@ -485,7 +485,7 @@ void CGMImpressOutAct::EndGroup()
uno::Reference< drawing::XShapes > aXShapes;
// if ( maXServiceManagerSC->createInstance( L"stardiv.one.drawing.ShapeCollection" )->queryInterface( ::getCppuType((const Reference< drawing::XShapes >*)0), aXShapes ) )
- uno::Reference< drawing::XShape > aXShapeCollection( maXServiceManagerSC->createInstance( rtl::OUString::createFromAscii("com.sun.star.drawing.ShapeCollection") ), uno::UNO_QUERY );
+ uno::Reference< drawing::XShape > aXShapeCollection( maXServiceManagerSC->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.ShapeCollection" )) ), uno::UNO_QUERY );
if ( aXShapeCollection.is() )
{
aXShapes = uno::Reference< drawing::XShapes >( aXShapeCollection, uno::UNO_QUERY );
@@ -523,7 +523,7 @@ void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect )
{
if ( mnGroupActCount != ( mpCGM->mnActCount - 1 ) ) // POWERPOINT HACK !!!
{
- if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.RectangleShape") ) )
+ if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.RectangleShape" )) ) )
{
awt::Size aSize( (long)(rFloatRect.Right - rFloatRect.Left ), (long)(rFloatRect.Bottom-rFloatRect.Top ) );
maXShape->setSize( aSize );
@@ -537,11 +537,11 @@ void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect )
void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation )
{
- if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.EllipseShape") ) )
+ if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EllipseShape" )) ) )
{
drawing::CircleKind eCircleKind = drawing::CircleKind_FULL;
uno::Any aAny( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleKind"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleKind" )), aAny );
long nXSize = (long)( rSize.X * 2.0 ); // Merkwuerdigkes Verhalten bei einer awt::Size von 0
long nYSize = (long)( rSize.Y * 2.0 );
@@ -565,7 +565,7 @@ void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, doub
void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation,
sal_uInt32 nType, double& fStartAngle, double& fEndAngle )
{
- if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.EllipseShape") ) )
+ if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EllipseShape" )) ) )
{
uno::Any aAny;
drawing::CircleKind eCircleKind;
@@ -604,11 +604,11 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize
else
{
aAny.setValue( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleKind"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleKind" )), aAny );
aAny <<= (sal_Int32)( (long)( fStartAngle * 100 ) );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleStartAngle"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleStartAngle" )), aAny );
aAny <<= (sal_Int32)( (long)( fEndAngle * 100 ) );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleEndAngle"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleEndAngle" )), aAny );
}
maXShape->setPosition( awt::Point( (long)( rCenter.X - rSize.X ), (long)( rCenter.Y - rSize.Y ) ) );
if ( rOrientation != 0 )
@@ -627,7 +627,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize
ImplSetLineBundle();
drawing::FillStyle eFillStyle = drawing::FillStyle_NONE;
aAny.setValue( &eFillStyle, ::getCppuType((const drawing::FillStyle*)0) );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), aAny );
}
}
}
@@ -655,7 +655,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
mpCGM->ImplMapX( fdx );
mpCGM->ImplMapY( fdy );
- if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.GraphicObjectShape") ) )
+ if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GraphicObjectShape" )) ) )
{
maXShape->setSize( awt::Size( (long)fdx, (long)fdy ) );
maXShape->setPosition( awt::Point( (long)aOrigin.X, (long)aOrigin.Y ) );
@@ -668,7 +668,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
uno::Reference< awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap( BitmapEx( *( pBmpDesc->mpBitmap ) ) ) );
uno::Any aAny;
aAny <<= xBitmap;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("GraphicObjectFillBitmap"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicObjectFillBitmap" )), aAny );
}
}
@@ -680,7 +680,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon& rPoly )
{
sal_uInt16 nPoints = rPoly.GetSize();
- if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.PolyPolygonShape") ) )
+ if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PolyPolygonShape" )) ) )
{
drawing::PointSequenceSequence aRetval;
@@ -701,7 +701,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon& rPoly )
uno::Any aParam;
aParam <<= aRetval;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygon"), aParam );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygon" )), aParam );
ImplSetFillBundle();
}
};
@@ -713,7 +713,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly )
{
sal_uInt16 nPoints = rPoly.GetSize();
- if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.PolyLineShape") ) )
+ if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PolyLineShape" )) ) )
{
drawing::PointSequenceSequence aRetval;
@@ -734,7 +734,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly )
uno::Any aParam;
aParam <<= aRetval;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygon"), aParam );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygon" )), aParam );
ImplSetLineBundle();
}
};
@@ -744,7 +744,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly )
void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon )
{
USHORT nPoints = rPolygon.GetSize();
- if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.OpenBezierShape") ) )
+ if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.OpenBezierShape" )) ) )
{
drawing::PolyPolygonBezierCoords aRetval;
@@ -769,7 +769,7 @@ void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon )
}
uno::Any aParam;
aParam <<= aRetval;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygonBezier"), aParam );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygonBezier" )), aParam );
ImplSetLineBundle();
}
};
@@ -779,7 +779,7 @@ void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon )
void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon )
{
sal_uInt32 nNumPolys = rPolyPolygon.Count();
- if ( nNumPolys && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.ClosedBezierShape") ) )
+ if ( nNumPolys && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.ClosedBezierShape" )) ) )
{
drawing::PolyPolygonBezierCoords aRetval;
@@ -814,7 +814,7 @@ void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon )
}
uno::Any aParam;
aParam <<= aRetval;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygonBezier"), aParam);
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygonBezier" )), aParam);
ImplSetFillBundle();
}
};
@@ -823,7 +823,7 @@ void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon )
void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, sal_uInt32 /*nSize*/, FinalFlag eFlag )
{
- if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.TextShape") ) )
+ if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TextShape" )) ) )
{
uno::Any aAny;
long nWidth = rTextSize.Width;
@@ -876,17 +876,17 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
if ( nOrientation )
{
aAny <<= (sal_Int32)( aTextPos.X );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointX"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointX" )), aAny );
aAny <<= (sal_Int32)( aTextPos.Y + nHeight );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointY"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointY" )), aAny );
aAny <<= (sal_Int32)( (sal_Int32)( nOrientation * 100 ) );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotateAngle"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" )), aAny );
}
if ( nWidth == -1 )
{
sal_Bool bTrue( sal_True );
aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0 ));
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextAutoGrowWidth"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextAutoGrowWidth" )), aAny );
drawing::TextAdjust eTextAdjust;
switch ( mpCGM->pElement->eTextAlignmentH )
@@ -904,13 +904,13 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
break;
}
aAny <<= eTextAdjust;
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextHorizontalAdjust"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" )), aAny );
}
if ( nHeight == -1 )
{
sal_Bool bTrue = sal_True;
aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0) );
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextAutoGrowHeight"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextAutoGrowHeight" )), aAny );
}
uno::Reference< text::XText > xText;
uno::Any aFirstQuery( maXShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0) ));
@@ -946,13 +946,13 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
aAny <<= (sal_Int16)style::HorizontalAlignment_CENTER;
break;
}
- aCursorPropSet->setPropertyValue( rtl::OUString::createFromAscii("ParaAdjust"), aAny );
+ aCursorPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParaAdjust" )), aAny );
}
if ( nWidth > 0 && nHeight > 0 ) // restricted text
{
sal_Bool bTrue = sal_True;
aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0));
- maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextFitToSize"), aAny );
+ maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextFitToSize" )), aAny );
}
aCursorText->setString( aStr );
aXTextCursor->gotoEnd( sal_True );
diff --git a/filter/source/graphicfilter/icgm/bitmap.hxx b/filter/source/graphicfilter/icgm/bitmap.hxx
index 774d4ba4d414..606f725c3619 100644
--- a/filter/source/graphicfilter/icgm/bitmap.hxx
+++ b/filter/source/graphicfilter/icgm/bitmap.hxx
@@ -54,20 +54,26 @@ class CGMBitmapDescriptor
sal_uInt32 mnX, mnY;
long mnLocalColorPrecision;
sal_uInt32 mnCompressionMode;
- CGMBitmapDescriptor() :
- mpBuf ( NULL ),
- mpBitmap ( NULL ),
- mpAcc ( NULL ),
- mbStatus ( sal_False ),
- mbVMirror ( sal_False ),
- mbHMirror ( sal_False ) { };
- ~CGMBitmapDescriptor()
- {
- if ( mpAcc )
- mpBitmap->ReleaseAccess( mpAcc );
- if ( mpBitmap )
- delete mpBitmap;
- };
+
+ CGMBitmapDescriptor()
+ : mpBuf(NULL)
+ , mpBitmap(NULL)
+ , mpAcc(NULL)
+ , mbStatus(sal_False)
+ , mbVMirror(sal_False)
+ , mbHMirror(sal_False)
+ , mndx(0.0)
+ , mndy(0.0)
+ , mnOrientation(0.0)
+ , mnLocalColorPrecision(0)
+ { };
+ ~CGMBitmapDescriptor()
+ {
+ if ( mpAcc )
+ mpBitmap->ReleaseAccess( mpAcc );
+ if ( mpBitmap )
+ delete mpBitmap;
+ };
};
class CGMBitmap
diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx
index 2c74c3229fa4..3431734a4573 100644
--- a/filter/source/graphicfilter/icgm/bundles.cxx
+++ b/filter/source/graphicfilter/icgm/bundles.cxx
@@ -49,7 +49,7 @@ void Bundle::SetColor( sal_uInt32 nColor )
mnColor = nColor;
}
-sal_uInt32 Bundle::GetColor()
+sal_uInt32 Bundle::GetColor() const
{
return mnColor;
}
diff --git a/filter/source/graphicfilter/icgm/bundles.hxx b/filter/source/graphicfilter/icgm/bundles.hxx
index a05c37bf4803..f9d75b24f7ee 100644
--- a/filter/source/graphicfilter/icgm/bundles.hxx
+++ b/filter/source/graphicfilter/icgm/bundles.hxx
@@ -46,7 +46,7 @@ class Bundle
public:
void SetColor( sal_uInt32 nColor ) ;
- sal_uInt32 GetColor() ;
+ sal_uInt32 GetColor() const;
long GetIndex() const { return mnBundleIndex; } ;
void SetIndex( long nBundleIndex ) { mnBundleIndex = nBundleIndex; } ;
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 0487e7e837d7..2a82022ec317 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -882,7 +882,7 @@ extern "C" sal_uInt32 __LOADONCALLAPI ImportCGM( String& rFileName, uno::Referen
aXStatInd = *(uno::Reference< task::XStatusIndicator > *)pProgressBar;
bProgressBar = aXStatInd.is();
if ( bProgressBar )
- aXStatInd->start( rtl::OUString::createFromAscii("CGM Import"), nInSize );
+ aXStatInd->start( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CGM Import" )), nInSize );
#endif
while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() )
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index 3b82d144d5c9..11fd45cb5a39 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -168,8 +168,8 @@ class CGM
#endif
void ImplComment( sal_uInt32, const char* );
sal_uInt32 GetBackGroundColor();
- sal_Bool IsValid() { return mbStatus; };
- sal_Bool IsFinished() { return mbIsFinished; };
+ sal_Bool IsValid() const { return mbStatus; };
+ sal_Bool IsFinished() const { return mbIsFinished; };
sal_Bool Write( SvStream& rIStm );
friend SvStream& operator>>( SvStream& rOStm, CGM& rCGM );
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index 3d0e023146c5..04937099e6d7 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -376,8 +376,6 @@ void CGM::ImplDoClass4()
case 0x0d : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc 3 Point" )
{
- int nSwitch = 0;
-
FloatPoint aStartingPoint, aIntermediatePoint, aEndingPoint, aCenterPoint;
ImplGetPoint( aStartingPoint, sal_True );
ImplGetPoint( aIntermediatePoint, sal_True );
@@ -402,6 +400,8 @@ void CGM::ImplDoClass4()
double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint );
double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint );
+ int nSwitch = 0;
+
if ( fStartAngle > fEndAngle )
{
nSwitch ^=1;
@@ -447,8 +447,6 @@ void CGM::ImplDoClass4()
case 0x0e : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc 3 Point Close" )
{
- int nSwitch = 0;
-
if ( mbFigure )
mpOutAct->CloseRegion();
@@ -476,6 +474,8 @@ void CGM::ImplDoClass4()
double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint );
double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint );
+ int nSwitch = 0;
+
if ( fStartAngle > fEndAngle )
{
nSwitch ^=1;
@@ -513,7 +513,7 @@ void CGM::ImplDoClass4()
case 0x0f : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc Centre" )
{
- double fOrientation, fStartAngle, fEndAngle, vector[ 4 ];
+ double fStartAngle, fEndAngle, vector[ 4 ];
FloatPoint aCenter, aRadius;
if ( mbFigure )
@@ -557,7 +557,7 @@ void CGM::ImplDoClass4()
}
else
{
- fOrientation = 0;
+ double fOrientation = 0;
mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, 2, fStartAngle, fEndAngle );
}
mnParaSize = mnElementSize;
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 46de91410c90..3090f3b604fc 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -48,21 +48,6 @@ ULONG DXF2GDIMetaFile::CountEntities(const DXFEntities & rEntities)
return nRes;
}
-
-void DXF2GDIMetaFile::MayCallback(ULONG /*nMainEntitiesProcessed*/)
-{
- // ULONG nPercent;
-/*
- if (pCallback!=NULL && nMainEntitiesCount!=0) {
- nPercent=nMinPercent+(nMaxPercent-nMinPercent)*nMainEntitiesProcessed/nMainEntitiesCount;
- if (nPercent>=nLastPercent+4) {
- if (((*pCallback)(pCallerData,(USHORT)nPercent))==TRUE) bStatus=FALSE;
- nLastPercent=nPercent;
- }
- }
-*/
-}
-
Color DXF2GDIMetaFile::ConvertColor(BYTE nColor)
{
return Color(
@@ -506,7 +491,7 @@ void DXF2GDIMetaFile::DrawInsertEntity(const DXFInsertEntity & rE, const DXFTran
aParentLayerDXFLineInfo=LTypeToDXFLineInfo(pLayer->sLineType);
}
}
- DrawEntities(*pB,aT,FALSE);
+ DrawEntities(*pB,aT);
aBlockDXFLineInfo=aSavedBlockDXFLineInfo;
aParentLayerDXFLineInfo=aSavedParentLayerDXFLineInfo;
nBlockColor=nSavedBlockColor;
@@ -757,7 +742,7 @@ void DXF2GDIMetaFile::DrawDimensionEntity(const DXFDimensionEntity & rE, const D
aParentLayerDXFLineInfo=LTypeToDXFLineInfo(pLayer->sLineType);
}
}
- DrawEntities(*pB,aT,FALSE);
+ DrawEntities(*pB,aT);
aBlockDXFLineInfo=aSavedBlockDXFLineInfo;
aParentLayerDXFLineInfo=aSavedParentLayerDXFLineInfo;
nBlockColor=nSavedBlockColor;
@@ -767,8 +752,7 @@ void DXF2GDIMetaFile::DrawDimensionEntity(const DXFDimensionEntity & rE, const D
void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
- const DXFTransform & rTransform,
- BOOL bTopEntities)
+ const DXFTransform & rTransform)
{
ULONG nCount=0;
DXFTransform aET;
@@ -834,7 +818,6 @@ void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
}
pE=pE->pSucc;
nCount++;
- if (bTopEntities) MayCallback(nCount);
}
}
@@ -957,7 +940,7 @@ BOOL DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
}
if (bStatus==TRUE)
- DrawEntities(pDXF->aEntities,aTransform,TRUE);
+ DrawEntities(pDXF->aEntities,aTransform);
rMTF.Stop();
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
index 3d0d2357d143..56915314f91c 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
@@ -65,8 +65,6 @@ private:
ULONG CountEntities(const DXFEntities & rEntities);
- void MayCallback(ULONG nMainEntitiesProcessed);
-
Color ConvertColor(BYTE nColor);
long GetEntityColor(const DXFBasicEntity & rE);
@@ -111,8 +109,7 @@ private:
void DrawHatchEntity( const DXFHatchEntity & rE, const DXFTransform & rTransform );
void DrawEntities(const DXFEntities & rEntities,
- const DXFTransform & rTransform,
- BOOL bTopEntities);
+ const DXFTransform & rTransform);
public:
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
index 2101447ddefb..c27ef74c7575 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
@@ -185,7 +185,7 @@ USHORT DXFGroupReader::Read()
}
-long DXFGroupReader::GetI(USHORT nG)
+long DXFGroupReader::GetI(USHORT nG) const
{
sal_Int32 nRetValue = 0;
if ( ( nG >= 60 ) && ( nG <= 79 ) )
@@ -199,7 +199,7 @@ long DXFGroupReader::GetI(USHORT nG)
return nRetValue;
}
-double DXFGroupReader::GetF(USHORT nG)
+double DXFGroupReader::GetF(USHORT nG) const
{
nG-=10;
if (nG<50) return F10_59[nG];
@@ -218,7 +218,7 @@ double DXFGroupReader::GetF(USHORT nG)
}
}
-const char * DXFGroupReader::GetS(USHORT nG)
+const char * DXFGroupReader::GetS(USHORT nG) const
{
if (nG<10) return S0_9[nG];
else if ( nG == 100 )
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
index e8b0b285ede9..0e5855790450 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
@@ -44,7 +44,7 @@ public:
DXFGroupReader( SvStream & rIStream, USHORT nMinPercent, USHORT nMaxPercent );
- BOOL GetStatus();
+ BOOL GetStatus() const;
void SetError();
@@ -53,20 +53,20 @@ public:
// Im Falle eines Fehlers liefert GetStatus() FALSE, Gruppencode wird 0
// gesetzt, und es wird SetS(0,"EOF") ausgefuehrt.
- USHORT GetG();
+ USHORT GetG() const;
// Liefert den letzten Gruppencode (also was Read() zuletzt lieferte)
- long GetI();
+ long GetI() const;
// Liefert den Integer-Wert zur Gruppe, die vorher mit Read() gelesen wurde.
// Dabei muss es sich um einen Gruppencode fuer den Datentyp Integer
// gehandelt haben, wenn nicht, wird 0 gelieferet.
- double GetF();
+ double GetF() const;
// Liefert den Floatingpoint-Wert zur Gruppe, die vorher mit Read() gelesen wurde.
// Dabei muss es sich um einen Gruppencode fuer den Datentyp Floatingpoint
// gehandelt haben, wenn nicht, wird 0 geliefert.
- const char * GetS();
+ const char * GetS() const;
// Liefert den String zur Gruppe, die vorher mit Read() gelesen wurde.
// Dabei muss es sich um einen Gruppencode fuer den Datentyp String
// gehandelt haben, wenn nicht, wird NULL geliefert.
@@ -75,9 +75,9 @@ public:
// aktuelle Gruppencode angegeben werden. (DXFGroupReader speichert die Parameter
// zu allen Gruppencodes. Dadurch ist es moeglich, dass zunaechst mit Read() einige
// verschiedene Gruppen eingelesen werden, bevor sie ausgewertet werden.)
- long GetI(USHORT nG);
- double GetF(USHORT nG);
- const char * GetS(USHORT nG);
+ long GetI(USHORT nG) const;
+ double GetF(USHORT nG) const;
+ const char * GetS(USHORT nG) const;
// Mit folgenden Methoden koennen die aktuell gespeicherten Werte zu den
// Gruppencodes veraendert werden. (z.B. um Defaultwerte zu setzen, bevor
@@ -93,7 +93,6 @@ private:
void ReadS(char * ptgt);
SvStream & rIS;
- char sIBuff[1024];
USHORT nIBuffSize,nIBuffPos;
BOOL bStatus;
USHORT nLastG;
@@ -120,7 +119,7 @@ private:
};
-inline BOOL DXFGroupReader::GetStatus()
+inline BOOL DXFGroupReader::GetStatus() const
{
return bStatus;
}
@@ -131,22 +130,22 @@ inline void DXFGroupReader::SetError()
bStatus=FALSE;
}
-inline USHORT DXFGroupReader::GetG()
+inline USHORT DXFGroupReader::GetG() const
{
return nLastG;
}
-inline long DXFGroupReader::GetI()
+inline long DXFGroupReader::GetI() const
{
return GetI(nLastG);
}
-inline double DXFGroupReader::GetF()
+inline double DXFGroupReader::GetF() const
{
return GetF(nLastG);
}
-inline const char * DXFGroupReader::GetS()
+inline const char * DXFGroupReader::GetS() const
{
return GetS(nLastG);
}
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 53959ac2a9c0..160a63aa27fb 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -39,7 +39,7 @@ class PBMReader {
private:
- SvStream* mpPBM; // Die einzulesende PBM-Datei
+ SvStream& mrPBM; // Die einzulesende PBM-Datei
BOOL mbStatus;
BOOL mbRemark; // FALSE wenn sich stream in einem Kommentar befindet
@@ -55,18 +55,19 @@ private:
BOOL ImplReadHeader();
public:
- PBMReader();
+ PBMReader(SvStream & rPBM);
~PBMReader();
- BOOL ReadPBM( SvStream & rPBM, Graphic & rGraphic );
+ BOOL ReadPBM(Graphic & rGraphic );
};
//=================== Methoden von PBMReader ==============================
-PBMReader::PBMReader() :
- mbStatus ( TRUE ),
- mbRemark ( FALSE ),
- mbRaw ( TRUE ),
- mpAcc ( NULL )
+PBMReader::PBMReader(SvStream & rPBM)
+ : mrPBM( rPBM )
+ , mbStatus( TRUE )
+ , mbRemark( FALSE )
+ , mbRaw( TRUE )
+ , mpAcc( NULL )
{
}
@@ -81,7 +82,7 @@ BOOL PBMReader::ImplCallback( USHORT /*nPercent*/ )
{
if ( ( (*pCallback)( pCallerData, nPercent ) ) == TRUE )
{
- mpPBM->SetError( SVSTREAM_FILEFORMAT_ERROR );
+ mrPBM.SetError( SVSTREAM_FILEFORMAT_ERROR );
return TRUE;
}
}
@@ -89,15 +90,14 @@ BOOL PBMReader::ImplCallback( USHORT /*nPercent*/ )
return FALSE;
}
-BOOL PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
+BOOL PBMReader::ReadPBM(Graphic & rGraphic )
{
USHORT i;
- if ( rPBM.GetError() )
+ if ( mrPBM.GetError() )
return FALSE;
- mpPBM = &rPBM;
- mpPBM->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ mrPBM.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
// Kopf einlesen:
@@ -167,7 +167,7 @@ BOOL PBMReader::ImplReadHeader()
BYTE nMax, nCount = 0;
BOOL bFinished = FALSE;
- *mpPBM >> nID[ 0 ] >> nID[ 1 ];
+ mrPBM >> nID[ 0 ] >> nID[ 1 ];
if ( nID[ 0 ] != 'P' )
return FALSE;
mnMaxVal = mnWidth = mnHeight = 0;
@@ -197,10 +197,10 @@ BOOL PBMReader::ImplReadHeader()
}
while ( bFinished == FALSE )
{
- if ( mpPBM->GetError() )
+ if ( mrPBM.GetError() )
return FALSE;
- *mpPBM >> nDat;
+ mrPBM >> nDat;
if ( nDat == '#' )
{
@@ -262,10 +262,10 @@ BOOL PBMReader::ImplReadBody()
ULONG nGrey, nRGB[3];
ULONG nWidth = 0;
ULONG nHeight = 0;
- signed char nShift = 0;
if ( mbRaw )
{
+ signed char nShift = 0;
switch ( mnMode )
{
@@ -273,12 +273,12 @@ BOOL PBMReader::ImplReadBody()
case 0 :
while ( nHeight != mnHeight )
{
- if ( mpPBM->IsEof() || mpPBM->GetError() )
+ if ( mrPBM.IsEof() || mrPBM.GetError() )
return FALSE;
if ( --nShift < 0 )
{
- *mpPBM >> nDat;
+ mrPBM >> nDat;
nShift = 7;
}
mpAcc->SetPixel( nHeight, nWidth, nDat >> nShift );
@@ -296,10 +296,10 @@ BOOL PBMReader::ImplReadBody()
case 1 :
while ( nHeight != mnHeight )
{
- if ( mpPBM->IsEof() || mpPBM->GetError() )
+ if ( mrPBM.IsEof() || mrPBM.GetError() )
return FALSE;
- *mpPBM >> nDat;
+ mrPBM >> nDat;
mpAcc->SetPixel( nHeight, nWidth++, nDat);
if ( nWidth == mnWidth )
@@ -315,12 +315,12 @@ BOOL PBMReader::ImplReadBody()
case 2 :
while ( nHeight != mnHeight )
{
- if ( mpPBM->IsEof() || mpPBM->GetError() )
+ if ( mrPBM.IsEof() || mrPBM.GetError() )
return FALSE;
BYTE nR, nG, nB;
ULONG nRed, nGreen, nBlue;
- *mpPBM >> nR >> nG >> nB;
+ mrPBM >> nR >> nG >> nB;
nRed = 255 * nR / mnMaxVal;
nGreen = 255 * nG / mnMaxVal;
nBlue = 255 * nB / mnMaxVal;
@@ -341,10 +341,10 @@ BOOL PBMReader::ImplReadBody()
case 0 :
while ( bFinished == FALSE )
{
- if ( mpPBM->IsEof() || mpPBM->GetError() )
+ if ( mrPBM.IsEof() || mrPBM.GetError() )
return FALSE;
- *mpPBM >> nDat;
+ mrPBM >> nDat;
if ( nDat == '#' )
{
@@ -402,10 +402,10 @@ BOOL PBMReader::ImplReadBody()
continue;
}
- if ( mpPBM->IsEof() || mpPBM->GetError() )
+ if ( mrPBM.IsEof() || mrPBM.GetError() )
return FALSE;
- *mpPBM >> nDat;
+ mrPBM >> nDat;
if ( nDat == '#' )
{
@@ -478,10 +478,10 @@ BOOL PBMReader::ImplReadBody()
continue;
}
- if ( mpPBM->IsEof() || mpPBM->GetError() )
+ if ( mrPBM.IsEof() || mrPBM.GetError() )
return FALSE;
- *mpPBM >> nDat;
+ mrPBM >> nDat;
if ( nDat == '#' )
{
@@ -532,9 +532,9 @@ BOOL PBMReader::ImplReadBody()
extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
{
- PBMReader aPBMReader;
+ PBMReader aPBMReader(rStream);
- return aPBMReader.ReadPBM( rStream, rGraphic );
+ return aPBMReader.ReadPBM(rGraphic );
}
//================== ein bischen Muell fuer Windows ==========================
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 2a089960af16..58b2f7a023f9 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -580,7 +580,7 @@ void EscherPropertyContainer::CreateTextProperties(
/*
if ( rObj.ImplGetPropertyValue(
- ::rtl::OUString::createFromAscii("TextWritingMode") ) )
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextWritingMode")) ) )
{
::com::sun::star::text::WritingMode eMode;
rObj.GetUsrAny() >>= eMode;
@@ -3011,7 +3011,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
if ( xText.is() )
aText = xText->getString();
if ( !aText.getLength() )
- aText = ::rtl::OUString::createFromAscii( "your text" ); // todo: moving into a resource
+ aText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "your text" )); // todo: moving into a resource
AddOpt( DFF_Prop_gtextUNICODE, aText );
// FontWork Font
@@ -3020,7 +3020,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
uno::Any aAny = aXPropSet->getPropertyValue( sCharFontName );
aAny >>= aFontName;
if ( !aFontName.getLength() )
- aFontName = ::rtl::OUString::createFromAscii( "Arial Black" );
+ aFontName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Arial Black" ));
AddOpt( DFF_Prop_gtextFont, aFontName );
sal_Int16 nCharScaleWidth = 100;
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 375b1a946568..f7608830e72b 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -216,14 +216,14 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
}
break;
}
- rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("RotateAngle") ));
+ rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" )) ));
- if( ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("IsFontwork") ) &&
+ if( ( rObj.ImplGetPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFontwork" )) ) &&
::cppu::any2bool( rObj.GetUsrAny() ) ) ||
rObj.GetType().EqualsAscii( "drawing.Measure" ) || rObj.GetType().EqualsAscii( "drawing.Caption" ) )
{
/*
- if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("BoundRect") ) )
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BoundRect")) ) )
{
::com::sun::star::awt::Rectangle aRect( *(::com::sun::star::awt::Rectangle*)rObj.GetUsrAny().getValue() );
rObj.SetRect( ImplMapPoint( Point( aRect.X, aRect.Y ) ),
@@ -305,7 +305,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
{
mpEscherEx->OpenContainer( ESCHER_SpContainer );
sal_Int32 nRadius = (sal_Int32)rObj.ImplGetInt32PropertyValue(
- ::rtl::OUString::createFromAscii("CornerRadius"));
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CornerRadius" )));
if( nRadius )
{
nRadius = ImplMapSize( Size( nRadius, 0 )).Width();
@@ -334,7 +334,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
{
CircleKind eCircleKind = CircleKind_FULL;
PolyStyle ePolyKind = PolyStyle();
- if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("CircleKind") ) )
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleKind" )) ) )
{
eCircleKind = *( (CircleKind*)rObj.GetUsrAny().getValue() );
switch ( eCircleKind )
@@ -369,10 +369,10 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
else
{
INT32 nStartAngle, nEndAngle;
- if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("CircleStartAngle") ) )
+ if ( !rObj.ImplGetPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleStartAngle" )) ) )
break;
nStartAngle = *( (INT32*)rObj.GetUsrAny().getValue() );
- if( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("CircleEndAngle") ) )
+ if( !rObj.ImplGetPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleEndAngle" )) ) )
break;
nEndAngle = *( (INT32*)rObj.GetUsrAny().getValue() );
@@ -704,7 +704,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
'D' == rObj.GetType().GetChar( 9 ) ) // drawing.3D
{
// SceneObject, CubeObject, SphereObject, LatheObject, ExtrudeObject, PolygonObject
- if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("Bitmap") ) )
+ if ( !rObj.ImplGetPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Bitmap" )) ) )
break;
mpEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -728,7 +728,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
aPropOpt.CreateShadowProperties( rObj.mXPropSet );
if( USHRT_MAX != mpEscherEx->GetHellLayerId() &&
- rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("LayerID") ) &&
+ rObj.ImplGetPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayerID" )) ) &&
(*((UINT16*)rObj.GetUsrAny().getValue()) ) == mpEscherEx->GetHellLayerId() )
{
aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x200020 );
@@ -789,7 +789,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
if ( !mpPicStrm )
mpPicStrm = mpEscherEx->QueryPictureStream();
EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm );
- rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("RotateAngle")));
+ rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" ))));
INT32 nAngle = rObj.GetAngle();
if( rObj.GetType().EqualsAscii( "drawing.Line" ))
{
@@ -1186,8 +1186,8 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
xub_StrLen nPos = mType.SearchAscii( "Shape" );
mType.Erase( nPos, 5 );
- static const OUString sPresStr(rtl::OUString::createFromAscii("IsPresentationObject"));
- static const OUString sEmptyPresStr(rtl::OUString::createFromAscii("IsEmptyPresentationObject"));
+ static const OUString sPresStr(RTL_CONSTASCII_USTRINGPARAM( "IsPresentationObject" ));
+ static const OUString sEmptyPresStr(RTL_CONSTASCII_USTRINGPARAM( "IsEmptyPresentationObject" ));
if( ImplGetPropertyValue( sPresStr ) )
mbPresObj = ::cppu::any2bool( mAny );
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 3af7b517a560..71b1b681d3eb 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3682,9 +3682,9 @@ BOOL SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, UINT3
return bRet;
}
-FASTBOOL SvxMSDffManager::SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd, ULONG nSkipCount ) const
+bool SvxMSDffManager::SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd, ULONG nSkipCount ) const
{
- FASTBOOL bRet = FALSE;
+ bool bRet = FALSE;
ULONG nFPosMerk = rSt.Tell(); // FilePos merken fuer ggf. spaetere Restauration
DffRecordHeader aHd;
do
@@ -3712,9 +3712,9 @@ FASTBOOL SvxMSDffManager::SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFil
return bRet;
}
-FASTBOOL SvxMSDffManager::SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMaxFilePos, DffRecordHeader* pRecHd, ULONG nSkipCount ) const
+bool SvxMSDffManager::SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMaxFilePos, DffRecordHeader* pRecHd, ULONG nSkipCount ) const
{
- FASTBOOL bRet = FALSE;
+ bool bRet = FALSE;
ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer ggf. spaetere Restauration
DffRecordHeader aHd;
do
@@ -3743,7 +3743,7 @@ FASTBOOL SvxMSDffManager::SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMax
}
-FASTBOOL SvxMSDffManager::GetColorFromPalette( USHORT /* nNum */, Color& rColor ) const
+bool SvxMSDffManager::GetColorFromPalette( USHORT /* nNum */, Color& rColor ) const
{
// diese Methode ist in der zum Excel-Import
// abgeleiteten Klasse zu ueberschreiben...
@@ -4001,15 +4001,15 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte
return aColor;
}
-FASTBOOL SvxMSDffManager::ReadDffString(SvStream& rSt, String& rTxt) const
+bool SvxMSDffManager::ReadDffString(SvStream& rSt, String& rTxt) const
{
- FASTBOOL bRet=FALSE;
+ bool bRet=FALSE;
DffRecordHeader aStrHd;
if( !ReadCommonRecordHeader(aStrHd, rSt) )
rSt.Seek( aStrHd.nFilePos );
else if ( aStrHd.nRecType == DFF_PST_TextBytesAtom || aStrHd.nRecType == DFF_PST_TextCharsAtom )
{
- FASTBOOL bUniCode=aStrHd.nRecType==DFF_PST_TextCharsAtom;
+ bool bUniCode=aStrHd.nRecType==DFF_PST_TextCharsAtom;
bRet=TRUE;
ULONG nBytes = aStrHd.nRecLen;
MSDFFReadZString( rSt, rTxt, nBytes, bUniCode );
@@ -4092,9 +4092,9 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const
}
}
-FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
+bool SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
{
- FASTBOOL bRet=FALSE;
+ bool bRet=FALSE;
SdrTextObj* pText = PTR_CAST(SdrTextObj, pObj);
if( pText )
{
@@ -4116,7 +4116,7 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
{ // Wohl 'nen kleiner Bug der EditEngine, das die
// Absastzattribute bei Clear() nicht entfernt werden.
- FASTBOOL bClearParaAttribs = TRUE;
+ bool bClearParaAttribs = TRUE;
rOutliner.SetStyleSheet( 0, NULL );
SfxItemSet aSet(rOutliner.GetEmptyItemSet());
aSet.Put(SvxColorItem( COL_BLACK ));
@@ -4271,7 +4271,7 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
//static
void SvxMSDffManager::MSDFFReadZString( SvStream& rIn, String& rStr,
- ULONG nRecLen, FASTBOOL bUniCode )
+ ULONG nRecLen, bool bUniCode )
{
sal_uInt16 nLen = (sal_uInt16)nRecLen;
if( nLen )
@@ -4854,8 +4854,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( mbTracing )
mpTracer->AddAttribute( aObjData.nSpFlags & SP_FGROUP
- ? rtl::OUString::createFromAscii( "GroupShape" )
- : rtl::OUString::createFromAscii( "Shape" ),
+ ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GroupShape" ))
+ : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Shape" )),
rtl::OUString::valueOf( (sal_Int32)aObjData.nShapeId ) );
aObjData.bOpt = maShapeRecords.SeekToContent( rSt, DFF_msofbtOPT, SEEK_FROM_CURRENT_AND_RESTART );
if ( aObjData.bOpt )
@@ -4927,7 +4927,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
}
}
aTextRect = aObjData.aBoundRect;
- FASTBOOL bGraphic = IsProperty( DFF_Prop_pib ) ||
+ bool bGraphic = IsProperty( DFF_Prop_pib ) ||
IsProperty( DFF_Prop_pibName ) ||
IsProperty( DFF_Prop_pibFlags );
@@ -5422,8 +5422,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( mbTracing )
mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP
- ? rtl::OUString::createFromAscii( "GroupShape" )
- : rtl::OUString::createFromAscii( "Shape" ) );
+ ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GroupShape" ))
+ : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Shape" )) );
return pRet;
}
@@ -5637,7 +5637,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
//textbox, this was changed for #88277# to be created as a simple
//rect to keep impress happy. For the rest of us we'd like to turn
//it back into a textbox again.
- FASTBOOL bTextFrame = (pImpRec->eShapeType == mso_sptTextBox);
+ bool bTextFrame = (pImpRec->eShapeType == mso_sptTextBox);
if (!bTextFrame)
{
//Either
@@ -6184,7 +6184,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
{
if ( mpTracer )
{
- uno::Any aAny( mpTracer->GetProperty( rtl::OUString::createFromAscii( "On" ) ) );
+ uno::Any aAny( mpTracer->GetProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" )) ) );
aAny >>= mbTracing;
}
SetModel( pSdrModel_, nApplicationScale );
@@ -6236,7 +6236,7 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const String& rBaseURL, MS
{
if ( mpTracer )
{
- uno::Any aAny( mpTracer->GetProperty( rtl::OUString::createFromAscii( "On" ) ) );
+ uno::Any aAny( mpTracer->GetProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" )) ) );
aAny >>= mbTracing;
}
SetModel( NULL, 0 );
@@ -7063,12 +7063,12 @@ BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
aFileName.Append( String::CreateFromInt32( nCount++ ) );
switch( nInst &~ 1 )
{
- case 0x216 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".wmf" ) ) ); break;
- case 0x3d4 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".emf" ) ) ); break;
- case 0x542 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".pct" ) ) ); break;
- case 0x46a : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".jpg" ) ) ); break;
- case 0x6e0 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".png" ) ) ); break;
- case 0x7a8 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".bmp" ) ) ); break;
+ case 0x216 : aFileName.Append( String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ) ); break;
+ case 0x3d4 : aFileName.Append( String( RTL_CONSTASCII_USTRINGPARAM( ".emf" ) ) ); break;
+ case 0x542 : aFileName.Append( String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ) ); break;
+ case 0x46a : aFileName.Append( String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ) ); break;
+ case 0x6e0 : aFileName.Append( String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ) ); break;
+ case 0x7a8 : aFileName.Append( String( RTL_CONSTASCII_USTRINGPARAM( ".bmp" ) ) ); break;
}
String aURLStr;
@@ -7830,7 +7830,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
// TODO/LATER: should the caller be notified if the aspect changes in future?
SvStorageStreamRef xObjInfoSrc = xObjStg->OpenSotStream(
- String( RTL_CONSTASCII_STRINGPARAM( "\3ObjInfo" ) ),
+ String( RTL_CONSTASCII_USTRINGPARAM( "\3ObjInfo" ) ),
STREAM_STD_READ | STREAM_NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
diff --git a/filter/source/msfilter/msfiltertracer.cxx b/filter/source/msfilter/msfiltertracer.cxx
index 103dc286dcd1..46a91d45701a 100644
--- a/filter/source/msfilter/msfiltertracer.cxx
+++ b/filter/source/msfilter/msfiltertracer.cxx
@@ -56,7 +56,7 @@ MSFilterTracer::MSFilterTracer( const ::rtl::OUString& rConfigPath, uno::Sequenc
mpStream( NULL ),
mbEnabled( sal_False ) // will be set to true in StartTracing()
{
- if ( mpCfgItem->ReadBool( rtl::OUString::createFromAscii( "On" ), sal_False ) )
+ if ( mpCfgItem->ReadBool( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" )), sal_False ) )
{
uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
if ( xMgr.is() )
@@ -65,17 +65,17 @@ MSFilterTracer::MSFilterTracer( const ::rtl::OUString& rConfigPath, uno::Sequenc
parameter as default into the property sequence of the FilterConfigItem. It means we ensure that
the property is available by trying to read it (the return value of the method is ignored) */
::rtl::OUString aEmptyString;
- mpCfgItem->ReadInt32( rtl::OUString::createFromAscii( "LogLevel" ), util::logging::LogLevel::ALL );
- mpCfgItem->ReadString( rtl::OUString::createFromAscii( "ClassFilter" ), aEmptyString );
- mpCfgItem->ReadString( rtl::OUString::createFromAscii( "MethodFilter" ), aEmptyString );
- mpCfgItem->ReadString( rtl::OUString::createFromAscii( "MessageFilter" ), aEmptyString );
+ mpCfgItem->ReadInt32( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LogLevel" )), util::logging::LogLevel::ALL );
+ mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassFilter" )), aEmptyString );
+ mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MethodFilter" )), aEmptyString );
+ mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MessageFilter" )), aEmptyString );
util::SearchAlgorithms eSearchAlgorithm = (util::SearchAlgorithms)
- mpCfgItem->ReadInt32( rtl::OUString::createFromAscii( "SearchAlgorithm" ), util::SearchAlgorithms_ABSOLUTE );
+ mpCfgItem->ReadInt32( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SearchAlgorithm" )), util::SearchAlgorithms_ABSOLUTE );
// creating the name of the log file
- rtl::OUString aPath( mpCfgItem->ReadString( rtl::OUString::createFromAscii( "Path" ), aEmptyString ) );
- rtl::OUString aName( mpCfgItem->ReadString( rtl::OUString::createFromAscii( "Name" ), aEmptyString ) );
- rtl::OUString aDocumentURL( mpCfgItem->ReadString( rtl::OUString::createFromAscii( "DocumentURL" ), aEmptyString ) );
+ rtl::OUString aPath( mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Path" )), aEmptyString ) );
+ rtl::OUString aName( mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" )), aEmptyString ) );
+ rtl::OUString aDocumentURL( mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentURL" )), aEmptyString ) );
INetURLObject aLogFile( aDocumentURL );
if ( aLogFile.GetMainURL( INetURLObject::NO_DECODE ).getLength() )
{
@@ -103,10 +103,10 @@ MSFilterTracer::MSFilterTracer( const ::rtl::OUString& rConfigPath, uno::Sequenc
}
}
if ( !aName.getLength() )
- aName = rtl::OUString::createFromAscii( "tracer" );
+ aName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "tracer" ));
aLogFile.insertName( aName );
}
- aLogFile.setExtension( rtl::OUString::createFromAscii( "log" ) );
+ aLogFile.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "log" )) );
// creating the file stream
mpStream = ::utl::UcbStreamHelper::CreateStream( aLogFile.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC | STREAM_SHARE_DENYNONE );
@@ -117,28 +117,28 @@ MSFilterTracer::MSFilterTracer( const ::rtl::OUString& rConfigPath, uno::Sequenc
uno::Reference< io::XOutputStream > xOutputStream( pHelper );
// instanciating the DocumentHandler, then setting the OutputStream
- mxHandler = uno::Reference< xml::sax::XDocumentHandler >( xMgr->createInstance( rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), uno::UNO_QUERY );
+ mxHandler = uno::Reference< xml::sax::XDocumentHandler >( xMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ), uno::UNO_QUERY );
uno::Reference< io::XActiveDataSource > xDocSrc( mxHandler, uno::UNO_QUERY );
xDocSrc->setOutputStream( xOutputStream );
mxHandler->startDocument();
- mxHandler->ignorableWhitespace ( rtl::OUString::createFromAscii( " " ) );
+ mxHandler->ignorableWhitespace ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " )) );
// writing the "DocumentHandler" property, so the FilterTracer component
// will use it for the output
uno::Any aAny;
aAny <<= xDocSrc;
- mpCfgItem->WriteAny( rtl::OUString::createFromAscii( "DocumentHandler" ), aAny );
+ mpCfgItem->WriteAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentHandler" )), aAny );
SvXMLAttributeList* pAttrList = new SvXMLAttributeList;
- pAttrList->AddAttribute( rtl::OUString::createFromAscii( "DocumentURL" ), aDocumentURL );
+ pAttrList->AddAttribute( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentURL" )), aDocumentURL );
uno::Reference < xml::sax::XAttributeList > xAttributeList(pAttrList);
- mxHandler->startElement( rtl::OUString::createFromAscii( "Document" ), xAttributeList );
+ mxHandler->startElement( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Document" )), xAttributeList );
}
uno::Sequence< uno::Any > aArgument( 1 );
uno::Sequence< beans::PropertyValue > aPropValues( mpCfgItem->GetFilterData() );
aArgument[ 0 ] <<= aPropValues;
- mxFilterTracer = xMgr->createInstanceWithArguments( rtl::OUString::createFromAscii( "com.sun.star.util.FilterTracer" ), aArgument );
+ mxFilterTracer = xMgr->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.FilterTracer" )), aArgument );
if ( mxFilterTracer.is() )
{
mxTextSearch = uno::Reference< util::XTextSearch >( mxFilterTracer, uno::UNO_QUERY );
@@ -159,9 +159,9 @@ MSFilterTracer::~MSFilterTracer()
mxFilterTracer = NULL;
if ( mxHandler.is() )
{
- mxHandler->ignorableWhitespace ( rtl::OUString::createFromAscii( " " ) );
- mxHandler->endElement( rtl::OUString::createFromAscii( "Document" ) );
- mxHandler->ignorableWhitespace ( rtl::OUString::createFromAscii( " " ) );
+ mxHandler->ignorableWhitespace ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " )) );
+ mxHandler->endElement( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Document" )) );
+ mxHandler->ignorableWhitespace ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " )) );
mxHandler->endDocument();
mxHandler = NULL;
}
@@ -172,7 +172,7 @@ MSFilterTracer::~MSFilterTracer()
void MSFilterTracer::StartTracing()
{
- mbEnabled = mpCfgItem->ReadBool( rtl::OUString::createFromAscii( "On" ), sal_False );
+ mbEnabled = mpCfgItem->ReadBool( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" )), sal_False );
}
void MSFilterTracer::EndTracing()
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index bd957d032700..b34b1d5813fd 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -78,6 +78,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <comphelper/componentcontext.hxx>
#include <unotools/streamwrap.hxx>
+#include <sal/macros.h>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/table/XCellRange.hpp>
@@ -352,14 +353,14 @@ uno::Reference< graphic::XGraphicObject> lcl_readGraphicObject( SotStorageStream
{
// use the GraphicProvider service to get the XGraphic
uno::Reference< graphic::XGraphicProvider > xGraphProvider(
- xServiceManager->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ) ), uno::UNO_QUERY );
+ xServiceManager->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.graphic.GraphicProvider" )) ), uno::UNO_QUERY );
if( xGraphProvider.is() )
{
uno::Reference< io::XInputStream > xStream( new utl::OInputStreamWrapper( *pS ) );
if( xStream.is() )
{
uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
- aMediaProps[0].Name = ::rtl::OUString::createFromAscii( "InputStream" );
+ aMediaProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InputStream" ));
aMediaProps[0].Value <<= xStream;
uno::Reference< graphic::XGraphic > xGraphic = xGraphProvider->queryGraphic( aMediaProps );
if( xGraphic.is() )
@@ -521,7 +522,6 @@ void lclReadCharArray( SvStorageStream& rStrm, char*& rpcCharArr, sal_uInt32 nLe
}
}
-
/** Creates an OUString from a character array created with lclReadCharArray().
The passed parameters must match, that means the length field must be the
@@ -549,6 +549,39 @@ OUString lclCreateOUString( const char* pcCharArr, sal_uInt32 nLenFld )
return svt::BinFilterUtils::CreateOUStringFromUniStringArray( pcCharArr, nBufSize );
}
+void readArrayString( SotStorageStream *pS, std::vector< rtl::OUString >& sStringsOut, sal_Int32 nSize, long nStart )
+{
+ unsigned long nFinish = pS->Tell() + nSize;
+ while ( pS->Tell() < nFinish )
+ {
+ sal_Int32 nStringLen = 0;
+ *pS >> nStringLen;
+ sal_uInt32 nStringSize = lclGetBufferSize( nStringLen );
+ sal_Char* pString = new sal_Char[ nStringSize ];
+ pS->Read( pString, nStringSize );
+ rtl::OUString sString = lclCreateOUString( pString, nStringLen );
+ delete[] pString;
+ sStringsOut.push_back( sString );
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ }
+}
+
+OUString createSubStreamName( const sal_uInt32& subStorageId )
+{
+ static OUString sI( RTL_CONSTASCII_USTRINGPARAM( "i" ));
+ static OUString sZero( RTL_CONSTASCII_USTRINGPARAM( "0" ));
+ OUStringBuffer buf( 6 );
+ buf.append( sI );
+ // for subStorage id < 10 stream name has leading '0'
+ // eg "i07"
+ if ( subStorageId < 10 )
+ {
+ buf.append( sZero );
+ }
+ buf.append( OUString::valueOf( (sal_Int32)subStorageId ) );
+ return buf.makeStringAndClear();
+}
+
// export ---------------------------------------------------------------------
/** This class implements writing a character array from a Unicode string.
@@ -641,6 +674,44 @@ void SvxOcxString::WriteCharArray( SvStorageStream& rStrm ) const
}
}
+class MultiPageProps
+{
+public:
+ sal_uInt16 nIdentifier; // major & minor version
+ sal_uInt16 nFixedAreaLen; // size of record
+ sal_uInt8 pBlockFlags[4]; // size of record
+ sal_Int32 mnPageCount;
+ sal_Int32 mnID;
+ bool mbEnabled;
+ std::vector< sal_Int32 > mnIDs;
+
+ MultiPageProps();
+ bool Read(SotStorageStream *pS);
+};
+
+MultiPageProps::MultiPageProps() : nIdentifier(0), nFixedAreaLen(0), mnPageCount(0), mnID(0), mbEnabled( true )
+{
+}
+
+bool MultiPageProps::Read(SotStorageStream *pS)
+{
+ *pS >> nIdentifier >> nFixedAreaLen;
+ pS->Read( pBlockFlags, sizeof( pBlockFlags ) );
+ if ( pBlockFlags[ 0 ] & 0x02 )
+ *pS >> mnPageCount;
+ if ( pBlockFlags[ 0 ] & 0x04 )
+ *pS >> mnID;
+ if ( pBlockFlags[ 0 ] & 0x08 )
+ mbEnabled = false;
+ for ( sal_Int32 i=0; i<mnPageCount; ++i )
+ {
+ sal_Int32 nID(0);
+ *pS >> nID;
+ mnIDs.push_back( nID );
+ }
+ return true;
+}
+
const sal_uInt16 USERFORM = (sal_uInt16)0xFF;
const sal_uInt16 STDCONTAINER = (sal_uInt16)0xFE;
@@ -666,48 +737,42 @@ const sal_uInt16 TOGGLEBUTTON = (sal_uInt16)0x1C;
const sal_uInt16 SCROLLBAR = (sal_uInt16)0x2F;
const sal_uInt16 MULTIPAGE = (sal_uInt16)0x39;
-// The IDs with bit 0x8000 set appear to be generated.
-// It looks like these ID's are used with the non-toolbox [1]
-// ActiveX controls that can be present in a Userform
-// ( note: RefEdit seems to be an exception )
-// In UserForm::Read just before the Container record starts
-// you will notice there can be sometimes trailing records,
-// it seems that these records have a 1:1 relationship with the non-toolbox
-// controls present in the Userform. An id in the trailing record
-// seems to identify the specific ActiveX control and an artificial nTypeIdent
-// e.g. 0x8000, 0x8001 etc. is created so as to be able to associate
-// the ActiveX control when referenced later
-// [1] Such ActiveX controls are added via Tools/AddionalControls
-// menu
-
-// create a fixed set of those special id(s)
-// ahem, we can only read one Progress bars at the moment so....
+
+const sal_uInt16 UNKNOWNCTRL = (sal_uInt16)0x7FFF;
const sal_uInt16 PROGRESSBAR = (sal_uInt16)0x8000;
-// A set of IDs from the trailing records mentioned above that seem to
-// identify the following ActiveX controls
+// following ActiveX controls are just for reference ( are NOT supported )
+const sal_uInt16 REFEDIT = (sal_uInt16)0x8001;
+const sal_uInt16 CALENDAR = (sal_uInt16)0x8002;
+const sal_uInt16 IMAGECOMBO = (sal_uInt16)0x8003;
+const sal_uInt16 IMAGELIST = (sal_uInt16)0x8004;
+const sal_uInt16 SLIDER = (sal_uInt16)0x8005;
+const sal_uInt16 STATUSBAR = (sal_uInt16)0x8006;
+const sal_uInt16 CHARTSPACE = (sal_uInt16)0x8007;
+
+// A set of common CLSIDs
+// there are to identify the following ActiveX controls ( that appear in the ClassTable records )
// Currently we only can process ( in a limited way ) the ProgressBar
// the other ID's are for reference ( & future )
-// RefEdit control {00024512-0000-0000-c000-000000000046}
-const sal_uInt8 aRefEditID[] =
-{
-0x12, 0x45, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
-};
-
// Microsoft ProgressBar Control, version 6.0 {35053A22-8589-11D1-B16A-00C0F0283628}
const sal_uInt8 aProgressID[] =
{
0x22, 0x3a, 0x05, 0x35, 0x89, 0x85, 0xd1, 0x11, 0xb1, 0x6a, 0x00, 0xc0, 0xf0, 0x28, 0x36, 0x28,
};
+// RefEdit control {00024512-0000-0000-c000-000000000046}
+const sal_uInt8 aRefEditID[] =
+{
+0x12, 0x45, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
+};
+
// Calendar Control 10.0
const sal_uInt8 aCalendarID[] =
{
0x2b, 0xc9, 0x27, 0x8e, 0x64, 0x12, 0x1c, 0x10, 0x8a, 0x2f, 0x04, 0x02, 0x24, 0x00, 0x9c, 0x02,
};
-
// Microsoft ImageComboxBox Control, version 6.0 {DD9DA666-8594-11D1-B16A-00C0F0283628}
const sal_uInt8 aImageComboID[] =
{
@@ -738,238 +803,364 @@ const sal_uInt8 aChartSpaceID[] =
0x46, 0xe5, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
};
-const sal_Int16 ActiveXIDLen = 0x10; // CLSID len
-const sal_Int16 ActiveXIDBlockLen = 0x30; // the block len that contains the CLSID
+const sal_uInt8 nSizeOfClsid = sizeof( aProgressID );
-bool lcl_handleActiveXControl( SvStorageStream *pS, sal_uInt16& nTypeID )
+struct ClsIdTypeIDPair
{
- nTypeID = 0; // Illegal ActiveX ID
- bool bRes = false;
- sal_uInt16 nIdentifier, nFixedAreaLen;
- *pS >> nIdentifier;
- *pS >> nFixedAreaLen;
- pS->SeekRel( ( nFixedAreaLen - ActiveXIDBlockLen ) );
- sal_uInt8 aID[ ActiveXIDLen ];
- if ( !pS->IsEof() )
- {
- pS->Read( aID, ActiveXIDLen );
- pS->SeekRel( ActiveXIDBlockLen - ActiveXIDLen ); // read remainer of record
- if ( memcmp( aID, aProgressID, ActiveXIDLen ) == 0 )
+// ClsIdTypeIDPair() : pClsID( NULL ), nTypeID( UNKNOWNCTRL ) {}
+ const sal_uInt8* pClsID;
+ const sal_uInt16 nTypeID;
+};
+
+ClsIdTypeIDPair ClsidList[] = { { aProgressID, PROGRESSBAR },
+// unsupported common activex controls
+#ifdef DEBUG
+ { aRefEditID, REFEDIT },
+ { aCalendarID, CALENDAR },
+ { aImageComboID, IMAGECOMBO },
+ { aImageListID, IMAGELIST },
+ { aSliderID, SLIDER },
+ { aStatusBarID, STATUSBAR },
+ { aChartSpaceID, CHARTSPACE },
+#endif
+};
+
+typedef std::vector< ContainerRecord > ContainerRecordList;
+
+class FormObjectDepthTypeCount
+{
+ public:
+ sal_uInt8 depth;
+ sal_uInt8 TypeOrCount;
+ std::auto_ptr< sal_uInt8 > OptionalType;
+ FormObjectDepthTypeCount() : depth(0), TypeOrCount(0) {}
+ bool Read( SvStorageStream* pS )
+ {
+ *pS >> depth >> TypeOrCount;
+ if ( TypeOrCount & 0x80 )
{
- nTypeID = PROGRESSBAR;
- OSL_TRACE("Found supported ***PROGRESSBAR*** ActiveX control");
- bRes = true;
+ OptionalType.reset( new sal_uInt8 );
+ *pS >> *OptionalType;
}
-#if (OSL_DEBUG_LEVEL > 0)
- // If we really want to process these more controls we should put them in
- // a list or array and have a single loop testing each id. For the moment
- // as we only can process PROGRESSBAR, not much point doing that until
- // we add support for at least another activex control
-
- else if ( memcmp( aID, aCalendarID, ActiveXIDLen ) == 0 )
- OSL_TRACE("Found unsupported ***CALENDAR*** ActiveX control");
- else if ( memcmp( aID, aRefEditID, ActiveXIDLen ) == 0 )
- OSL_TRACE("Found unsupported ***REFEDIT*** ActiveX control");
- else if ( memcmp( aID, aImageComboID, ActiveXIDLen ) == 0 )
- OSL_TRACE("Found unsupported ***IMAGECOMBO*** ActiveX control");
- else if ( memcmp( aID, aImageListID, ActiveXIDLen ) == 0 )
- OSL_TRACE("Found unsupported ***IMAGELIST*** ActiveX control");
- else if ( memcmp( aID, aChartSpaceID, ActiveXIDLen ) == 0 )
- OSL_TRACE("Found unsupported ***CHARTSPACE*** ActiveX control");
- else if ( memcmp( aID, aSliderID, ActiveXIDLen ) == 0 )
- OSL_TRACE("Found unsupported ***SLIDER*** ActiveX control");
- else if ( memcmp( aID, aStatusBarID, ActiveXIDLen ) == 0 )
- OSL_TRACE("Found unsupported ***STATUSBAR*** ActiveX control");
-#endif
- else
+ TypeOrCount = ( TypeOrCount >> 1 );
+ return true;
+ }
+};
+
+class ClassTable
+{
+ sal_uInt16 nIdentifier;
+ sal_uInt16 nFixedAreaLen;
+ sal_uInt32 nContentFlags;
+ sal_uInt16 nClassTableFlags;
+ sal_uInt16 nVarFlags;
+ sal_Int32 nCountOfMethods;
+ sal_Int32 nDispidBind;
+ sal_uInt16 nGetBindIndex;
+ sal_uInt16 nPutBindIndex;
+ sal_uInt16 nBindType;
+ sal_uInt16 nGetValueIndex;
+ sal_uInt16 nPutValueIndex;
+ sal_uInt16 nValueType;
+ sal_uInt32 nDisidRowset;
+ sal_uInt16 nSetRowset;
+ sal_uInt8 pClsId[16];
+ sal_uInt8 pDispEvent[16];
+ sal_uInt8 pDefaultProg[16];
+ sal_uInt16 nTypeId;
+public:
+ ClassTable() : nIdentifier( 0 )
+ ,nFixedAreaLen( 0 )
+ ,nContentFlags(0)
+ ,nClassTableFlags(0)
+ ,nVarFlags(0)
+ ,nCountOfMethods(0)
+ ,nDispidBind(0)
+ ,nGetBindIndex(0)
+ ,nPutBindIndex(0)
+ ,nBindType(0)
+ ,nGetValueIndex(0)
+ ,nPutValueIndex(0)
+ ,nValueType(0)
+ ,nDisidRowset(0)
+ ,nSetRowset(0)
+ ,nTypeId(UNKNOWNCTRL)
+
+ {
+ memset( pClsId, 0, sizeof( pClsId ) );
+ memset( pDispEvent, 0, sizeof( pDispEvent ) );
+ memset( pDefaultProg, 0, sizeof( pDefaultProg ) );
+ }
+ bool Read( SvStorageStream* pS )
+ {
+ long nStartPos = pS->Tell();
+ *pS >> nIdentifier >> nFixedAreaLen >> nContentFlags;
+ bool bClsID( false );
+ bool bDispEvent( false );
+ bool bDefaultProg( false );
+ if ( nContentFlags & 0x00000001 )
+ bClsID = true;
+ if ( nContentFlags & 0x00000002 )
+ bDispEvent = true;
+// if ( nContentFlags & 0x00000004 ) ' not set should be 0
+ if ( nContentFlags & 0x00000008 )
+ bDefaultProg = true;
+ if ( nContentFlags & 0x00000010 )
+ *pS >> nClassTableFlags >> nVarFlags;
+ if ( nContentFlags & 0x00000020 )
+ *pS >> nCountOfMethods;
+ if ( nContentFlags & 0x00000040 )
+ *pS >> nDispidBind;
+ if ( nContentFlags & 0x00000080 )
+ *pS >> nGetBindIndex;
+ if ( nContentFlags & 0x00000100 )
+ *pS >> nPutBindIndex;
+ if ( nContentFlags & 0x00000200 )
+ *pS >> nBindType;
+ if ( nContentFlags & 0x00000400 )
+ *pS >> nGetValueIndex;
+ if ( nContentFlags & 0x00000800 )
+ *pS >> nPutValueIndex;
+ if ( nContentFlags & 0x00001000 )
+ *pS >> nValueType;
+ if ( nContentFlags & 0x00002000 )
{
- OSL_TRACE("Unknown activeX ID !");
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ *pS >> nDisidRowset;
}
+ if ( nContentFlags & 0x00004000 )
+ *pS >> nSetRowset;
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ // Extra Block
+ if ( bClsID )
+ pS->Read( pClsId, sizeof( pClsId ) );
+ if ( bDispEvent )
+ pS->Read( pDispEvent, sizeof( pDispEvent ) );
+ if ( bDefaultProg )
+ pS->Read( pDefaultProg, sizeof( pDefaultProg ) );
+
+ sal_Int32 nNumIds = SAL_N_ELEMENTS( ClsidList );
+
+ if ( bClsID )
+ {
+ for ( sal_Int32 index = 0; index < nNumIds; ++index )
+ {
+ if ( memcmp( pClsId, ClsidList[ index ].pClsID, nSizeOfClsid ) == 0 )
+ {
+ nTypeId = ClsidList[ index ].nTypeID;
+ OSL_TRACE( "... found activex control ClsidList[ %d ] and have given it TypeIdent 0x%x", index, nTypeId );
+ }
+ }
+ }
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ return true;
}
- return bRes;
-}
-typedef std::vector< ContainerRecord > ContainerRecordList;
+ sal_uInt16 getTypeId() { return nTypeId; }
+};
-class ContainerRecReader
+class OleSiteConcreteControl
{
- public:
+ sal_uInt16 nIdentifier;
+ sal_uInt16 nFixedAreaLen;
+ sal_uInt32 nContentFlags;
+public:
+ OleSiteConcreteControl() : nIdentifier( 0 ), nFixedAreaLen( 0 ), nContentFlags(0) {}
+ bool Read( ContainerRecord& rec, SvStorageStream* pS )
+ {
+ long nStartPos = pS->Tell();
+ *pS >> nIdentifier >> nFixedAreaLen >> nContentFlags;
+
+ bool bPosition( false );
+
+ sal_uInt32 nNameLen = 0;
+ // length of control name
+ if ( nContentFlags & 0x00000001 )
+ *pS >> nNameLen;
+ // length of control tag
+ sal_uInt32 nTagLen = 0;
+ if( nContentFlags & 0x00000002 )
+ *pS >> nTagLen;
+ // substorage id for frames
+ if( nContentFlags & 0x00000004 )
+ *pS >> rec.nSubStorageId;
+ // help-context id
+ if( nContentFlags & 0x00000008 )
+ pS->SeekRel( 4 );
+ // option flags
+ if( nContentFlags & 0x00000010 )
+ {
+ sal_uInt32 nBitFlags = 0;
+ *pS >> nBitFlags;
+ rec.bVisible = ( nBitFlags & 0x02 );
+ rec.bTabStop = ( nBitFlags & 0x01 );
+ }
+ // substream size
+ if( nContentFlags & 0x00000020 )
+ *pS >> rec.nSubStreamLen;
+ // tabstop position
+ if( nContentFlags & 0x00000040 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 2 );
+ *pS >> rec.nTabPos;
+ }
+ // control type
+ if( nContentFlags & 0x00000080 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 2 );
+ *pS >> rec.nTypeIdent;
+ }
+ if( nContentFlags & 0x00000100 )
+ bPosition = true;
+ sal_Int16 nGroupId = 0;
+ if( nContentFlags & 0x00000200 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 2 );
+ *pS >> nGroupId;
+ }
- virtual ~ContainerRecReader() {}
+ // length of infotip
+ sal_uInt32 nTipLen = 0;
+ if( nContentFlags & 0x00000800 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ *pS >> nTipLen;
+ }
+ sal_uInt32 nCntrlIdLen = 0;
+ if( nContentFlags & 0x00001000 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ *pS >> nCntrlIdLen;
+ }
- virtual bool Read( OCX_ContainerControl* pContainerControl, SvStorageStream *pS)
- {
- *pS >> nNoRecords;
- *pS >> nTotalLen;
+ // length of control source name
+ sal_uInt32 nCtrlSrcLen = 0;
+ if( nContentFlags & 0x00002000 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ *pS >> nCtrlSrcLen;
+ }
- if ( isMultiPage )
+ // length of row source name
+ sal_uInt32 nRowSrcLen = 0;
+ if( nContentFlags & 0x00004000 )
{
- if ( !handleMultiPageHdr( pS ) )
- {
- return false;
- }
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ *pS >> nRowSrcLen;
}
- else
+
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ // control name
+ sal_Char* pName = 0;
+ sal_uInt32 nNameBufSize = lclGetBufferSize( nNameLen );
+ if( nNameBufSize > 0 )
{
- if ( !handleStandardHdr( pS ) )
- {
- return false;
- }
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ pName = new char[ nNameBufSize ];
+ pS->Read( pName, nNameBufSize );
+ }
+ // control tag
+ sal_uInt32 nTagBufSize = lclGetBufferSize( nTagLen );
+ if( nTagBufSize > 0 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ pS->SeekRel( nTagBufSize );
}
- records.clear();
- for (sal_uInt32 nRecord = 0; nRecord < nNoRecords; ++nRecord)
+ // control position
+ if( bPosition )
{
- // DR #134146# redo loading of FrameChild data
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ *pS >> rec.nLeft >> rec.nTop;
+ }
- ContainerRecord rec;
+ // control infotip
+ sal_uInt32 nTipBufSize = lclGetBufferSize( nTipLen );
+ if( nTipBufSize > 0 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ std::auto_ptr< sal_Char > pTipName;
+ pTipName.reset( new sal_Char[ nTipBufSize ] );
+ pS->Read( pTipName.get(), nTipBufSize );
+ rec.controlTip = lclCreateOUString( pTipName.get(), nTipLen );
+ }
+ // control id
+ sal_uInt32 nCntrlIdSize = lclGetBufferSize( nCntrlIdLen );
+ if( nCntrlIdSize > 0 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ pS->SeekRel( nCntrlIdSize );
+ }
+ // control source name
+ sal_uInt32 nCtrlSrcBufSize = lclGetBufferSize( nCtrlSrcLen );
+ if( nCtrlSrcBufSize > 0 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ std::vector< sal_Char > pCtrlSrcName( nCtrlSrcBufSize );
+ pS->Read( &pCtrlSrcName[0], nCtrlSrcBufSize );
+ rec.sCtrlSource = lclCreateOUString( &pCtrlSrcName[0], nCtrlSrcLen );
+ OSL_TRACE("*** *** *** ControlSourceName -> %s ", rtl::OUStringToOString( rec.sCtrlSource, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ // row source name
+ sal_uInt32 nRowSrcBufSize = lclGetBufferSize( nRowSrcLen );
+ if( nRowSrcBufSize > 0 )
+ {
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ std::vector< sal_Char > pRowSrcName( nRowSrcBufSize );
+ pS->Read( &pRowSrcName[0], nRowSrcBufSize );
+ rec.sRowSource = lclCreateOUString( &pRowSrcName[0], nRowSrcLen );
+ OSL_TRACE("*** *** *** RowSourceName -> %s ", rtl::OUStringToOString( rec.sRowSource, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
- // record header
- sal_uInt16 nId, nSize;
- *pS >> nId >> nSize;
- sal_Size nStartPos = pS->Tell();
-
- // content flags
- sal_uInt32 nContentFlags;
- *pS >> nContentFlags;
-
- // length of control name
- sal_uInt32 nNameLen = 0;
- if( nContentFlags & 0x00000001 )
- *pS >> nNameLen;
- // length of control tag
- sal_uInt32 nTagLen = 0;
- if( nContentFlags & 0x00000002 )
- *pS >> nTagLen;
- // substorage id for frames
- if( nContentFlags & 0x00000004 )
- *pS >> rec.nSubStorageId;
- // help-context id
- if( nContentFlags & 0x00000008 )
- pS->SeekRel( 4 );
- // option flags
- if( nContentFlags & 0x00000010 )
- {
- sal_uInt32 nBitFlags = 0;
- *pS >> nBitFlags;
- rec.bVisible = ( ( nBitFlags & 0x02 ) == 0x02 );
- }
- // substream size
- if( nContentFlags & 0x00000020 )
- *pS >> rec.nSubStreamLen;
- // tabstop position
- if( nContentFlags & 0x00000040 )
- *pS >> rec.nTabPos;
- // control type
- if( nContentFlags & 0x00000080 )
- *pS >> rec.nTypeIdent;
- if( nContentFlags & 0x00000200 )
- pS->SeekRel( 4 ); // Grouping?
- // length of infotip
- sal_uInt32 nTipLen = 0;
- if( nContentFlags & 0x00000800 )
- {
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- *pS >> nTipLen;
- }
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ rec.cName = lclCreateOUString(pName, nNameLen);
+ delete[] pName;
+ return true;
+ }
+};
- sal_uInt32 nCntrlIdLen = 0;
- if( nContentFlags & 0x00001000 )
- *pS >> nCntrlIdLen;
+class ContainerRecReader
+{
+ public:
- // length of control source name
- sal_uInt32 nCtrlSrcLen = 0;
- if( nContentFlags & 0x00002000 )
- {
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- *pS >> nCtrlSrcLen;
- }
+ virtual ~ContainerRecReader() {}
- // length of row source name
- sal_uInt32 nRowSrcLen = 0;
- if( nContentFlags & 0x00004000 )
- {
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- *pS >> nRowSrcLen;
- }
+ virtual bool Read( OCX_ParentControl* pContainerControl, SvStorageStream *pS, std::vector< ClassTable >& rSiteClassInfo )
+ {
+ *pS >> nNoRecords;
+ *pS >> nTotalLen;
+ long nStart = pS->Tell();
+ for ( sal_uInt32 nSite = 0; nSite < nNoRecords; )
+ {
+ FormObjectDepthTypeCount siteAndDepth;
+ siteAndDepth.Read( pS );
+ nSite += ( siteAndDepth.OptionalType.get() ? siteAndDepth.TypeOrCount : 1 );
+ }
- // control name
- sal_Char* pName = 0;
- sal_uInt32 nNameBufSize = lclGetBufferSize( nNameLen );
- if( nNameBufSize > 0 )
- {
- pName = new char[ nNameBufSize ];
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- pS->Read( pName, nNameBufSize );
- }
- // control tag
- sal_uInt32 nTagBufSize = lclGetBufferSize( nTagLen );
- if( nTagBufSize > 0 )
- {
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- pS->SeekRel( nTagBufSize );
- }
+ ReadAlign(pS, pS->Tell() - nStart, 4);
- // control position
- if( nContentFlags & 0x00000100 )
- {
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- *pS >> rec.nLeft >> rec.nTop;
- }
+ for (sal_uInt32 nRecord = 0; nRecord < nNoRecords; ++nRecord)
+ {
- // control infotip
- sal_uInt32 nTipBufSize = lclGetBufferSize( nTipLen );
- if( nTipBufSize > 0 )
- {
- std::auto_ptr< sal_Char > pTipName;
- pTipName.reset( new sal_Char[ nTipBufSize ] );
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- pS->Read( pTipName.get(), nTipBufSize );
- rec.controlTip = lclCreateOUString( pTipName.get(), nTipLen );
- }
- // control id
- sal_uInt32 nCntrlIdSize = lclGetBufferSize( nCntrlIdLen );
- if( nCntrlIdSize > 0 )
- {
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- pS->SeekRel( nCntrlIdSize );
- }
- // control source name
- sal_uInt32 nCtrlSrcBufSize = lclGetBufferSize( nCtrlSrcLen );
- if( nCtrlSrcBufSize > 0 )
- {
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- std::auto_ptr< sal_Char > pCtrlSrcName;
- pCtrlSrcName.reset( new sal_Char[ nCtrlSrcBufSize ] );
- pS->Read( pCtrlSrcName.get(), nCtrlSrcBufSize );
- rec.sCtrlSource = lclCreateOUString( pCtrlSrcName.get(), nCtrlSrcLen );
- OSL_TRACE("*** *** *** ControlSourceName -> %s ", rtl::OUStringToOString( rec.sCtrlSource, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- // row source name
- sal_uInt32 nRowSrcBufSize = lclGetBufferSize( nRowSrcLen );
- if( nRowSrcBufSize > 0 )
+ ContainerRecord rec;
+
+ OleSiteConcreteControl site;
+ site.Read( rec, pS );
+ if ( rec.nTypeIdent >= ( UNKNOWNCTRL + 1 ) )
{
- ReadAlign( pS, pS->Tell() - nStartPos, 4 );
- std::auto_ptr< sal_Char > pRowSrcName;
- pRowSrcName.reset( new sal_Char[ nRowSrcBufSize ] );
- pS->Read( pRowSrcName.get(), nRowSrcBufSize );
- rec.sRowSource = lclCreateOUString( pRowSrcName.get(), nRowSrcLen );
- OSL_TRACE("*** *** *** RowSourceName -> %s ", rtl::OUStringToOString( rec.sRowSource, RTL_TEXTENCODING_UTF8 ).getStr() );
+ sal_uInt16 nIndex = rec.nTypeIdent - ( UNKNOWNCTRL + 1 );
+ if ( nIndex < rSiteClassInfo.size() )
+ rec.nTypeIdent = rSiteClassInfo[ nIndex ].getTypeId();
}
-
- // seek to end of data
- pS->Seek( nStartPos + nSize );
-
- rec.cName = lclCreateOUString(pName, nNameLen);
- delete[] pName;
-
OCX_Control* pControl = NULL;
+ OSL_TRACE("** About to create control of type 0x%x with name %s from rec", rec.nTypeIdent, rtl::OUStringToOString( rec.cName, RTL_TEXTENCODING_UTF8 ).getStr() );
if( pContainerControl->createFromContainerRecord( rec, pControl ) &&
pControl )
{
// propagate doc shell from parent
pControl->pDocSh = pContainerControl->pDocSh;
pContainerControl->ProcessControl( pControl, pS, rec );
+
}
else if ( rec.nTypeIdent & 0x8000 )
{
@@ -987,90 +1178,12 @@ class ContainerRecReader
return true;
}
+ ContainerRecReader():nNoRecords(0), nTotalLen(0){}
protected:
- ContainerRecReader() : isMultiPage(false){}
- bool isMultiPage;
sal_uInt32 nNoRecords;
sal_uInt32 nTotalLen;
private:
- bool handleStandardHdr( SvStorageStream* pS )
- {
- sal_uInt8 aUnknown11[4];
- pS->Read(aUnknown11, sizeof(aUnknown11));
- // discovered a dialog with value of 0xFF for aUnknown11
- // needed an extra 4 bytes to offset correctly into the control
- // records. Valid test or coincidence ?
- if ( aUnknown11[1] == 0xFF )
- pS->Read( aUnknown11, sizeof(aUnknown11));
- return true;
- }
-
- bool handleMultiPageHdr( SvStorageStream* pS )
- {
- sal_uInt32 nUnknown_32b; // unknown 32 bit structure, flags ?
- sal_uInt16 nUnknown_16b; // unknown 16 bit structure
- sal_uInt16 nMysteryLen; // lenght of unknown sub record
-
- *pS >> nUnknown_32b;
- *pS >> nUnknown_16b;
- *pS >> nMysteryLen;
-
- pS->SeekRel( nMysteryLen );
- return true;
- }
- ContainerRecordList records;
-};
-
-class StdContainerRecReader : public ContainerRecReader
-{
- public:
- StdContainerRecReader(){}
-};
-
-class MultiPageContainerRecReader : public ContainerRecReader
-{
- public:
- MultiPageContainerRecReader()
- {
- // NP ( 27-01-05 )
- // Strictly speaking this approach shouldn't be necessary.
- // It should be possible to have a common routine read the
- // container record array and by examining the flags present in
- // the record to determine we expect to read or not.
- // In this case for a MultPage control there is no Top or Left
- // values in the control record array, however time contraints
- // and associated risk prevent further investigation of this
- // at the moment.
- // similar situation exists for the start of the container record
- // which in the case of the MultiPage is different from
- // UserForm & Frame ( the other containers )
-
- isMultiPage = true; // tell the base class skip
- }
-};
-
-class ContainerRecordReaderFac
-{
- public:
- static ContainerRecReader* instance( sal_uInt32 containerType )
- {
- switch( containerType )
- {
- case PAGE:
- case FRAME:
- case USERFORM:
- case STDCONTAINER:
- return new StdContainerRecReader();
- case MULTIPAGE:
- return new MultiPageContainerRecReader();
- default:
- DBG_ERROR("Illegal container type for factory");
- return NULL;
- }
- }
- private:
- ContainerRecordReaderFac();
};
} // namespace
@@ -1273,6 +1386,7 @@ sal_Bool OCX_Control::Import(uno::Reference<container::XNameContainer> &rDialog
}
uno::Reference<beans::XPropertySet> xPropSet(xCreate, uno::UNO_QUERY);
+
if (!xPropSet.is())
return sal_False;
@@ -1920,7 +2034,7 @@ sal_Bool OCX_OptionButton::Import(com::sun::star::uno::Reference<
sGroupName = sParentName.concat( C2U( ":" ) ).concat( sGroupName );
}
if ( sGroupName.getLength() == 0 )
- sGroupName = rtl::OUString::createFromAscii("DefaultGroup");
+ sGroupName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultGroup" ));
OSL_TRACE("RadioButton %s has groupname %s",
rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( sGroupName, RTL_TEXTENCODING_UTF8 ).getStr() );
try
@@ -2202,6 +2316,12 @@ sal_Bool OCX_TextBox::Import(com::sun::star::uno::Reference<
}
}
+ if ( sImageUrl.getLength() )
+ {
+ aTmp <<= sImageUrl;
+ rPropSet->setPropertyValue( WW8_ASCII2STR("ImageURL"), aTmp);
+ }
+
aFontData.Import(rPropSet);
return sal_True;
}
@@ -3648,8 +3768,15 @@ sal_Bool OCX_Label::Read(SvStorageStream *pS)
{
pS->Read(pPictureHeader,20);
*pS >> nPictureLen;
- pPicture = new sal_uInt8[nPictureLen];
- pS->Read(pPicture,nPictureLen);
+ long imagePos = pS->Tell();
+ mxGrfObj = lcl_readGraphicObject( pS );
+ if( mxGrfObj.is() )
+ {
+ sImageUrl = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( GRAPHOBJ_URLPREFIX ) );
+ sImageUrl = sImageUrl + mxGrfObj->getUniqueID();
+ }
+ // make sure the stream position should be pointing after the image
+ pS->Seek( imagePos + nPictureLen );
}
if (nIcon)
{
@@ -3669,325 +3796,61 @@ TypeName::TypeName(sal_Char *pName, sal_uInt32 nStoreId, sal_uInt32 nLen, sal_uI
{
}
-OCX_ContainerControl::OCX_ContainerControl( SotStorageRef& parent,
- const ::rtl::OUString& storageName,
- const ::rtl::OUString& sN,
- const uno::Reference< container::XNameContainer > &rParent,
- OCX_Control* pParent ) :
- OCX_Control(sN, pParent), mxParent(rParent), nNoRecords(0), nTotalLen(0), containerType( STDCONTAINER )
-{
-
- mContainerStorage = parent->OpenSotStorage(storageName,
- STREAM_READWRITE |
- STREAM_NOCREATE |
- STREAM_SHARE_DENYALL);
- mContainerStream = mContainerStorage->OpenSotStream(
- String(RTL_CONSTASCII_STRINGPARAM("f"),
- RTL_TEXTENCODING_MS_1252),
- STREAM_STD_READ | STREAM_NOCREATE);
- mContainedControlsStream = mContainerStorage->OpenSotStream( String(RTL_CONSTASCII_STRINGPARAM("o"),
- RTL_TEXTENCODING_MS_1252),
- STREAM_STD_READ | STREAM_NOCREATE);
-}
-OCX_ContainerControl::~OCX_ContainerControl()
-{
- CtrlIterator aEnd = mpControls.end();
- for (CtrlIterator aIter = mpControls.begin(); aIter != aEnd; ++ aIter )
- {
- delete *aIter;
- }
-}
-
-// Really import should receive the parent e.g. a Userform, Frame or Multi Page
-// and call import on its containees with itself ( up-called from
-// the base class ) but... the reality is we have no containment model
-// so we make sure rPropSet is always the parent Dialog
-
-sal_Bool OCX_ContainerControl::Import(uno::Reference<beans::XPropertySet>& /* rProps */ )
-{
- if ( !mxParent.is() )
- {
- return sal_False;
- }
- CtrlIterator aEnd = mpControls.end();
-// int count = 0;
- for (CtrlIterator aIter = mpControls.begin(); aIter != aEnd; ++ aIter )
- {
- if ( !(*aIter)->Import( mxParent ) )
- {
- return sal_False;
- }
- }
- return sal_True;
-}
-
-OUString OCX_ContainerControl::createSubStreamName( const sal_uInt32& subStorageId )
-{
- static OUString sI = OUString::createFromAscii("i");
- static OUString sZero = OUString::createFromAscii( "0" );
- OUStringBuffer buf( 6 );
- buf.append( sI );
- // for subStorage id < 10 stream name has leading '0'
- // eg "i07"
- if ( subStorageId < 10 )
- {
- buf.append( sZero );
- }
- buf.append( OUString::valueOf( (sal_Int32)subStorageId ) );
- return buf.makeStringAndClear();
-}
-
-
-bool OCX_ContainerControl::createFromContainerRecord( ContainerRecord& record, OCX_Control*& pControl )
-{
- pControl = NULL;
- if ( record.nTypeIdent & 0x8000 )
- {
- std::hash_map<sal_uInt16, sal_uInt16>::iterator it = mActiveXIDMap.find( record.nTypeIdent );
- if ( it == mActiveXIDMap.end() )
- return false;
- // replace the generated id with our hardcoded one
- record.nTypeIdent = it->second;
- }
- switch ( record.nTypeIdent)
- {
- case CMDBUTTON:
- pControl = new OCX_CommandButton;
- break;
- case LABEL:
- pControl = new OCX_UserFormLabel(this);
- break;
- case TEXTBOX:
- pControl = new OCX_TextBox;
- break;
- case LISTBOX:
- pControl = new OCX_ListBox;
- break;
- case COMBOBOX:
- pControl = new OCX_ComboBox;
- break;
- case CHECKBOX:
- pControl = new OCX_CheckBox;
- break;
- case OPTIONBUTTON:
- pControl = new OCX_OptionButton;
- break;
- case TOGGLEBUTTON:
- pControl = new OCX_ToggleButton;
- break;
- case IMAGE: //Image
- {
- pControl = new OCX_Image;
- break;
- }
- case PAGE: // Page
- {
- OUString sMSStore = createSubStreamName( record.nSubStorageId );
- pControl = new OCX_Page(mContainerStorage, sMSStore,
- record.cName, mxParent, this);
- break;
- }
- case MULTIPAGE: // MultiPage
- {
- OUString sMSStore = createSubStreamName( record.nSubStorageId );
- pControl = new OCX_MultiPage( mContainerStorage, sMSStore,
- record.cName, mxParent, this);
- break;
- }
- case FRAME: //Frame
- {
- OUString sFrameStore = createSubStreamName( record.nSubStorageId );
- pControl = new OCX_Frame(mContainerStorage, sFrameStore,
- record.cName, mxParent, this);
-
- break;
- }
- case SPINBUTTON: //SpinButton
- {
- pControl = new OCX_SpinButton;
- break;
- }
- case TABSTRIP: //TabStrip
- {
- pControl = new OCX_TabStrip;
- break;
- }
- case SCROLLBAR: //ScrollBar
- pControl = new OCX_ScrollBar;
- break;
- case PROGRESSBAR: //ProgressBar Active X control
- pControl = new OCX_ProgressBar;
- break;
- default:
- OSL_TRACE( "**** Unknown control 0x%x", record.nTypeIdent );
- DBG_ERROR( "Unknown control");
- return false;
- }
- pControl->sName = record.cName;
- return true;
-}
-
-
-void addSeperator( std::vector< OCX_Control* >& dest )
-{
- OCX_Control* seperator = new OCX_CommandButton;
- seperator->SetInDialog(true);
- seperator->sName = C2S("GroupSeperator");
- dest.push_back( seperator );
-}
-
-void addRButtons( std::vector< OCX_Control* >& src,
- std::vector< OCX_Control* >& dest,
- bool addGroupSeperator )
-{
- if ( addGroupSeperator )
- {
- addSeperator( dest );
- }
-
- for ( CtrlIterator rbIter = src.begin(); rbIter != src.end(); ++rbIter )
- {
- dest.push_back( *rbIter );
- }
-}
-
-void OCX_ContainerControl::ProcessControl(OCX_Control* pControl,SvStorageStream* /* pS */, ContainerRecord& rec )
-{
- SotStorageStreamRef oStream = mContainedControlsStream;
-
- // can insert into OO Dialog (e.g is this a supported dialog control)??
- if ( rec.nTypeIdent == TABSTRIP )
- {
- // skip the record in the stream, discard the control
- oStream->SeekRel( rec.nSubStreamLen );
- delete pControl;
- }
- else
- {
- // A container control needs to read the f stream in
- // the folder ( substorage ) associated with this control
- switch ( rec.nTypeIdent )
- {
- case FRAME:
- case MULTIPAGE:
- case PAGE:
- {
- OCX_ContainerControl* pContainer =
- static_cast< OCX_ContainerControl* >( pControl );
- oStream = pContainer->getContainerStream();
- break;
- }
- case LISTBOX:
- case OPTIONBUTTON:
- case COMBOBOX:
- case SPINBUTTON:
- case SCROLLBAR:
- {
- pControl->msCtrlSource = rec.sCtrlSource;
- pControl->msRowSource = rec.sRowSource;
- }
- }
- pControl->sName = rec.cName;
- pControl->msToolTip = rec.controlTip;
- // Position of controls is relative to the container
- pControl->mnTop = rec.nTop + mnTop;
- pControl->mnLeft = rec.nLeft + mnLeft;
- // MS tabIndex, pretty useless in OpenOffice land
- // as tab indexes in MS are relative to parent container.
- // However we need this value in order to set
- // OpenOffice tab indices in a sensible way to
- // reflect the ms tabbing from orig MS UserForm, see below
- pControl->mnTabPos = rec.nTabPos;
- pControl->SetInDialog(true);
- pControl->mbVisible = rec.bVisible;
- if ( mnStep )
- {
- // If the container has a step then it should be
- // applied to all containees
- pControl->mnStep = mnStep;
- }
- pControl->msParentName = sName;
-
- // #117490# DR: container records provide size of substream, use it here...
-
- // remember initial position to set correct stream position
- ULONG nStrmPos = oStream->Tell();
- // import control, may return with invalid stream position
- pControl->FullRead(oStream);
- // set stream to position behind substream of this control
- oStream->Seek( nStrmPos + rec.nSubStreamLen );
-
- mpControls.push_back( pControl );
- }
-}
-
-sal_Bool OCX_ContainerControl::Read(SvStorageStream *pS)
-{
-
- if ( mpParent )
- {
- mnBackColor = mpParent->mnBackColor;
- }
-
- std::auto_ptr< ContainerRecReader > reader (
- ContainerRecordReaderFac::instance( containerType ) );
-
- reader->Read( this, pS );
- // Need to honour the MS Tab Indexes. However MS tab indexes are
- // relative to parent, this hack sorts the controls in each container
- // based on the ms tab indexes. When import is called we create the
- // controls in Open/Star office based on the order of the tab indexes,
- // this ensures that the default tab index created by Star/Open office
- // reflects the "flattened" ms tab order.
- ::std::sort( mpControls.begin(), mpControls.end(), SortOrderByTabPos() );
- return true;
-}
-
OCX_MultiPage::OCX_MultiPage( SotStorageRef& parent,
const ::rtl::OUString& storageName,
const ::rtl::OUString& sN,
const uno::Reference< container::XNameContainer > &rDialog,
OCX_Control* pParent):
- OCX_ContainerControl(parent, storageName, sN, rDialog, pParent ), fUnknown1(0), fEnabled(1),
- fLocked(0), fBackStyle(1), fWordWrap(1), fAutoSize(0), nCaptionLen(0),
- nVertPos(1), nHorzPos(7), nMousePointer(0), nBorderColor(0x80000012),
- nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nSpecialEffect(0),
- nPicture(0), nPictureAlignment(2), nPictureSizeMode(0),
- bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0),
- nScrollWidth(0), nScrollHeight(0), nIconLen(0), pIcon(0), nPictureLen(0),
- pPicture(0)
-{
- //msDialogType = C2U("NotSupported");
+ OCX_ParentControl(parent, storageName, sN, rDialog, pParent ), bHasTabs( true )
+
+{
msDialogType = C2U("com.sun.star.awt.UnoMultiPageModel");
mnForeColor = 0x80000012L,
mnBackColor = 0x8000000FL;
bSetInDialog = true;// UserForm control only
aFontData.SetHasAlign(TRUE);
- containerType = MULTIPAGE;
- mnCurrentPageStep = 0;
+ nActiveTab = 0;
+ // open up the 'x' stream
+ mXStream = mContainerStorage->OpenSotStream(
+ String(RTL_CONSTASCII_STRINGPARAM("x"),
+ RTL_TEXTENCODING_MS_1252),
+ STREAM_STD_READ | STREAM_NOCREATE);
}
void OCX_MultiPage::ProcessControl(OCX_Control* pControl, SvStorageStream* /* pS */, ContainerRecord& rec )
{
SotStorageStreamRef oStream = mContainedControlsStream;
- OCX_Page *pPage = NULL;
- if ( rec.nTypeIdent == PAGE )
- pPage = static_cast< OCX_Page* >( pControl );
- if ( pPage != NULL )
+ if ( rec.nTypeIdent == TABSTRIP )
{
- pPage->mnStep = ++mnCurrentPageStep;
-
- pPage->mnTop = mnTop;// move these to Page::import ?
- pPage->mnLeft = mnLeft;
- pPage->mnBackColor = mnBackColor;
-
- oStream = pPage->getContainerStream();;
- // Position of controls is relative to pos of this MuliPage
- // Control
- pPage->FullRead( oStream );
+ // TabStrip reads the 'o' stream
+ OCX_TabStrip oTabStrip;
+ oTabStrip.sName = C2S("FromMultiPage-o");
+ oTabStrip.Read( mContainedControlsStream );
+ sCaptions = oTabStrip.msItems;
+ bHasTabs = oTabStrip.bHasTabs;
+ nHeight = oTabStrip.nHeight;
+ nWidth = oTabStrip.nWidth;
+ }
+ else if ( rec.nTypeIdent == PAGE )
+ {
+ OCX_Page *pPage = NULL;
+ pPage = static_cast< OCX_Page* >( pControl );
+ if ( pPage != NULL )
+ {
+ oStream = pPage->getContainerStream();;
+ // Position of controls is relative to pos of this MuliPage
+ // Control
+ pPage->FullRead( oStream );
+ // nWidth & nHeight seem to screw up multipage control
+ pPage->nWidth = 0;
+ pPage->nHeight = 0;
+ pPage->mnBackColor = mnBackColor;
+
+ mpControls.push_back( pPage );
+ idToPage[ pPage->mnID ] = pPage;
+ }
- mpControls.push_back( pPage );
}
else
{
@@ -4001,110 +3864,78 @@ sal_Bool OCX_MultiPage::Read(SvStorageStream *pS)
{
// Unlike the other containers e.g. UserForm & Frame
// the o stream is does not contain info for the contained controls
- // ( e.g. the pages themselves ) but seems to be for the MultiPage
- // itself - need to check this in more detail
-
- // For the moment skip read of the MultiPage specific properties
- // not much point reading these as we can't display the multi page
- // control or in fact any sort of tabbed layout, best we can do is
- // import just the contained controls of the individual pages
- // Note: the record skipped below ( does not contain the expected
- // info on this control, that seems to be contained in the o stream,
- // see comment above)
+ // 'o' stream contains a tabstrip control
+ // 'f' stream as usual ( info about the containees )
+ // '01..09' ( etc. ) these streams contain the page controls
+ // 'x' stream, this contains an array of properties for each page followed
+ // by a set of properties for the multipage control itself
+
+ // read the 'f' stream
+ OCX_ParentControl::Read(pS);
+
+ // Read the 'x' stream
+ // consists of
+ // a) nTabs + 1 PageProperties ( which are little use to us )
+ // => skip
+ // b) a MutliPageProperty ( which contains at least the page count and
+ // IDs of the pages ( and order ) - useful for associating correct page
+ // with correct tab
+
+
OCX_Control skip(C2S("Dummy"));
- skip.Read( pS );
- mnCurrentPageStep = mnStep; //( set step of of pages relative to step
- //of this MultiPage ( e.g. emulate containment )
- return OCX_ContainerControl::Read(pS);
+ sal_Int32 nPagePropsToRead = sCaptions.size() + 1;
+ for ( sal_Int32 page = 0; page < nPagePropsToRead; ++page )
+ skip.Read( mXStream );
+ MultiPageProps multiPage;
+ multiPage.Read( mXStream );
+ mPageIds = multiPage.mnIDs;
+ return true;
}
sal_Bool OCX_MultiPage::Import(com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet> &rPropSet)
{
- OCX_ContainerControl::Import( rPropSet );
- return sal_True;
-}
-
-sal_Bool OCX_MultiPage::Import(com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer>
- &rDialog)
-{
- uno::Reference<beans::XPropertySet> xPropSet( rDialog, uno::UNO_QUERY );
-
- // Although MultiPage is not represeted by a "real" control we still
- // need to propagate the backcolor of this logical parent
- // ( the dialog or Frame or whatever ) to the children of this control.
- // For example the controls contained in the Page of a
- // MultiPage control use the parents backcolor ( e,g,
- // Pages backcolor ) when trying to fake transparency
- mnBackColor = mpParent->mnBackColor;
-
- if ( xPropSet.is() )
- {
- uno::Reference<lang::XMultiServiceFactory>
- xFactory(rDialog, uno::UNO_QUERY);
- OSL_TRACE("** MultiPage creating control %s", rtl::OUStringToOString( msDialogType, RTL_TEXTENCODING_UTF8 ).getStr() );
- uno::Reference<uno::XInterface> xCreate = xFactory->createInstance(msDialogType);
- if (!xCreate.is())
- return sal_False;
-
- uno::Reference<awt::XControlModel> xModel(xCreate, uno::UNO_QUERY);
- if (!xModel.is())
- return sal_False;
-
- try
+ uno::Any aTmp(&sName,getCppuType((OUString *)0));
+ rPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp);
+ if ( !bHasTabs )
+ rPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Decoration")), uno::makeAny( sal_False ) );
+ aTmp <<= ImportColor(mnBackColor);
+ rPropSet->setPropertyValue( WW8_ASCII2STR("BackgroundColor"), aTmp);
+ // apply caption/titles to pages
+ std::vector<sal_Int32>::iterator itCtrlId = mPageIds.begin();
+ std::vector<sal_Int32>::iterator itCtrlId_end = mPageIds.end();
+ std::vector< rtl::OUString >::iterator itCaption = sCaptions.begin();
+ mpControls.clear();
+ // need to sort the controls according to the order of the ids
+ for ( sal_Int32 index = 1 ; ( sCaptions.size() == idToPage.size() ) && itCtrlId != itCtrlId_end; ++itCtrlId, ++itCaption, ++index )
+ {
+ std::hash_map< sal_Int32, OCX_Page* >::iterator it = idToPage.find( *itCtrlId );
+ if ( it != idToPage.end() )
{
- // we should just call MultiPage::Import( XPropertySet )
- OSL_TRACE("********* MULTIPAGE cName %s", rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() );
- uno::Any aTmp(&sName,getCppuType((OUString *)0));
- uno::Reference<beans::XPropertySet> xPrps(xModel, uno::UNO_QUERY);
- xPrps->setPropertyValue( WW8_ASCII2STR("Name"), aTmp );
- aTmp = uno::makeAny( mnCurrentPageStep );
- xPrps->setPropertyValue( WW8_ASCII2STR("ProgressValueMax"), aTmp );
- // default current page to 0 ( #FIXME, we need to read this value )
- aTmp = uno::makeAny( sal_Int32(0) );
- xPrps->setPropertyValue( WW8_ASCII2STR("ProgressValue"), aTmp );
- OSL_TRACE("********* MULTIPAGE vomitted out properties");
+ it->second->msTitle = *itCaption;
+ if ( it->second->mbVisible )
+ nActiveTab = index;
+ mpControls.push_back( it->second );
- // Calls import on contained controls
- rDialog->insertByName(sName, uno::makeAny(xModel));
- OSL_TRACE("*** inserted ***");
}
- catch( uno::Exception& )
- {
- DBG_ERRORFILE(
- ByteString( "OCX_Control::Import - cannot insert control \"" ).
- Append( ByteString( sName, RTL_TEXTENCODING_UTF8 ) ).
- Append( '"' ).GetBuffer() );
- }
-
- // Calls import on contained pages
- return OCX_ContainerControl::Import( xPropSet );
}
- OSL_TRACE("*** Major problem, no dialog to add controls to ");
- DBG_ERROR(" Major problem, no dialog to add controls to ");
- return false;
-}
-
+ OCX_ParentControl::Import( rPropSet );
+ rPropSet->setPropertyValue( WW8_ASCII2STR("MultiPageValue"), uno::makeAny( nActiveTab ));
+ return sal_True;
+}
OCX_Page::OCX_Page( SotStorageRef& parent,
- const ::rtl::OUString& storageName,
+ sal_Int32 nId,
const ::rtl::OUString& sN,
const uno::Reference< container::XNameContainer > &rDialog,
OCX_Control* pParent):
- OCX_ContainerControl(parent, storageName, sN, rDialog, pParent ),
- fUnknown1(0), fEnabled(1), fLocked(0),
- fBackStyle(1), fWordWrap(1), fAutoSize(0), nCaptionLen(0), nVertPos(1),
- nHorzPos(7), nMousePointer(0), nBorderColor(0x80000012),
- nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nSpecialEffect(0),
- nPicture(0), nPictureAlignment(2), nPictureSizeMode(0),
- bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0),
- nScrollWidth(0), nScrollHeight(0), nIconLen(0), pIcon(0), nPictureLen(0),
- pPicture(0)
-{
- msDialogType = C2U("NotSupported");
+ OCX_ParentControl(parent, createSubStreamName( nId ), sN, rDialog, pParent ), mnID( nId )
+{
+ msDialogType = C2U("com.sun.star.awt.UnoPageModel");
mnForeColor = 0x80000012,
mnBackColor = 0x8000000F,
bSetInDialog = true;// UserForm control only
@@ -4114,65 +3945,35 @@ OCX_Page::OCX_Page( SotStorageRef& parent,
sal_Bool OCX_Page::Read(SvStorageStream *pS)
{
- long nStart = pS->Tell();
- *pS >> nIdentifier;
- DBG_ASSERT(0x400==nIdentifier,
- "A control that has a different identifier");
- *pS >> nFixedAreaLen;
- pS->Read(pBlockFlags,4);
-
- pS->SeekRel( nFixedAreaLen - sizeof( pBlockFlags ) );
-
- ReadAlign( pS, pS->Tell() - nStart, 4);
-
- if (pBlockFlags[2] & 0x10)
- {
- //Font Stuff..
- pS->SeekRel(0x1a);
- sal_uInt8 nFontLen;
- *pS >> nFontLen;
- pS->SeekRel(nFontLen);
- }
- return OCX_ContainerControl::Read(pS);
-
+ return OCX_ParentControl::Read(pS);
}
sal_Bool OCX_Page::Import(com::sun::star::uno::Reference<
- com::sun::star::container::XNameContainer>
- &rDialog)
+ com::sun::star::beans::XPropertySet>
+ &rPropSet)
{
+ uno::Any aTmp(&sName,getCppuType((OUString *)0));
+ rPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp);
+
+ if (msTitle.getLength())
+ rPropSet->setPropertyValue( WW8_ASCII2STR("Title"), uno::makeAny( msTitle ) );
+
+ aTmp <<= ImportColor(mnBackColor);
+ rPropSet->setPropertyValue( WW8_ASCII2STR("BackgroundColor"), aTmp);
+
+ // Calls import on contained controls
+ OCX_ParentControl::Import( rPropSet );
+ return sal_True;
- uno::Reference<beans::XPropertySet> xPropSet( rDialog, uno::UNO_QUERY );
- if ( xPropSet.is() )
- {
- // apply Step to contained controls
- CtrlIterator aEnd = mpControls.end();
- for (CtrlIterator aIter = mpControls.begin(); aIter != aEnd; ++ aIter )
- {
- (*aIter)->mnStep = mnStep;
- }
- // Calls import on contained pages
- return OCX_ContainerControl::Import( xPropSet );
- }
- OSL_TRACE("*** Major problem, no dialog to add controls to ");
- DBG_ERROR("*** Major problem, no dialog to add controls to ");
- return sal_False;
}
OCX_Frame::OCX_Frame( SotStorageRef& parent,
const ::rtl::OUString& storageName,
const ::rtl::OUString& sN,
- const uno::Reference< container::XNameContainer > &rDialog, OCX_Control* pParent):
- OCX_ContainerControl(parent, storageName, sN, rDialog, pParent ),fUnknown1(0),fEnabled(1), fLocked(0),
- fBackStyle(1), fWordWrap(1), fAutoSize(0), nCaptionLen(0), nVertPos(1),
- nHorzPos(7), nMousePointer(0), nBorderColor(0x80000012),
- nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nSpecialEffect(0),
- nPicture(0), nPictureAlignment(2), nPictureSizeMode(0),
- bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0),
- nScrollWidth(0), nScrollHeight(0), nScrollLeft(0), nScrollTop(0), nIconLen(0), pIcon(0), nPictureLen(0),
- pPicture(0)
-{
- msDialogType = C2U("com.sun.star.awt.UnoControlGroupBoxModel");
+ const uno::Reference< container::XNameContainer > &rDialog, OCX_Control* pParent): OCX_ParentControl(parent, storageName, sN, rDialog, pParent )
+{
+ msDialogType = C2U("com.sun.star.awt.UnoFrameModel");
mnForeColor = 0x80000012;
mnBackColor = 0x8000000F;
bSetInDialog = true;// UserForm control only
@@ -4182,159 +3983,7 @@ OCX_Frame::OCX_Frame( SotStorageRef& parent,
sal_Bool OCX_Frame::Read(SvStorageStream *pS)
{
- long nStart = pS->Tell();
- *pS >> nIdentifier;
- DBG_ASSERT(0x400==nIdentifier,
- "A control that has a different identifier");
- *pS >> nFixedAreaLen;
- pS->Read(pBlockFlags,4);
-
- if (pBlockFlags[0] & 0x01)
- {
- DBG_ASSERT(!this, "ARSE");
- }
- if (pBlockFlags[0] & 0x02)
- *pS >> mnBackColor;
- if (pBlockFlags[0] & 0x04)
- *pS >> mnForeColor;
- if (pBlockFlags[0] & 0x08)
- *pS >> fUnknown1;
- if (pBlockFlags[0] & 0x40)
- {
- sal_uInt8 nTemp;
- *pS >> nTemp;
- fEnabled = (nTemp&0x04)>>2;
- fBackStyle = (nTemp&0x08)>>3;
- *pS >> nTemp;
- *pS >> nTemp;
- fWordWrap = (nTemp&0x80)>>7;
- *pS >> nTemp;
- fAutoSize = (nTemp&0x10)>>4;
- }
- if (pBlockFlags[0] & 0x80)
- {
- *pS >> nBorderStyle;
- }
-
- ReadAlign(pS, pS->Tell() - nStart, 4);
-
- if (pBlockFlags[1] & 0x01)
- *pS >> nMousePointer;
- if (pBlockFlags[1] & 0x02)
- *pS >> nKeepScrollBarsVisible;
- if (pBlockFlags[1] & 0x20)
- *pS >> fUnknown1; // another unknown 32 bit ( or is 8 or 16 bit with padding ? )
-
- if (pBlockFlags[1] & 0x80)
- {
- ReadAlign(pS, pS->Tell() - nStart, 2);
- *pS >> nIcon;
- DBG_ASSERT(nIcon == 0xFFFF, "Unexpected nIcon");
- }
-
- bool bCaption = false;
-
- if (pBlockFlags[2] & 0x01)
- *pS >> nCycle;
- if (pBlockFlags[2] & 0x02)
- *pS >> nSpecialEffect;
-
- if (pBlockFlags[2] & 0x04)
- {
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> nBorderColor;
- }
-
- if (pBlockFlags[2] & 0x08)
- {
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> nCaptionLen;
- bCaption = true;
- }
-
- if (pBlockFlags[2] & 0x10)
- {
- ReadAlign(pS, pS->Tell() - nStart, 2);
- sal_uInt16 nNoIdea;
- *pS >> nNoIdea;
- DBG_ASSERT(nNoIdea == 0xFFFF, "Expected 0xFFFF, (related to font ?)");
- }
-
- if (pBlockFlags[2] & 0x20)
- {
- ReadAlign(pS, pS->Tell() - nStart, 2);
- *pS >> nPicture;
- DBG_ASSERT(nPicture == 0xFFFF, "Unexpected nIcon");
- }
-
- if (pBlockFlags[2] & 0x80)
- *pS >> nPictureAlignment;
-
- if (pBlockFlags[3] & 0x01)
- bPictureTiling = true;
-
- if (pBlockFlags[3] & 0x02)
- *pS >> nPictureSizeMode;
-
- if (pBlockFlags[3] & 0x04)
- {
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> fUnknown8;
- }
-
- if (pBlockFlags[3] & 0x08)
- {
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> fUnknown9;
- }
-
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> nWidth;
- *pS >> nHeight;
- *pS >> nScrollWidth;
- *pS >> nScrollHeight;
-
- if (pBlockFlags[1] & 0x10)
- {
- *pS >> nScrollLeft;
- *pS >> nScrollTop;
- }
-
- if ( bCaption )
- {
- lclReadCharArray( *pS, pCaption, nCaptionLen, pS->Tell() - nStart);
- }
-
- OUString tempCaption = lclCreateOUString( pCaption, nCaptionLen );
-
- if (nIcon)
- {
- pS->Read(pIconHeader,20);
- *pS >> nIconLen;
- pIcon = new sal_uInt8[nIconLen];
- pS->Read(pIcon,nIconLen);
- }
-
- if (nPicture)
- {
- pS->Read(pPictureHeader,20);
- *pS >> nPictureLen;
- pPicture = new sal_uInt8[nPictureLen];
- pS->Read(pPicture,nPictureLen);
- }
-
- ReadAlign( pS, pS->Tell() - nStart, 4);
-
- if (pBlockFlags[2] & 0x10)
- {
- //Font Stuff..
- pS->SeekRel(0x1a);
- sal_uInt8 nFontLen;
- *pS >> nFontLen;
- pS->SeekRel(nFontLen);
- }
-
- return OCX_ContainerControl::Read( pS );
+ return OCX_ParentControl::Read( pS );
}
sal_Bool OCX_Frame::Import(com::sun::star::uno::Reference<
@@ -4349,195 +3998,26 @@ sal_Bool OCX_Frame::Import(com::sun::star::uno::Reference<
rPropSet->setPropertyValue( WW8_ASCII2STR("Label"), aTmp);
}
+ aTmp <<= ImportColor(mnBackColor);
+ rPropSet->setPropertyValue( WW8_ASCII2STR("BackgroundColor"), aTmp);
+
// Calls import on contained controls
- OCX_ContainerControl::Import( rPropSet );
+ OCX_ParentControl::Import( rPropSet );
return sal_True;
}
+
OCX_UserForm::OCX_UserForm( SotStorageRef& parent,
const OUString& storageName,
const OUString& sN,
const ::uno::Reference< container::XNameContainer > &rDialog,
const ::uno::Reference< lang::XMultiServiceFactory >& rMsf):
- OCX_ContainerControl(parent, storageName, sN, rDialog),
- nChildrenA(0), fEnabled(1), fLocked(0),
- fBackStyle(1), fWordWrap(1), fAutoSize(0), nCaptionLen(0), nVertPos(1),
- nHorzPos(7), nMousePointer(0), nBorderColor(0x80000012), nChildrenB(0),
- nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nSpecialEffect(0),
- nPicture(0), nPictureAlignment(2), nPictureSizeMode(0),
- bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0),
- nScrollWidth(0), nScrollHeight(0), nScrollLeft(0), nScrollTop(0), nIconLen(0), pIcon(0), nPictureLen(0)
- {
- mnForeColor = 0x80000012;
- mnBackColor = 0x8000000F;
- uno::Reference< beans::XPropertySet> xProps( rMsf, uno::UNO_QUERY);
- if ( xProps.is() )
- {
- xProps->getPropertyValue(C2S("DefaultContext")) >>= mxCtx;
- }
- aFontData.SetHasAlign(TRUE);
- }
-sal_Bool OCX_UserForm::Read(SvStorageStream *pS)
-{
- long nStart = pS->Tell();
- *pS >> nIdentifier;
- DBG_ASSERT(0x400==nIdentifier,
- "A control that has a different identifier");
- *pS >> nFixedAreaLen;
- pS->Read(pBlockFlags,4);
-
- if (pBlockFlags[0] & 0x01)
- {
- DBG_ASSERT(!this, "ARSE");
- }
- if (pBlockFlags[0] & 0x02)
- *pS >> mnBackColor;
- if (pBlockFlags[0] & 0x04)
- *pS >> mnForeColor;
- if (pBlockFlags[0] & 0x08)
- *pS >> nChildrenA;
- if (pBlockFlags[0] & 0x40)
- {
- sal_uInt8 nTemp;
- *pS >> nTemp;
- fEnabled = (nTemp&0x04)>>2;
- fBackStyle = (nTemp&0x08)>>3;
- *pS >> nTemp;
- *pS >> nTemp;
- fWordWrap = (nTemp&0x80)>>7;
- *pS >> nTemp;
- fAutoSize = (nTemp&0x10)>>4;
- }
- if (pBlockFlags[0] & 0x80)
- {
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> nBorderStyle;
- }
-#if 0
- sal_uInt16 nFixedOrAlign;
- *pS >> nFixedOrAlign;
-#endif
- if (pBlockFlags[1] & 0x01)
- *pS >> nMousePointer;
- if (pBlockFlags[1] & 0x02)
- *pS >> nKeepScrollBarsVisible;
- if (pBlockFlags[1] & 0x20)
- {
- sal_uInt32 nUnknown32;
- *pS >> nUnknown32;
- }
- if (pBlockFlags[1] & 0x80)
- {
- ReadAlign(pS, pS->Tell() - nStart, 2);
- *pS >> nIcon;
- DBG_ASSERT(nIcon == 0xFFFF, "Unexpected nIcon");
- }
- if (pBlockFlags[2] & 0x01)
- *pS >> nCycle;
- if (pBlockFlags[2] & 0x02)
- *pS >> nSpecialEffect;
-
- if (pBlockFlags[2] & 0x04)
- {
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> nBorderColor;
- }
-
- if (pBlockFlags[2] & 0x10)
- {
- ReadAlign(pS, pS->Tell() - nStart, 2);
- sal_uInt16 nNoIdea;
- *pS >> nNoIdea;
- DBG_ASSERT(nNoIdea == 0xFFFF, "Expected 0xFFFF, (related to font ?)");
- }
-
- if (pBlockFlags[2] & 0x20)
- {
- ReadAlign(pS, pS->Tell() - nStart, 2);
- *pS >> nPicture;
- DBG_ASSERT(nPicture == 0xFFFF, "Unexpected nIcon");
- }
-
- if (pBlockFlags[2] & 0x80)
- *pS >> nPictureAlignment;
-
- if (pBlockFlags[3] & 0x01)
- bPictureTiling = true;
-
- if (pBlockFlags[3] & 0x02)
- *pS >> nPictureSizeMode;
-
- if (pBlockFlags[3] & 0x04)
- {
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> nChildrenB;
- }
-
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> nDrawBuffer;
-
- ReadAlign(pS, pS->Tell() - nStart, 4);
- *pS >> nWidth;
- *pS >> nHeight;
- *pS >> nScrollWidth;
- *pS >> nScrollHeight;
-
- if (pBlockFlags[1] & 0x10)
- {
- *pS >> nScrollLeft;
- *pS >> nScrollTop;
- }
-
- if (nIcon)
- {
- pS->Read(pIconHeader,20);
- *pS >> nIconLen;
- pIcon = new sal_uInt8[nIconLen];
- pS->Read(pIcon,nIconLen);
- }
-
- ReadAlign( pS, pS->Tell() - nStart, 4);
- if (pBlockFlags[2] & 0x10)
+ OCX_ParentControl(parent, storageName, sN, rDialog )
{
- //Font Stuff..
- pS->SeekRel(0x1a);
- sal_uInt8 nFontLen;
- *pS >> nFontLen;
- pS->SeekRel(nFontLen);
- }
- if (nPicture)
- {
- pS->Read(pPictureHeader,20);
- *pS >> nPictureLen;
- long imagePos = pS->Tell();
- // great embedded object
- mxGrfObj = lcl_readGraphicObject( pS );
- if( mxGrfObj.is() )
- {
- sImageUrl = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( GRAPHOBJ_URLPREFIX ) );
- sImageUrl = sImageUrl + mxGrfObj->getUniqueID();
- }
- // make sure the stream position should be pointing after the image.
- pS->Seek( imagePos + nPictureLen );
- }
-
- sal_Int16 numTrailingRecs = 0;
- *pS >> numTrailingRecs;
- // seems to be no. of trailing records,
- // before container record starts proper
- // ( unknown what these trailing records are for)
- if ( numTrailingRecs )
+ uno::Reference< beans::XPropertySet> xProps( rMsf, uno::UNO_QUERY);
+ if ( xProps.is() )
{
- for ( sal_Int16 i = 0 ; numTrailingRecs ; --numTrailingRecs, ++i )
- {
- sal_uInt16 nTypeID = 0;
- if ( lcl_handleActiveXControl( pS, nTypeID ) )
- {
- if ( nTypeID & 0x8000 ) // valid ActiveXID
- mActiveXIDMap[ ( i | 0x8000 ) ] = nTypeID;
- }
- }
+ xProps->getPropertyValue(C2S("DefaultContext")) >>= mxCtx;
}
- return OCX_ContainerControl::Read( pS );
}
sal_Bool OCX_UserForm::Import(
@@ -4563,9 +4043,15 @@ sal_Bool OCX_UserForm::Import(
aTmp <<= sal_Int32( aAppFontSize.Height ); //100th mm
xDialogPropSet->setPropertyValue(WW8_ASCII2STR("Height"), aTmp);
+ if ( sImageUrl.getLength() )
+ {
+ aTmp <<= sImageUrl;
+ xDialogPropSet->setPropertyValue( WW8_ASCII2STR("ImageURL"), aTmp);
+ }
uno::Reference<beans::XPropertySet> xPropSet( mxParent, uno::UNO_QUERY );
- OCX_ContainerControl::Import( xPropSet );
+ OCX_ParentControl::Import( xPropSet );
+ uno::Reference< frame::XModel > xModel( pDocSh ? pDocSh->GetModel() : NULL );
uno::Reference<io::XInputStreamProvider> xSource =
xmlscript::exportDialogModel(mxParent, mxCtx, pDocSh->GetModel() );
@@ -4832,7 +4318,7 @@ OCX_Control * SvxMSConvertOCXControls::OCX_Factory(
rControlModel,uno::UNO_QUERY);
uno::Any aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii("ClassId"));
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassId" )));
sal_Int16 nClassId = *(sal_Int16*) aTmp.getValue();
//Begin nasty hack
@@ -4852,8 +4338,7 @@ OCX_Control * SvxMSConvertOCXControls::OCX_Factory(
uno::Reference< lang::XServiceInfo > xInfo(rControlModel,
uno::UNO_QUERY);
if (xInfo->
- supportsService(OUString::createFromAscii(
- "com.sun.star.form.component.FormattedField")))
+ supportsService(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FormattedField" ))))
{
rId.AppendAscii("8BD21D10-EC42-11CE-9e0d-00aa006002f3");
rName.AppendAscii("TextBox");
@@ -4865,8 +4350,7 @@ OCX_Control * SvxMSConvertOCXControls::OCX_Factory(
uno::Reference< lang::XServiceInfo > xInfo(rControlModel,
uno::UNO_QUERY);
if (xInfo->
- supportsService(OUString::createFromAscii(
- "com.sun.star.form.component.ImageControl")))
+ supportsService(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ImageControl" ))))
nClassId = form::FormComponentType::IMAGECONTROL;
}
//End nasty hack
@@ -4998,7 +4482,7 @@ sal_Bool SvxMSConvertOCXControls::WriteOCXStream( SvStorageRef& rSrc1,
#if 0
uno::Any aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii("ClassId"));
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId")));
sal_Int16 nClassId = *(sal_Int16*) aTmp.getValue();
#endif
@@ -5133,6 +4617,11 @@ sal_Bool OCX_CheckBox::Import(com::sun::star::uno::Reference<
rPropSet->setPropertyValue( WW8_ASCII2STR("VerticalAlign"), aTmp );
aFontData.Import(rPropSet);
+ if ( sImageUrl.getLength() )
+ {
+ aTmp <<= sImageUrl;
+ rPropSet->setPropertyValue( WW8_ASCII2STR("ImageURL"), aTmp);
+ }
return(sal_True);
}
@@ -5592,38 +5081,242 @@ sal_Bool HTML_TextBox::ReadFontData(SotStorageStream * /*pS*/)
return sal_True;
}
-
// Doesn't really read anything but just skips the
// record.
sal_Bool OCX_TabStrip::Read(SotStorageStream *pS)
{
- const long skipLen = 0x18;
+ long nStart = pS->Tell();
*pS >> nIdentifier;
DBG_ASSERT(nStandardId==nIdentifier,
"A control that has a different identifier");
*pS >> nFixedAreaLen;
pS->Read(pBlockFlags, sizeof(pBlockFlags));
- pS->SeekRel(skipLen);
- *pS >> nNumTabs;
- // skip to end of control
- pS->SeekRel(nFixedAreaLen - sizeof(pBlockFlags) - sizeof(nNumTabs) - skipLen );
- return sal_True;
-}
-sal_Bool OCX_TabStrip::ReadFontData(SotStorageStream *pS)
-{
- // Seems like there is a real font record followed by
- // a number of blank records ( e.g. nFixedAreaLen = 0 )
- // The number of trailing blank records is equal to the number of tabs
- OCX_Control::ReadFontData(pS);
- for ( sal_uInt16 index = 0; index < nNumTabs; index++ )
+ bool bSize = false;
+ bool bMultiRow = false;
+ bool bTooltips = true;
+ bool hasEmbeddedImage = false;
+ sal_Int32 nameSize = 0;
+ sal_Int32 tipStringSize = 0;
+ sal_Int32 nAcceleratorSize = 0;
+ sal_Int32 nItemSize = 0;
+ sal_Int32 nTagSize = 0;
+ if ( pBlockFlags[ 0 ] & 0x01 )
+ {
+ //List index
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ sal_Int32 nOptional32 = 0; //
+ *pS >> nOptional32;
+ }
+ if (pBlockFlags[0] & 0x02)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> mnBackColor;
+ }
+ if (pBlockFlags[0] & 0x04)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> mnForeColor;
+ }
+ if (pBlockFlags[0] & 0x10)
+ bSize = true;
+ if (pBlockFlags[0] & 0x20)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nItemSize;
+ }
+ if (pBlockFlags[0] & 0x40)
+ {
+ sal_Int8 nOptional8 = 0; // mouse pointer
+ *pS >> nOptional8;
+ }
+ if (pBlockFlags[1] & 0x01)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ sal_Int32 nOptional32 = 0; // taborientation
+ *pS >> nOptional32;
+ }
+ if (pBlockFlags[1] & 0x02)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ sal_Int32 nOptional32 = 0; // tabstyle
+ *pS >> nOptional32;
+ if ( nOptional32 == 2 )
+ bHasTabs =false;
+ }
+ if (pBlockFlags[1] & 0x04)
+ bMultiRow = true;
+ if (pBlockFlags[1] & 0x08)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ sal_Int32 nOptional32 = 0; // tabfixedwidth
+ *pS >> nOptional32;
+ }
+ if (pBlockFlags[1] & 0x10)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ sal_Int32 nOptional32 = 0; // tabfixedheight
+ *pS >> nOptional32;
+ }
+ if (pBlockFlags[1] & 0x20)
+ bTooltips = false;
+
+ if (pBlockFlags[1] & 0x80)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> tipStringSize;
+ }
+
+ if (pBlockFlags[2] & 0x02)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nameSize;
+ }
+
+ if (pBlockFlags[2] & 0x04)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ sal_Int32 nOptional32 = 0; // variouspropertybits
+ *pS >> nOptional32;
+ }
+
+ if (pBlockFlags[2] & 0x10)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ sal_Int32 nOptional32 = 0; // tabsallocated
+ *pS >> nOptional32;
+ }
+
+ if (pBlockFlags[2] & 0x20)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nTagSize;
+ }
+
+ if (pBlockFlags[2] & 0x40)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nNumTabs;
+ }
+
+ if (pBlockFlags[2] & 0x80)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nAcceleratorSize;
+ }
+
+ if (pBlockFlags[3] & 0x01)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 2);
+ sal_Int16 nOptional16 = 0; // Mouse Icon
+ *pS >> nOptional16;
+ hasEmbeddedImage = true;
+ }
+
+ // Extra block
+ if ( bSize )
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nWidth;
+ *pS >> nHeight;
+ }
+ if ( nItemSize )
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ // read the caption for each tab
+ readArrayString( pS, msItems, nItemSize, nStart );
+ std::vector< rtl::OUString >::iterator it = msItems.begin();
+ std::vector< rtl::OUString >::iterator it_end = msItems.end();
+ for ( sal_Int32 i=0; it != it_end; ++i, ++it )
+ OSL_TRACE(" Caption [ %d ] is %s", i, rtl::OUStringToOString( *it, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
+ if ( tipStringSize )
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ // read the tip for each tab
+ std::vector< rtl::OUString > sTips;
+ readArrayString( pS, sTips, tipStringSize, nStart );
+ std::vector< rtl::OUString >::iterator it = sTips.begin();
+ std::vector< rtl::OUString >::iterator it_end = sTips.end();
+ for ( sal_Int32 i=0; it != it_end; ++i, ++it )
+ OSL_TRACE(" Tip [ %d ] is %s", i, rtl::OUStringToOString( *it, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
+ if ( nameSize )
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ // read the name for each tab
+ std::vector< rtl::OUString > sNames;
+ readArrayString( pS, sNames, nameSize, nStart );
+ std::vector< rtl::OUString >::iterator it = sNames.begin();
+ std::vector< rtl::OUString >::iterator it_end = sNames.end();
+ for ( sal_Int32 i=0; it != it_end; ++i, ++it )
+ OSL_TRACE(" Name [ %d ] is %s", i, rtl::OUStringToOString( *it, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
+ if ( nTagSize )
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ // read the name for each tab
+ std::vector< rtl::OUString > sTags;
+ readArrayString( pS, sTags, nTagSize, nStart );
+ std::vector< rtl::OUString >::iterator it = sTags.begin();
+ std::vector< rtl::OUString >::iterator it_end = sTags.end();
+ for ( sal_Int32 i=0; it != it_end; ++i, ++it )
+ OSL_TRACE(" Tag [ %d ] is %s", i, rtl::OUStringToOString( *it, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
+ if ( nAcceleratorSize )
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ // read the name for each tab
+ std::vector< rtl::OUString > sAccelerators;
+ readArrayString( pS, sAccelerators, nAcceleratorSize, nStart );
+ std::vector< rtl::OUString >::iterator it = sAccelerators.begin();
+ std::vector< rtl::OUString >::iterator it_end = sAccelerators.end();
+ for ( sal_Int32 i=0; it != it_end; ++i, ++it )
+ OSL_TRACE(" Accelerator [ %d ] is %s", i, rtl::OUStringToOString( *it, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
+ // Stream data
+ if ( hasEmbeddedImage )
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ sal_uInt8 pPictureHeader[20];
+ sal_uInt32 nPictureLen(0);
+ pS->Read(pPictureHeader,20);
+ *pS >> nPictureLen;
+ long imagePos = pS->Tell();
+ // great embedded object
+ mxGrfObj = lcl_readGraphicObject( pS );
+ if( mxGrfObj.is() )
+ {
+ sImageUrl = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( GRAPHOBJ_URLPREFIX ) );
+ sImageUrl = sImageUrl + mxGrfObj->getUniqueID();
+ }
+ // make sure the stream position should be pointing after the image.
+ pS->Seek( imagePos + nPictureLen );
+ }
+
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ OCX_Control::ReadFontData(pS); // read textprops
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ for ( sal_Int32 i = 0; i < nNumTabs; ++i )
{
- OCX_Control::Read(pS); // read trailing records
+ sal_uInt32 TabStripTabFlags(0);
+ *pS >> TabStripTabFlags;
}
return sal_True;
}
+sal_Bool OCX_TabStrip::ReadFontData(SotStorageStream* /* pS */)
+{
+ // OCX_TabStrip::Read includes the text props
+ return true;
+}
+
sal_Bool OCX_Image::Read(SotStorageStream *pS)
{
ULONG nStart = pS->Tell();
@@ -5707,12 +5400,10 @@ sal_Bool OCX_Image::Read(SotStorageStream *pS)
if ( hasEmbeddedImage )
{
- //image follows this block
- //len of image is 0x14 relative to end of this block
- pS->Seek( pS->Tell() + 0x14 );
-
- sal_uInt32 nImageLen = 0;
- *pS >> nImageLen;
+ sal_uInt8 pPictureHeader[20];
+ sal_uInt32 nPictureLen(0);
+ pS->Read(pPictureHeader,20);
+ *pS >> nPictureLen;
long imagePos = pS->Tell();
@@ -5723,7 +5414,7 @@ sal_Bool OCX_Image::Read(SotStorageStream *pS)
sImageUrl = sImageUrl + mxGrfObj->getUniqueID();
}
// make sure the stream position should be pointing after the image
- pS->Seek( imagePos + nImageLen );
+ pS->Seek( imagePos + nPictureLen );
}
return sal_True;
}
@@ -6400,6 +6091,375 @@ sal_Bool OCX_ProgressBar::Import(uno::Reference< beans::XPropertySet > &rPropSet
rPropSet->setPropertyValue( WW8_ASCII2STR("Enabled"), uno::makeAny( sal_False ) );
return sal_True;
}
+
// ============================================================================
+OCX_ParentControl::OCX_ParentControl( SotStorageRef& parent, const OUString& storageName, const OUString& sN, const ::uno::Reference< container::XNameContainer > &rParent, OCX_Control* pParent ) : OCX_Control(sN, pParent), mxParent(rParent), nNextAvailableID(0), nBooleanProperties(0), nGroupCnt(0), nZoom(0), fEnabled(1), fLocked(0), fBackStyle(1), fWordWrap(1), fAutoSize(0), nCaptionLen(0), nVertPos(1), nHorzPos(7), nBorderColor(0x80000012), nShapeCookie(0), nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nMousePointer(0), nSpecialEffect(0), nPicture(0), nPictureAlignment(2), nPictureSizeMode(0), bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0), nScrollWidth(0), nScrollHeight(0), nScrollLeft(0), nScrollTop(0), nIconLen(0), pIcon(0), nPictureLen(0)
+{
+ mnForeColor = 0x80000012;
+ mnBackColor = 0x8000000F;
+ aFontData.SetHasAlign(TRUE);
+ mContainerStorage = parent->OpenSotStorage(storageName,
+ STREAM_READWRITE |
+ STREAM_NOCREATE |
+ STREAM_SHARE_DENYALL);
+ mContainerStream = mContainerStorage->OpenSotStream(
+ String(RTL_CONSTASCII_STRINGPARAM("f"),
+ RTL_TEXTENCODING_MS_1252),
+ STREAM_STD_READ | STREAM_NOCREATE);
+ mContainedControlsStream = mContainerStorage->OpenSotStream( String(RTL_CONSTASCII_STRINGPARAM("o"),
+ RTL_TEXTENCODING_MS_1252),
+ STREAM_STD_READ | STREAM_NOCREATE);
+}
+
+OCX_ParentControl::~OCX_ParentControl()
+{
+ CtrlIterator aEnd = mpControls.end();
+ for (CtrlIterator aIter = mpControls.begin(); aIter != aEnd; ++ aIter )
+ {
+ delete *aIter;
+ }
+}
+
+sal_Bool OCX_ParentControl::Import(uno::Reference<beans::XPropertySet>& rProps )
+{
+ // #FIXME we probably don't need this (fake) parent (mxParen) which is the dialog iirc
+ if ( !mxParent.is() )
+ {
+ return sal_False;
+ }
+ CtrlIterator aEnd = mpControls.end();
+// int count = 0;
+ for (CtrlIterator aIter = mpControls.begin(); aIter != aEnd; ++ aIter )
+ {
+ uno::Reference< container::XNameContainer > xNameContainer( rProps, uno::UNO_QUERY );
+ if ( !(*aIter)->Import( xNameContainer ) )
+ {
+ return sal_False;
+ }
+ }
+ return sal_True;
+}
+
+bool OCX_ParentControl::createFromContainerRecord( const ContainerRecord& record, OCX_Control*& pControl )
+{
+ pControl = NULL;
+ switch ( record.nTypeIdent)
+ {
+ case CMDBUTTON:
+ pControl = new OCX_CommandButton;
+ break;
+ case LABEL:
+ pControl = new OCX_UserFormLabel(this);
+ break;
+ case TEXTBOX:
+ pControl = new OCX_TextBox;
+ break;
+ case LISTBOX:
+ pControl = new OCX_ListBox;
+ break;
+ case COMBOBOX:
+ pControl = new OCX_ComboBox;
+ break;
+ case CHECKBOX:
+ pControl = new OCX_CheckBox;
+ break;
+ case OPTIONBUTTON:
+ pControl = new OCX_OptionButton;
+ break;
+ case TOGGLEBUTTON:
+ pControl = new OCX_ToggleButton;
+ break;
+ case IMAGE: //Image
+ {
+ pControl = new OCX_Image;
+ break;
+ }
+ case PAGE: // Page
+ {
+ pControl = new OCX_Page(mContainerStorage, record.nSubStorageId,
+ record.cName, mxParent, this);
+ break;
+ }
+ case MULTIPAGE: // MultiPage
+ {
+ OUString sMSStore = createSubStreamName( record.nSubStorageId );
+ pControl = new OCX_MultiPage( mContainerStorage, sMSStore,
+ record.cName, mxParent, this);
+ break;
+ }
+ case FRAME: //Frame
+ {
+ OUString sFrameStore = createSubStreamName( record.nSubStorageId );
+ pControl = new OCX_Frame(mContainerStorage, sFrameStore,
+ record.cName, mxParent, this);
+
+ break;
+ }
+ case SPINBUTTON: //SpinButton
+ {
+ pControl = new OCX_SpinButton;
+ break;
+ }
+ case TABSTRIP: //TabStrip
+ {
+ pControl = new OCX_TabStrip;
+ break;
+ }
+ case SCROLLBAR: //ScrollBar
+ pControl = new OCX_ScrollBar;
+ break;
+ case PROGRESSBAR: //ProgressBar Active X control
+ pControl = new OCX_ProgressBar;
+ break;
+ default:
+ OSL_TRACE( "**** Unknown control 0x%x", record.nTypeIdent );
+ DBG_ERROR( "Unknown control");
+ return false;
+ }
+ pControl->sName = record.cName;
+
+ pControl->msToolTip = record.controlTip;
+ pControl->mnTop = record.nTop;
+ pControl->mnLeft = record.nLeft;
+ // MS tabIndex, pretty useless in OpenOffice land
+ // as tab indexes in MS are relative to parent container.
+ // However we need this value in order to set
+ // OpenOffice tab indices in a sensible way to
+ // reflect the ms tabbing from orig MS UserForm, see below
+ pControl->mnTabPos = record.nTabPos;
+ pControl->SetInDialog(true);
+ pControl->mbVisible = record.bVisible;
+
+ return true;
+}
+
+void OCX_ParentControl::ProcessControl(OCX_Control* pControl,SvStorageStream* /* pS */, ContainerRecord& rec )
+{
+ SotStorageStreamRef oStream = mContainedControlsStream;
+
+ // can insert into OO Dialog (e.g is this a supported dialog control)??
+ if ( rec.nTypeIdent == TABSTRIP )
+ {
+ // skip the record in the stream, discard the control
+ oStream->SeekRel( rec.nSubStreamLen );
+ delete pControl;
+ }
+ else
+ {
+ // A container control needs to read the f stream in
+ // the folder ( substorage ) associated with this control
+ if ( rec.nTypeIdent == FRAME ||
+ rec.nTypeIdent == MULTIPAGE||
+ rec.nTypeIdent == PAGE )
+ {
+ OCX_ParentControl* pContainer =
+ static_cast< OCX_ParentControl* >( pControl );
+ oStream = pContainer->getContainerStream();
+ }
+ // #117490# DR: container records provide size of substream, use it here...
+
+ // remember initial position to set correct stream position
+ ULONG nStrmPos = oStream->Tell();
+ // import control, may return with invalid stream position
+ pControl->FullRead(oStream);
+ // set stream to position behind substream of this control
+ oStream->Seek( nStrmPos + rec.nSubStreamLen );
+ }
+}
+
+sal_Bool OCX_ParentControl::Read(SvStorageStream *pS)
+{
+ long nStart = pS->Tell();
+
+ *pS >> nIdentifier;
+ DBG_ASSERT(0x400==nIdentifier,
+ "A control that has a different identifier");
+ *pS >> nFixedAreaLen;
+ pS->Read(pBlockFlags,4);
+
+ bool bExtraSize = false;
+ bool bLogicalSize = false;
+ bool bScrollPosition = false;
+ bool bFont = false;
+ if (pBlockFlags[0] & 0x01)
+ {
+ DBG_ASSERT(!this, "ARSE");
+ }
+ if (pBlockFlags[0] & 0x02)
+ *pS >> mnBackColor;
+ if (pBlockFlags[0] & 0x04)
+ *pS >> mnForeColor;
+ if (pBlockFlags[0] & 0x08)
+ *pS >> nNextAvailableID;
+ if (pBlockFlags[0] & 0x40)
+ *pS >> nBooleanProperties;
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ if (pBlockFlags[0] & 0x80)
+ {
+ *pS >> nBorderStyle;
+ }
+ if (pBlockFlags[1] & 0x01)
+ *pS >> nMousePointer;
+ if (pBlockFlags[1] & 0x02)
+ *pS >> nKeepScrollBarsVisible;
+ if (pBlockFlags[1] & 0x04)
+ bExtraSize = true;
+ if (pBlockFlags[1] & 0x08)
+ bLogicalSize = true;
+ if (pBlockFlags[1] & 0x10)
+ bScrollPosition = true;
+ if (pBlockFlags[1] & 0x20)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nGroupCnt;
+ }
+
+ if (pBlockFlags[1] & 0x80)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 2);
+ *pS >> nIcon;
+ DBG_ASSERT(nIcon == 0xFFFF, "Unexpected nIcon");
+ }
+ if (pBlockFlags[2] & 0x01)
+ *pS >> nCycle;
+ if (pBlockFlags[2] & 0x02)
+ *pS >> nSpecialEffect;
+ if (pBlockFlags[2] & 0x04)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nBorderColor;
+ }
+ if (pBlockFlags[2] & 0x08)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nCaptionLen;
+ }
+
+ if (pBlockFlags[2] & 0x10)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 2);
+ sal_uInt16 nNoIdea;
+ *pS >> nNoIdea;
+ DBG_ASSERT(nNoIdea == 0xFFFF, "Expected 0xFFFF, (related to font ?)");
+ bFont = true;
+ }
+ if (pBlockFlags[2] & 0x20)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 2);
+ *pS >> nPicture;
+ DBG_ASSERT(nPicture == 0xFFFF, "Unexpected nIcon");
+ }
+
+ if (pBlockFlags[2] & 0x40)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nZoom;
+ }
+ if (pBlockFlags[2] & 0x80)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nPictureAlignment;
+ }
+
+ if (pBlockFlags[3] & 0x01)
+ bPictureTiling = true;
+
+ if (pBlockFlags[3] & 0x02)
+ *pS >> nPictureSizeMode;
+
+ if (pBlockFlags[3] & 0x04)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nShapeCookie;
+ }
+ if (pBlockFlags[3] & 0x08)
+ {
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ *pS >> nDrawBuffer;
+ }
+
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+ // Extra
+ if ( bExtraSize )
+ {
+ *pS >> nWidth;
+ *pS >> nHeight;
+ }
+ if ( bLogicalSize )
+ {
+ *pS >> nScrollWidth;
+ *pS >> nScrollHeight;
+ }
+ if ( bScrollPosition )
+ {
+ *pS >> nScrollLeft;
+ *pS >> nScrollTop;
+ }
+ if ( nCaptionLen )
+ {
+ sal_uInt32 nCaptionSize = lclGetBufferSize( nCaptionLen );
+ if ( nCaptionSize )
+ {
+ pCaption = new sal_Char[ nCaptionSize ];
+ pS->Read( pCaption, nCaptionSize );
+ }
+ }
+
+ ReadAlign(pS, pS->Tell() - nStart, 4);
+
+ // StreamData
+ if (nIcon)
+ {
+ pS->Read(pIconHeader,20);
+ *pS >> nIconLen;
+ pIcon = new sal_uInt8[nIconLen];
+ pS->Read(pIcon,nIconLen);
+ }
+ if ( bFont )
+ {
+ //Font Stuff..
+ pS->SeekRel(0x1a);
+ sal_uInt8 nFontLen;
+ *pS >> nFontLen;
+ pS->SeekRel(nFontLen);
+ }
+ if (nPicture)
+ {
+ pS->Read(pPictureHeader,20);
+ *pS >> nPictureLen;
+ long imagePos = pS->Tell();
+ // great embedded object
+ mxGrfObj = lcl_readGraphicObject( pS );
+ if( mxGrfObj.is() )
+ {
+ sImageUrl = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( GRAPHOBJ_URLPREFIX ) );
+ sImageUrl = sImageUrl + mxGrfObj->getUniqueID();
+ }
+ // make sure the stream position should be pointing after the image.
+ pS->Seek( imagePos + nPictureLen );
+ }
+ // FormSiteData
+ std::vector< ClassTable > siteClassInfo;
+ if ( ( nBooleanProperties & 0x00008000 ) == 0x0)
+ {
+ sal_Int16 numTrailingRecs = 0;
+ *pS >> numTrailingRecs;
+ if ( numTrailingRecs )
+ {
+ for ( ; numTrailingRecs ; --numTrailingRecs )
+ {
+ ClassTable cacheClass;
+ cacheClass.Read( pS );
+ siteClassInfo.push_back( cacheClass );
+ }
+ }
+ }
+ // Sites
+ ContainerRecReader reader;
+ reader.Read( this, pS, siteClassInfo );
+
+ return true;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index a3fa45784977..abb5d680cc57 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -214,7 +214,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
//TODO/LATER: a "StoreTo" method at embedded object would be nice
uno::Sequence < beans::PropertyValue > aSeq(2);
SvStream* pStream = new SvMemoryStream;
- aSeq[0].Name = ::rtl::OUString::createFromAscii( "OutputStream" );
+ aSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OutputStream" ));
::uno::Reference < io::XOutputStream > xOut = new ::utl::OOutputStreamWrapper( *pStream );
aSeq[0].Value <<= xOut;
aSeq[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
@@ -222,7 +222,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY );
try
{
- xStor->storeToURL( ::rtl::OUString::createFromAscii( "private:stream" ), aSeq );
+ xStor->storeToURL( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" )), aSeq );
}
catch( uno::Exception& ) {} // #TODO really handle exceptions - interactionalhandler etc. ?
@@ -319,11 +319,11 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
//TODO/LATER: is stream instead of outputstream a better choice?!
//TODO/LATER: a "StoreTo" method at embedded object would be nice
uno::Sequence < beans::PropertyValue > aSeq(1);
- aSeq[0].Name = ::rtl::OUString::createFromAscii( "OutputStream" );
+ aSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OutputStream" ));
::uno::Reference < io::XOutputStream > xOut = new ::utl::OOutputStreamWrapper( *xEmbStm );
aSeq[0].Value <<= xOut;
uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY );
- xStor->storeToURL( ::rtl::OUString::createFromAscii( "private:stream" ), aSeq );
+ xStor->storeToURL( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" )), aSeq );
}
catch( uno::Exception& )
{
@@ -348,7 +348,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
if ( xPers.is() )
{
uno::Sequence < beans::PropertyValue > aEmptySeq;
- ::rtl::OUString aTempName(::rtl::OUString::createFromAscii("bla"));
+ ::rtl::OUString aTempName( RTL_CONSTASCII_USTRINGPARAM( "bla" ));
try
{
xPers->storeToEntry( xStor, aTempName, aEmptySeq, aEmptySeq );
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index b34fadcf99f3..b39ca1e5e81b 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -108,8 +108,8 @@ uno::Any
CustomToolBarImportHelper::createCommandFromMacro( const rtl::OUString& sCmd )
{
//"vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document"
- static rtl::OUString scheme = rtl::OUString::createFromAscii( "vnd.sun.star.script:");
- static rtl::OUString part2 = rtl::OUString::createFromAscii("?language=Basic&location=document");
+ static rtl::OUString scheme( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:" ));
+ static rtl::OUString part2( RTL_CONSTASCII_USTRINGPARAM( "?language=Basic&location=document" ));
// create script url
rtl::OUString scriptURL = scheme + sCmd + part2;
return uno::makeAny( scriptURL );
@@ -493,7 +493,7 @@ TBCGeneralInfo::ImportToolBarControlData( CustomToolBarImportHelper& helper, std
if ( aMacroInf.IsResolved() )
aProp.Value = helper.createCommandFromMacro( aMacroInf.ResolvedMacro() );
else
- aProp.Value <<= rtl::OUString::createFromAscii("UnResolvedMacro[").concat( extraInfo.getOnAction() ).concat( rtl::OUString::createFromAscii("]") );
+ aProp.Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UnResolvedMacro[" )).concat( extraInfo.getOnAction() ).concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "]" )) );
sControlData.push_back( aProp );
}
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 5baf69bf11a5..b0b9b42d861f 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <tools/urlobj.hxx>
#include <osl/file.hxx>
#include <unotools/pathoptions.hxx>
@@ -45,8 +46,8 @@ using namespace ::com::sun::star;
namespace ooo { namespace vba {
-const static rtl::OUString sUrlPart0 = rtl::OUString::createFromAscii( "vnd.sun.star.script:");
-const static rtl::OUString sUrlPart1 = rtl::OUString::createFromAscii( "?language=Basic&location=document");
+const static rtl::OUString sUrlPart0( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:" ));
+const static rtl::OUString sUrlPart1( RTL_CONSTASCII_USTRINGPARAM( "?language=Basic&location=document" ));
String makeMacroURL( const String& sMacroName )
{
@@ -121,7 +122,7 @@ SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath )
bDocNameNoPathMatch = xModel->getURL().copy( lastSlashIndex + 1 ).equals( aURL );
if ( !bDocNameNoPathMatch )
{
- rtl::OUString aTmpName = rtl::OUString::createFromAscii("'") + xModel->getURL().copy( lastSlashIndex + 1 ) + rtl::OUString::createFromAscii("'");
+ rtl::OUString aTmpName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "'" )) + xModel->getURL().copy( lastSlashIndex + 1 ) + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "'" ));
bDocNameNoPathMatch = aTmpName.equals( aURL );
}
}
@@ -287,15 +288,15 @@ VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUStrin
{
// Ok, if we have no Container specified then we need to search them in order, this document, template this document created from, global templates,
// get the name of Project/Library for 'this' document
- rtl::OUString sThisProject;
- BasicManager* pBasicMgr = pShell-> GetBasicManager();
- if ( pBasicMgr )
+ rtl::OUString sThisProject = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") );
+ try
{
- if ( pBasicMgr->GetName().Len() )
- sThisProject = pBasicMgr->GetName();
- else // cater for the case where VBA is not enabled
- sThisProject = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") );
+ uno::Reference< beans::XPropertySet > xProps( pShell->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY_THROW );
+ sThisProject = xVBAMode->getProjectName();
}
+ catch( uno::Exception& /*e*/) {}
+
sSearchList.push_back( sThisProject ); // First Lib to search
if ( xPrjNameCache.is() )
{
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 79c6eaf12631..f8151dd9f7eb 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -580,7 +580,7 @@ sal_Bool SdrEscherImport::ReadString( String& rStr ) const
return bRet;
}
-FASTBOOL SdrEscherImport::GetColorFromPalette(USHORT /*nNum*/, Color& /*rColor*/) const
+bool SdrEscherImport::GetColorFromPalette(USHORT /*nNum*/, Color& /*rColor*/) const
{
return FALSE;
}
@@ -1398,12 +1398,16 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
if ( bOk )
{
- // PersistPtrs lesen (alle)
- nPersistPtrAnz = aUserEditAtom.nMaxPersistWritten + 1; // 1 mehr, damit ich immer direkt indizieren kann
- pPersistPtr = new UINT32[ nPersistPtrAnz ]; // (die fangen naemlich eigentlich bei 1 an)
+ nPersistPtrAnz = aUserEditAtom.nMaxPersistWritten + 1;
+ if ( ( nPersistPtrAnz >> 2 ) > nStreamLen ) // sj: at least nPersistPtrAnz is not allowed to be greater than filesize
+ bOk = FALSE; // (it should not be greater than the PPT_PST_PersistPtrIncrementalBlock, but
+ // we are reading this block later, so we do not have access yet)
+
+ if ( bOk && ( nPersistPtrAnz < ( SAL_MAX_UINT32 / sizeof( UINT32 ) ) ) )
+ pPersistPtr = new (std::nothrow) UINT32[ nPersistPtrAnz ];
if ( !pPersistPtr )
bOk = FALSE;
- else
+ if ( bOk )
{
memset( pPersistPtr, 0x00, nPersistPtrAnz * 4 );
@@ -1730,7 +1734,7 @@ sal_Bool PPTConvertOCXControls::InsertControl(
if( rServiceFactory.is() )
{
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xCreate = rServiceFactory
- ->createInstance(String( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ControlShape" ) ) );
+ ->createInstance(String( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.ControlShape" ) ) );
if( xCreate.is() )
{
xShape = ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >(xCreate, ::com::sun::star::uno::UNO_QUERY);
@@ -2203,7 +2207,7 @@ sal_Bool SdrPowerPointImport::ReadFontCollection()
aFont.SetHeight( 100 );
if ( mbTracing && !pFont->bAvailable )
- mpTracer->Trace( rtl::OUString::createFromAscii( "sd1000" ), pFont->aName );
+ mpTracer->Trace( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "sd1000" )), pFont->aName );
#ifdef DBG_EXTRACTFONTMETRICS
@@ -2644,7 +2648,7 @@ Size SdrPowerPointImport::GetPageSize() const
return aRet;
}
-FASTBOOL SdrPowerPointImport::GetColorFromPalette( USHORT nNum, Color& rColor ) const
+bool SdrPowerPointImport::GetColorFromPalette( USHORT nNum, Color& rColor ) const
{
if ( nPageColorsNum != nAktPageNum || ePageColorsKind != eAktPageKind )
{
@@ -2879,8 +2883,8 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
{
if ( mbTracing )
mpTracer->AddAttribute( eAktPageKind == PPT_SLIDEPAGE
- ? rtl::OUString::createFromAscii( "Page" )
- : rtl::OUString::createFromAscii( "NotesPage" ),
+ ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Page" ))
+ : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NotesPage" )),
rtl::OUString::valueOf( (sal_Int32)nAktPageNum + 1 ) );
rSlidePersist.pHeaderFooterEntry = new HeaderFooterEntry( pMasterPersist );
@@ -3073,8 +3077,8 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
SolveSolver( *rSlidePersist.pSolverContainer );
if ( mbTracing )
mpTracer->RemoveAttribute( eAktPageKind == PPT_SLIDEPAGE
- ? rtl::OUString::createFromAscii( "Page" )
- : rtl::OUString::createFromAscii( "NotesPage" ) );
+ ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Page" ))
+ : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NotesPage" )) );
}
rStCtrl.Seek( nMerk );
}
@@ -5016,8 +5020,8 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
rIn >> nCharCount
>> aParaPropSet.pParaSet->mnDepth; // Einruecktiefe
- aParaPropSet.pParaSet->mnDepth =
- std::min(sal_uInt16(9),
+ aParaPropSet.pParaSet->mnDepth = // taking care of about using not more than 9 outliner levels
+ std::min(sal_uInt16(8),
aParaPropSet.pParaSet->mnDepth);
nCharCount--;
diff --git a/filter/source/msfilter/svxmsbas.cxx b/filter/source/msfilter/svxmsbas.cxx
index 00eb6f4b9676..7aabccd91dcd 100644
--- a/filter/source/msfilter/svxmsbas.cxx
+++ b/filter/source/msfilter/svxmsbas.cxx
@@ -135,7 +135,7 @@ bool SvxImportMSVBasic::ImportForms_Impl(const String& rStorageName,
// hacky test code to read referenced projects on linux
sal_Int32 nPos = (*it).lastIndexOf('\\');
sFileName = (*it).copy( nPos + 1 );
- sFileName = rtl::OUString::createFromAscii("~/Documents/") + sFileName;
+ sFileName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "~/Documents/" )) + sFileName;
#endif
#endif
SotStorageRef rRoot = new SotStorage( sFileName, STREAM_STD_READWRITE, STORAGE_TRANSACTED );
@@ -518,7 +518,7 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( VBA_Impl& aVBA, const std::vector< Stri
}
if (bAsComment)
{
- aSource += rtl::OUString::createFromAscii("\nEnd Sub");
+ aSource += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\nEnd Sub" ));
}
::rtl::OUString aModName( sModule );
aSource = modeTypeComment + aSource;
diff --git a/filter/source/odfflatxml/odfflatxmlexport.xsl b/filter/source/odfflatxml/odfflatxmlexport.xsl
index e08afd75f79f..2c1ea97eea33 100644
--- a/filter/source/odfflatxml/odfflatxmlexport.xsl
+++ b/filter/source/odfflatxml/odfflatxmlexport.xsl
@@ -11,4 +11,6 @@
<xsl:template match="@office:mimetype[string(.)='application/vnd.oasis.opendocument.drawing']">
<xsl:attribute name="office:mimetype">application/vnd.oasis.opendocument.graphics</xsl:attribute>
</xsl:template>
+
+ <xsl:include href="split-long-lines.xsl"/>
</xsl:stylesheet>
diff --git a/filter/source/odfflatxml/split-long-lines.xsl b/filter/source/odfflatxml/split-long-lines.xsl
new file mode 100644
index 000000000000..0e9d310a5ac5
--- /dev/null
+++ b/filter/source/odfflatxml/split-long-lines.xsl
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Version: MPL 1.1 / GPLv3+ / LGPLv3+
+
+The contents of this file are subject to the Mozilla Public License Version
+1.1 (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.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the
+License.
+
+The Initial Developer of the Original Code is
+ Gioele Barabucci <gioele@svario.it>
+Portions created by the Initial Developer are Copyright (C) 2010 the
+Initial Developer. All Rights Reserved.
+
+Contributor(s): Gioele Barabucci <gioele@svario.it>
+
+Alternatively, the contents of this file may be used under the terms of
+either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+instead of those above.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+ version="1.0">
+ <xsl:param name="num-max-spaces">5</xsl:param>
+ <xsl:param name="sep"><xsl:text xml:space="preserve">&#32;</xsl:text></xsl:param>
+ <xsl:param name="newline"><xsl:text xml:space="preserve">&#10;</xsl:text></xsl:param>
+
+ <xsl:template match="text:p/text()">
+ <xsl:call-template name="split-current-text-node"/>
+ </xsl:template>
+
+ <xsl:template match="text:p/text:span/text()">
+ <xsl:call-template name="split-current-text-node"/>
+ </xsl:template>
+
+ <xsl:template name="split-current-text-node">
+ <xsl:call-template name="split-text">
+ <xsl:with-param name="num-prec-spaces">0</xsl:with-param>
+ <xsl:with-param name="text" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="split-text">
+ <xsl:param name="num-prec-spaces"/>
+ <xsl:param name="text"/>
+
+ <xsl:variable name="contains-space" select="contains($text, $sep)"/>
+ <xsl:variable name="text-before">
+ <xsl:choose>
+ <xsl:when test="$contains-space"><xsl:value-of select="substring-before($text, $sep)"/></xsl:when>
+ <xsl:when test="$text = $sep"><xsl:value-of select="$text"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="text-after">
+ <xsl:choose>
+ <xsl:when test="$contains-space"><xsl:value-of select="substring-after($text, $sep)"/></xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="finished" select="string-length($text-after) = 0"/>
+ <xsl:variable name="is-empty" select="string-length($text-before) = 0"/>
+
+ <xsl:value-of select="$text-before"/>
+
+ <xsl:choose>
+ <xsl:when test="$num-prec-spaces = $num-max-spaces">
+ <xsl:value-of select="$newline"/>
+ <xsl:call-template name="split-text">
+ <xsl:with-param name="text" select="$text-after"/>
+ <xsl:with-param name="num-prec-spaces">0</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:if test="$contains-space">
+ <xsl:value-of select="$sep"/>
+ </xsl:if>
+
+ <xsl:if test="not($finished)">
+ <xsl:variable name="incr" select="number(not($is-empty))"/>
+
+ <xsl:call-template name="split-text">
+ <xsl:with-param name="text" select="$text-after"/>
+ <xsl:with-param name="num-prec-spaces" select="$num-prec-spaces + $incr"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index a450892da164..723e61e2f4a4 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -332,7 +332,7 @@ static OUString getMimetypeForDocument( const Reference< XMultiServiceFactory >&
// find the related type name
OUString aTypeName;
Reference< container::XNameAccess > xFilterFactory(
- xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ),
+ xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ),
uno::UNO_QUERY );
Sequence< beans::PropertyValue > aFilterData;
@@ -345,7 +345,7 @@ static OUString getMimetypeForDocument( const Reference< XMultiServiceFactory >&
{
// find the mediatype
Reference< container::XNameAccess > xTypeDetection(
- xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ) ),
+ xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" )) ),
UNO_QUERY );
Sequence< beans::PropertyValue > aTypeData;
@@ -393,15 +393,15 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
Reference< XServiceInfo > xInfo( mxSrcDoc, UNO_QUERY );
if ( xInfo.is() )
{
- if ( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.presentation.PresentationDocument" ) ) )
+ if ( xInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" )) ) )
aCreator.AppendAscii( "Impress" );
- else if ( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.drawing.DrawingDocument" ) ) )
+ else if ( xInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" )) ) )
aCreator.AppendAscii( "Draw" );
- else if ( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" ) ) )
+ else if ( xInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" )) ) )
aCreator.AppendAscii( "Writer" );
- else if ( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" ) ) )
+ else if ( xInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" )) ) )
aCreator.AppendAscii( "Calc" );
- else if ( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.formula.FormulaProperties" ) ) )
+ else if ( xInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.formula.FormulaProperties" )) ) )
aCreator.AppendAscii( "Math" );
}
diff --git a/filter/source/pdf/pdfuno.cxx b/filter/source/pdf/pdfuno.cxx
index a278cd5fd6bd..59ef536df046 100644
--- a/filter/source/pdf/pdfuno.cxx
+++ b/filter/source/pdf/pdfuno.cxx
@@ -64,14 +64,14 @@ extern "C"
sal_Int32 nPos;
xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PDFFilter_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
const Sequence< OUString > & rSNL1 = PDFFilter_getSupportedServiceNames();
const OUString * pArray1 = rSNL1.getConstArray();
for ( nPos = rSNL1.getLength(); nPos--; )
xNewKey->createKey( pArray1[nPos] );
xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PDFDialog_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
const Sequence< OUString > & rSNL2 = PDFDialog_getSupportedServiceNames();
const OUString * pArray2 = rSNL2.getConstArray();
for ( nPos = rSNL2.getLength(); nPos--; )
diff --git a/filter/source/placeware/tempfile.cxx b/filter/source/placeware/tempfile.cxx
index 93ec0abbcd0a..6c85817d1da1 100644
--- a/filter/source/placeware/tempfile.cxx
+++ b/filter/source/placeware/tempfile.cxx
@@ -163,7 +163,7 @@ OUString TempFile::createTempFileURL()
if( aTmp.getStr()[ aTmp.getLength() - 1 ] != sal_Unicode( '/' ) )
aTmp += OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ));
aTmp += OUString::valueOf( (sal_Int32) (unsigned) u, nRadix );
- aTmp += OUString::createFromAscii( ".tmp" );
+ aTmp += OUString( RTL_CONSTASCII_USTRINGPARAM( ".tmp" ));
osl::File aFile( aTmp );
osl::FileBase::RC err = aFile.open(osl_File_OpenFlag_Create);
diff --git a/filter/source/placeware/uno.cxx b/filter/source/placeware/uno.cxx
index ad18fb3db186..d7c8795ca20f 100644
--- a/filter/source/placeware/uno.cxx
+++ b/filter/source/placeware/uno.cxx
@@ -69,7 +69,7 @@ sal_Bool SAL_CALL component_writeInfo(
{
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PlaceWareExportFilter_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
const Sequence< OUString > & rSNL = PlaceWareExportFilter_getSupportedServiceNames();
const OUString * pArray = rSNL.getConstArray();
diff --git a/filter/source/svg/gfxtypes.hxx b/filter/source/svg/gfxtypes.hxx
index 242888f0d7ca..8cad13556cdf 100644
--- a/filter/source/svg/gfxtypes.hxx
+++ b/filter/source/svg/gfxtypes.hxx
@@ -40,7 +40,7 @@ namespace svgi
struct ARGBColor
{
- double toDoubleColor( sal_uInt8 val ) { return val/255.0; }
+ double toDoubleColor( sal_uInt8 val ) const { return val/255.0; }
ARGBColor() : a(1.0), r(0.0), g(0.0), b(0.0)
{}
diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx
index a85de2fbb6c7..c515e856cd23 100644
--- a/filter/source/svg/parserfragments.cxx
+++ b/filter/source/svg/parserfragments.cxx
@@ -37,8 +37,8 @@
#include <string.h>
#include <limits.h>
#include <boost/bind.hpp>
-#include <boost/spirit.hpp>
-#include <boost/spirit/dynamic/while.hpp>
+#include <boost/spirit/include/classic.hpp>
+#include <boost/spirit/include/classic_while.hpp>
#include <numeric>
#include <algorithm>
@@ -130,7 +130,7 @@ geometry::AffineMatrix2D multiplyMatrix( const geometry::AffineMatrix2D& rLHS,
namespace
{
- struct ColorGrammar : public ::boost::spirit::grammar< ColorGrammar >
+ struct ColorGrammar : public ::boost::spirit::classic::grammar< ColorGrammar >
{
public:
ARGBColor& m_rColor;
@@ -138,10 +138,10 @@ namespace
template< typename ScannerT >
struct definition
{
- ::boost::spirit::rule< ScannerT > colorExpression;
+ ::boost::spirit::classic::rule< ScannerT > colorExpression;
definition( const ColorGrammar& self )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
int_parser<sal_uInt8,10,1,3> byte_p;
colorExpression =
@@ -182,14 +182,14 @@ namespace
>> ')')
);
}
- ::boost::spirit::rule<ScannerT> const& start() const { return colorExpression; }
+ ::boost::spirit::classic::rule<ScannerT> const& start() const { return colorExpression; }
};
};
}
bool parseColor( const char* sColor, ARGBColor& rColor )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
if( parse(sColor,
ColorGrammar(rColor) >> end_p,
@@ -366,7 +366,7 @@ bool parseColor( const char* sColor, ARGBColor& rColor )
bool parseOpacity (const char* sOpacity, ARGBColor& rColor )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
if( parse(sOpacity,
// Begin grammar
@@ -385,7 +385,7 @@ bool parseOpacity (const char* sOpacity, ARGBColor& rColor )
bool parseTransform( const char* sTransform, basegfx::B2DHomMatrix& rTransform )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
double fRefOffsetX(0.0);
double fRefOffsetY(0.0);
@@ -501,7 +501,7 @@ bool parseTransform( const char* sTransform, basegfx::B2DHomMatrix& rTransform )
bool parseViewBox( const char* sViewbox, basegfx::B2DRange& rRect )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
double x=0.0,y=0.0,w=0.0,h=0.0;
@@ -529,7 +529,7 @@ bool parseViewBox( const char* sViewbox, basegfx::B2DRange& rRect )
bool parseDashArray( const char* sDashArray, std::vector<double>& rOutputVector )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
rOutputVector.clear();
return parse(sDashArray,
@@ -555,7 +555,7 @@ bool parsePaintUri( std::pair<const char*,const char*>& o_rPaintUri,
std::pair<ARGBColor,bool>& io_rColor,
const char* sPaintUri )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
const bool bRes = parse(sPaintUri,
// Begin grammar
@@ -587,7 +587,7 @@ void appendChar( std::string& str, char character)
bool parseXlinkHref( const char* sXlinkHref, std::string& data )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
data.erase(data.begin(),data.end());
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index 914e3b396b9c..892a5860b2b7 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -90,7 +90,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
else
if( mxSrcDoc.is() )
{
- uno::Reference< frame::XDesktop > xDesktop( mxMSF->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ),
+ uno::Reference< frame::XDesktop > xDesktop( mxMSF->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ),
uno::UNO_QUERY);
if( xDesktop.is() )
{
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 10e152e30dce..67e5432991e5 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -1124,8 +1124,7 @@ struct AnnotatingVisitor
if( aPaintUri.first != aPaintUri.second )
{
// assuming gradient. assumption does not hold generally
- const char* pClosingBracket;
- if( (pClosingBracket=strstr(sValue,")")) && rValue.getLength() > 5 )
+ if( strstr(sValue,")") && rValue.getLength() > 5 )
{
ElementRefMapType::iterator aRes;
if( (aRes=maGradientIdMap.find(
@@ -1813,7 +1812,7 @@ sal_Bool SVGReader::parseAndConvert()
{
uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder(
m_xServiceFactory->createInstance(
- rtl::OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")), uno::UNO_QUERY_THROW );
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.dom.DocumentBuilder" ))), uno::UNO_QUERY_THROW );
uno::Reference<xml::dom::XDocument> xDom(
xDomBuilder->parse(m_xInputStream),
@@ -2719,7 +2718,7 @@ bool importSvg(SvStream & rStream, Graphic & rGraphic )
uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder(
xServiceFactory->createInstance(
- rtl::OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.dom.DocumentBuilder" ))),
uno::UNO_QUERY_THROW );
uno::Reference<io::XInputStream> xStream(
diff --git a/filter/source/svg/svguno.cxx b/filter/source/svg/svguno.cxx
index b94675d7adb7..92e092e8155c 100644
--- a/filter/source/svg/svguno.cxx
+++ b/filter/source/svg/svguno.cxx
@@ -61,7 +61,7 @@ extern "C"
{
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SVGFilter_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
const Sequence< OUString > & rSNL = SVGFilter_getSupportedServiceNames();
const OUString * pArray = rSNL.getConstArray();
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 37dc24b7d309..766b1fc8aaea 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -872,7 +872,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
{
String aTransform;
- aTransform = NMSP_RTL::OUString::createFromAscii( "translate" );
+ aTransform = NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM( "translate" ));
aTransform += '(';
aTransform += String( GetValueString( aPt.X() ) );
aTransform += ',';
@@ -881,7 +881,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
if( rFont.GetOrientation() )
{
- aTransform += String( NMSP_RTL::OUString::createFromAscii( " rotate" ) );
+ aTransform += String( NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM( " rotate" )) );
aTransform += '(';
aTransform += String( NMSP_RTL::OUString::valueOf( rFont.GetOrientation() * -0.1 ) );
aTransform += ')';
@@ -889,13 +889,13 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
if( rFont.GetItalic() != ITALIC_NONE )
{
- aTransform += String( NMSP_RTL::OUString::createFromAscii( " skewX" ) );
+ aTransform += String( NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM( " skewX" )) );
aTransform += '(';
aTransform += String( NMSP_RTL::OUString::valueOf( (sal_Int32) -10 ) );
aTransform += ')';
}
- aTransform += String( NMSP_RTL::OUString::createFromAscii( " translate" ) );
+ aTransform += String( NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM( " translate" )) );
aTransform += '(';
aTransform += String( GetValueString( -aPt.X() ) );
aTransform += ',';
diff --git a/filter/source/svg/units.cxx b/filter/source/svg/units.cxx
index 96a810dccc8c..50487e6591e0 100644
--- a/filter/source/svg/units.cxx
+++ b/filter/source/svg/units.cxx
@@ -29,17 +29,10 @@
#include "precompiled_filter.hxx"
#include "units.hxx"
+#include <basegfx/range/b2drange.hxx>
#include "gfxtypes.hxx"
-#include "spirit_supplements.hxx"
-
-#include <string.h>
#include <rtl/ustring.hxx>
-
-#include <boost/bind.hpp>
-// workaround. spirit uses INT_MAX.
-#include <limits.h>
-#include <boost/spirit.hpp>
-
+#include <boost/spirit/include/classic.hpp>
namespace svgi
{
@@ -92,7 +85,8 @@ double convLength( double value, SvgUnit unit, const State& rState, char dir )
double convLength( const rtl::OUString& sValue, const State& rState, char dir )
{
- using namespace ::boost::spirit;
+ //FIXME: convert deprecated spirit::classic to use spirit::qi
+ using namespace ::boost::spirit::classic;
rtl::OString aUTF8 = rtl::OUStringToOString( sValue,
RTL_TEXTENCODING_UTF8 );
diff --git a/filter/source/t602/filterenv.cxx b/filter/source/t602/filterenv.cxx
index 97a82e6b24b8..4327cc251b06 100644
--- a/filter/source/t602/filterenv.cxx
+++ b/filter/source/t602/filterenv.cxx
@@ -63,7 +63,7 @@ sal_Bool SAL_CALL component_writeInfo(
sal_Int32 nPos = 0;
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( T602ImportFilter_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
const Sequence< OUString > & rSNL = T602ImportFilter_getSupportedServiceNames();
const OUString * pArray = rSNL.getConstArray();
@@ -71,7 +71,7 @@ sal_Bool SAL_CALL component_writeInfo(
xNewKey->createKey( pArray[nPos] );
xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( T602ImportFilterDialog_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
const Sequence< OUString > & rSNL2 = T602ImportFilterDialog_getSupportedServiceNames();
pArray = rSNL2.getConstArray();
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index a5cbe7b2a590..d7b78072668e 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -932,7 +932,7 @@ throw ( RuntimeException )
MutexGuard guard( Mutex::getGlobalMutex() );
if( !pNames ) {
static Sequence< OUString > seqNames(2);
- seqNames.getArray()[0] = OUString::createFromAscii(IMPLEMENTATION_NAME);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLEMENTATION_NAME));
pNames = &seqNames;
}
}
@@ -1041,12 +1041,12 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
ous[2] = getResStr(T602FILTER_STR_ENCODING_CP895);
ous[3] = getResStr(T602FILTER_STR_ENCODING_KOI8CS2);
any <<= ous;
- xPSetCodeLB->setPropertyValue(OUString::createFromAscii("StringItemList"), any);
+ xPSetCodeLB->setPropertyValue(OUString( RTL_CONSTASCII_USTRINGPARAM( "StringItemList" )), any);
Sequence < sal_Int16 > shr(1);
shr[0] = ini.forcecode ? ((sal_Int16) ini.xcode) + 1 : 0;
any <<= shr;
- xPSetCodeLB->setPropertyValue(OUString::createFromAscii("SelectedItems"), any);
+ xPSetCodeLB->setPropertyValue(OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" )), any);
Reference < XInterface > AzbCheckBoxModel = _Inst("com.sun.star.awt.UnoControlCheckBoxModel");
Reference < XPropertySet > xPSetAzbukaCB( AzbCheckBoxModel, UNO_QUERY );
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 27cd84d42634..cf13627d3463 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -101,7 +101,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star
Sequence< Any > aAnys(1);
OUString aBaseURI;
- if (aMediaMap.find(OUString::createFromAscii("URL"))->second >>= aBaseURI)
+ if (aMediaMap.find(OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" )))->second >>= aBaseURI)
{
INetURLObject aURLObj(aBaseURI);
// base URI in this case is the URI of the actual saving location
@@ -119,7 +119,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star
Reference< XPropertySet > xInfoSet(
GenericPropertySet_CreateInstance( new PropertySetInfo( aImportInfoMap ) ) );
xInfoSet->setPropertyValue(
- OUString::createFromAscii( "BaseURI" ), makeAny( aBaseURI ));
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" )), makeAny( aBaseURI ));
aAnys[0] <<= xInfoSet;
@@ -170,12 +170,12 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star
Sequence<com::sun::star::beans::PropertyValue> pValue=xstyleLoader->getStyleLoaderOptions();
//Load the Styles from the Template URL Supplied in the TypeDetection file
- if(msTemplateName.indexOf(OUString::createFromAscii("file:"))==-1)
+ if(msTemplateName.indexOf(OUString( RTL_CONSTASCII_USTRINGPARAM( "file:" )))==-1)
{
Reference< XConfigManager >xCfgMgr ( mxMSF->createInstance(
- OUString::createFromAscii("com.sun.star.config.SpecialConfigManager") ), UNO_QUERY );
- OUString PathString=xCfgMgr->substituteVariables(OUString::createFromAscii("$(progurl)"));
- PathString=PathString.concat(OUString::createFromAscii("/"));
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" )) ), UNO_QUERY );
+ OUString PathString(xCfgMgr->substituteVariables(OUString(RTL_CONSTASCII_USTRINGPARAM("$(progurl)"))));
+ PathString = PathString.concat(OUString( RTL_CONSTASCII_USTRINGPARAM( "/" )));
msTemplateName=PathString.concat(msTemplateName);
}
@@ -272,7 +272,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star
// get the base URI, so we can use relative links
OUString aBaseURI;
- if (aMediaMap.find(OUString::createFromAscii("URL"))->second >>= aBaseURI)
+ if (aMediaMap.find(OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" )))->second >>= aBaseURI)
{
INetURLObject aURLObj(aBaseURI);
// base URI in this case is the URI of the actual saving location
@@ -292,12 +292,12 @@ sal_Bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star
Reference< XPropertySet > xInfoSet(
GenericPropertySet_CreateInstance( new PropertySetInfo( aImportInfoMap ) ) );
xInfoSet->setPropertyValue(
- OUString::createFromAscii( "UsePrettyPrinting" ), makeAny( bPrettyPrint ));
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "UsePrettyPrinting" )), makeAny( bPrettyPrint ));
xInfoSet->setPropertyValue(
- OUString::createFromAscii( "ExportTextNumberElement" ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportTextNumberElement" )),
makeAny( bExportTextNumberElementForListItems ));
xInfoSet->setPropertyValue(
- OUString::createFromAscii( "BaseURI" ), makeAny( aBaseURI ));
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" )), makeAny( aBaseURI ));
aAnys[1] <<= xInfoSet;
Reference< XExporter > xExporter( mxMSF->createInstanceWithArguments (
@@ -376,11 +376,11 @@ void SAL_CALL XmlFilterAdaptor::initialize( const Sequence< Any >& aArguments )
{
comphelper::SequenceAsHashMap aMap(aAnySeq);
msFilterName = aMap.getUnpackedValueOrDefault(
- OUString::createFromAscii("Type"), OUString());
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" )), OUString());
msUserData = aMap.getUnpackedValueOrDefault(
- OUString::createFromAscii("UserData"), Sequence< OUString >());
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "UserData" )), Sequence< OUString >());
msTemplateName = aMap.getUnpackedValueOrDefault(
- OUString::createFromAscii("TemplateName"), OUString());
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "TemplateName" )), OUString());
}
}
OUString XmlFilterAdaptor_getImplementationName ()
diff --git a/filter/source/xmlfilteradaptor/genericfilter.cxx b/filter/source/xmlfilteradaptor/genericfilter.cxx
index b0dbd18f8fc9..0effdf85d795 100644
--- a/filter/source/xmlfilteradaptor/genericfilter.cxx
+++ b/filter/source/xmlfilteradaptor/genericfilter.cxx
@@ -101,7 +101,7 @@ sal_Bool SAL_CALL component_writeInfo(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( XmlFilterAdaptor_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
diff --git a/filter/source/xmlfilterdetect/fdcomp.cxx b/filter/source/xmlfilterdetect/fdcomp.cxx
index 5f11adff9986..82731faf90fb 100644
--- a/filter/source/xmlfilterdetect/fdcomp.cxx
+++ b/filter/source/xmlfilterdetect/fdcomp.cxx
@@ -101,7 +101,7 @@ sal_Bool SAL_CALL component_writeInfo(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( FilterDetect_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index 4b60983f4d06..02079fe52c47 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -99,8 +99,8 @@ Reference< com::sun::star::frame::XModel > xModel;
::rtl::OUString SAL_CALL FilterDetect::detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aArguments ) throw( com::sun::star::uno::RuntimeException )
{
- ::rtl::OUString sTypeName = OUString::createFromAscii("");
- ::rtl::OUString sUrl = OUString::createFromAscii("");
+ ::rtl::OUString sTypeName;
+ ::rtl::OUString sUrl;
::rtl::OUString originalTypeName;
Sequence<PropertyValue > lProps ;
@@ -156,7 +156,7 @@ Reference< com::sun::star::frame::XModel > xModel;
// test typedetect code
- Reference <XNameAccess> xTypeCont(mxMSF->createInstance(OUString::createFromAscii("com.sun.star.document.TypeDetection")),UNO_QUERY);
+ Reference <XNameAccess> xTypeCont(mxMSF->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ))),UNO_QUERY);
Sequence < ::rtl::OUString > myTypes= xTypeCont->getElementNames();
nLength = myTypes.getLength();
@@ -172,7 +172,7 @@ Reference< com::sun::star::frame::XModel > xModel;
sal_Int32 j =0;
while( j < new_nlength && sTypeName.equalsAscii(""))
{
- ::rtl::OUString tmpStr =OUString::createFromAscii("");
+ ::rtl::OUString tmpStr;
lProps[j].Value >>=tmpStr;
if((lProps[j].Name.equalsAscii("ClipboardFormat")) && (!tmpStr.equalsAscii("")) )
{
@@ -191,14 +191,14 @@ Reference< com::sun::star::frame::XModel > xModel;
}
if(sTypeName.equalsAscii(""))
{
- //sTypeName=::rtl::OUString::createFromAscii("writer_Flat_XML_File");
+ //sTypeName=::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("writer_Flat_XML_File"));
}
else
{
if ( location == aArguments.getLength() )
{
aArguments.realloc(nLength+1);
- aArguments[location].Name = ::rtl::OUString::createFromAscii( "TypeName" );
+ aArguments[location].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TypeName" ));
}
aArguments[location].Value <<=sTypeName;
}
@@ -213,8 +213,8 @@ Reference< com::sun::star::frame::XModel > xModel;
::rtl::OUString SAL_CALL supportedByType( const ::rtl::OUString clipBoardFormat , const ::rtl::OString resultString, const ::rtl::OUString checkType)
{
- ::rtl::OUString sTypeName= OUString::createFromAscii("");
- if((clipBoardFormat.match(OUString::createFromAscii("doctype:"))))
+ ::rtl::OUString sTypeName;
+ if((clipBoardFormat.match(OUString( RTL_CONSTASCII_USTRINGPARAM( "doctype:" )))))
{
::rtl::OString tryStr = ::rtl::OUStringToOString(clipBoardFormat.copy(8),RTL_TEXTENCODING_ASCII_US).getStr();
// OSL_ENSURE( sal_False, tryStr);
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 70cb8b716be9..c5c0ac86320e 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -1778,7 +1778,7 @@
3) 'fo:text-indent' the indent of the first line of some child (e.g. paragraph) (applied by CSS class style)
Possible list children:
- <!ELEMENT text:list-item (text:p|text:h|text:list|text:list)+>
+ <!ELEMENT text:list-item (text:p|text:h|text:list)+>
In the Office the list label before the text depends on two attributes:
- 'text:min-label-width': the distance between list label and all text of the list item.
@@ -1827,6 +1827,7 @@
<xsl:if test="$listStyle/text:list-style/text:list-level-style-number">
<xsl:choose>
<xsl:when test="$isListHeader">0</xsl:when>
+ <xsl:when test="$isEmptyList">
<!-- An empty list item (no text:h/text:p as child), will not count as item and does not increment the count. -->
<xsl:variable name="tempItemNumber">
<xsl:choose>
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 3974b101d7bf..c350f7ff2216 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -110,10 +110,10 @@ void TypeDetectionExporter::doExport( Reference< XOutputStream > xOS, const XML
xDocSrc->setOutputStream( xOS );
::comphelper::AttributeList * pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( OUString::createFromAscii( "xmlns:oor" ), sCdataAttribute, OUString::createFromAscii( "http://openoffice.org/2001/registry" ) );
- pAttrList->AddAttribute ( OUString::createFromAscii( "xmlns:xs" ), sCdataAttribute, OUString::createFromAscii( "http://www.w3.org/2001/XMLSchema" ) );
- pAttrList->AddAttribute ( sName, sCdataAttribute, OUString::createFromAscii( "TypeDetection" ) );
- pAttrList->AddAttribute ( OUString::createFromAscii( "oor:package" ), sCdataAttribute, OUString::createFromAscii( "org.openoffice.Office" ) );
+ pAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM( "xmlns:oor" )), sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "http://openoffice.org/2001/registry" )) );
+ pAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM( "xmlns:xs" )), sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "http://www.w3.org/2001/XMLSchema" )) );
+ pAttrList->AddAttribute ( sName, sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "TypeDetection" )) );
+ pAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM( "oor:package" )), sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office" )) );
Reference < XAttributeList > xAttrList (pAttrList);
xHandler->startDocument();
@@ -123,7 +123,7 @@ void TypeDetectionExporter::doExport( Reference< XOutputStream > xOS, const XML
// export types
{
xAttrList = pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( sName, sCdataAttribute, OUString::createFromAscii( "Types" ) );
+ pAttrList->AddAttribute ( sName, sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "Types" )) );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sNode, xAttrList );
@@ -166,7 +166,7 @@ void TypeDetectionExporter::doExport( Reference< XOutputStream > xOS, const XML
// export filters
{
xAttrList = pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( sName, sCdataAttribute, OUString::createFromAscii( "Filters" ) );
+ pAttrList->AddAttribute ( sName, sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "Filters" )) );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sNode, xAttrList );
@@ -242,8 +242,8 @@ void TypeDetectionExporter::addProperty( Reference< XDocumentHandler > xHandler,
const OUString sWhiteSpace ( RTL_CONSTASCII_USTRINGPARAM ( " " ) );
::comphelper::AttributeList * pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( OUString::createFromAscii( "oor:name" ), sCdataAttribute, rName );
- pAttrList->AddAttribute ( OUString::createFromAscii( "oor:type" ), sCdataAttribute, OUString::createFromAscii( "xs:string" ) );
+ pAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM( "oor:name" )), sCdataAttribute, rName );
+ pAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM( "oor:type" )), sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "xs:string" )) );
Reference < XAttributeList > xAttrList (pAttrList);
xHandler->ignorableWhitespace ( sWhiteSpace );
@@ -272,14 +272,14 @@ void TypeDetectionExporter::addLocaleProperty( Reference< XDocumentHandler > xHa
const OUString sWhiteSpace ( RTL_CONSTASCII_USTRINGPARAM ( " " ) );
::comphelper::AttributeList * pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( OUString::createFromAscii( "oor:name" ), sCdataAttribute, rName );
- pAttrList->AddAttribute ( OUString::createFromAscii( "oor:type" ), sCdataAttribute, OUString::createFromAscii( "xs:string" ) );
+ pAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM( "oor:name" )), sCdataAttribute, rName );
+ pAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM( "oor:type" )), sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "xs:string" )) );
Reference < XAttributeList > xAttrList (pAttrList);
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sProp, xAttrList );
xAttrList = pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( OUString::createFromAscii( "xml:lang" ), sCdataAttribute, OUString::createFromAscii( "en-US" ) );
+ pAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM( "xml:lang" )), sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM( "en-US" )) );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sValue, xAttrList );
xHandler->characters( rValue );
diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx
index dbb1e65d6bdd..52070b03517c 100644
--- a/filter/source/xsltdialog/typedetectionimport.cxx
+++ b/filter/source/xsltdialog/typedetectionimport.cxx
@@ -72,7 +72,7 @@ void TypeDetectionImporter::doImport( Reference< XMultiServiceFactory >& xMSF, R
{
try
{
- Reference< XParser > xParser( xMSF->createInstance(OUString::createFromAscii( "com.sun.star.xml.sax.Parser" ) ), UNO_QUERY );
+ Reference< XParser > xParser( xMSF->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" )) ), UNO_QUERY );
if( xParser.is() )
{
TypeDetectionImporter* pImporter = new TypeDetectionImporter( xMSF );
diff --git a/filter/source/xsltdialog/xmlfileview.cxx b/filter/source/xsltdialog/xmlfileview.cxx
index dca8b7a86dbb..11973b431582 100644
--- a/filter/source/xsltdialog/xmlfileview.cxx
+++ b/filter/source/xsltdialog/xmlfileview.cxx
@@ -618,7 +618,7 @@ void XMLSourceFileDialog::onValidate()
try
{
- Reference< XImportFilter > xImporter( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.documentconversion.XSLTValidate" ) ), UNO_QUERY );
+ Reference< XImportFilter > xImporter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.documentconversion.XSLTValidate" )) ), UNO_QUERY );
if( xImporter.is() )
{
osl::File aInputFile( maFileURL );
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index bdd241d89a19..c981ee28d32d 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -131,7 +131,7 @@ XMLFilterDialogComponent::XMLFilterDialogComponent( const com::sun::star::uno::R
mxMSF( rxMSF ),
mpDialog( NULL )
{
- Reference< XDesktop > xDesktop( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
+ Reference< XDesktop > xDesktop( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
if( xDesktop.is() )
{
Reference< XTerminateListener > xListener( this );
@@ -422,7 +422,7 @@ sal_Bool SAL_CALL component_writeInfo(
{
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( XMLFilterDialogComponent_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+ xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
singlecomponent_writeInfo( xNewKey, XMLFilterDialogComponent_getSupportedServiceNames() );
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index 2130b09db727..6489e21101cb 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -81,7 +81,7 @@ XMLFilterJarHelper::XMLFilterJarHelper( Reference< XMultiServiceFactory >& xMSF
{
try
{
- Reference< XConfigManager > xCfgMgr( xMSF->createInstance(OUString::createFromAscii("com.sun.star.config.SpecialConfigManager")), UNO_QUERY );
+ Reference< XConfigManager > xCfgMgr( xMSF->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" ))), UNO_QUERY );
if( xCfgMgr.is() )
{
sProgPath = xCfgMgr->substituteVariables( sProgPath );
@@ -187,8 +187,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt
Reference< XHierarchicalNameAccess > xIfc(
mxMSF->createInstanceWithArguments(
- rtl::OUString::createFromAscii(
- "com.sun.star.packages.comp.ZipPackage" ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.packages.comp.ZipPackage" )),
aArguments ), UNO_QUERY );
if( xIfc.is() )
@@ -290,8 +289,7 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL, XMLFilterVect
Reference< XHierarchicalNameAccess > xIfc(
mxMSF->createInstanceWithArguments(
- rtl::OUString::createFromAscii(
- "com.sun.star.packages.comp.ZipPackage" ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.packages.comp.ZipPackage" )),
aArguments ), UNO_QUERY );
if( xIfc.is() )
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index fe764009ba49..33a0aff4e5b4 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -102,11 +102,11 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResM
try
{
- mxFilterContainer = Reference< XNameContainer >::query( rxMSF->createInstance( OUString::createFromAscii("com.sun.star.document.FilterFactory" ) ) );
- mxTypeDetection = Reference< XNameContainer >::query( rxMSF->createInstance( OUString::createFromAscii("com.sun.star.document.TypeDetection" ) ));
- mxExtendedTypeDetection = Reference< XNameContainer >::query( rxMSF->createInstance( OUString::createFromAscii("com.sun.star.document.ExtendedTypeDetectionFactory" ) ) );
+ mxFilterContainer = Reference< XNameContainer >::query( rxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ) );
+ mxTypeDetection = Reference< XNameContainer >::query( rxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" )) ));
+ mxExtendedTypeDetection = Reference< XNameContainer >::query( rxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ExtendedTypeDetectionFactory" )) ) );
- Reference< XConfigManager > xCfgMgr( mxMSF->createInstance(OUString::createFromAscii("com.sun.star.config.SpecialConfigManager") ), UNO_QUERY );
+ Reference< XConfigManager > xCfgMgr( mxMSF->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" )) ), UNO_QUERY );
if( xCfgMgr.is() )
{
sTemplatePath = xCfgMgr->substituteVariables( sTemplatePath );
@@ -251,7 +251,7 @@ void XMLFilterSettingsDialog::onNew()
aTempInfo.maInterfaceName = createUniqueInterfaceName( String( RESID( STR_DEFAULT_UI_NAME ) ) );
// set default application
- aTempInfo.maDocumentService = OUString::createFromAscii("com.sun.star.text.TextDocument");
+ aTempInfo.maDocumentService = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ));
// execute XML Filter Dialog
XMLFilterTabDialog aDlg( this, *mpResMgr, mxMSF, &aTempInfo );
@@ -1378,9 +1378,9 @@ OUString getApplicationUIName( const OUString& rServiceName )
OUString aRet = String( RESID( STR_UNKNOWN_APPLICATION ) );
if( rServiceName.getLength() )
{
- aRet += OUString::createFromAscii(" (");
+ aRet += OUString( RTL_CONSTASCII_USTRINGPARAM( " (" ));
aRet += rServiceName;
- aRet += OUString::createFromAscii(")");
+ aRet += OUString( RTL_CONSTASCII_USTRINGPARAM( ")" ));
}
return aRet;
}
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 7a612d139490..15aee854fee4 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -146,7 +146,7 @@ bool XMLFilterTabDialog::onOk()
{
try
{
- Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( OUString::createFromAscii("com.sun.star.document.FilterFactory" ) ), UNO_QUERY );
+ Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ), UNO_QUERY );
if( xFilterContainer.is() )
{
if( xFilterContainer->hasByName( mpNewInfo->maFilterName ) )
@@ -178,7 +178,7 @@ bool XMLFilterTabDialog::onOk()
{
try
{
- Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( OUString::createFromAscii("com.sun.star.document.FilterFactory" ) ), UNO_QUERY );
+ Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ), UNO_QUERY );
if( xFilterContainer.is() )
{
Sequence< OUString > aFilterNames( xFilterContainer->getElementNames() );
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index 7572228a0299..48da5ae6eee5 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -78,7 +78,7 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, co
try
{
- Reference< XConfigManager > xCfgMgr( rxMSF->createInstance(OUString::createFromAscii("com.sun.star.config.SpecialConfigManager")), UNO_QUERY );
+ Reference< XConfigManager > xCfgMgr( rxMSF->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" ))), UNO_QUERY );
if( xCfgMgr.is() )
sInstPath = xCfgMgr->substituteVariables( sInstPath );
}
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index c59957645715..4f027de246ab 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -181,11 +181,11 @@ XMLFilterTestDialog::XMLFilterTestDialog( Window* pParent, ResMgr& rResMgr, cons
try
{
- Reference< XConfigManager > xCfgMgr( mxMSF->createInstance( OUString::createFromAscii("com.sun.star.config.SpecialConfigManager")), UNO_QUERY );
+ Reference< XConfigManager > xCfgMgr( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" ))), UNO_QUERY );
if( xCfgMgr.is() )
sDTDPath = xCfgMgr->substituteVariables( sDTDPath );
- mxGlobalBroadcaster = Reference < XEventBroadcaster >::query( mxMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.GlobalEventBroadcaster") ) );
+ mxGlobalBroadcaster = Reference < XEventBroadcaster >::query( mxMSF->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.GlobalEventBroadcaster" )) ) );
if ( mxGlobalBroadcaster.is() )
{
mxGlobalEventListener = new GlobalEventListenerImpl( this );
@@ -329,8 +329,8 @@ void XMLFilterTestDialog::onExportBrowse()
com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
0 );
- Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( OUString::createFromAscii("com.sun.star.document.FilterFactory" ) ), UNO_QUERY );
- Reference< XNameAccess > xTypeDetection( mxMSF->createInstance( OUString::createFromAscii("com.sun.star.document.TypeDetection" ) ), UNO_QUERY );
+ Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ), UNO_QUERY );
+ Reference< XNameAccess > xTypeDetection( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" )) ), UNO_QUERY );
if( xFilterContainer.is() && xTypeDetection.is() )
{
Sequence< OUString > aFilterNames( xFilterContainer->getElementNames() );
@@ -404,7 +404,7 @@ void XMLFilterTestDialog::onExportBrowse()
{
if( n > 0 )
aExtension += OUString( sal_Unicode(';') );
- aExtension += OUString::createFromAscii("*.");
+ aExtension += OUString( RTL_CONSTASCII_USTRINGPARAM( "*." ));
aExtension += (*pExtensions++);
}
}
@@ -434,13 +434,13 @@ void XMLFilterTestDialog::onExportBrowse()
{
maExportRecentFile = aDlg.GetPath();
- Reference< XComponentLoader > xLoader( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
- Reference< XInteractionHandler > xInter( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.task.InteractionHandler" ) ), UNO_QUERY );
+ Reference< XComponentLoader > xLoader( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
+ Reference< XInteractionHandler > xInter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), UNO_QUERY );
if( xLoader.is() && xInter.is() )
{
OUString aFrame( RTL_CONSTASCII_USTRINGPARAM( "_default" ) );
Sequence< PropertyValue > aArguments(1);
- aArguments[0].Name = OUString::createFromAscii( "InteractionHandler" );
+ aArguments[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArguments[0].Value <<= xInter;
Reference< XComponent > xComp( xLoader->loadComponentFromURL( maExportRecentFile, aFrame, 0, aArguments ) );
if( xComp.is() )
@@ -505,7 +505,7 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp )
aSourceData[i++].Value <<= mpFilterInfo->maDocType;
}
- Reference< XExportFilter > xExporter( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.documentconversion.XSLTFilter" ) ), UNO_QUERY );
+ Reference< XExportFilter > xExporter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.documentconversion.XSLTFilter" )) ), UNO_QUERY );
Reference< XDocumentHandler > xHandler( xExporter, UNO_QUERY );
if( xHandler.is() )
{
@@ -521,8 +521,8 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp )
{
try
{
- xGrfResolver = Reference< XGraphicObjectResolver >::query( xDocFac->createInstance( OUString::createFromAscii("com.sun.star.document.ExportGraphicObjectResolver") ) );
- xObjectResolver = Reference< XEmbeddedObjectResolver >::query( xDocFac->createInstance( OUString::createFromAscii("com.sun.star.document.ExportEmbeddedObjectResolver") ) );
+ xGrfResolver = Reference< XGraphicObjectResolver >::query( xDocFac->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ExportGraphicObjectResolver" )) ) );
+ xObjectResolver = Reference< XEmbeddedObjectResolver >::query( xDocFac->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ExportEmbeddedObjectResolver" )) ) );
}
catch( Exception& )
{
@@ -588,7 +588,7 @@ void XMLFilterTestDialog::onImportBrowse()
if( i > 0 )
aExtensions += ';';
- aExtensions += String( RTL_CONSTASCII_STRINGPARAM("*.") );
+ aExtensions += String( RTL_CONSTASCII_USTRINGPARAM("*.") );
if( nLastIndex == -1 )
{
@@ -628,16 +628,16 @@ void XMLFilterTestDialog::import( const OUString& rURL )
{
try
{
- Reference< XComponentLoader > xLoader( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
- Reference< XInteractionHandler > xInter( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.task.InteractionHandler" ) ), UNO_QUERY );
+ Reference< XComponentLoader > xLoader( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
+ Reference< XInteractionHandler > xInter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), UNO_QUERY );
if( xLoader.is() && xInter.is() )
{
OUString aFrame( RTL_CONSTASCII_USTRINGPARAM( "_default" ) );
Sequence< PropertyValue > aArguments(2);
- aArguments[0].Name = OUString::createFromAscii( "FilterName" );
+ aArguments[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
aArguments[0].Value <<= mpFilterInfo->maFilterName;
- aArguments[1].Name = OUString::createFromAscii( "InteractionHandler" );
+ aArguments[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArguments[1].Value <<= xInter;
xLoader->loadComponentFromURL( rURL, aFrame, 0, aArguments );
@@ -648,7 +648,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
TempFile aTempFile;
OUString aTempFileURL( aTempFile.GetURL() );
- Reference< XImportFilter > xImporter( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.documentconversion.XSLTFilter" ) ), UNO_QUERY );
+ Reference< XImportFilter > xImporter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.documentconversion.XSLTFilter" )) ), UNO_QUERY );
if( xImporter.is() )
{
osl::File aInputFile( rURL );
@@ -659,22 +659,22 @@ void XMLFilterTestDialog::import( const OUString& rURL )
Sequence< PropertyValue > aSourceData( 5 );
int i = 0;
- aSourceData[i ].Name = OUString::createFromAscii( "InputStream" );
+ aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "InputStream" ));
aSourceData[i++].Value <<= xIS;
- aSourceData[i ].Name = OUString::createFromAscii( "FileName" );
+ aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "FileName" ));
aSourceData[i++].Value <<= rURL;
- aSourceData[i ].Name = OUString::createFromAscii( "Indent" );
+ aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Indent" ));
aSourceData[i++].Value <<= (sal_Bool)sal_True;
- aSourceData[i ].Name = OUString::createFromAscii("DocType_Public");
- aSourceData[i++].Value <<= OUString::createFromAscii("-//OpenOffice.org//DTD OfficeDocument 1.0//EN");
+ aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "DocType_Public" ));
+ aSourceData[i++].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" ));
- aSourceData[i ].Name = OUString::createFromAscii("DocType_System");
+ aSourceData[i ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "DocType_System" ));
aSourceData[i++].Value <<= sDTDPath;
- Reference< XDocumentHandler > xWriter( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), UNO_QUERY );
+ Reference< XDocumentHandler > xWriter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ), UNO_QUERY );
File aOutputFile( aTempFileURL );
rc = aOutputFile.open( OpenFlag_Write );
@@ -729,7 +729,7 @@ Reference< XComponent > XMLFilterTestDialog::getFrontMostDocument( const OUStrin
try
{
- Reference< XDesktop > xDesktop( mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
+ Reference< XDesktop > xDesktop( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
if( xDesktop.is() )
{
Reference< XComponent > xTest( mxLastFocusModel );
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index f9186d31b6f7..73200ac24d42 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -307,10 +307,10 @@ void XSLTFilter::disposing(const EventObject& ) throw (RuntimeException)
{
Reference< XComponentContext > xContext;
Reference< XPropertySet > xProps( m_rServiceFactory, UNO_QUERY_THROW );
- xContext.set( xProps->getPropertyValue( ::rtl::OUString::createFromAscii( "DefaultContext" ) ), UNO_QUERY_THROW );
- Reference< XMacroExpander > xMacroExpander( xContext->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.util.theMacroExpander" ) ), UNO_QUERY_THROW );
+ xContext.set( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" )) ), UNO_QUERY_THROW );
+ Reference< XMacroExpander > xMacroExpander( xContext->getValueByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ), UNO_QUERY_THROW );
sExpandedUrl = xMacroExpander->expandMacros(sUrl);
- sal_Int32 nPos = sExpandedUrl.indexOf(::rtl::OUString::createFromAscii("vnd.sun.star.expand:"));
+ sal_Int32 nPos = sExpandedUrl.indexOf(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.expand:" )));
if ( nPos != -1 )
sExpandedUrl = sExpandedUrl.copy(nPos+20);
}
@@ -348,8 +348,8 @@ OUString XSLTFilter::rel2abs(const OUString& s)
{
Reference< XStringSubstitution > subs(m_rServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.util.PathSubstitution")), UNO_QUERY);
- OUString aWorkingDir = subs->getSubstituteVariableValue(OUString::createFromAscii("$(progurl)"));
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.PathSubstitution" ))), UNO_QUERY);
+ OUString aWorkingDir(subs->getSubstituteVariableValue(OUString(RTL_CONSTASCII_USTRINGPARAM("$(progurl)"))));
INetURLObject aObj( aWorkingDir );
aObj.setFinalSlash();
bool bWasAbsolute;
@@ -395,7 +395,7 @@ sal_Bool XSLTFilter::importer(
// create SAX parser that will read the document file
// and provide events to xHandler passed to this call
Reference < XParser > xSaxParser( m_rServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Parser")), UNO_QUERY );
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" ))), UNO_QUERY );
OSL_ASSERT(xSaxParser.is());
if(!xSaxParser.is())return sal_False;
@@ -403,16 +403,16 @@ sal_Bool XSLTFilter::importer(
Sequence< Any > args(3);
NamedValue nv;
- nv.Name = OUString::createFromAscii("StylesheetURL");
+ nv.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "StylesheetURL" ));
nv.Value <<= expandUrl(udStyleSheet); args[0] <<= nv;
- nv.Name = OUString::createFromAscii("SourceURL");
+ nv.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SourceURL" ));
nv.Value <<= aURL; args[1] <<= nv;
- nv.Name = OUString::createFromAscii("SourceBaseURL");
+ nv.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SourceBaseURL" ));
nv.Value <<= OUString(INetURLObject(aURL).getBase());
args[2] <<= nv;
m_tcontrol = Reference< XActiveDataControl >(m_rServiceFactory->createInstanceWithArguments(
- OUString::createFromAscii("com.sun.star.comp.JAXTHelper"), args), UNO_QUERY);
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.JAXTHelper" )), args), UNO_QUERY);
OSL_ASSERT(xHandler.is());
OSL_ASSERT(xInputStream.is());
@@ -430,7 +430,7 @@ sal_Bool XSLTFilter::importer(
// create pipe
Reference< XOutputStream > pipeout(m_rServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY);
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pipe" ))), UNO_QUERY);
Reference< XInputStream > pipein(pipeout, UNO_QUERY);
//connect transformer to pipe
@@ -516,22 +516,22 @@ sal_Bool XSLTFilter::exporter(
// get the document writer
m_rDocumentHandler = Reference<XExtendedDocumentHandler>(
m_rServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Writer")),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ))),
UNO_QUERY);
}
// create transformer
Sequence< Any > args(4);
NamedValue nv;
- nv.Name = OUString::createFromAscii("StylesheetURL");
+ nv.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "StylesheetURL" ));
nv.Value <<= expandUrl(udStyleSheet); args[0] <<= nv;
- nv.Name = OUString::createFromAscii("TargetURL");
+ nv.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ));
nv.Value <<= sURL; args[1] <<= nv;
- nv.Name = OUString::createFromAscii("DoctypeSystem");
+ nv.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "DoctypeSystem" ));
nv.Value <<= aDoctypeSystem; args[2] <<= nv;
- nv.Name = OUString::createFromAscii("DoctypePublic");
+ nv.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "DoctypePublic" ));
nv.Value <<= aDoctypePublic; args[3] <<= nv;
- nv.Name = OUString::createFromAscii("TargetBaseURL");
+ nv.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "TargetBaseURL" ));
INetURLObject ineturl(sURL);
ineturl.removeSegment();
m_aExportBaseUrl = ineturl.GetMainURL(INetURLObject::NO_DECODE);
@@ -539,7 +539,7 @@ sal_Bool XSLTFilter::exporter(
args[3] <<= nv;
m_tcontrol = Reference< XActiveDataControl >(m_rServiceFactory->createInstanceWithArguments(
- OUString::createFromAscii("com.sun.star.comp.JAXTHelper"), args), UNO_QUERY);
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.JAXTHelper" )), args), UNO_QUERY);
OSL_ASSERT(m_rDocumentHandler.is());
OSL_ASSERT(m_rOutputStream.is());
@@ -551,7 +551,7 @@ sal_Bool XSLTFilter::exporter(
// create pipe
Reference< XOutputStream > pipeout(m_rServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY);
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pipe" ))), UNO_QUERY);
Reference< XInputStream > pipein(pipeout, UNO_QUERY);
// connect sax writer to pipe
@@ -664,7 +664,7 @@ static Sequence< OUString > getSupportedServiceNames()
if( !pNames )
{
static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString::createFromAscii(SERVICE_NAME);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICE_NAME));
pNames = &seqNames;
}
}
@@ -691,7 +691,7 @@ sal_Bool SAL_CALL component_writeInfo(void * /* pServiceManager */, void * pRegi
{
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
- OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) );
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" )) ) );
const Sequence< OUString > & rSNL = getSupportedServiceNames();
const OUString * pArray = rSNL.getConstArray();