[Libreoffice-commits] core.git: sd/inc sd/source sd/xml test/user-template

Stephan Bergmann sbergman at redhat.com
Fri Apr 22 07:54:33 UTC 2016


 sd/inc/pres.hxx                                                    |    4 ++--
 sd/source/core/sdpage.cxx                                          |   10 +++++-----
 sd/source/ui/controller/slidelayoutcontroller.cxx                  |    4 ++--
 sd/source/ui/inc/ToolBarManager.hxx                                |    6 +++---
 sd/source/ui/sidebar/LayoutMenu.cxx                                |    2 +-
 sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx         |    8 ++++----
 sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx                 |    4 ++--
 sd/source/ui/slidesorter/inc/view/SlsTheme.hxx                     |    6 +++---
 sd/source/ui/slidesorter/view/SlsTheme.cxx                         |    6 +++---
 sd/source/ui/unoidl/DrawController.cxx                             |    4 ++--
 sd/source/ui/view/ToolBarManager.cxx                               |    4 ++--
 sd/source/ui/view/ViewShellImplementation.cxx                      |    4 ++--
 sd/source/ui/view/viewshe3.cxx                                     |    2 +-
 sd/xml/layoutlist.xml                                              |    2 +-
 test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml |    2 +-
 15 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit fc233b52ce2acc1bcd7cecc3d51bcab870c81932
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 22 09:53:59 2016 +0200

    Avoid reserved identifiers
    
    Change-Id: I3542622f6b3752f7254abd07d9f3a8141f10c3dc

diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx
index 3bc3db7..1909672 100644
--- a/sd/inc/pres.hxx
+++ b/sd/inc/pres.hxx
@@ -47,7 +47,7 @@ enum PresObjKind
 enum AutoLayout
 {
     // new layouts with enum/text/chart/org/clip merged to content
-    AUTOLAYOUT__START = 0,
+    AUTOLAYOUT_START = 0,
     AUTOLAYOUT_TITLE = 0,                       ///< Title Slide
     AUTOLAYOUT_TITLE_CONTENT = 1,               ///< Title, Content
     AUTOLAYOUT_TITLE_2CONTENT = 3,              ///< Title and 2 Content
@@ -98,7 +98,7 @@ enum AutoLayout
     AUTOLAYOUT_HANDOUT9 = 31,
     AUTOLAYOUT_4CLIPART = 33,
     AUTOLAYOUT_6CLIPART = 34,
-    AUTOLAYOUT__END
+    AUTOLAYOUT_END
 };
 
 enum PageKind
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index c903177..409bf445 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1198,7 +1198,7 @@ LayoutDescriptor::LayoutDescriptor( int k0, int k1, int k2, int k3, int k4, int
 
 static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
 {
-    static const LayoutDescriptor aLayouts[AUTOLAYOUT__END-AUTOLAYOUT__START] =
+    static const LayoutDescriptor aLayouts[AUTOLAYOUT_END-AUTOLAYOUT_START] =
     {
         LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_TEXT ),                                 // AUTOLAYOUT_TITLE
         LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE ),                              // AUTOLAYOUT_ENUM
@@ -1240,10 +1240,10 @@ static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
             PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE )
     };
 
-    if( (eLayout < AUTOLAYOUT__START) || (eLayout >= AUTOLAYOUT__END) )
+    if( (eLayout < AUTOLAYOUT_START) || (eLayout >= AUTOLAYOUT_END) )
         eLayout = AUTOLAYOUT_NONE;
 
-    return aLayouts[ eLayout - AUTOLAYOUT__START ];
+    return aLayouts[ eLayout - AUTOLAYOUT_START ];
 }
 
 rtl::OUString enumtoString(AutoLayout aut)
@@ -1272,8 +1272,8 @@ rtl::OUString enumtoString(AutoLayout aut)
         case AUTOLAYOUT_TITLE_6CONTENT:
             retstr="AUTOLAYOUT_TITLE_6CONTENT";
             break;
