23 #include <com/sun/star/table/XTable.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
40 #include <editeng/editeng.hxx>
57 void WriteCell( sal_Int32 nCol, sal_Int32 nRow );
71 constexpr OUStringLiteral
gsSize( u
"Size" );
76 , mxTable( rObj.getTable() )
91 Reference< XTableColumns > xColumns(
mxTable->getColumns() );
92 const sal_Int32 nColCount = xColumns->getCount();
94 std::vector< sal_Int32 > aColumnStart;
95 aColumnStart.reserve( nColCount );
99 for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
try
102 sal_Int32 nWidth = 0;
103 xSet->getPropertyValue(
gsSize ) >>= nWidth;
105 aColumnStart.push_back( nPos );
113 Reference< XTableRows > xRows(
mxTable->getRows() );
114 const sal_Int32 nRowCount = xRows->getCount();
116 for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ )
try
119 WriteRow( xRowSet, nRow, aColumnStart );
131 sal_Int32 nRowHeight = 0;
132 xRowSet->getPropertyValue(
gsSize ) >>= nRowHeight;
137 const sal_Int32 nColCount =
mxTable->getColumnCount();
138 for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
140 CellRef xCell( dynamic_cast< Cell* >(
mxTable->getCellByPosition( nCol, nRow ).get() ) );
146 if ( (nCol & 0x0F) == 0x0F )
152 for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
167 CellRef xCell( dynamic_cast< Cell* >(
mxTable->getCellByPosition( nCol, nRow ).get() ) );
169 if( !xCell.is() || xCell->isMerged() )
178 bool bOwnParaObj = pParaObj !=
nullptr;
180 if( pParaObj ==
nullptr )
181 pParaObj = xCell->GetOutlinerParaObject();
197 bool bResetAttr =
false;
201 const SfxItemSet& rCellSet = xCell->GetItemSet();
static tools::Long HundMMToTwips(tools::Long nIn)
#define OOO_STRING_SVTOOLS_RTF_QL
OUString GetText(LineEnd eEnd=LINEEND_LF) const
#define OOO_STRING_SVTOOLS_RTF_QR
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr OUStringLiteral gsSize(u"Size")
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
#define OOO_STRING_SVTOOLS_RTF_ANSI
#define OOO_STRING_SVTOOLS_RTF_INTBL
SvStream & WriteOString(const OString &rStr)
SvStream & WriteCharPtr(const char *pBuf)
SVT_DLLPUBLIC SvStream & Out_String(SvStream &, const OUString &, rtl_TextEncoding eDestEnc=RTL_TEXTENCODING_MS_1252)
FontItalic GetPosture() const
#define OOO_STRING_SVTOOLS_RTF_I
#define OOO_STRING_SVTOOLS_RTF_QJ
#define OOO_STRING_SVTOOLS_RTF_ROW
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
#define OOO_STRING_SVTOOLS_RTF_TRLEFT
#define TOOLS_WARN_EXCEPTION(area, stream)
#define OOO_STRING_SVTOOLS_RTF_PARD
void SetText(const OutlinerParaObject &)
FontWeight GetWeight() const
Reference< XTable > mxTable
#define OOO_STRING_SVTOOLS_RTF_TRRH
#define OOO_STRING_SVTOOLS_RTF_PLAIN
const EditEngine & GetEditEngine() const
#define OOO_STRING_SVTOOLS_RTF_B
void WriteRow(const Reference< XPropertySet > &xRowSet, sal_Int32 nRow, const std::vector< sal_Int32 > &aColumnStart)
#define OOO_STRING_SVTOOLS_RTF_CELL
FontLineStyle GetLineStyle() const
#define OOO_STRING_SVTOOLS_RTF_TROWD
void ExportAsRTF(SvStream &rStrm, SdrTableObj &rObj)
Hack for clipboard with calc and writer, export and import table content as rtf table.
#define OOO_STRING_SVTOOLS_RTF_TRGAPH
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define OOO_STRING_SVTOOLS_RTF_CELLX
#define OOO_STRING_SVTOOLS_RTF_RTF
#define OOO_STRING_SVTOOLS_RTF_UL
SvStream & WriteChar(char nChar)
void WriteCell(sal_Int32 nCol, sal_Int32 nRow)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
SdrOutliner & ImpGetDrawOutliner() const
#define SAL_NEWLINE_STRING
#define OOO_STRING_SVTOOLS_RTF_QC
SdrTableRtfExporter(SvStream &rStrmP, SdrTableObj &rObj)