diff options
-rw-r--r-- | basctl/source/basicide/objdlg.cxx | 33 | ||||
-rw-r--r-- | basctl/source/inc/objdlg.hxx | 39 | ||||
-rw-r--r-- | solenv/clang-format/blacklist | 2 |
3 files changed, 34 insertions, 40 deletions
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx index 34846e67e1fa..89bbafced4d0 100644 --- a/basctl/source/basicide/objdlg.cxx +++ b/basctl/source/basicide/objdlg.cxx @@ -27,8 +27,7 @@ namespace basctl { - -ObjectCatalog::ObjectCatalog (vcl::Window* pParent) +ObjectCatalog::ObjectCatalog(vcl::Window* pParent) : DockingWindow(pParent) , aTitle(VclPtr<FixedText>::Create(this)) , aTree(VclPtr<TreeListBox>::Create(this, WB_TABSTOP)) @@ -42,11 +41,8 @@ ObjectCatalog::ObjectCatalog (vcl::Window* pParent) // tree list aTree->Hide(); - aTree->SetStyle( - WB_BORDER | WB_TABSTOP | WB_HSCROLL | - WB_HASLINES | WB_HASLINESATROOT | - WB_HASBUTTONS | WB_HASBUTTONSATROOT - ); + aTree->SetStyle(WB_BORDER | WB_TABSTOP | WB_HSCROLL | WB_HASLINES | WB_HASLINESATROOT + | WB_HASBUTTONS | WB_HASBUTTONSATROOT); aTree->SetAccessibleName(IDEResId(RID_STR_TLB_MACROS)); aTree->SetHelpId(HID_BASICIDE_OBJECTCAT); aTree->ScanAllEntries(); @@ -58,8 +54,8 @@ ObjectCatalog::ObjectCatalog (vcl::Window* pParent) Point aPos = rParent.OutputToScreenPixel(Point(0, 0)); Size const aParentSize = rParent.GetSizePixel(); Size const aSize = GetSizePixel(); - aPos.AdjustX((aParentSize.Width() - aSize.Width()) / 2 ); - aPos.AdjustY((aParentSize.Height() - aSize.Height()) / 2 ); + aPos.AdjustX((aParentSize.Width() - aSize.Width()) / 2); + aPos.AdjustY((aParentSize.Height() - aSize.Height()) / 2); SetPosPixel(aPos); } @@ -67,10 +63,7 @@ ObjectCatalog::ObjectCatalog (vcl::Window* pParent) GetParent()->GetSystemWindow()->GetTaskPaneList()->AddWindow(this); } -ObjectCatalog::~ObjectCatalog() -{ - disposeOnce(); -} +ObjectCatalog::~ObjectCatalog() { disposeOnce(); } void ObjectCatalog::dispose() { @@ -82,14 +75,14 @@ void ObjectCatalog::dispose() } // Resize() -- called by Window -void ObjectCatalog::Resize () +void ObjectCatalog::Resize() { // arranging the controls ArrangeWindows(); } // ToggleFloatingMode() -- called by DockingWindow when IsFloatingMode() changes -void ObjectCatalog::ToggleFloatingMode () +void ObjectCatalog::ToggleFloatingMode() { // base class version DockingWindow::ToggleFloatingMode(); @@ -113,7 +106,7 @@ void ObjectCatalog::ArrangeWindows() else { Size aTitleSize = LogicToPixel(Size(3, 10), MapMode(MapUnit::MapAppFont)); - aTitleSize.setWidth( aSize.Width() - 2*aTitleSize.Width() ); + aTitleSize.setWidth(aSize.Width() - 2 * aTitleSize.Width()); aTitle->SetPosPixel(LogicToPixel(Point(3, 3), MapMode(MapUnit::MapAppFont))); aTitle->SetSizePixel(aTitleSize); aTitle->Show(); @@ -122,10 +115,7 @@ void ObjectCatalog::ArrangeWindows() // tree Point const aTreePos = LogicToPixel(Point(3, bFloating ? 3 : 16), MapMode(MapUnit::MapAppFont)); long const nMargin = aTreePos.X(); - Size const aTreeSize( - aSize.Width() - 2*nMargin, - aSize.Height() - aTreePos.Y() - nMargin - ); + Size const aTreeSize(aSize.Width() - 2 * nMargin, aSize.Height() - aTreePos.Y() - nMargin); if (aTreeSize.Height() > 0) { aTree->SetPosSizePixel(aTreePos, aTreeSize); @@ -135,7 +125,7 @@ void ObjectCatalog::ArrangeWindows() aTree->Hide(); } -void ObjectCatalog::SetCurrentEntry (BaseWindow* pCurWin) +void ObjectCatalog::SetCurrentEntry(BaseWindow* pCurWin) { EntryDescriptor aDescriptor; if (pCurWin) @@ -143,7 +133,6 @@ void ObjectCatalog::SetCurrentEntry (BaseWindow* pCurWin) aTree->SetCurrentEntry(aDescriptor); } - } // namespace basctl /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/inc/objdlg.hxx b/basctl/source/inc/objdlg.hxx index 670cb52ec5d2..fbe37f249306 100644 --- a/basctl/source/inc/objdlg.hxx +++ b/basctl/source/inc/objdlg.hxx @@ -27,31 +27,38 @@ namespace basctl { - - -// ObjectCatalog -- a docking window that contains the currently loaded macros -// in a tree structure. - +/*! + * @brief A docking window that contains a tree of the currently loaded macros + * + * The class creates Object Catalog window with the currently loaded macros + * in a tree structure which allows user to quickly select the necessary + * macro in BasicIDE. + */ class ObjectCatalog : public DockingWindow { public: explicit ObjectCatalog(vcl::Window* pParent); virtual ~ObjectCatalog() override; virtual void dispose() override; -public: - void UpdateEntries () { aTree->UpdateEntries(); } - void SetCurrentEntry (BaseWindow* pCurWin); -private: - // title: "Object Catalog" - VclPtr<FixedText> aTitle; - // the tree-list of the objects - VclPtr<TreeListBox> aTree; + /// Update the entries of Object Catalog Treelist + void UpdateEntries() { aTree->UpdateEntries(); } + void SetCurrentEntry(BaseWindow* pCurWin); private: - virtual void Resize () override; // Window - virtual void ToggleFloatingMode () override; // DockingWindow - void ArrangeWindows (); + VclPtr<FixedText> aTitle; ///< Title of the Object Catalog window + VclPtr<TreeListBox> aTree; ///< The Treelist of the objects in window + + /// Function is called by Window. Use only for arranging the controls. + virtual void Resize() override; + /*! + * Function for resize by DockingWindow. + * It is called by DockingWindow when IsFloatingMode() changes. + */ + virtual void ToggleFloatingMode() override; + + /// Uses by Resize() and ToggleFloatingMode() functions for resizing + void ArrangeWindows(); }; } // namespace basctl diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index d0e0cc780461..9b4f7770921d 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -284,7 +284,6 @@ basctl/source/basicide/macrodlg.hxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/moduldlg.hxx -basctl/source/basicide/objdlg.cxx basctl/source/basicide/register.cxx basctl/source/basicide/sbxitem.cxx basctl/source/basicide/scriptdocument.cxx @@ -325,7 +324,6 @@ basctl/source/inc/iderid.hxx basctl/source/inc/layout.hxx basctl/source/inc/localizationmgr.hxx basctl/source/inc/managelang.hxx -basctl/source/inc/objdlg.hxx basctl/source/inc/propbrw.hxx basctl/source/inc/sbxitem.hxx basctl/source/inc/scriptdocument.hxx |