-        case AUTOLAYOUT__START:
-            retstr="AUTOLAYOUT__START";
+        case AUTOLAYOUT_START:
+            retstr="AUTOLAYOUT_START";
             break;
         case AUTOLAYOUT_TITLE_2CONTENT_CONTENT:
             retstr="AUTOLAYOUT_TITLE_2CONTENT_CONTENT";
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 15742ef..0d03698 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -283,7 +283,7 @@ void LayoutToolbarMenu::SelectHdl(void* pControl)
 
     Sequence< PropertyValue > aArgs;
 
-    AutoLayout eLayout = AUTOLAYOUT__END;
+    AutoLayout eLayout = AUTOLAYOUT_END;
 
     OUString sCommandURL( mrController.getCommandURL() );
 
@@ -296,7 +296,7 @@ void LayoutToolbarMenu::SelectHdl(void* pControl)
         eLayout = static_cast< AutoLayout >(mpLayoutSet2->GetSelectItemId()-1);
     }
 
-    if( eLayout != AUTOLAYOUT__END )
+    if( eLayout != AUTOLAYOUT_END )
     {
         aArgs = Sequence< PropertyValue >(1);
         aArgs[0].Name = "WhatLayout";
diff --git a/sd/source/ui/inc/ToolBarManager.hxx b/sd/source/ui/inc/ToolBarManager.hxx
index 606ccdd..d9bf41b 100644
--- a/sd/source/ui/inc/ToolBarManager.hxx
+++ b/sd/source/ui/inc/ToolBarManager.hxx
@@ -120,14 +120,14 @@ public:
     /** The set of tool bar groups.
     */
     enum ToolBarGroup {
-        TBG__FIRST,
+        TBG_FIRST,
 
-        TBG_PERMANENT = TBG__FIRST,
+        TBG_PERMANENT = TBG_FIRST,
         TBG_FUNCTION,
         TBG_COMMON_TASK,
         TBG_MASTER_MODE,
 
-        TBG__LAST = TBG_MASTER_MODE
+        TBG_LAST = TBG_MASTER_MODE
     };
 
     /** Reset the set of visible object bars in the specified group.  Tool
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 212d0a6..55a51c2 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -681,7 +681,7 @@ void LayoutMenu::UpdateSelection()
 
         // Get layout of current page.
         AutoLayout aLayout (pCurrentPage->GetAutoLayout());
-        if (aLayout<AUTOLAYOUT__START || aLayout>AUTOLAYOUT__END)
+        if (aLayout<AUTOLAYOUT_START || aLayout>AUTOLAYOUT_END)
             break;
 
         // Find the entry of the menu for to the layout.
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx b/sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx
index 077a5ce..594cc31 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx
@@ -23,21 +23,21 @@
 namespace sd { namespace slidesorter { namespace cache {
 
 /** Each request for a preview creation has a priority.  This enum defines
-    the available priorities.  The special values MIN__CLASS and MAX__CLASS
+    the available priorities.  The special values MIN_CLASS and MAX_CLASS
     are/can be used for validation and have to be kept up-to-date.
 */
 enum RequestPriorityClass
 {
-    MIN__CLASS = 0,
+    MIN_CLASS = 0,
 
     // The slide is visible.  A preview does not yet exist.
-    VISIBLE_NO_PREVIEW = MIN__CLASS,
+    VISIBLE_NO_PREVIEW = MIN_CLASS,
     // The slide is visible.  A preview exists but is not up-to-date anymore.
     VISIBLE_OUTDATED_PREVIEW,
     // The slide is not visible.
     NOT_VISIBLE,
 
-    MAX__CLASS = NOT_VISIBLE
+    MAX_CLASS = NOT_VISIBLE
 };
 
 } } } // end of namespace ::sd::slidesorter::cache
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
index 11ed93f..993aece 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
@@ -103,7 +103,7 @@ void RequestQueue::AddRequest (
 {
     ::osl::MutexGuard aGuard (maMutex);
 
-    OSL_ASSERT(eRequestClass>=MIN__CLASS && eRequestClass<=MAX__CLASS);
+    OSL_ASSERT(eRequestClass>=MIN_CLASS && eRequestClass<=MAX_CLASS);
 
     // If the request is already a member of the queue then remove it so
     // that the following insertion will use the new prioritization.
@@ -174,7 +174,7 @@ void RequestQueue::ChangeClass (
 {
     ::osl::MutexGuard aGuard (maMutex);
 
-    OSL_ASSERT(eNewRequestClass>=MIN__CLASS && eNewRequestClass<=MAX__CLASS);
+    OSL_ASSERT(eNewRequestClass>=MIN_CLASS && eNewRequestClass<=MAX_CLASS);
 
     Container::const_iterator iRequest (
         ::std::find_if (
diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
index 5aaf9c9..c6e8292 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
@@ -71,7 +71,7 @@ public:
         Color_Selection,
         Color_PreviewBorder,
         Color_PageCountFontColor,
-        _ColorType_Size_
+        ColorType_Size_
     };
     ColorData GetColor (const ColorType eType);
 
@@ -83,7 +83,7 @@ public:
         Gradient_MouseOverSelected,
         Gradient_MouseOverSelectedAndFocusedPage,
         Gradient_FocusedPage,
-        _GradientColorType_Size_
+        GradientColorType_Size_
     };
     enum GradientColorClass {
         Border1,
@@ -111,7 +111,7 @@ public:
         Icon_RawInsertShadow,
         Icon_HideSlideOverlay,
         Icon_FocusBorder,
-        _IconType_Size_
+        IconType_Size_
     };
     const BitmapEx& GetIcon (const IconType eType);
 
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index 1ae6f92..eb75e79 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -69,7 +69,7 @@ Theme::Theme (const std::shared_ptr<controller::Properties>& rpProperties)
     {
         LocalResource aResource (RID_SLIDESORTER_ICONS);
 
-        maColor.resize(_ColorType_Size_);
+        maColor.resize(ColorType_Size_);
         maColor[Color_Background] = maBackgroundColor;
         maColor[Color_PageNumberDefault] = 0x0808080;
         maColor[Color_PageNumberHover] = 0x4c4c4c;
@@ -90,7 +90,7 @@ void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties)
 
     maColor[Color_Background] = maBackgroundColor;
 
-    maGradients.resize(_GradientColorType_Size_);
+    maGradients.resize(GradientColorType_Size_);
 
     maColor[Color_Background] = maBackgroundColor;
     const ColorData aSelectionColor (rpProperties->GetSelectionColor().GetColor());
@@ -119,7 +119,7 @@ void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties)
     if (maIcons.empty())
     {
         LocalResource aResource (RID_SLIDESORTER_ICONS);
-        maIcons.resize(_IconType_Size_);
+        maIcons.resize(IconType_Size_);
 
         InitializeIcon(Icon_RawShadow, IMAGE_SHADOW);
         InitializeIcon(Icon_RawInsertShadow, IMAGE_INSERT_SHADOW);
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index a7144e0..48bd6ac 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -720,13 +720,13 @@ sal_Bool SAL_CALL DrawController::isFormDesignMode(  ) throw (uno::RuntimeExcept
     return bIsDesignMode;
 }
 
-void SAL_CALL DrawController::setFormDesignMode( sal_Bool _DesignMode ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL DrawController::setFormDesignMode( sal_Bool DesignMode ) throw (uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
 
     FmFormShell* pFormShell = mpBase->GetFormShellManager()->GetFormShell();
     if ( pFormShell )
-        pFormShell->SetDesignMode( _DesignMode );
+        pFormShell->SetDesignMode( DesignMode );
 }
 
 uno::Reference< awt::XControl > SAL_CALL DrawController::getControl( const uno::Reference< awt::XControlModel >& xModel ) throw (container::NoSuchElementException, uno::RuntimeException, std::exception)
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index b8f0e51..1e8a91c 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -612,7 +612,7 @@ void ToolBarManager::Implementation::ResetToolBars (ToolBarGroup eGroup)
 void ToolBarManager::Implementation::ResetAllToolBars()
 {
     SAL_INFO("sd.view", OSL_THIS_FUNC << ": resetting all tool bars");
-    for (int i=TBG__FIRST; i<=TBG__LAST; ++i)
+    for (int i=TBG_FIRST; i<=TBG_LAST; ++i)
         ResetToolBars((ToolBarGroup)i);
 }
 
@@ -1258,7 +1258,7 @@ bool ToolBarList::RemoveToolBar (
 
 void ToolBarList::MakeRequestedToolBarList (NameList& rRequestedToolBars) const
 {
-    for (int i=sd::ToolBarManager::TBG__FIRST; i<=sd::ToolBarManager::TBG__LAST; ++i)
+    for (int i=sd::ToolBarManager::TBG_FIRST; i<=sd::ToolBarManager::TBG_LAST; ++i)
     {
         ::sd::ToolBarManager::ToolBarGroup eGroup = (::sd::ToolBarManager::ToolBarGroup)i;
         Groups::const_iterator iGroup (maGroups.find(eGroup));
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index ed686ee..ac06fa2 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -129,8 +129,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
             const SfxBoolItem* pBVisible = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEBACK);
             const SfxBoolItem* pBObjsVisible = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEOBJ);
             AutoLayout aLayout ((AutoLayout)pNewAutoLayout->GetValue ());
-            if (aLayout >= AUTOLAYOUT__START
-                && aLayout < AUTOLAYOUT__END)
+            if (aLayout >= AUTOLAYOUT_START
+                && aLayout < AUTOLAYOUT_END)
             {
                 aNewName        = pNewName->GetValue ();
                 aNewAutoLayout = (AutoLayout) pNewAutoLayout->GetValue ();
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index a10aae8..2451701 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -258,7 +258,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
         const SfxBoolItem* pIsPageBack = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEBACK);
         const SfxBoolItem* pIsPageObj = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEOBJ);
 
-        if (CHECK_RANGE (AUTOLAYOUT__START, (AutoLayout) pLayout->GetValue (), AUTOLAYOUT__END))
+        if (CHECK_RANGE (AUTOLAYOUT_START, (AutoLayout) pLayout->GetValue (), AUTOLAYOUT_END))
         {
             if (ePageKind == PK_NOTES)
             {
diff --git a/sd/xml/layoutlist.xml b/sd/xml/layoutlist.xml
index c5f8d5e..c458b11 100644
--- a/sd/xml/layoutlist.xml
+++ b/sd/xml/layoutlist.xml
@@ -49,7 +49,7 @@
         <presobj kind="PRESOBJ_OUTLINE5" relative-height="0.477" relative-width="0.322" relative-posX="1.05" relative-posY="1.095"/>
         <presobj kind="PRESOBJ_OUTLINE6" relative-height="0.477" relative-width="0.322" relative-posX="0" relative-posY="1.095"/>
     </layout>
-    <layout type="AUTOLAYOUT__START">
+    <layout type="AUTOLAYOUT_START">
         <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
         <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
diff --git a/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml b/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
index c5f8d5e..c458b11 100644
--- a/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
+++ b/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
@@ -49,7 +49,7 @@
         <presobj kind="PRESOBJ_OUTLINE5" relative-height="0.477" relative-width="0.322" relative-posX="1.05" relative-posY="1.095"/>
         <presobj kind="PRESOBJ_OUTLINE6" relative-height="0.477" relative-width="0.322" relative-posX="0" relative-posY="1.095"/>
     </layout>
-    <layout type="AUTOLAYOUT__START">
+    <layout type="AUTOLAYOUT_START">
         <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
         <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>


More information about the Libreoffice-commits mailing list