Hi all,
I shouldn't be let around code, but here's a patch for a trivial bug
for you to take a look at anyway.
It fixes fdo# 38207 (i.e. moves the item "Borders" up, if we are in
Writer/Web options) and also hides "Repeat [heading] on each page"
since that option doesn't seem to make sense for websites either.
Specifically my question is, does the following make sense?
- aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
+ aRepeatHeaderCB.Check((!bHTMLMode) && (aInsOpts.mnRowsToRepeat > 0));
(That is, does it prevent setting aRepeatHeader to true when in
Writer/Web mode or is that bogus?)
Regards,
Astron.
From ef47ccad183584d0d2da4d84dfed8d5af8bcaa0e Mon Sep 17 00:00:00 2001
From: "Stefan Knorr (astron)" <heinzlesspam@gmail.com>
Date: Sat, 3 Mar 2012 22:02:23 +0100
Subject: [PATCH] Fix fdo#38207 and also hide another option in Writer/Web
---
sw/source/ui/config/optpage.cxx | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 014f04d..89cb4eb 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1287,15 +1287,27 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
// hide certain controls for html
if(bHTMLMode)
{
-
+ aRepeatHeaderCB.Hide();
aDontSplitCB.Hide();
+
+ long nMoveUpBy =
+ aRepeatHeaderCB.LogicToPixel( Size( 13, 13 ), MAP_APPFONT ).Height();
+
+ Point aPos = aRepeatHeaderCB.GetPosPixel();
+ aRepeatHeaderCB.SetPosPixel( Point( aPos.X(), aPos.Y() - nMoveUpBy ) );
+
+ nMoveUpBy +=
+ aDontSplitCB.LogicToPixel( Size( 13, 13 ), MAP_APPFONT ).Height();
+
+ aPos = aBorderCB.GetPosPixel();
+ aBorderCB.SetPosPixel( Point( aPos.X(), aPos.Y() - nMoveUpBy ) );
}
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check(0 != (nInsTblFlags & tabopts::HEADLINE));
- aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
+ aRepeatHeaderCB.Check((!bHTMLMode) && (aInsOpts.mnRowsToRepeat > 0));
aDontSplitCB.Check(!(nInsTblFlags & tabopts::SPLIT_LAYOUT));
aBorderCB.Check(0 != (nInsTblFlags & tabopts::DEFAULT_BORDER));
--
1.7.5.4
Context
- [Patch] Fix for fdo#38207 and another idea of mine · Stefan Knorr (Astron)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.