summaryrefslogtreecommitdiffstats
path: root/basctl
diff options
context:
space:
mode:
authortagezi <lera.goncharuk@gmail.com>2018-11-28 12:35:05 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-29 13:28:01 +0100
commit0631c5da4257a657f923663bda851cf8bb3a8507 (patch)
tree9be9d711563955c13c05f60ed178947e00c48d23 /basctl
parenttdf#42949 Fix IWYU warnings in include/vcl/[i-m]* (diff)
downloadcore-0631c5da4257a657f923663bda851cf8bb3a8507.tar.gz
core-0631c5da4257a657f923663bda851cf8bb3a8507.zip
Reformat and documentation of ObjectCatalog
This improves the Doxygen-generated documentation for the class at https://docs.libreoffice.org. Also remove objdlg.cxx and objdlg.hxx files from clang-format blacklist. Change-Id: I2299e225892a4d5db638a519bdab51a5d0c72c4d Reviewed-on: https://gerrit.libreoffice.org/63610 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/objdlg.cxx33
-rw-r--r--basctl/source/inc/objdlg.hxx39
2 files changed, 34 insertions, 38 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