diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-20 15:37:25 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-20 16:36:54 -0500 |
commit | 88869c1dd907c4851cd8671f0822a0d7c4fd3f36 (patch) | |
tree | bd647d7317c5c98ac2017beb856852bf9d84a2f3 /svx | |
parent | 6964157be89119fe58347f7281207205236b05a6 (diff) |
String to rtl::OUString.
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/svdograf.hxx | 13 | ||||
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 29 |
2 files changed, 28 insertions, 14 deletions
diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx index f11a1eb6bb17..eb2235f995e3 100644 --- a/svx/inc/svx/svdograf.hxx +++ b/svx/inc/svx/svdograf.hxx @@ -83,6 +83,9 @@ public: class GraphicObject; class SdrGraphicLink; +/** + * This class represents an embedded or linked bitmap graphic object. + */ class SVX_DLLPUBLIC SdrGrafObj : public SdrRectObj { private: @@ -100,8 +103,8 @@ private: void ImpSetAttrToGrafInfo(); // Werte vom Pool kopieren GraphicAttr aGrafInfo; - String aFileName; // Wenn es sich um einen Link handelt, steht hier der Dateiname drin. - String aFilterName; + rtl::OUString aFileName; // Wenn es sich um einen Link handelt, steht hier der Dateiname drin. + rtl::OUString aFilterName; GraphicObject* pGraphic; // Zur Beschleunigung von Bitmapausgaben, besonders von gedrehten. SdrGraphicLink* pGraphicLink; // Und hier noch ein Pointer fuer gelinkte Grafiken bool bMirrored:1; // True bedeutet, die Grafik ist horizontal, d.h. ueber die Y-Achse gespiegelt auszugeben. @@ -158,12 +161,12 @@ public: void ForceSwapIn() const; void ForceSwapOut() const; - void SetGraphicLink(const String& rFileName, const String& rFilterName); + void SetGraphicLink(const rtl::OUString& rFileName, const String& rFilterName); void ReleaseGraphicLink(); bool IsLinkedGraphic() const; - const String& GetFileName() const { return aFileName; } - const String& GetFilterName() const { return aFilterName; } + const rtl::OUString& GetFileName() const; + const rtl::OUString& GetFilterName() const; void StartAnimation(OutputDevice* pOutDev, const Point& rPoint, const Size& rSize, long nExtraData=0L); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index b317bbaed20b..26606b7d2db5 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -597,10 +597,11 @@ void SdrGrafObj::ImpLinkAnmeldung() if( pLinkManager != NULL && pGraphicLink == NULL ) { - if( aFileName.Len() ) + if (!aFileName.isEmpty()) { pGraphicLink = new SdrGraphicLink( this ); - pLinkManager->InsertFileLink( *pGraphicLink, OBJECT_CLIENT_GRF, aFileName, ( aFilterName.Len() ? &aFilterName : NULL ), NULL ); + pLinkManager->InsertFileLink( + *pGraphicLink, OBJECT_CLIENT_GRF, aFileName, (aFilterName.isEmpty() ? NULL : &aFilterName), NULL); pGraphicLink->Connect(); } } @@ -622,7 +623,7 @@ void SdrGrafObj::ImpLinkAbmeldung() // ----------------------------------------------------------------------------- -void SdrGrafObj::SetGraphicLink( const String& rFileName, const String& rFilterName ) +void SdrGrafObj::SetGraphicLink(const rtl::OUString& rFileName, const String& rFilterName) { ImpLinkAbmeldung(); aFileName = rFileName; @@ -639,13 +640,23 @@ void SdrGrafObj::SetGraphicLink( const String& rFileName, const String& rFilterN void SdrGrafObj::ReleaseGraphicLink() { ImpLinkAbmeldung(); - aFileName = String(); - aFilterName = String(); + aFileName = rtl::OUString(); + aFilterName = rtl::OUString(); } bool SdrGrafObj::IsLinkedGraphic() const { - return aFileName.Len() > 0; + return !aFileName.isEmpty(); +} + +const rtl::OUString& SdrGrafObj::GetFileName() const +{ + return aFileName; +} + +const rtl::OUString& SdrGrafObj::GetFilterName() const +{ + return aFilterName; } // ----------------------------------------------------------------------------- @@ -974,7 +985,7 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage ) SdrRectObj::SetPage( pNewPage ); - if(aFileName.Len() && bInsert) + if (!aFileName.isEmpty() && bInsert) ImpLinkAnmeldung(); } @@ -999,7 +1010,7 @@ void SdrGrafObj::SetModel( SdrModel* pNewModel ) // realize model SdrRectObj::SetModel(pNewModel); - if( bChg && aFileName.Len() ) + if (bChg && !aFileName.isEmpty()) ImpLinkAnmeldung(); } @@ -1345,7 +1356,7 @@ Reference< XInputStream > SdrGrafObj::getInputStream() } } - if( !xStream.is() && aFileName.Len() ) + if (!xStream.is() && !aFileName.isEmpty()) { SvFileStream* pStream = new SvFileStream( aFileName, STREAM_READ ); if( pStream ) |