[Libreoffice-commits] core.git: sd/inc sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 18 06:51:53 UTC 2018
sd/inc/app.hrc | 19 +-
sd/inc/strings.hrc | 18 +-
sd/source/core/drawdoc4.cxx | 386 ++++++++++++++++++++++++++------------------
sd/source/core/stlpool.cxx | 18 +-
sd/source/core/stlsheet.cxx | 23 ++
5 files changed, 291 insertions(+), 173 deletions(-)
New commits:
commit 99102d4263189d347c7a7d0df8fd782e8c4c8ad5
Author: heiko tietze <tietze.heiko at gmail.com>
AuthorDate: Thu Sep 13 19:31:49 2018 +0200
Commit: Heiko Tietze <tietze.heiko at gmail.com>
CommitDate: Tue Sep 18 08:51:32 2018 +0200
tdf#94369 - Default set of Impress graphic styles
Several drawing styles added
Change-Id: I3c0efcdc5c0462844f84f5dbb355cfa800a70898
Reviewed-on: https://gerrit.libreoffice.org/60444
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 40b36b26f41c..391371e35206 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -24,12 +24,19 @@
// Helper IDs for templates
#define HID_STANDARD_STYLESHEET_NAME (HID_SD_START + 70)
-#define HID_POOLSHEET_TEXT (HID_SD_START + 71)
-#define HID_POOLSHEET_TITLE (HID_SD_START + 72)
#define HID_POOLSHEET_OBJWITHOUTFILL (HID_SD_START + 73)
#define HID_POOLSHEET_OBJNOLINENOFILL (HID_SD_START + 74)
-#define HID_POOLSHEET_HEADLINE (HID_SD_START + 75)
-#define HID_POOLSHEET_MEASURE (HID_SD_START + 76)
+#define HID_POOLSHEET_TEXT (HID_SD_START + 71)
+#define HID_POOLSHEET_A4 (HID_SD_START + 104)
+#define HID_POOLSHEET_A4_TITLE (HID_SD_START + 72)
+#define HID_POOLSHEET_A4_HEADLINE (HID_SD_START + 75)
+#define HID_POOLSHEET_A4_TEXT (HID_SD_START + 105)
+#define HID_POOLSHEET_A0 (HID_SD_START + 109)
+#define HID_POOLSHEET_A0_TITLE (HID_SD_START + 110)
+#define HID_POOLSHEET_A0_HEADLINE (HID_SD_START + 111)
+#define HID_POOLSHEET_A0_TEXT (HID_SD_START + 112)
+#define HID_POOLSHEET_GRAPHIC (HID_SD_START + 106)
+#define HID_POOLSHEET_SHAPES (HID_SD_START + 107)
#define HID_POOLSHEET_FILLED (HID_SD_START + 77)
#define HID_POOLSHEET_FILLED_BLUE (HID_SD_START + 78)
#define HID_POOLSHEET_FILLED_GREEN (HID_SD_START + 79)
@@ -40,6 +47,10 @@
#define HID_POOLSHEET_OUTLINE_GREEN (HID_SD_START + 84)
#define HID_POOLSHEET_OUTLINE_RED (HID_SD_START + 102)
#define HID_POOLSHEET_OUTLINE_YELLOW (HID_SD_START + 103)
+#define HID_POOLSHEET_LINES (HID_SD_START + 108)
+#define HID_POOLSHEET_MEASURE (HID_SD_START + 76)
+#define HID_POOLSHEET_LINES_DASHED (HID_SD_START + 113) //dummy
+#define HID_POOLSHEET_LAST (HID_SD_START + 114) //dummy
#define HID_PSEUDOSHEET_TITLE (HID_SD_START + 85)
#define HID_PSEUDOSHEET_OUTLINE (HID_SD_START + 86)
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index c076da9895a4..986b318f4628 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -313,12 +313,22 @@
#define STR_STANDARD_STYLESHEET_NAME NC_("STR_STANDARD_STYLESHEET_NAME", "Default" )
#define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" )
-#define STR_POOLSHEET_MEASURE NC_("STR_POOLSHEET_MEASURE", "Dimension Line" )
-#define STR_POOLSHEET_TEXT NC_("STR_POOLSHEET_TEXT", "Text" )
-#define STR_POOLSHEET_TITLE NC_("STR_POOLSHEET_TITLE", "Title" )
-#define STR_POOLSHEET_HEADLINE NC_("STR_POOLSHEET_HEADLINE", "Heading" )
#define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" )
#define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" )
+#define STR_POOLSHEET_TEXT NC_("STR_POOLSHEET_TEXT", "Text" )
+#define STR_POOLSHEET_A4 NC_("STR_POOLSHEET_A4", "A4" )
+#define STR_POOLSHEET_A4_TITLE NC_("STR_POOLSHEET_A4_TITLE", "Title A4" )
+#define STR_POOLSHEET_A4_HEADLINE NC_("STR_POOLSHEET_A4_HEADLINE", "Heading A4" )
+#define STR_POOLSHEET_A4_TEXT NC_("STR_POOLSHEET_A4_TEXT", "Text A4" )
+#define STR_POOLSHEET_A0 NC_("STR_POOLSHEET_A0", "A0" )
+#define STR_POOLSHEET_A0_TITLE NC_("STR_POOLSHEET_A0_TITLE", "Title A0" )
+#define STR_POOLSHEET_A0_HEADLINE NC_("STR_POOLSHEET_A0_HEADLINE", "Heading A0" )
+#define STR_POOLSHEET_A0_TEXT NC_("STR_POOLSHEET_A0_TEXT", "Text A0" )
+#define STR_POOLSHEET_GRAPHIC NC_("STR_POOLSHEET_GRAPHIC", "Graphic" )
+#define STR_POOLSHEET_SHAPES NC_("STR_POOLSHEET_GRAPHIC", "Shapes" )
+#define STR_POOLSHEET_LINES NC_("STR_POOLSHEET_LINES", "Lines" )
+#define STR_POOLSHEET_MEASURE NC_("STR_POOLSHEET_MEASURE", "Arrow Line" )
+#define STR_POOLSHEET_LINES_DASHED NC_("STR_POOLSHEET_LINES_DASHED", "Dashed Line" )
#define STR_POOLSHEET_FILLED NC_("STR_POOLSHEET_FILLED", "Filled" )
#define STR_POOLSHEET_FILLED_BLUE NC_("STR_POOLSHEET_FILLED_BLUE", "Filled Blue" )
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 1dfb1fd93e61..d11495bd29bc 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -251,17 +251,15 @@ void SdDrawDocument::CreateLayoutTemplates()
SfxItemSet* pISet = nullptr;
- // Object without filling
+ // Default > Object without filling
+{
aName = SdResId(STR_POOLSHEET_OBJWITHOUTFILL);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHOUTFILL );
- pISet = &pSheet->GetItemSet();
-
- pISet->Put(XFillStyleItem(drawing::FillStyle_NONE));
- pISet->Put(XLineColorItem(OUString(), COL_BLACK));
-
- // Object no fill no line
+}
+ // Default > Object no fill no line
+{
aName = SdResId(STR_POOLSHEET_OBJNOLINENOFILL);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
@@ -270,91 +268,163 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XFillStyleItem(drawing::FillStyle_NONE));
pISet->Put(XLineStyleItem(drawing::LineStyle_NONE));
+}
- // Text
+ // tdf#94369
- aName = SdResId(STR_POOLSHEET_TEXT);
- pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
- pSheet->SetParent(aStdName);
+ // Text
+ OUString aTextName;
+{
+ aTextName = SdResId(STR_POOLSHEET_TEXT);
+ pSheet = &(pSSPool->Make(aTextName, SfxStyleFamily::Para, nMask));
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXT );
pISet = &pSheet->GetItemSet();
+ aSvxFontItem.SetFamilyName("Noto Sans");
+ pISet->Put( aSvxFontItem ); // Noto Sans
+ pISet->Put(XFillStyleItem(drawing::FillStyle_SOLID)); // solid fill
+ pISet->Put(XFillColorItem(OUString(), Color(0xeeeeee))); // light gray 5
+ pISet->Put(XLineStyleItem(drawing::LineStyle_SOLID)); // solid fill
+ pISet->Put(XLineColorItem(OUString(), Color(0xcccccc))); // light gray 3
+}
+ // Text > A4
+ OUString aA4Name;
+{
+ aA4Name = SdResId(STR_POOLSHEET_A4);
+ pSheet = &(pSSPool->Make(aA4Name, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent( aTextName );
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_A4 );
+ pISet = &pSheet->GetItemSet();
+ pISet->Put(SvxFontHeightItem(635, 100, EE_CHAR_FONTHEIGHT )); // 18 pt
+ pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); // no filling
+}
+ // Text > A4 > Title
+{
- pISet->Put(XLineStyleItem(drawing::LineStyle_NONE));
- pISet->Put(XFillStyleItem(drawing::FillStyle_NONE));
-
- // Title
-
- aName = SdResId(STR_POOLSHEET_TITLE);
+ aName = SdResId(STR_POOLSHEET_A4_TITLE);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
- pSheet->SetParent(aStdName);
- pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE );
+ pSheet->SetParent( aA4Name );
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_A4_TITLE );
pISet = &pSheet->GetItemSet();
-
- pISet->Put(XLineStyleItem(drawing::LineStyle_NONE));
- pISet->Put(XFillStyleItem(drawing::FillStyle_NONE));
-
- pISet->Put(SvxFontHeightItem(1551, 100, EE_CHAR_FONTHEIGHT )); // 44 pt
-
- // Headline
-
- aName = SdResId(STR_POOLSHEET_HEADLINE);
+ pISet->Put(SvxFontHeightItem(1551, 100, EE_CHAR_FONTHEIGHT )); // 44 pt
+ pISet->Put(XLineStyleItem(drawing::LineStyle_NONE)); // no border
+}
+ // Text > A4 > Headline
+{
+ aName = SdResId(STR_POOLSHEET_A4_HEADLINE);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
- pSheet->SetParent(aStdName);
- pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE );
+ pSheet->SetParent( aA4Name );
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_A4_HEADLINE );
pISet = &pSheet->GetItemSet();
-
- pISet->Put(XLineStyleItem(drawing::LineStyle_NONE));
- pISet->Put(XFillStyleItem(drawing::FillStyle_NONE));
-
- pISet->Put(SvxFontHeightItem(846, 100, EE_CHAR_FONTHEIGHT )); // 24 pt
-
- pISet->Put(SvxULSpaceItem(420, 210, EE_PARA_ULSPACE )); // Paragraph margin above: 4,2 mm,
- // Paragraph margin below: 2,1 mm
- // Measurements
- aName = SdResId(STR_POOLSHEET_MEASURE);
+ pISet->Put(SvxFontHeightItem(847, 100, EE_CHAR_FONTHEIGHT )); // 24 pt
+ pISet->Put(XLineStyleItem(drawing::LineStyle_NONE)); // no border
+}
+ // Text > A4 > Text
+{
+ aName = SdResId(STR_POOLSHEET_A4_TEXT);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
- pSheet->SetParent(aStdName);
- pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_MEASURE );
+ pSheet->SetParent(aA4Name);
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_A4_TEXT );
pISet = &pSheet->GetItemSet();
+ pISet->Put(XLineStyleItem(drawing::LineStyle_NONE)); // no border
+}
+ // Text > A0
+ OUString aA0Name;
+{
+ aA0Name = SdResId(STR_POOLSHEET_A0);
+ pSheet = &(pSSPool->Make(aA0Name, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent(aTextName);
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_A0 );
+ pISet = &pSheet->GetItemSet();
+ pISet->Put(SvxFontHeightItem(1692, 100, EE_CHAR_FONTHEIGHT )); // 48 pt
+ pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); // no filling
+}
+ // Text > A0 > Title
+{
+ aName = SdResId(STR_POOLSHEET_A0_TITLE);
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent(aA0Name);
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_A0_TITLE );
+ pISet = &pSheet->GetItemSet();
+ pISet->Put(SvxFontHeightItem(3385, 100, EE_CHAR_FONTHEIGHT )); // 96 pt
+ pISet->Put(XLineStyleItem(drawing::LineStyle_NONE)); // no border
+}
+ // Text > A0 > Headline
+{
+ aName = SdResId(STR_POOLSHEET_A0_HEADLINE);
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent(aA0Name);
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_A0_HEADLINE );
+ pISet = &pSheet->GetItemSet();
+ pISet->Put(SvxFontHeightItem(2538, 100, EE_CHAR_FONTHEIGHT )); // 72 pt
+ pISet->Put(XLineStyleItem(drawing::LineStyle_NONE)); // no border
+}
+ // Text > A0 > Text
+{
+ aName = SdResId(STR_POOLSHEET_A0_TEXT);
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent(aA0Name);
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_A0_TEXT );
+ pISet = &pSheet->GetItemSet();
+ pISet->Put(XLineStyleItem(drawing::LineStyle_NONE)); // no border
+}
- pISet->Put(XFillStyleItem(drawing::FillStyle_NONE));
- pISet->Put(XLineColorItem(OUString(), COL_BLACK));
-
- pISet->Put(SvxFontHeightItem(423, 100, EE_CHAR_FONTHEIGHT )); // 12 pt
-
- ::basegfx::B2DPolygon aArrow;
- aArrow.append(::basegfx::B2DPoint(10.0, 0.0));
- aArrow.append(::basegfx::B2DPoint(0.0, 30.0));
- aArrow.append(::basegfx::B2DPoint(20.0, 30.0));
- aArrow.setClosed(true);
-
- pISet->Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow)));
- pISet->Put(XLineStartWidthItem(200));
- pISet->Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow)));
- pISet->Put(XLineEndWidthItem(200));
- pISet->Put(XLineStyleItem(drawing::LineStyle_SOLID));
- pISet->Put(SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, true));
-
- // Filled
- OUString aFilledName(SdResId(STR_POOLSHEET_FILLED));
+ // Graphic
+ OUString aGraphicName;
XFillGradientItem aFillGradient;
XGradient aGradient;
- aGradient.SetGradientStyle( ::awt::GradientStyle_LINEAR );
- aGradient.SetAngle( 300 );
- aSvxFontItem.SetFamilyName("Noto Sans");
+{
+ aGraphicName = SdResId(STR_POOLSHEET_GRAPHIC);
+ pSheet = &(pSSPool->Make(aGraphicName, SfxStyleFamily::Para, nMask));
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_GRAPHIC );
+ pISet = &pSheet->GetItemSet();
+ aSvxFontItem.SetFamilyName("Liberation Sans"); // Liberation Sans
+ pISet->Put( aSvxFontItem );
+ pISet->Put( SvxFontHeightItem(635, 100, EE_CHAR_FONTHEIGHT) ); // 18 pt
+ pISet->Put( XFillStyleItem(drawing::FillStyle_SOLID) ); // solid fill
+ pISet->Put( XFillColorItem(OUString(), COL_WHITE) ); // filled white
+
+}
+ // Graphic > Shapes
+ OUString aShapesName;
+{
+ aShapesName = SdResId(STR_POOLSHEET_SHAPES);
+ pSheet = &(pSSPool->Make(aShapesName, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent( aGraphicName );
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_SHAPES);
+ pISet = &pSheet->GetItemSet();
+ pISet->Put(XFillStyleItem(drawing::FillStyle_GRADIENT)); // fill with gradient
+ aGradient.SetGradientStyle( ::awt::GradientStyle_RECT); // square type
+ aGradient.SetAngle( 0 ); // 0° angle
+ aGradient.SetStartColor( Color(0xcccccc) ); // white
+ aGradient.SetEndColor( COL_WHITE ); // light gray 3
+ aFillGradient.SetName( aShapesName );
+ aFillGradient.SetGradientValue(aGradient);
+ pISet->Put( aFillGradient );
+ pISet->Put( XLineStyleItem(drawing::LineStyle_NONE) ); // no border
+ pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
+ pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
+ }
+ // Graphic > Shapes > Filled
+ OUString aFilledName(SdResId(STR_POOLSHEET_FILLED));
+{
aName = aFilledName;
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_FILLED );
+ pSheet->SetParent( aShapesName );
pISet = &pSheet->GetItemSet();
- pISet->Put( XFillStyleItem(drawing::FillStyle_SOLID) ); // filled solid
- pISet->Put( XFillColorItem(OUString(), Color(0x00ffffff)) ); // white
- pISet->Put( XLineColorItem(OUString(), COL_BLACK) ); // black
- pISet->Put( aSvxFontItem ); // Noto Sans
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
-
- // Blue
+
+ aGradient.SetGradientStyle( ::awt::GradientStyle_LINEAR );
+ aGradient.SetAngle( 300 );
+ aGradient.SetStartColor( COL_WHITE ); // white
+ aGradient.SetEndColor( Color(0xcccccc) ); // light gray 3
+ aFillGradient.SetName( aName );
+ aFillGradient.SetGradientValue(aGradient);
+ pISet->Put( XFillStyleItem(drawing::FillStyle_GRADIENT) );
+ pISet->Put( aFillGradient );
+}
+ // Graphic > Shapes > Filled > Blue
+{
aName =SdResId(STR_POOLSHEET_FILLED_BLUE);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aFilledName);
@@ -363,17 +433,13 @@ void SdDrawDocument::CreateLayoutTemplates()
aGradient.SetStartColor( Color(0x00729fcf) ); // light blue 2
aGradient.SetEndColor( Color(0x00355269) ); // dark blue 2
- aFillGradient.SetGradientValue(aGradient);
aFillGradient.SetName( aName );
- pISet->Put( XFillStyleItem(drawing::FillStyle_GRADIENT) );
+ aFillGradient.SetGradientValue(aGradient);
pISet->Put( aFillGradient );
- pISet->Put( XLineStyleItem(drawing::LineStyle_NONE) );
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
- pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxColorItem(COL_WHITE, EE_CHAR_COLOR )); // font color
-
- // Green
+ pISet->Put( SvxColorItem(COL_WHITE, EE_CHAR_COLOR )); // font white
+}
+ // Graphic > Shapes > Filled > Green
+{
aName =SdResId(STR_POOLSHEET_FILLED_GREEN);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aFilledName);
@@ -382,17 +448,14 @@ void SdDrawDocument::CreateLayoutTemplates()
aGradient.SetStartColor( Color(0x0077bc65) ); // light green 2
aGradient.SetEndColor( Color(0x00127622) ); // dark green 2
- aFillGradient.SetGradientValue(aGradient);
aFillGradient.SetName( aName );
- pISet->Put( XFillStyleItem(drawing::FillStyle_GRADIENT) );
+ aFillGradient.SetGradientValue(aGradient);
pISet->Put( aFillGradient );
- pISet->Put( XLineStyleItem(drawing::LineStyle_NONE) );
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxColorItem(COL_WHITE, EE_CHAR_COLOR )); // font color
-
- // Red
+ pISet->Put( SvxColorItem(COL_WHITE, EE_CHAR_COLOR )); // font white
+}
+ // Graphic > Shapes > Filled > Red
+{
aName =SdResId(STR_POOLSHEET_FILLED_RED);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aFilledName);
@@ -401,17 +464,13 @@ void SdDrawDocument::CreateLayoutTemplates()
aGradient.SetStartColor( Color(0x00ff6d6d) ); // light red 2
aGradient.SetEndColor( Color(0x00c9211e) ); // dark red 2
- aFillGradient.SetGradientValue(aGradient);
aFillGradient.SetName( aName );
- pISet->Put( XFillStyleItem(drawing::FillStyle_GRADIENT) );
+ aFillGradient.SetGradientValue(aGradient);
pISet->Put( aFillGradient );
- pISet->Put( XLineStyleItem(drawing::LineStyle_NONE) );
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
- pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxColorItem(COL_WHITE, EE_CHAR_COLOR )); // font color
-
- // Yellow
+ pISet->Put( SvxColorItem(COL_WHITE, EE_CHAR_COLOR )); // font white
+}
+ // Graphic > Shapes > Filled > Yellow
+{
aName =SdResId(STR_POOLSHEET_FILLED_YELLOW);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aFilledName);
@@ -420,89 +479,106 @@ void SdDrawDocument::CreateLayoutTemplates()
aGradient.SetStartColor( Color(0x00ffde59) ); // light gold 2
aGradient.SetEndColor( Color(0x00b47804) ); // dark gold 2
- aFillGradient.SetGradientValue(aGradient);
aFillGradient.SetName( aName );
- pISet->Put( XFillStyleItem(drawing::FillStyle_GRADIENT) );
+ aFillGradient.SetGradientValue(aGradient);
pISet->Put( aFillGradient );
- pISet->Put( XLineStyleItem(drawing::LineStyle_NONE) );
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
- pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxColorItem(COL_WHITE, EE_CHAR_COLOR )); // font color
-
- // Outlines
- OUString aOutlineName(SdResId(STR_POOLSHEET_OUTLINE));
-
+ pISet->Put( SvxColorItem(COL_WHITE, EE_CHAR_COLOR )); // font white
+}
+ // Graphic > Shapes > Outlines
+ OUString aOutlineName(SdResId(STR_POOLSHEET_OUTLINE));
+{
aName = aOutlineName;
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OUTLINE );
+ pSheet->SetParent( aShapesName );
pISet = &pSheet->GetItemSet();
- pISet->Put( XLineWidthItem(81)); // 2.3 pt
- pISet->Put( XFillStyleItem(drawing::FillStyle_NONE)); // clear
- pISet->Put( XLineColorItem(OUString(), COL_BLACK)); // b/w
- pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
-
- // blue
+ pISet->Put( XFillStyleItem(drawing::FillStyle_NONE) ); // clear
+ pISet->Put( XLineStyleItem(drawing::LineStyle_SOLID) ); // solide line
+ pISet->Put( XLineWidthItem(81) ); // 2.3 pt
+ pISet->Put( XLineColorItem(OUString(), COL_BLACK) ); // b/w
+}
+ // Graphic > Shapes > Outlines > Blue
+{
aName =SdResId(STR_POOLSHEET_OUTLINE_BLUE);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aOutlineName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OUTLINE_BLUE );
pISet = &pSheet->GetItemSet();
-
- pISet->Put( XLineStyleItem(drawing::LineStyle_SOLID));
- pISet->Put( XLineColorItem(OUString(), Color(0x00355269)) ); // dark blue 2
- pISet->Put( XLineWidthItem(81)); // 2.3 pt
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
- pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxColorItem(Color(0x00355269), EE_CHAR_COLOR )); // font color
-
- // green
+ pISet->Put( XLineColorItem(OUString(), Color(0x00355269)) ); // dark blue 2
+ pISet->Put( SvxColorItem(Color(0x00355269), EE_CHAR_COLOR )); // font color
+}
+ // Graphic > Shapes > Outlines > Green
+{
aName =SdResId(STR_POOLSHEET_OUTLINE_GREEN);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aOutlineName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OUTLINE_GREEN );
pISet = &pSheet->GetItemSet();
-
- pISet->Put( XLineStyleItem(drawing::LineStyle_SOLID));
- pISet->Put( XLineColorItem(OUString(), Color(0x00127622)) ); // dark green 2
- pISet->Put( XLineWidthItem(81)); // 2.3 pt
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
- pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxColorItem(Color(0x00127622), EE_CHAR_COLOR )); // font color
-
- // red
+ pISet->Put( XLineColorItem(OUString(), Color(0x00127622)) ); // dark green 2
+ pISet->Put( SvxColorItem(Color(0x00127622), EE_CHAR_COLOR )); // font color
+}
+ // Graphic > Shapes > Outlines > Red
+{
aName =SdResId(STR_POOLSHEET_OUTLINE_RED);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aOutlineName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OUTLINE_RED );
pISet = &pSheet->GetItemSet();
-
- pISet->Put( XLineStyleItem(drawing::LineStyle_SOLID));
- pISet->Put( XLineColorItem(OUString(), Color(0x00c9211e)) ); // dark red 2
- pISet->Put( XLineWidthItem(81)); // 2.3 pt
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
- pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxColorItem(Color(0x00c9211e), EE_CHAR_COLOR )); // font color
-
- // yellow
+ pISet->Put( XLineColorItem(OUString(), Color(0x00c9211e)) ); // dark red 2
+ pISet->Put( SvxColorItem(Color(0x00c9211e), EE_CHAR_COLOR )); // font color
+}
+ // Graphic > Shapes > Outlines > Yellow
+{
aName =SdResId(STR_POOLSHEET_OUTLINE_YELLOW);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aOutlineName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OUTLINE_YELLOW );
pISet = &pSheet->GetItemSet();
-
pISet->Put( XLineStyleItem(drawing::LineStyle_SOLID));
- pISet->Put( XLineColorItem(OUString(), Color(0x00b47804)) ); // dark gold 2
- pISet->Put( XLineWidthItem(81)); // 2.3 pt
- pISet->Put( SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT) ); // 14 pt
- pISet->Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT) ); // bold
- pISet->Put( aSvxFontItem ); // font name
- pISet->Put( SvxColorItem(Color(0x00b47804), EE_CHAR_COLOR )); // font color
+ pISet->Put( XLineColorItem(OUString(), Color(0x00b47804)) ); // dark gold 2
+ pISet->Put( SvxColorItem(Color(0x00b47804), EE_CHAR_COLOR )); // font color
+}
+ // Graphic > Lines
+ OUString aLinesName;
+{
+ aLinesName = SdResId(STR_POOLSHEET_LINES);
+ pSheet = &(pSSPool->Make(aLinesName, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent( aGraphicName );
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_LINES);
+ pISet = &pSheet->GetItemSet();
+ pISet->Put( XFillStyleItem(drawing::FillStyle_NONE) ); // clear
+ pISet->Put( XLineStyleItem(drawing::LineStyle_SOLID) ); // solide line
+ pISet->Put( XLineColorItem(OUString(), COL_BLACK) ); // b/w
+}
+ // Graphic > Lines > Measurements
+{
+ aName = SdResId(STR_POOLSHEET_MEASURE);
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent(aLinesName);
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_MEASURE );
+ pISet = &pSheet->GetItemSet();
+
+ ::basegfx::B2DPolygon aArrow; // arrows
+ aArrow.append(::basegfx::B2DPoint(10.0, 0.0));
+ aArrow.append(::basegfx::B2DPoint(0.0, 30.0));
+ aArrow.append(::basegfx::B2DPoint(20.0, 30.0));
+ aArrow.setClosed(true);
+
+ pISet->Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow)));
+ pISet->Put(XLineStartWidthItem(200));
+ pISet->Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow)));
+ pISet->Put(XLineEndWidthItem(200));
+ pISet->Put(SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, true));
+}
+ // Graphic > Lines > Dashed
+{
+ aName = SdResId(STR_POOLSHEET_LINES_DASHED);
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
+ pSheet->SetParent(aLinesName);
+ pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_LINES_DASHED );
+ pISet = &pSheet->GetItemSet();
+ pISet->Put( XLineStyleItem(drawing::LineStyle_DASH) ); // dashed line
+}
// Generate presentation templates for default layout.
OUString aPrefix = SdResId(STR_LAYOUT_DEFAULT_NAME);
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index ee4cc427489c..682e41840517 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -955,9 +955,16 @@ void SdStyleSheetPool::UpdateStdNames()
case HID_POOLSHEET_OBJWITHOUTFILL: pNameId = STR_POOLSHEET_OBJWITHOUTFILL; break;
case HID_POOLSHEET_OBJNOLINENOFILL: pNameId = STR_POOLSHEET_OBJNOLINENOFILL;break;
case HID_POOLSHEET_TEXT: pNameId = STR_POOLSHEET_TEXT; break;
- case HID_POOLSHEET_TITLE: pNameId = STR_POOLSHEET_TITLE; break;
- case HID_POOLSHEET_HEADLINE: pNameId = STR_POOLSHEET_HEADLINE; break;
- case HID_POOLSHEET_MEASURE: pNameId = STR_POOLSHEET_MEASURE; break;
+ case HID_POOLSHEET_A4: pNameId = STR_POOLSHEET_A4; break;
+ case HID_POOLSHEET_A4_TITLE: pNameId = STR_POOLSHEET_A4_TITLE; break;
+ case HID_POOLSHEET_A4_HEADLINE: pNameId = STR_POOLSHEET_A4_HEADLINE; break;
+ case HID_POOLSHEET_A4_TEXT: pNameId = STR_POOLSHEET_A4_TEXT; break;
+ case HID_POOLSHEET_A0: pNameId = STR_POOLSHEET_A0; break;
+ case HID_POOLSHEET_A0_TITLE: pNameId = STR_POOLSHEET_A0_TITLE; break;
+ case HID_POOLSHEET_A0_HEADLINE: pNameId = STR_POOLSHEET_A0_HEADLINE; break;
+ case HID_POOLSHEET_A0_TEXT: pNameId = STR_POOLSHEET_A0_TEXT; break;
+ case HID_POOLSHEET_GRAPHIC: pNameId = STR_POOLSHEET_GRAPHIC; break;
+ case HID_POOLSHEET_SHAPES: pNameId = STR_POOLSHEET_SHAPES; break;
case HID_POOLSHEET_FILLED: pNameId = STR_POOLSHEET_FILLED; break;
case HID_POOLSHEET_FILLED_BLUE: pNameId = STR_POOLSHEET_FILLED_BLUE; break;
case HID_POOLSHEET_FILLED_GREEN: pNameId = STR_POOLSHEET_FILLED_GREEN; break;
@@ -968,9 +975,10 @@ void SdStyleSheetPool::UpdateStdNames()
case HID_POOLSHEET_OUTLINE_GREEN: pNameId = STR_POOLSHEET_OUTLINE_GREEN; break;
case HID_POOLSHEET_OUTLINE_RED: pNameId = STR_POOLSHEET_OUTLINE_RED; break;
case HID_POOLSHEET_OUTLINE_YELLOW: pNameId = STR_POOLSHEET_OUTLINE_YELLOW; break;
+ case HID_POOLSHEET_LINES: pNameId = STR_POOLSHEET_LINES; break;
+ case HID_POOLSHEET_MEASURE: pNameId = STR_POOLSHEET_MEASURE; break;
+ case HID_POOLSHEET_LINES_DASHED: pNameId = STR_POOLSHEET_LINES_DASHED; break;
- case HID_PSEUDOSHEET_TITLE: pNameId = STR_PSEUDOSHEET_TITLE; break;
- case HID_PSEUDOSHEET_SUBTITLE: pNameId = STR_PSEUDOSHEET_SUBTITLE; break;
case HID_PSEUDOSHEET_OUTLINE1:
case HID_PSEUDOSHEET_OUTLINE2:
case HID_PSEUDOSHEET_OUTLINE3:
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 96927318f974..2ee00f3c0c69 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -597,10 +597,19 @@ struct ApiNameMap
{ OUStringLiteral("notes"), HID_PSEUDOSHEET_NOTES },
{ OUStringLiteral("standard"), HID_STANDARD_STYLESHEET_NAME },
{ OUStringLiteral("objectwithoutfill"), HID_POOLSHEET_OBJWITHOUTFILL },
- { OUStringLiteral("text"), HID_POOLSHEET_TEXT },
- { OUStringLiteral("title"), HID_POOLSHEET_TITLE },
- { OUStringLiteral("headline"), HID_POOLSHEET_HEADLINE },
- { OUStringLiteral("measure"), HID_POOLSHEET_MEASURE },
+
+ { OUStringLiteral("Text"), HID_POOLSHEET_TEXT },
+ { OUStringLiteral("A4"), HID_POOLSHEET_A4 },
+ { OUStringLiteral("Title A4"), HID_POOLSHEET_A4_TITLE },
+ { OUStringLiteral("Heading A4"), HID_POOLSHEET_A4_HEADLINE },
+ { OUStringLiteral("Text A4"), HID_POOLSHEET_A4_TEXT },
+ { OUStringLiteral("A4"), HID_POOLSHEET_A0 },
+ { OUStringLiteral("Title A0"), HID_POOLSHEET_A0_TITLE },
+ { OUStringLiteral("Heading A0"), HID_POOLSHEET_A0_HEADLINE },
+ { OUStringLiteral("Text A0"), HID_POOLSHEET_A0_TEXT },
+
+ { OUStringLiteral("Graphic"), HID_POOLSHEET_GRAPHIC },
+ { OUStringLiteral("Shapes"), HID_POOLSHEET_SHAPES },
{ OUStringLiteral("Filled"), HID_POOLSHEET_FILLED },
{ OUStringLiteral("Filled Blue"), HID_POOLSHEET_FILLED_BLUE },
{ OUStringLiteral("Filled Green"), HID_POOLSHEET_FILLED_GREEN },
@@ -610,7 +619,11 @@ struct ApiNameMap
{ OUStringLiteral("Outlined Blue"), HID_POOLSHEET_OUTLINE_BLUE },
{ OUStringLiteral("Outlined Green"), HID_POOLSHEET_OUTLINE_GREEN },
{ OUStringLiteral("Outlined Red"), HID_POOLSHEET_OUTLINE_RED },
- { OUStringLiteral("Outlined Yellow"), HID_POOLSHEET_OUTLINE_YELLOW } };
+ { OUStringLiteral("Outlined Yellow"), HID_POOLSHEET_OUTLINE_YELLOW },
+ { OUStringLiteral("Lines"), HID_POOLSHEET_LINES },
+ { OUStringLiteral("Arrow Line"), HID_POOLSHEET_MEASURE },
+ { OUStringLiteral("Arrow Dashed"), HID_POOLSHEET_LINES_DASHED }
+ };
OUString GetApiNameForHelpId(sal_uLong nId)
{
More information about the Libreoffice-commits
mailing list