Author: arielch
Date: Tue Dec 11 04:31:17 2012
New Revision: 1419993
URL: http://svn.apache.org/viewvc?rev=1419993&view=rev
Log:
i25945 - Allow disabling scrollbar tips by API and configuration
Modified:
openoffice/trunk/main/offapi/com/sun/star/text/ViewSettings.idl
openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
openoffice/trunk/main/sw/inc/viewopt.hxx
openoffice/trunk/main/sw/source/ui/config/usrpref.cxx
openoffice/trunk/main/sw/source/ui/uiview/viewport.cxx
openoffice/trunk/main/sw/source/ui/uno/unomod.cxx
Modified: openoffice/trunk/main/offapi/com/sun/star/text/ViewSettings.idl
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/text/ViewSettings.idl?rev=1419993&r1=1419992&r2=1419993&view=diff
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/text/ViewSettings.idl (original)
+++ openoffice/trunk/main/offapi/com/sun/star/text/ViewSettings.idl Tue Dec 11
04:31:17 2012
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,260 +7,172 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
#ifndef __com_sun_star_text_ViewSettings_idl__
#define __com_sun_star_text_ViewSettings_idl__
-#ifndef __com_sun_star_beans_XPropertySet_idl__
#include <com/sun/star/beans/XPropertySet.idl>
-#endif
-#ifndef __com_sun_star_view_DocumentZoomType_idl__
#include <com/sun/star/view/DocumentZoomType.idl>
-#endif
-#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
-#endif
-
-//=============================================================================
-
- module com { module sun { module star { module text {
-//=============================================================================
+module com { module sun { module star { module text {
// DocMerge from xml: service com::sun::star::text::ViewSettings
/** provides access to the settings of the controller of a text document.
*/
published service ViewSettings
{
- // DocMerge: empty anyway
- interface com::sun::star::beans::XPropertySet;
-
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowAnnotations
- /** If this property is <TRUE/>, annotations (notes) are visible.
- */
- [property] boolean ShowAnnotations;
-
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowBreaks
- /** If this property is <TRUE/>, paragraph line breaks are visible.
- */
- [property] boolean ShowBreaks;
-
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowFieldCommandsShowDrawings
- /** If this property is <TRUE/>, shapes are visible.
- */
- [property] boolean ShowDrawings;
-
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowFieldCommands
- /** If this property is <TRUE/>, text fields are shown with their
commands; otherwise
- the content is visible.
- */
- [property] boolean ShowFieldCommands;
-
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowFootnoteBackground
- /** If this property is <TRUE/>, footnotes symbols are displayed with
gray background.
- */
- [property] boolean ShowFootnoteBackground;
-
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowGraphics
- /** If this property is <TRUE/>, graphic objects are visible.
- */
- [property] boolean ShowGraphics;
+ interface com::sun::star::beans::XPropertySet;
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowHiddenParagraphs
- /** If this property is <TRUE/>, hidden paragraghs are displayed.
- */
- [property] boolean ShowHiddenParagraphs;
-
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowHiddenText
- /** If this property is <TRUE/>, hidden text is displayed.
- */
- [property] boolean ShowHiddenText;
-
-
//-------------------------------------------------------------------------
-
- /** ShowHoriRuler and ShowVertRuler determine whether a ruler is
visible.
- */
- [property] boolean ShowRulers;
-
-
//-------------------------------------------------------------------------
-
- /** If this property is <TRUE/> and the property ShowRulers is <TRUE/>,
- the horizontal ruler is displayed.
- */
- [property] boolean ShowHoriRuler;
-
-
//-------------------------------------------------------------------------
-
- /** If this property is <TRUE/> and the property ShowRulers is <TRUE/>,
- the horizontal scroll bar is displayed.
- */
- [property] boolean ShowHoriScrollBar;
-
-
//-------------------------------------------------------------------------
-
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowIndexMarkBackground
- /** If this property is <TRUE/>, index marks are displayed with gray
background.
- */
- [property] boolean ShowIndexMarkBackground;
-
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, annotations (notes) are visible.
+ */
+ [property] boolean ShowAnnotations;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowParaBreaks
- /** If this property is <TRUE/>, paragraph breaks are visible.
- */
- [property] boolean ShowParaBreaks;
+ /** If this property is <TRUE/>, paragraph line breaks are visible.
+ */
+ [property] boolean ShowBreaks;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, shapes are visible.
+ */
+ [property] boolean ShowDrawings;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowProtectedSpaces
- /** If this property is <TRUE/>, protected spaces (hard spaces) are
displayed with gray
- background.
- */
- [property] boolean ShowProtectedSpaces;
+ /** If this property is <TRUE/>, text fields are shown with their
commands; otherwise
+ the content is visible.
+ */
+ [property] boolean ShowFieldCommands;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, footnotes symbols are displayed with gray
background.
+ */
+ [property] boolean ShowFootnoteBackground;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowSoftHyphens
- /** If this property is <TRUE/>, soft hyphens are displayed with gray
background.
- */
- [property] boolean ShowSoftHyphens;
+ /** If this property is <TRUE/>, graphic objects are visible.
+ */
+ [property] boolean ShowGraphics;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, hidden paragraghs are displayed.
+ */
+ [property] boolean ShowHiddenParagraphs;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowSpaces
- /** If this property is <TRUE/>, spaces are displayed with dots.
- */
- [property] boolean ShowSpaces;
+ /** If this property is <TRUE/>, hidden text is displayed.
+ */
+ [property] boolean ShowHiddenText;
-
//-------------------------------------------------------------------------
+ /** ShowHoriRuler and ShowVertRuler determine whether a ruler is visible.
+ */
+ [property] boolean ShowRulers;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowTableBoundaries
- /** If this property is <TRUE/>, table boundaries are displayed.
- */
- [property] boolean ShowTableBoundaries;
+ /** If this property is <TRUE/> and the property ShowRulers is <TRUE/>,
+ the horizontal ruler is displayed.
+ */
+ [property] boolean ShowHoriRuler;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/> and the property ShowRulers is <TRUE/>,
+ the horizontal scroll bar is displayed.
+ */
+ [property] boolean ShowHoriScrollBar;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowTables
- /** If this property is <TRUE/>, tables are visible.
- */
- [property] boolean ShowTables;
+ /** If this property is <TRUE/>, index marks are displayed with gray
background.
+ */
+ [property] boolean ShowIndexMarkBackground;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, paragraph breaks are visible.
+ */
+ [property] boolean ShowParaBreaks;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowTabstops
- /** If this property is <TRUE/>, tab stops are visible.
- */
- [property] boolean ShowTabstops;
+ /** If this property is <TRUE/>, protected spaces (hard spaces) are
displayed with gray
+ background.
+ */
+ [property] boolean ShowProtectedSpaces;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, soft hyphens are displayed with gray
background.
+ */
+ [property] boolean ShowSoftHyphens;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowTextBoundaries
- /** If this property is <TRUE/>, text boundaries are displayed.
- */
- [property] boolean ShowTextBoundaries;
+ /** If this property is <TRUE/>, spaces are displayed with dots.
+ */
+ [property] boolean ShowSpaces;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, table boundaries are displayed.
+ */
+ [property] boolean ShowTableBoundaries;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowTextFieldBackground
- /** If this property is <TRUE/>, text fields are displayed with gray
background.
- */
- [property] boolean ShowTextFieldBackground;
+ /** If this property is <TRUE/>, tables are visible.
+ */
+ [property] boolean ShowTables;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, tab stops are visible.
+ */
+ [property] boolean ShowTabstops;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowVertRuler
- /** If this property is <TRUE/>, the vertical ruler is displayed.
- */
- [property] boolean ShowVertRuler;
+ /** If this property is <TRUE/>, text boundaries are displayed.
+ */
+ [property] boolean ShowTextBoundaries;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, text fields are displayed with gray
background.
+ */
+ [property] boolean ShowTextFieldBackground;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::ShowVertScrollBar
- /** If this property is <TRUE/>, the vertical scroll bar is displayed.
- */
- [property] boolean ShowVertScrollBar;
+ /** If this property is <TRUE/>, the vertical ruler is displayed.
+ */
+ [property] boolean ShowVertRuler;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, the vertical scroll bar is displayed.
+ */
+ [property] boolean ShowVertScrollBar;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::SmoothScrolling
- /** If this property is <TRUE/>, smooth scrolling is active.
- */
- [property] boolean SmoothScrolling;
+ /** If this property is <TRUE/>, smooth scrolling is active.
+ */
+ [property] boolean SmoothScrolling;
-
//-------------------------------------------------------------------------
+ /** If this property is <TRUE/>, handles of drawing objects are visible.
+ */
+ [property] boolean SolidMarkHandles;
- // DocMerge from xml: property
com::sun::star::text::ViewSettings::SolidMarkHandles
- /** If this property is <TRUE/>, handles of drawing objects are visible.
- */
- [property] boolean SolidMarkHandles;
- //-------------------------------------------------------------------------
/** If this property is <TRUE/>, the vertical ruler is aligned to the
right side
of the view and the vertical scrollbar is on the left.
- */
+ */
[property] boolean IsVertRulerRightAligned;
- //-------------------------------------------------------------------------
/** If this property is <TRUE/> the document will be displayed as if it
were a HTML document.
- */
+ */
[property] boolean ShowOnlineLayout;
- //-------------------------------------------------------------------------
/** This property defines the zoom type for the document.
@see com::sun::star::view::DocumentZoomType
*/
[property] short ZoomType;
- //-------------------------------------------------------------------------
/** Defines the zoom value to use.
Valid only if the ZoomType is set to
<member
scope="com::sun::star::view::DocumentZoomType">BY_VALUE</member>.
- */
+ */
[property] short ZoomValue;
- //-------------------------------------------------------------------------
+
/** If this property is <TRUE/> hyperlinks in the document are executed
(loaded) on
mouse click. Otherwise they are handled like normal text.
*/
[optional, property] boolean IsExecuteHyperlinks;
- //-------------------------------------------------------------------------
/** Specifies whether to display the grid or not
@since OOo 2.0
*/
[optional, property] boolean IsRasterVisible;
- //-------------------------------------------------------------------------
/** Specifies whether to move frames, drawing elements, and form
functions only between grid points.
@@ -268,7 +180,6 @@ published service ViewSettings
*/
[optional, property] boolean IsSnapToRaster;
- //-------------------------------------------------------------------------
/** Specifies the number of intervals between grid points on the X-axis.
<p>The value must be greater or equal to 0, and the application
@@ -280,7 +191,6 @@ published service ViewSettings
*/
[optional, property] long RasterSubdivisionX;
- //-------------------------------------------------------------------------
/** Specifies the number of intervals between grid points on the Y-axis.
<p>The value must be greater or equal to 0, and the application
@@ -292,7 +202,6 @@ published service ViewSettings
*/
[optional, property] long RasterSubdivisionY;
- //-------------------------------------------------------------------------
/** Defines the unit of measure for the spacing between grid points
on the X-axis.
@@ -305,7 +214,6 @@ published service ViewSettings
*/
[optional, property] long RasterResolutionX;
- //-------------------------------------------------------------------------
/** Defines the unit of measure for the spacing between grid points
on the Y-axis.
@@ -318,13 +226,12 @@ published service ViewSettings
*/
[optional, property] long RasterResolutionY;
- //-------------------------------------------------------------------------
/** If this property is <TRUE/>, hidden characters are displayed
@since OOo 3.0
*/
[optional, property] boolean ShowHiddenCharacters;
- //-------------------------------------------------------------------------
+
/** If this property is <TRUE/>, the settings of nonprinting characters
are applied.
<p>This option controls the use of the settings ShowHiddenCharacters,
@@ -333,7 +240,7 @@ published service ViewSettings
@since OOo 3.0
*/
[optional, property] boolean ShowNonprintingCharacters;
- //-------------------------------------------------------------------------
+
/** metric unit of the horizontal ruler
<p>Uses values <type scope="com::sun::star::awt">FieldUnit</type></p>
@@ -341,7 +248,7 @@ published service ViewSettings
@since OOo 3.1
*/
[optional, property] long HorizontalRulerMetric;
- //-------------------------------------------------------------------------
+
/** metric unit of the vertical ruler
<p>Uses values from <type
scope="com::sun::star::awt">FieldUnit</type></p>
@@ -349,16 +256,21 @@ published service ViewSettings
@since OOo 3.1
*/
[optional, property] long VerticalRulerMetric;
- //-------------------------------------------------------------------------
+
/** If this property is <TRUE/>, tips for document content are shown,
typically in a help balloon when the mouse is over the content.
- @since Apache OpenOffice 3.5
+ @since Apache OpenOffice 4.0
*/
[optional, property] boolean ShowContentTips;
-};
-//=============================================================================
+ /** If this property is <TRUE/>, and the scroll bar is shown, a tool tip
+ is displayed while scrolling.
+
+ @since Apache OpenOffice 4.0
+ */
+ [optional, property] boolean ShowScrollBarTips;
+};
}; }; }; };
Modified:
openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs?rev=1419993&r1=1419992&r2=1419993&view=diff
==============================================================================
---
openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
(original)
+++
openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
Tue Dec 11 04:31:17 2012
@@ -1319,6 +1319,15 @@
<info>
<desc>Contains various window settings
such as scrollbars, rules, etc.</desc>
</info>
+ <prop oor:name="ShowScrollBarTips" oor:type="xs:boolean">
+ <!-- UIHints: Not accessible via user interface -->
+ <info>
+ <author>arielch</author>
+ <desc>Enables the user to prevent the display of help
tips on the scrollbars programmatically.</desc>
+ <label>Prevent scrollbars help tips</label>
+ </info>
+ <value>true</value>
+ </prop>
<prop oor:name="HorizontalScroll"
oor:type="xs:boolean">
<!-- OldPath: Writer/Layout/Window -->
<!-- OldLocation: Soffice.cfg -->
Modified: openoffice/trunk/main/sw/inc/viewopt.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/inc/viewopt.hxx?rev=1419993&r1=1419992&r2=1419993&view=diff
==============================================================================
--- openoffice/trunk/main/sw/inc/viewopt.hxx (original)
+++ openoffice/trunk/main/sw/inc/viewopt.hxx Tue Dec 11 04:31:17 2012
@@ -91,7 +91,7 @@ namespace svtools{ class ColorConfig;}
#define VIEWOPT_2_GRFKEEPZOOM 0x00040000L
#define VIEWOPT_2_CONTENT_TIPS 0x00100000L
#define VIEWOPT_2_RESERVED3 0x00200000L
-#define VIEWOPT_2_RESERVED4 0x00400000L
+#define VIEWOPT_2_SCROLLBAR_TIPS 0x00400000L
#define VIEWOPT_2_PRTFORMAT 0x00800000L
#define VIEWOPT_2_SHADOWCRSR 0x01000000L
#define VIEWOPT_2_V_RULER_RIGHT 0x02000000L
@@ -474,6 +474,8 @@ public:
{ return nUIOptions & VIEWOPT_2_CONTENT_TIPS ? sal_True : sal_False; }
sal_Bool IsPrtFormat() const
{ return nUIOptions & VIEWOPT_2_PRTFORMAT ? sal_True :
sal_False; }
+ sal_Bool IsShowScrollBarTips() const
+ { return nUIOptions & VIEWOPT_2_SCROLLBAR_TIPS ? sal_True : sal_False;
}
SvxZoomType GetZoomType() const { return eZoom; }
@@ -491,6 +493,8 @@ public:
{ b ? (nUIOptions |= VIEWOPT_2_CONTENT_TIPS) : (nUIOptions &=
~VIEWOPT_2_CONTENT_TIPS); }
void SetPrtFormat( sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &=
~VIEWOPT_2_PRTFORMAT); }
+ void SetShowScrollBarTips( sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_SCROLLBAR_TIPS) : (nUIOptions &=
~VIEWOPT_2_SCROLLBAR_TIPS); }
void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; }
void SetTblDest( sal_uInt8 nNew ) { nTblDest =
nNew; }
Modified: openoffice/trunk/main/sw/source/ui/config/usrpref.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/config/usrpref.cxx?rev=1419993&r1=1419992&r2=1419993&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/config/usrpref.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/config/usrpref.cxx Tue Dec 11 04:31:17
2012
@@ -261,9 +261,10 @@ Sequence<OUString> SwLayoutViewConfig::G
"Window/IsVerticalRulerRight", //16
"ViewLayout/Columns", //17
"ViewLayout/BookMode", //18
- "Other/IsSquaredPageMode" //19
+ "Other/IsSquaredPageMode", //19
+ "Window/ShowScrollBarTips" //20
};
- const int nCount = bWeb ? 15 : 20;
+ const int nCount = bWeb ? 15 : 21;
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
@@ -331,6 +332,7 @@ void SwLayoutViewConfig::Commit()
case 17: rVal <<= (sal_Int32)rParent.GetViewLayoutColumns();
break; // "ViewLayout/Columns",
case 18: rVal <<= (sal_Bool) rParent.IsViewLayoutBookMode();
break; // "ViewLayout/BookMode",
case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break;
// "Other/IsSquaredPageMode",
+ case 20: rVal <<= (sal_Bool) rParent.IsShowScrollBarTips(); break;
// "Window/ShowScrollBarTips",
}
}
PutProperties(aNames, aValues);
@@ -387,6 +389,7 @@ void SwLayoutViewConfig::Load()
case 17: rParent.SetViewLayoutColumns(
static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns",
case 18: rParent.SetViewLayoutBookMode(bSet); break;//
"ViewLayout/BookMode",
case 19: rParent.SetDefaultPageMode(bSet,sal_True);
break;// "Other/IsSquaredPageMode",
+ case 20: rParent.SetShowScrollBarTips(bSet); break;//
"Window/ShowScrollBarTips",
}
}
}
Modified: openoffice/trunk/main/sw/source/ui/uiview/viewport.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uiview/viewport.cxx?rev=1419993&r1=1419992&r2=1419993&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uiview/viewport.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uiview/viewport.cxx Tue Dec 11 04:31:17
2012
@@ -717,51 +717,55 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollba
// so we dont must do it agin.
EndScrollHdl(pScrollbar);
- Point aPos( aVisArea.TopLeft() );
- lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder());
+ if ( Help::IsQuickHelpEnabled() &&
+ pWrtShell->GetViewOptions()->IsShowScrollBarTips())
+ {
+ Point aPos( aVisArea.TopLeft() );
+ lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder());
- sal_uInt16 nPhNum = 1;
- sal_uInt16 nVirtNum = 1;
+ sal_uInt16 nPhNum = 1;
+ sal_uInt16 nVirtNum = 1;
- String sDisplay;
- if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum,
nVirtNum, sDisplay ))
- {
- // JP 21.07.00: the end scrollhandler invalidate the
FN_STAT_PAGE,
- // so we dont must do it
agin.
-// if(!GetViewFrame()->GetFrame().IsInPlace())
-// S F X_BINDINGS().Update(FN_STAT_PAGE);
+ String sDisplay;
+ if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum,
nVirtNum, sDisplay ))
+ {
+ // JP 21.07.00: the end scrollhandler invalidate the
FN_STAT_PAGE,
+ // so we dont must do it agin.
+ // if(!GetViewFrame()->GetFrame().IsInPlace())
+ // S F X_BINDINGS().Update(FN_STAT_PAGE);
+
+ //QuickHelp:
+ if( pWrtShell->GetPageCnt() > 1 )
+ {
+ if( !nPgNum || nPgNum != nPhNum )
+ {
+ Rectangle aRect;
+ aRect.Left() =
pScrollbar->GetParent()->OutputToScreenPixel(
+ pScrollbar->GetPosPixel() ).X() -8;
+ aRect.Top() = pScrollbar->OutputToScreenPixel(
+ pScrollbar->GetPointerPosPixel() ).Y();
+ aRect.Right() = aRect.Left();
+ aRect.Bottom() = aRect.Top();
+
+ String sPageStr( GetPageStr( nPhNum, nVirtNum,
sDisplay ));
+ SwContentAtPos aCnt( SwContentAtPos::SW_OUTLINE );
+ pWrtShell->GetContentAtPos( aPos, aCnt );
+ if( aCnt.sStr.Len() )
+ {
+ sPageStr += String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( " - "
));
+ sPageStr.Insert( aCnt.sStr, 0, 80 );
+ sPageStr.SearchAndReplaceAll( '\t', ' ' );
+ sPageStr.SearchAndReplaceAll( 0x0a, ' ' );
+ }
- //QuickHelp:
- if( pWrtShell->GetPageCnt() > 1 && Help::IsQuickHelpEnabled() )
- {
- if( !nPgNum || nPgNum != nPhNum )
- {
- Rectangle aRect;
- aRect.Left() =
pScrollbar->GetParent()->OutputToScreenPixel(
-
pScrollbar->GetPosPixel() ).X() -8;
- aRect.Top() =
pScrollbar->OutputToScreenPixel(
-
pScrollbar->GetPointerPosPixel() ).Y();
- aRect.Right() = aRect.Left();
- aRect.Bottom() = aRect.Top();
-
- String sPageStr( GetPageStr( nPhNum,
nVirtNum, sDisplay ));
- SwContentAtPos aCnt(
SwContentAtPos::SW_OUTLINE );
- pWrtShell->GetContentAtPos( aPos, aCnt
);
- if( aCnt.sStr.Len() )
- {
- sPageStr +=
String::CreateFromAscii(
-
RTL_CONSTASCII_STRINGPARAM( " - " ));
- sPageStr.Insert( aCnt.sStr, 0,
80 );
- sPageStr.SearchAndReplaceAll(
'\t', ' ' );
- sPageStr.SearchAndReplaceAll( 0x0a, ' ' );
+ Help::ShowQuickHelp( pScrollbar, aRect, sPageStr,
+ QUICKHELP_RIGHT|QUICKHELP_VCENTER);
}
-
- Help::ShowQuickHelp( pScrollbar, aRect,
sPageStr,
-
QUICKHELP_RIGHT|QUICKHELP_VCENTER);
- }
- nPgNum = nPhNum;
- }
- }
+ nPgNum = nPhNum;
+ }
+ }
+ }
}
else
EndScrollHdl(pScrollbar);
Modified: openoffice/trunk/main/sw/source/ui/uno/unomod.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uno/unomod.cxx?rev=1419993&r1=1419992&r2=1419993&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uno/unomod.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uno/unomod.cxx Tue Dec 11 04:31:17 2012
@@ -100,7 +100,8 @@ enum SwViewSettingsPropertyHandles
HANDLE_VIEWSET_RASTER_SUBDIVISION_X,
HANDLE_VIEWSET_RASTER_SUBDIVISION_Y,
HANDLE_VIEWSET_HORI_RULER_METRIC,
- HANDLE_VIEWSET_VERT_RULER_METRIC
+ HANDLE_VIEWSET_VERT_RULER_METRIC,
+ HANDLE_VIEWSET_SCROLLBAR_TIPS
};
enum SwPrintSettingsPropertyHandles
{
@@ -155,6 +156,7 @@ static ChainablePropertySetInfo * lcl_cr
{ RTL_CONSTASCII_STRINGPARAM ( "ShowParaBreaks"),
HANDLE_VIEWSET_PARA_BREAKS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "ShowProtectedSpaces"),
HANDLE_VIEWSET_PROTECTED_SPACES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "ShowRulers"),
HANDLE_VIEWSET_SHOW_RULER , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
+ { RTL_CONSTASCII_STRINGPARAM ( "ShowScrollBarTips"),
HANDLE_VIEWSET_SCROLLBAR_TIPS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "ShowSoftHyphens"),
HANDLE_VIEWSET_SOFT_HYPHENS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "ShowSpaces"),
HANDLE_VIEWSET_SPACES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "ShowTableBoundaries"),
HANDLE_VIEWSET_TABLE_BOUNDARIES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
@@ -689,6 +691,7 @@ void SwXViewSettings::_setSingleValue( c
case HANDLE_VIEWSET_SHOW_CONTENT_TIPS :
mpViewOption->SetShowContentTips(bVal); break;
case HANDLE_VIEWSET_IS_RASTER_VISIBLE :
mpViewOption->SetGridVisible(bVal); break;
case HANDLE_VIEWSET_IS_SNAP_TO_RASTER :
mpViewOption->SetSnap(bVal); break;
+ case HANDLE_VIEWSET_SCROLLBAR_TIPS :
mpViewOption->SetShowScrollBarTips(bVal); break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_X :
{
sal_Int32 nTmp = 0;
@@ -920,6 +923,7 @@ void SwXViewSettings::_getSingleValue( c
case HANDLE_VIEWSET_SHOW_CONTENT_TIPS : bBoolVal =
mpConstViewOption->IsShowContentTips(); break;
case HANDLE_VIEWSET_IS_RASTER_VISIBLE : bBoolVal =
mpConstViewOption->IsGridVisible(); break;
case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : bBoolVal =
mpConstViewOption->IsSnap(); break;
+ case HANDLE_VIEWSET_SCROLLBAR_TIPS : bBoolVal =
mpConstViewOption->IsShowScrollBarTips(); break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_X :
bBool = sal_False;
rValue <<= (sal_Int32)
TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Width());