summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
diff options
context:
space:
mode:
authorandreas kainz <kainz.a@gmail.com>2020-10-29 14:31:35 +0100
committerAndreas Kainz <kainz.a@gmail.com>2020-10-29 23:09:49 +0100
commit55e0a9f5506ca95238b3b70cb9beb33d089577f4 (patch)
tree233ff069d69e64910105fa05d05055d530e59a37 /svx/source/tbxctrls
parent5b33b1a6b0f251202e89cef436efd4719c3fc0c4 (diff)
StylesPreview in Writer NB arrangement in two rows
Change-Id: I05e0b903e7d51cb2487f18f5bbeb6228ba7c945f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105008 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.com>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r--svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx6
-rw-r--r--svx/source/tbxctrls/StylesPreviewWindow.cxx6
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx4
3 files changed, 9 insertions, 7 deletions
diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
index 9b78a0e7aaf0..47995067ae03 100644
--- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
+++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
@@ -68,8 +68,8 @@ void StylesPreviewToolBoxControl::InitializeStyles(
css::uno::Reference<css::container::XNameAccess> xParaStyles;
xStylesSupplier->getStyleFamilies()->getByName("ParagraphStyles") >>= xParaStyles;
static const std::vector<OUString> aWriterStyles
- = { "Standard", "Text body", "Title", "Subtitle",
- "Heading 1", "Heading 2", "Heading 3", "Quotations" };
+ = { "Standard", "Text body", "Heading 1", "Heading 2", "Heading 3",
+ "Heading 4", "Title", "Subtitle", "Quotations", "Preformatted Text" };
for (const OUString& aStyle : aWriterStyles)
{
try
@@ -185,4 +185,4 @@ com_sun_star_comp_svx_StylesPreviewToolBoxControl_get_implementation(
return cppu::acquire(new StylesPreviewToolBoxControl());
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index 7448592f2162..265fea39b956 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -369,7 +369,7 @@ StylesPreviewWindow_Base::StylesPreviewWindow_Base(
m_xStyleControllersWeld[i].reset(
new weld::CustomWeld(xBuilder, sId, *m_xStyleControllers[i]));
- m_xStyleControllersWeld[i]->set_size_request(100, 60);
+ m_xStyleControllersWeld[i]->set_size_request(128, 28);
}
m_xUp->connect_clicked(LINK(this, StylesPreviewWindow_Base, GoUp));
@@ -477,14 +477,14 @@ IMPL_LINK(StylesPreviewWindow_Base, GoUp, const OString&, /*rItem*/, void)
if (m_nStyleIterator == 0)
m_nStyleIterator = m_aAllStyles.size();
else
- m_nStyleIterator--;
+ m_nStyleIterator = m_nStyleIterator - 2;
Update();
}
IMPL_LINK(StylesPreviewWindow_Base, GoDown, const OString&, /*rItem*/, void)
{
- m_nStyleIterator++;
+ m_nStyleIterator = m_nStyleIterator + 2;
Update();
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index af2eea072998..548aced8073c 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2560,7 +2560,9 @@ struct SvxStyleToolBoxControl::Impl
"Heading 1",
"Heading 2",
"Heading 3",
- "Quotations"
+ "Heading 4",
+ "Quotations",
+ "Preformatted Text"
};
for( const OUString& aStyle: aWriterStyles )
{