Kaydet (Commit) 9aee4d1c authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

harmonize Tell() Seek() type.

Change-Id: I2e472aa0279d0763762d3c660207cd74da512626
üst d9cd3dc9
......@@ -437,7 +437,7 @@ namespace cppcanvas
s.ReadInt32( pathLength );
SAL_INFO("cppcanvas.emf", "EMF+\tpath length: " << pathLength);
sal_uInt32 pos = s.Tell ();
sal_Size pos = s.Tell ();
sal_uInt32 pathHeader;
sal_Int32 pathPoints, pathFlags;
......@@ -907,7 +907,7 @@ namespace cppcanvas
{
s.ReadInt32( customStartCapLen );
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomStartCapLen: " << customStartCapLen);
sal_uInt32 pos = s.Tell();
sal_Size pos = s.Tell();
customStartCap = new EMFPCustomLineCap();
customStartCap->Read(s, rR);
......@@ -922,7 +922,7 @@ namespace cppcanvas
{
s.ReadInt32( customEndCapLen );
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomEndCapLen: " << customEndCapLen);
sal_uInt32 pos = s.Tell();
sal_Size pos = s.Tell();
customEndCap = new EMFPCustomLineCap();
customEndCap->Read(s, rR);
......@@ -1598,7 +1598,7 @@ namespace cppcanvas
while (length > 0) {
sal_uInt16 type, flags;
sal_uInt32 size, dataSize;
sal_uInt32 next;
sal_Size next;
rMF.ReadUInt16( type ).ReadUInt16( flags ).ReadUInt32( size ).ReadUInt32( dataSize );
......
......@@ -155,7 +155,7 @@ void OHTMLReader::NextToken( int nToken )
case HTML_THEAD_ON:
case HTML_TBODY_ON:
{
sal_uInt32 nTell = rInput.Tell(); // perhaps alters position of the stream
sal_Size nTell = rInput.Tell(); // perhaps alters position of the stream
if ( !m_xTable.is() )
{// use first line as header
m_bError = !CreateTable(nToken);
......
......@@ -145,7 +145,7 @@ void ORTFReader::NextToken( int nToken )
bool bInsertRow = true;
if ( !m_xTable.is() ) // use first line as header
{
sal_uInt32 nTell = rInput.Tell(); // perhaps alters position of the stream
sal_Size nTell = rInput.Tell(); // perhaps alters position of the stream
m_bError = !CreateTable(nToken);
bInsertRow = m_bAppendFirstLine;
......
......@@ -433,7 +433,7 @@ void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
{
if(m_pParserStream)
{
sal_uInt32 nTell = m_pParserStream->Tell(); // might change seek position of stream
sal_Size nTell = m_pParserStream->Tell(); // might change seek position of stream
SvParser *pReader = createReader(nRows);
if(pReader)
......
......@@ -1076,8 +1076,8 @@ void PluginInputStream::writeBytes( const Sequence<sal_Int8>& Buffer ) throw()
if( m_nMode == -1 || !m_pPlugin->getPluginComm() )
return;
sal_uInt32 nPos = m_aFileStream.Tell();
sal_uInt32 nBytes = 0;
sal_Size nPos = m_aFileStream.Tell();
sal_Size nBytes = 0;
while( m_nMode != NP_ASFILEONLY &&
m_nWritePos < nPos &&
(nBytes = m_pPlugin->getPluginComm()-> NPP_WriteReady(
......
......@@ -863,7 +863,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile,
if (aLine.indexOf(';') == -1)
{
const sal_uInt32 nImgListStartPos = aIStm.Tell();
const sal_Size nImgListStartPos = aIStm.Tell();
do
{
......@@ -909,7 +909,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile,
}
}
const sal_uInt32 nImgListEndPos = aIStm.Tell();
const sal_Size nImgListEndPos = aIStm.Tell();
aIStm.Seek( nImgListStartPos );
while( aIStm.Tell() < nImgListEndPos )
{
......
......@@ -345,14 +345,14 @@ void RTFDocumentImpl::setIgnoreFirst(OUString& rIgnoreFirst)
m_aIgnoreFirst = rIgnoreFirst;
}
void RTFDocumentImpl::resolveSubstream(sal_uInt32 nPos, Id nId)
void RTFDocumentImpl::resolveSubstream(sal_Size nPos, Id nId)
{
OUString aStr;
resolveSubstream(nPos, nId, aStr);
}
void RTFDocumentImpl::resolveSubstream(sal_uInt32 nPos, Id nId, OUString& rIgnoreFirst)
void RTFDocumentImpl::resolveSubstream(sal_Size nPos, Id nId, OUString& rIgnoreFirst)
{
sal_uInt32 nCurrent = Strm().Tell();
sal_Size nCurrent = Strm().Tell();
// Seek to header position, parse, then seek back.
RTFDocumentImpl::Pointer_t pImpl(new RTFDocumentImpl(m_xContext, m_xInputStream, m_xDstDoc, m_xFrame, m_xStatusIndicator));
pImpl->setSuperstream(this);
......@@ -539,7 +539,7 @@ void RTFDocumentImpl::sectBreak(bool bFinal = false)
}
while (!m_nHeaderFooterPositions.empty())
{
std::pair<Id, sal_uInt32> aPair = m_nHeaderFooterPositions.front();
std::pair<Id, sal_Size> aPair = m_nHeaderFooterPositions.front();
m_nHeaderFooterPositions.pop();
resolveSubstream(aPair.second, aPair.first);
}
......@@ -575,7 +575,7 @@ void RTFDocumentImpl::sectBreak(bool bFinal = false)
m_bNeedSect = false;
}
void RTFDocumentImpl::seek(sal_uInt32 nPos)
void RTFDocumentImpl::seek(sal_Size nPos)
{
Strm().Seek(nPos);
}
......@@ -1278,7 +1278,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
case RTF_FLDINST:
{
// Look for the field type
sal_Int32 nPos = Strm().Tell();
sal_Size nPos = Strm().Tell();
OStringBuffer aBuf;
char ch = 0;
bool bFoundCode = false;
......@@ -1385,7 +1385,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
if (!m_pSuperstream)
{
Id nId = 0;
sal_uInt32 nPos = m_nGroupStartPos - 1;
sal_Size nPos = m_nGroupStartPos - 1;
switch (nKeyword)
{
case RTF_HEADER: nId = NS_ooxml::LN_headerr; break;
......
......@@ -318,7 +318,7 @@ namespace writerfilter {
void setAuthor(OUString& rAuthor);
void setAuthorInitials(OUString& rAuthorInitials);
void setIgnoreFirst(OUString& rIgnoreFirst);
void seek(sal_uInt32 nPos);
void seek(sal_Size nPos);
uno::Reference<lang::XMultiServiceFactory> getModelFactory();
bool isInBackground();
void setDestinationText(OUString& rString);
......@@ -348,8 +348,8 @@ namespace writerfilter {
RTFSprms mergeAttributes();
void resetSprms();
void resetAttributes();
void resolveSubstream(sal_uInt32 nPos, Id nId);
void resolveSubstream(sal_uInt32 nPos, Id nId, OUString& rIgnoreFirst);
void resolveSubstream(sal_Size nPos, Id nId);
void resolveSubstream(sal_Size nPos, Id nId, OUString& rIgnoreFirst);
void text(OUString& rString);
// Sends a single character to dmapper, taking care of buffering.
......@@ -421,8 +421,8 @@ namespace writerfilter {
RTFDocumentImpl *m_pSuperstream;
/// Type of the stream: header, footer, footnote, etc.
Id m_nStreamType;
std::queue< std::pair<Id, sal_uInt32> > m_nHeaderFooterPositions;
sal_uInt32 m_nGroupStartPos;
std::queue< std::pair<Id, sal_Size> > m_nHeaderFooterPositions;
sal_Size m_nGroupStartPos;
/// Ignore the first occurrence of this text.
OUString m_aIgnoreFirst;
/// Bookmark name <-> index map.
......
......@@ -67,9 +67,9 @@ int RTFTokenizer::resolveParse()
static ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILanguageTag());
OUString sDocLoad(ResId(RID_SVXSTR_DOC_LOAD, *pResMgr).toString());
sal_uInt32 nCurrentPos = Strm().Tell();
sal_Size nCurrentPos = Strm().Tell();
Strm().Seek(STREAM_SEEK_TO_END);
sal_uInt32 nEndPos = Strm().Tell();
sal_Size nEndPos = Strm().Tell();
Strm().Seek(nCurrentPos);
m_xStatusIndicator->start(sDocLoad, nEndPos);
nPercentSize = nEndPos / 100;
......@@ -81,7 +81,7 @@ int RTFTokenizer::resolveParse()
{
//SAL_INFO("writerfilter", OSL_THIS_FUNC << ": parsing character '" << ch << "'");
sal_uInt32 nCurrentPos = Strm().Tell();
sal_Size nCurrentPos = Strm().Tell();
if (m_xStatusIndicator.is() && nCurrentPos > (nLastPos + nPercentSize))
m_xStatusIndicator->setValue(nLastPos = nCurrentPos);
......
......@@ -48,7 +48,7 @@ namespace writerfilter {
/// Same as the size of the importer's states, except that this can be negative for invalid input.
int m_nGroup;
sal_Int32 m_nLineNumber;
sal_Int32 m_nLineStartPos;
sal_Size m_nLineStartPos;
sal_Size m_nGroupStart;
};
} // namespace rtftok
......
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