30 #include <rtl/ustrbuf.hxx>
54 #include <strings.hrc>
57 #include <libxml/xmlwriter.h>
67 OUString &rText )
const
80 if( rText.getLength() && aStr.getLength() )
101 rText =
SwResId( STR_CHARFMT ) +
"(" + aStr +
")";
104 rText =
SwResId( STR_NO_CHARFMT );
152 if ( GetLines() > 1 )
154 if ( GetChars() > 1 )
156 rText = OUString::number( GetChars() ) +
" ";
158 rText +=
SwResId( STR_DROP_OVER ) +
160 OUString::number( GetLines() ) +
165 rText =
SwResId( STR_NO_DROP_LINES );
193 rText =
SwResId( STR_NUMRULE_ON ).replaceFirst(
"%LISTSTYLENAME",
GetValue());
195 rText =
SwResId( STR_NUMRULE_OFF );
224 rText =
SwResId( STR_FRM_WIDTH ) +
" ";
225 if ( GetWidthPercent() )
232 rText += ::GetMetricText( GetWidth(), eCoreUnit, ePresUnit, &rIntl ) +
238 STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
239 rText +=
", " +
SwResId(pId) +
" ";
240 if ( GetHeightPercent() )
247 rText = ::GetMetricText( GetHeight(), eCoreUnit, ePresUnit, &rIntl ) +
266 TranslateId pId = GetHeaderFormat() ? STR_HEADER : STR_NO_HEADER;
283 TranslateId pId = GetFooterFormat() ? STR_FOOTER : STR_NO_FOOTER;
300 case css::text::WrapTextMode_NONE:
301 pId = STR_SURROUND_NONE;
303 case css::text::WrapTextMode_THROUGH:
304 pId = STR_SURROUND_THROUGH;
306 case css::text::WrapTextMode_PARALLEL:
307 pId = STR_SURROUND_PARALLEL;
309 case css::text::WrapTextMode_DYNAMIC:
310 pId = STR_SURROUND_IDEAL;
312 case css::text::WrapTextMode_LEFT:
313 pId = STR_SURROUND_LEFT;
315 case css::text::WrapTextMode_RIGHT:
316 pId = STR_SURROUND_RIGHT;
323 if ( IsAnchorOnly() )
325 rText +=
" " +
SwResId( STR_SURROUND_ANCHORONLY );
342 switch ( GetVertOrient() )
346 rText +=
SwResId( STR_POS_Y ) +
" " +
347 ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, &rIntl ) +
351 case text::VertOrientation::TOP:
354 case text::VertOrientation::CENTER:
355 pId = STR_VERT_CENTER;
357 case text::VertOrientation::BOTTOM:
358 pId = STR_VERT_BOTTOM;
360 case text::VertOrientation::LINE_TOP:
363 case text::VertOrientation::LINE_CENTER:
364 pId = STR_LINE_CENTER;
366 case text::VertOrientation::LINE_BOTTOM:
367 pId = STR_LINE_BOTTOM;
388 switch ( GetHoriOrient() )
392 rText +=
SwResId( STR_POS_X ) +
" " +
393 ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, &rIntl ) +
397 case text::HoriOrientation::RIGHT:
398 pId = STR_HORI_RIGHT;
400 case text::HoriOrientation::CENTER:
401 pId = STR_HORI_CENTER;
403 case text::HoriOrientation::LEFT:
406 case text::HoriOrientation::INSIDE:
407 pId = STR_HORI_INSIDE;
409 case text::HoriOrientation::OUTSIDE:
410 pId = STR_HORI_OUTSIDE;
412 case text::HoriOrientation::FULL:
434 switch ( GetAnchorId() )
436 case RndStdIds::FLY_AT_PARA:
437 pId = STR_FLY_AT_PARA;
439 case RndStdIds::FLY_AS_CHAR:
440 pId = STR_FLY_AS_CHAR;
442 case RndStdIds::FLY_AT_CHAR:
443 pId = STR_FLY_AT_CHAR;
445 case RndStdIds::FLY_AT_PAGE:
446 pId = STR_FLY_AT_PAGE;
468 rText =
SwResId( STR_NO_PAGEDESC );
483 sal_uInt16 nCnt = GetNumCols();
486 rText = OUString::number(nCnt) +
" " +
SwResId( STR_COLUMNS );
490 rText +=
" " +
SwResId( STR_LINE_WIDTH ) +
" " +
491 ::GetMetricText( nWdth, eCoreUnit,
492 MapUnit::MapPoint, &rIntl );
513 rText +=
"Client-Map";
518 rText +=
"URL: " +
m_sURL;
519 if ( m_bIsServerMap )
520 rText +=
" (Server-Map)";
522 if ( !m_sTargetFrameName.isEmpty() )
524 rText +=
", Target: " + m_sTargetFrameName;
540 rText =
SwResId(STR_EDIT_IN_READONLY);
546 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwFormatEditInReadonly"));
547 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(Which()).getStr()));
548 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::boolean(
GetValue()).getStr()));
549 (
void)xmlTextWriterEndElement(pWriter);
562 rText =
SwResId(STR_LAYOUT_SPLIT);
599 if ( GetPrev() || GetNext() )
604 rText += GetPrev()->GetName();
606 rText +=
SwResId(STR_CONNECT2);
609 rText += GetNext()->GetName();
624 rText +=
SwResId(STR_LINECOUNT);
626 rText +=
SwResId(STR_DONTLINECOUNT);
627 if ( GetStartValue() )
629 rText +=
" " +
SwResId(STR_LINCOUNT_START) +
630 OUString::number( GetStartValue() );
646 switch ( GetGridType() )
652 pId = STR_GRID_LINES_ONLY;
655 pId = STR_GRID_LINES_CHARS;
694 rText +=
SwResId( STR_MIRROR_TOGGLE );
703 if( SfxItemPresentation::Complete == ePres )
704 rText =
SwResId( STR_ROTATION );
705 else if( rText.getLength() )
715 if( SfxItemPresentation::Complete == ePres )
716 rText =
SwResId( STR_LUMINANCE );
717 else if( rText.getLength() )
728 if( SfxItemPresentation::Complete == ePres )
729 rText =
SwResId( STR_CONTRAST );
730 else if( rText.getLength() )
741 if( SfxItemPresentation::Complete == ePres )
753 else if( rText.getLength() )
756 else if( rText.getLength() )
767 OUStringBuffer aText;
768 if( SfxItemPresentation::Complete == ePres )
769 aText.append(
SwResId(STR_GAMMA));
772 rText = aText.makeStringAndClear();
781 if( SfxItemPresentation::Complete == ePres )
793 if( SfxItemPresentation::Complete == ePres )
794 rText =
SwResId( STR_TRANSPARENCY );
795 else if( rText.getLength() )
807 if( SfxItemPresentation::Complete == ePres )
813 case GraphicDrawMode::Greys: pId = STR_DRAWMODE_GREY;
break;
814 case GraphicDrawMode::Mono: pId = STR_DRAWMODE_BLACKWHITE;
break;
815 case GraphicDrawMode::Watermark: pId = STR_DRAWMODE_WATERMARK;
break;
816 default: pId = STR_DRAWMODE_STD;
break;
830 if( SfxItemPresentation::Complete == ePres )
840 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwFormatFollowTextFlow"));
841 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(Which()).getStr()));
842 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::boolean(
GetValue()).getStr()));
843 (
void)xmlTextWriterEndElement(pWriter);
static const AllSettings & GetSettings()
constexpr TypedWhichId< SwChannelRGrf > RES_GRFATR_CHANNELR(138)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
const OUString & GetName() const
OUString SwResId(TranslateId aId)
const SfxPoolItem * NextItem()
TranslateId GetMetricId(MapUnit eUnit)
constexpr TypedWhichId< SwChannelBGrf > RES_GRFATR_CHANNELB(140)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
void dumpAsXml(xmlTextWriterPtr pWriter) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Frame cannot be moved in Var-direction.
void GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText) const
static OUString formatPercent(double dNumber, const LanguageTag &rLangTag)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
constexpr TypedWhichId< SwChannelGGrf > RES_GRFATR_CHANNELG(139)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
struct _xmlTextWriter * xmlTextWriterPtr
Frame is variable in Var-direction.
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
const SfxPoolItem * GetCurItem() const
OUString EditResId(TranslateId aId)