rpms/openoffice.org/F-11 openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch, NONE, 1.1
David Tardon
dtardon at fedoraproject.org
Sat Jan 16 09:10:10 UTC 2010
Author: dtardon
Update of /cvs/extras/rpms/openoffice.org/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21342
Added Files:
openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch
Log Message:
... add the patch. grrr...
openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch:
optcolor.cxx | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
--- NEW FILE openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch ---
diff -r 0fa6864c75c3 svx/source/dialog/optcolor.cxx
--- a/svx/source/dialog/optcolor.cxx Mon Jan 04 19:54:38 2010 +0100
+++ b/svx/source/dialog/optcolor.cxx Sat Jan 16 09:15:45 2010 +0100
@@ -261,6 +261,9 @@
virtual void Command( const CommandEvent& rCEvt );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ // calculate position behind last chapter
+ sal_Int32 impl_getPosBehindLastChapter() const;
+
public:
ColorConfigWindow_Impl(Window* pParent, const ResId& rResId);
~ColorConfigWindow_Impl();
@@ -398,7 +401,7 @@
/* -----------------------------25.03.2002 17:05------------------------------
- ---------------------------------------------------------------------------*/
+---------------------------------------------------------------------------*/
ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rResId) :
Window(pParent, rResId),
aGeneralBackWN(this),
@@ -709,14 +712,14 @@
aChapters[GROUP_CALC ]->SetGroupHeight( aChapters[GROUP_DRAW]->GetPosPixel().Y() - aChapters[GROUP_CALC]->GetPosPixel().Y() );
aChapters[GROUP_DRAW ]->SetGroupHeight( aChapters[GROUP_BASIC]->GetPosPixel().Y() - aChapters[GROUP_DRAW]->GetPosPixel().Y() );
aChapters[GROUP_BASIC ]->SetGroupHeight( aChapters[GROUP_SQL]->GetPosPixel().Y() - aChapters[GROUP_BASIC]->GetPosPixel().Y() );
+ aChapters[GROUP_SQL]->SetGroupHeight(impl_getPosBehindLastChapter()
+ - aChapters[GROUP_SQL]->GetPosPixel().Y());
ExtendedColorConfig aExtConfig;
sal_Int32 nExtCount = aExtConfig.GetComponentCount();
if ( nExtCount )
{
- // calculate position behind last chapter
- sal_Int32 nLastY = aSQLCommentWN.GetPosPixel().Y() + aSQLCommentWN.GetSizePixel().Height();
- nLastY = nLastY + LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height();
+ const sal_Int32 nLastY(impl_getPosBehindLastChapter());
// to calculate the number of lines
sal_Int32 nHeight = LogicToPixel( Size( 0, _LINE_HEIGHT ), MAP_APPFONT ).Height();
sal_Int32 nLineNum = nLastY / nHeight;
@@ -898,6 +901,15 @@
aChapterWins.clear();
::std::vector< Window*>().swap(aChapterWins);
}
+
+sal_Int32
+ColorConfigWindow_Impl::impl_getPosBehindLastChapter() const
+{
+ sal_Int32 nLastY = aSQLCommentWN.GetPosPixel().Y() + aSQLCommentWN.GetSizePixel().Height();
+ nLastY = nLastY + LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height();
+ return nLastY;
+}
+
/* -----------------------------2002/06/20 12:48------------------------------
---------------------------------------------------------------------------*/
@@ -1175,9 +1187,9 @@
/* -----------------------------26.03.2002 12:55------------------------------
---------------------------------------------------------------------------*/
-sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, bool _bShow)
+sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, sal_Bool _bShow)
{
- BOOL bHide = TRUE;
+ sal_Bool bHide = TRUE;
if(pWindow)
{
Point aPos = pWindow->GetPosPixel();
@@ -1206,12 +1218,14 @@
continue;
Point aPos;
//controls outside of the view need to be hidden to speed up accessibility tools
- bool bShowCtrl = ( lcl_isGroupVisible(
+ sal_Bool bShowCtrl = ( lcl_isGroupVisible(
lcl_getGroup(i), aScrollWindow.GetModuleOptions() ) != sal_False );
- lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl);
- lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl);
- lcl_MoveAndShow(aScrollWindow.aWindows[i] , nOffset, nWindowHeight, bShowCtrl);
- BOOL bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl);
+ // if any of the items on the current line is visible, the
+ // whole line should be visible
+ sal_Bool bShow(lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl));
+ bShow = lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl) || bShow;
+ bShow = lcl_MoveAndShow(aScrollWindow.aWindows[i] , nOffset, nWindowHeight, bShowCtrl) || bShow;
+ bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl) || bShow;
if(bShow)
{
if(nFirstVisible == -1)
@@ -1223,7 +1237,7 @@
//show the one prior to the first visible and the first after the last visble control
//to enable KEY_TAB travelling
- if(nFirstVisible)
+ if(nFirstVisible > 0)
{
//skip gaps where no controls exist for the related ColorConfigEntry
do
More information about the scm-commits
mailing list