23#include <editeng/editeng.hxx>
24#include <editeng/editids.hrc>
28#include <osl/diagnose.h>
33#define SC_RTFTWIPTOL 10
38 pActDefault( nullptr ),
69 (
pE->aSel.nStartPara ==
pE->aSel.nEndPara
70 &&
pE->aSel.nStartPos ==
pE->aSel.nEndPos
73 (
pE->aSel.nStartPara + 1 ==
pE->aSel.nEndPara
75 &&
pE->aSel.nEndPos == 0
138 if (
pE->nColOverlap > 1 )
139 nCol = nCol +
pE->nColOverlap;
143 if ( ++nCol <= pE->nCol )
145 pE->nColOverlap = nCol -
pE->nCol;
156 switch ( rInfo.eState )
158 case RtfImportState::NextToken:
161 case RtfImportState::UnknownAttr:
164 case RtfImportState::Start:
173 case RtfImportState::End:
174 if ( rInfo.aSelection.nEndPos )
176 pActDefault =
nullptr;
180 rInfo.aSelection.nEndPara++;
184 case RtfImportState::SetAttr:
186 case RtfImportState::InsertText:
188 case RtfImportState::InsertPara:
191 OSL_FAIL(
"unknown ImportInfo.eState");
221 for (
const std::unique_ptr<ScRTFCellDefault> & pCellDefault :
maDefaultList)
232 OSL_ENSURE(
pActDefault,
"NewCellRow: pActDefault==0" );
293 OSL_ENSURE(
pDefMerge,
"RTF_CLMRG: pDefMerge==0" );
326 OSL_ENSURE(
pActDefault,
"RTF_CELL: pActDefault==0" );
ErrCode Read(SvStream &rInput, const OUString &rBaseURL, EETextFormat, SvKeyValueIterator *pHTTPHeaderAttrs=nullptr)
sal_Int32 GetTextLen() const
const Link< RtfImportInfo &, void > & GetRtfImportHdl() const
void SetRtfImportHdl(const Link< RtfImportInfo &, void > &rLink)
void NewActEntry(const ScEEParseEntry *)
std::vector< std::shared_ptr< ScEEParseEntry > > maList
std::shared_ptr< ScEEParseEntry > mxActEntry
rtl::Reference< SfxItemPool > pPool
ScRTFCellDefault * pActDefault
ScRTFParser(EditEngine *)
std::unique_ptr< ScRTFCellDefault > pInsDefault
bool SeekTwips(sal_uInt16 nTwips, SCCOL *pCol)
ScRTFCellDefault * pDefMerge
void EntryEnd(ScEEParseEntry *, const ESelection &)
virtual ~ScRTFParser() override
void ProcToken(RtfImportInfo *)
DefaultList maDefaultList
virtual ErrCode Read(SvStream &, const OUString &rBaseURL) override
void SetPardMap(TypedWhichId< T > wid, TypedWhichId< T > widTrue)
void SetAttrPool(SfxItemPool *pNewPool)
const_iterator begin() const
std::vector< Value >::const_iterator const_iterator
const_iterator find(const Value &x) const
const_iterator end() const
std::pair< const_iterator, bool > insert(Value &&x)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
#define LINK(Instance, Class, Member)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
IMPL_LINK(ScRTFParser, RTFImportHdl, RtfImportInfo &, rInfo, void)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxShadowItem > ATTR_SHADOW(152)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
SvParser< int > * pParser