summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2013-05-29 08:10:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-30 14:28:48 +0100
commit0ff751efaa49a5b3d22d324a43527bfd21e5a17c (patch)
tree3bd7a230b3cb974dd85749edaf88a4002d57d112 /include
parent20824c118f21c1aad2672630f1c2ed7eecf5d2dd (diff)
Resolves: #i122096# apply default bullet numbering rule on toggle on...
if the current numbering rule is not a bullet numbering rule. - improve application default bullet numbering rule by add corresponding spacing to the first list level - refactoring of code introduced for paragraph property panel to handle toggle and set of bullets and numbering (cherry picked from commit 8c142809c7e16853d5634487cc9ed4e53caa3f91) Conflicts: editeng/inc/editeng/outliner.hxx editeng/source/outliner/outlin2.cxx editeng/source/outliner/outliner.cxx editeng/source/outliner/outlvw.cxx sd/source/ui/func/fuolbull.cxx Change-Id: If2807b2b81f8ade1e5b3282aa636cc2c0d8ea76a
Diffstat (limited to 'include')
-rw-r--r--include/editeng/outliner.hxx64
1 files changed, 57 insertions, 7 deletions
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 8b4b92e32550..c9c0b0bc1a23 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -329,12 +329,44 @@ public:
const SvxFieldItem* GetFieldUnderMousePointer() const;
const SvxFieldItem* GetFieldAtSelection() const;
- /** enables numbering for the selected paragraphs if the numbering of the first paragraph is off
- or disables numbering for the selected paragraphs if the numbering of the first paragraph is on
+ /** enables bullets for the selected paragraphs if the bullets/numbering of the first paragraph is off
+ or disables bullets/numbering for the selected paragraphs if the bullets/numbering of the first paragraph is on
*/
- void ToggleBullets();
- sal_Bool ToggleBullets(sal_Bool bBulletOnOff, sal_Bool bNormalBullet, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL, sal_Bool bForceBulletOnOff = false);
- sal_Bool ToggleAllParagraphsBullets(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet, sal_Bool bToggleOn, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL);
+ void ToggleBullets();
+
+ void ToggleBulletsNumbering(
+ const bool bToggle,
+ const bool bHandleBullets,
+ const SvxNumRule* pNumRule = NULL );
+
+ /** apply bullets/numbering for paragraphs
+
+ @param boolean bHandleBullets
+ true: handle bullets
+ false: handle numbering
+
+ @param pNewNumRule
+ numbering rule which needs to be applied. can be 0.
+
+ @param boolean bAtSelection
+ true: apply bullets/numbering at selected paragraphs
+ false: apply bullets/numbering at all paragraphs
+ */
+ void ApplyBulletsNumbering(
+ const bool bHandleBullets,
+ const SvxNumRule* pNewNumRule,
+ const bool bCheckCurrentNumRuleBeforeApplyingNewNumRule,
+ const bool bAtSelection = false );
+
+ /** switch off bullets/numbering for paragraphs
+
+ @param boolean bAtSelection
+ true: switch off bullets/numbering at selected paragraphs
+ false: switch off bullets/numbering at all paragraphs
+ */
+ void SwitchOffBulletsNumbering(
+ const bool bAtSelection = false );
+
/** enables numbering for the selected paragraphs that are not enabled and ignore all selected
paragraphs that already have numbering enabled.
*/
@@ -608,7 +640,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
DECL_LINK( EditEngineNotifyHdl, EENotify* );
void ImplCheckParagraphs( sal_Int32 nStart, sal_Int32 nEnd );
- sal_Bool ImplHasBullet( sal_Int32 nPara ) const;
+ bool ImplHasNumberFormat( sal_Int32 nPara ) const;
Size ImplGetBulletSize( sal_Int32 nPara );
sal_uInt16 ImplGetNumbering( sal_Int32 nPara, const SvxNumberFormat* pParaFmt );
void ImplCalcBulletText( sal_Int32 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChildren );
@@ -989,7 +1021,25 @@ public:
virtual sal_Bool IsParaIsNumberingRestart( sal_Int32 nPara );
virtual void SetParaIsNumberingRestart( sal_Int32 nPara, sal_Bool bParaIsNumberingRestart );
- sal_Int32 GetBulletsNumberingStatus();
+ /** determine the bullets/numbering status of the given paragraphs
+
+ @param nParaStart
+ index of paragraph at which the check starts
+
+ @param nParaEnd
+ index of paragraph at which the check ends
+
+ @returns
+ 0 : all paragraphs have bullets
+ 1 : all paragraphs have numbering
+ 2 : otherwise
+ */
+ sal_Int32 GetBulletsNumberingStatus(
+ const sal_Int32 nParaStart,
+ const sal_Int32 nParaEnd ) const;
+
+ // convenient method to determine the bullets/numbering status for all paragraphs
+ sal_Int32 GetBulletsNumberingStatus() const;
};
#endif