Kaydet (Commit) abe49a84 authored tarafından Noel Grandin's avatar Noel Grandin

convert CPPCANVAS module from String to OUString

Change-Id: I12a219a50cc3a9b07c9852cc0d417f71797b9e15
üst e6d91ff2
...@@ -263,7 +263,7 @@ static float GetSwapFloat( SvStream& rSt ) ...@@ -263,7 +263,7 @@ static float GetSwapFloat( SvStream& rSt )
bool bSubsettableActions ); bool bSubsettableActions );
void createTextAction( const ::Point& rStartPoint, void createTextAction( const ::Point& rStartPoint,
const String rString, const OUString rString,
int nIndex, int nIndex,
int nLength, int nLength,
const sal_Int32* pCharWidths, const sal_Int32* pCharWidths,
......
...@@ -750,7 +750,7 @@ namespace cppcanvas ...@@ -750,7 +750,7 @@ namespace cppcanvas
if (width == 0) { // non native formats if (width == 0) { // non native formats
GraphicFilter filter; GraphicFilter filter;
filter.ImportGraphic (graphic, String (), s); filter.ImportGraphic (graphic, OUString(), s);
SAL_INFO("cppcanvas.emf", "EMF+\tbitmap width: " << graphic.GetBitmap().GetSizePixel().Width() << " height: " << graphic.GetBitmap().GetSizePixel().Height()); SAL_INFO("cppcanvas.emf", "EMF+\tbitmap width: " << graphic.GetBitmap().GetSizePixel().Width() << " height: " << graphic.GetBitmap().GetSizePixel().Height());
} }
...@@ -764,7 +764,7 @@ namespace cppcanvas ...@@ -764,7 +764,7 @@ namespace cppcanvas
// workaround buggy metafiles, which have wrong mfSize set (n#705956 for example) // workaround buggy metafiles, which have wrong mfSize set (n#705956 for example)
SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), bUseWholeStream ? s.remainingSize() : dataSize - 16, STREAM_READ); SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), bUseWholeStream ? s.remainingSize() : dataSize - 16, STREAM_READ);
filter.ImportGraphic (graphic, String (), mfStream); filter.ImportGraphic (graphic, OUString(), mfStream);
// debug code - write the stream to debug file /tmp/emf-stream.emf // debug code - write the stream to debug file /tmp/emf-stream.emf
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
......
...@@ -849,14 +849,14 @@ namespace cppcanvas ...@@ -849,14 +849,14 @@ namespace cppcanvas
// create text effects such as shadow/relief/embossed // create text effects such as shadow/relief/embossed
void ImplRenderer::createTextAction( const ::Point& rStartPoint, void ImplRenderer::createTextAction( const ::Point& rStartPoint,
const String rString, const OUString rString,
int nIndex, int nIndex,
int nLength, int nLength,
const sal_Int32* pCharWidths, const sal_Int32* pCharWidths,
const ActionFactoryParameters& rParms, const ActionFactoryParameters& rParms,
bool bSubsettableActions ) bool bSubsettableActions )
{ {
ENSURE_OR_THROW( nIndex >= 0 && nLength <= rString.Len() + nIndex, ENSURE_OR_THROW( nIndex >= 0 && nLength <= rString.getLength() + nIndex,
"ImplRenderer::createTextWithEffectsAction(): Invalid text index" ); "ImplRenderer::createTextWithEffectsAction(): Invalid text index" );
if( !nLength ) if( !nLength )
...@@ -975,11 +975,11 @@ namespace cppcanvas ...@@ -975,11 +975,11 @@ namespace cppcanvas
nMaxWidth += nWidth + 1; nMaxWidth += nWidth + 1;
long nFullStrikeoutWidth = 0; long nFullStrikeoutWidth = 0;
String aStrikeoutText; OUString aStrikeoutText;
while( (nFullStrikeoutWidth+=nStrikeoutWidth ) < nMaxWidth+1 ) while( (nFullStrikeoutWidth+=nStrikeoutWidth ) < nMaxWidth+1 )
aStrikeoutText += pChars[0]; aStrikeoutText += OUString(pChars[0]);
xub_StrLen nLen = aStrikeoutText.Len(); sal_Int32 nLen = aStrikeoutText.getLength();
if( nLen ) if( nLen )
{ {
...@@ -1008,7 +1008,7 @@ namespace cppcanvas ...@@ -1008,7 +1008,7 @@ namespace cppcanvas
aShadowColor, aShadowColor,
aStrikeoutText, aStrikeoutText,
nStartPos, nStartPos,
aStrikeoutText.Len(), aStrikeoutText.getLength(),
pStrikeoutCharWidths, pStrikeoutCharWidths,
rParms.mrVDev, rParms.mrVDev,
rParms.mrCanvas, rParms.mrCanvas,
......
...@@ -189,7 +189,7 @@ namespace cppcanvas ...@@ -189,7 +189,7 @@ namespace cppcanvas
return aCharWidthSeq; return aCharWidthSeq;
} }
uno::Sequence< double > setupDXArray( const ::String& rText, uno::Sequence< double > setupDXArray( const OUString& rText,
sal_Int32 nStartPos, sal_Int32 nStartPos,
sal_Int32 nLen, sal_Int32 nLen,
VirtualDevice& rVDev, VirtualDevice& rVDev,
...@@ -1935,7 +1935,7 @@ namespace cppcanvas ...@@ -1935,7 +1935,7 @@ namespace cppcanvas
const ::Color& rReliefColor, const ::Color& rReliefColor,
const ::basegfx::B2DSize& rShadowOffset, const ::basegfx::B2DSize& rShadowOffset,
const ::Color& rShadowColor, const ::Color& rShadowColor,
const String& rText, const OUString& rText,
sal_Int32 nStartPos, sal_Int32 nStartPos,
sal_Int32 nLen, sal_Int32 nLen,
const sal_Int32* pDXArray, const sal_Int32* pDXArray,
...@@ -2085,7 +2085,7 @@ namespace cppcanvas ...@@ -2085,7 +2085,7 @@ namespace cppcanvas
const ::Color& rReliefColor, const ::Color& rReliefColor,
const ::Size& rShadowOffset, const ::Size& rShadowOffset,
const ::Color& rShadowColor, const ::Color& rShadowColor,
const String& rText, const OUString& rText,
sal_Int32 nStartPos, sal_Int32 nStartPos,
sal_Int32 nLen, sal_Int32 nLen,
const sal_Int32* pDXArray, const sal_Int32* pDXArray,
......
...@@ -31,7 +31,6 @@ class VirtualDevice; ...@@ -31,7 +31,6 @@ class VirtualDevice;
class Point; class Point;
class Size; class Size;
class Color; class Color;
class String;
/* Definition of internal::TextActionFactory class */ /* Definition of internal::TextActionFactory class */
...@@ -71,7 +70,7 @@ namespace cppcanvas ...@@ -71,7 +70,7 @@ namespace cppcanvas
const ::Color& rReliefColor, const ::Color& rReliefColor,
const ::Size& rShadowOffset, const ::Size& rShadowOffset,
const ::Color& rShadowColor, const ::Color& rShadowColor,
const ::String& rText, const OUString& rText,
sal_Int32 nStartPos, sal_Int32 nStartPos,
sal_Int32 nLen, sal_Int32 nLen,
const sal_Int32* pDXArray, const sal_Int32* pDXArray,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment