dev/null |binary icon-themes/galaxy/vcl/res/index.png |binary icon-themes/hicontrast/vcl/res/index.png |binary icon-themes/human/vcl/res/collate.png |binary icon-themes/human/vcl/res/index.png |binary icon-themes/human/vcl/res/ncollate.png |binary icon-themes/industrial/vcl/res/index.png |binary icon-themes/oxygen/vcl/res/collate.png |binary icon-themes/oxygen/vcl/res/index.png |binary icon-themes/oxygen/vcl/res/ncollate.png |binary vcl/inc/svids.hrc | 1 vcl/inc/vcl/window.hxx | 77 ++++++------------------------- vcl/inc/window.h | 3 - vcl/source/src/images.src | 5 ++ vcl/source/window/builder.cxx | 22 ++++++++ vcl/source/window/layout.cxx | 1 vcl/source/window/window.cxx | 1 vcl/source/window/window2.cxx | 13 +++++ 18 files changed, 61 insertions(+), 62 deletions(-)
New commits: commit ca6aa93fd448203a08b65b8b2c2db762f991d4d5 Author: Caolán McNamara <[email protected]> Date: Sat Oct 20 12:57:22 2012 +0100 add infrastructure for secondary button groups Change-Id: I5fd1bbc31a0259e92f6eb23beef5d3c77b74eed8 diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index 5b83760..54a9ba9 100644 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -1119,67 +1119,41 @@ public: Size get_preferred_size() const; /* - * Gets the value of the "halign" property. + * How to horizontally align this widget */ VclAlign get_halign() const; - - /* - * Sets the horizontal alignment of widget. See the "halign" property. - */ void set_halign(VclAlign eAlign); /* - * Gets the value of the "valign" property. + * How to vertically align this widget */ VclAlign get_valign() const; - - /* - * Sets the horizontal alignment of widget. See the "valign" property. - */ void set_valign(VclAlign eAlign); /* - * Gets whether the widget would like to use any available extra horizontal + * Whether the widget would like to use any available extra horizontal * space. */ bool get_hexpand() const; - - /* - * Sets whether the widget would like to use any available extra horizontal - * space. - */ void set_hexpand(bool bExpand); /* - * Gets whether the widget would like to use any available extra vertical + * Whether the widget would like to use any available extra vertical * space. */ bool get_vexpand() const; - - /* - * Sets whether the widget would like to use any available extra vertical - * space. - */ void set_vexpand(bool bExpand); /* - * Gets whether the widget would like to use any available extra space. + * Whether the widget would like to use any available extra space. */ bool get_expand() const; - - /* - * Sets whether the widget would like to use any available extra space. - */ void set_expand(bool bExpand); /* - * Gets whether the widget should receive extra space when the parent grows + * Whether the widget should receive extra space when the parent grows */ bool get_fill() const; - - /* - * Sets whether the widget should receive extra space when the parent grows - */ void set_fill(bool bFill); void set_border_width(sal_Int32 nBorderWidth); @@ -1198,64 +1172,47 @@ public: sal_Int32 get_margin_bottom() const; /* - * Gets how the widget is packed with reference to the start or end of the parent + * How the widget is packed with reference to the start or end of the parent */ VclPackType get_pack_type() const; - - /* - * Sets how the widget is packed with reference to the start or end of the parent - */ void set_pack_type(VclPackType ePackType); /* - * Sets extra space to put between the widget and its neighbors + * The extra space to put between the widget and its neighbors */ sal_Int32 get_padding() const; - - /* - * Sets extra space to put between the widget and its neighbors - */ void set_padding(sal_Int32 nPadding); /* - * Gets the number of columns that the widget spans + * The number of columns that the widget spans */ sal_Int32 get_grid_width() const; - - /* - * Sets the number of columns that the widget spans - */ void set_grid_width(sal_Int32 nCols); /* - * Gets the column number to attach the left side of the widget to + * The column number to attach the left side of the widget to */ sal_Int32 get_grid_left_attach() const; - - /* - * Sets the column number to attach the left side of the widget to - */ void set_grid_left_attach(sal_Int32 nAttach); /* - * Gets the number of row that the widget spans + * The number of row that the widget spans */ sal_Int32 get_grid_height() const; - - /* - * Sets the number of row that the widget spans - */ void set_grid_height(sal_Int32 nRows); /* - * Gets the row number to attach the top side of the widget to + * The row number to attach the top side of the widget to */ sal_Int32 get_grid_top_attach() const; + void set_grid_top_attach(sal_Int32 nAttach); /* - * Sets the row number to attach the top side of the widget to + * If true this child appears in a secondary layout group of children + * e.g. help buttons in a buttonbox */ - void set_grid_top_attach(sal_Int32 nAttach); + bool get_secondary() const; + void set_secondary(bool bSecondary); /* * Sets a widget property diff --git a/vcl/inc/window.h b/vcl/inc/window.h index cb48d04..7f16bba 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -403,7 +403,8 @@ public: mbHexpand:1, mbVexpand:1, mbExpand:1, - mbFill:1; + mbFill:1, + mbSecondary:1; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; }; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 20a2b71..bf14656 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1460,6 +1460,10 @@ void VclBuilder::applyPackingProperty(Window *pCurrent, { set_window_packing_position(pCurrent, sValue.toInt32()); } + else if (sKey == "secondary") + { + pCurrent->set_secondary(toBool(sValue)); + } else { SAL_WARN("vcl.layout", "unknown packing: " << sKey.getStr()); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 8336a08..e2a594b 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -255,6 +255,7 @@ Size VclButtonBox::calculateRequisition() const { if (!pChild->IsVisible()) continue; + SAL_WARN_IF(pChild->get_secondary(), "vcl.layout", "secondary groups not implemented yet"); ++nVisibleChildren; Size aChildSize = getLayoutRequisition(*pChild); if (aChildSize.Width() > aSize.Width()) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 9efcedf..b154eab 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -726,6 +726,7 @@ void Window::ImplInitWindowData( WindowType nType ) mpWindowImpl->mbVexpand = false; mpWindowImpl->mbExpand = false; mpWindowImpl->mbFill = true; + mpWindowImpl->mbSecondary = false; mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // sal_True: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 4c0b330..ba04bb6 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1925,6 +1925,7 @@ void Window::take_properties(Window &rOther) mpWindowImpl->mbVexpand = pWindowImpl->mbVexpand; mpWindowImpl->mbExpand = pWindowImpl->mbExpand; mpWindowImpl->mbFill = pWindowImpl->mbFill; + mpWindowImpl->mbSecondary = pWindowImpl->mbSecondary; bool bHasBorderWindow = mpWindowImpl->mpBorderWindow; bool bOtherHasBorderWindow = pWindowImpl->mpBorderWindow; @@ -2321,4 +2322,16 @@ sal_Int32 Window::get_width_request() const return pWindowImpl->mnWidthRequest; } +bool Window::get_secondary() const +{ + WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; + return pWindowImpl->mbSecondary; +} + +void Window::set_secondary(bool bSecondary) +{ + WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; + pWindowImpl->mbSecondary = bSecondary; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 324e116a2e454526891b674da58d07061406f868 Author: Caolán McNamara <[email protected]> Date: Sat Oct 20 12:37:42 2012 +0100 add a stock index image to vcl, ala gtk-index Change-Id: I96cd80f14d557752c19b88bb2c99298d7c3e3e0b diff --git a/icon-themes/galaxy/vcl/res/index.png b/icon-themes/galaxy/vcl/res/index.png new file mode 100644 index 0000000..eee0edf Binary files /dev/null and b/icon-themes/galaxy/vcl/res/index.png differ diff --git a/icon-themes/hicontrast/vcl/res/index.png b/icon-themes/hicontrast/vcl/res/index.png new file mode 100644 index 0000000..4392542 Binary files /dev/null and b/icon-themes/hicontrast/vcl/res/index.png differ diff --git a/icon-themes/human/vcl/res/index.png b/icon-themes/human/vcl/res/index.png new file mode 100644 index 0000000..d41d81a Binary files /dev/null and b/icon-themes/human/vcl/res/index.png differ diff --git a/icon-themes/industrial/vcl/res/index.png b/icon-themes/industrial/vcl/res/index.png new file mode 100644 index 0000000..d41d81a Binary files /dev/null and b/icon-themes/industrial/vcl/res/index.png differ diff --git a/icon-themes/oxygen/vcl/res/index.png b/icon-themes/oxygen/vcl/res/index.png new file mode 100644 index 0000000..d41d81a Binary files /dev/null and b/icon-themes/oxygen/vcl/res/index.png differ diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc index e0a64f6..5abe5bd 100644 --- a/vcl/inc/svids.hrc +++ b/vcl/inc/svids.hrc @@ -41,6 +41,7 @@ #define SV_RESID_BITMAP_SCROLLMSK 1050 #define SV_RESID_BITMAP_SCROLLBMP 1051 #define SV_RESID_BITMAP_CLOSEDOC 1052 +#define SV_RESID_BITMAP_INDEX 1053 #define SV_DISCLOSURE_PLUS 1060 #define SV_DISCLOSURE_MINUS 1061 diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src index f0b58f4..061f59c 100644 --- a/vcl/source/src/images.src +++ b/vcl/source/src/images.src @@ -77,6 +77,11 @@ Bitmap SV_RESID_BITMAP_CLOSEDOC File = "closedoc.png"; }; +Bitmap SV_RESID_BITMAP_INDEX +{ + File = "index.png"; +}; + Bitmap SV_RESID_BITMAP_SPLITHPIN { File = "splhpin.png"; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 735bde1..20a2b71 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -33,6 +33,14 @@ namespace { + sal_uInt16 mapStockToImageResource(OString sType) + { + sal_uInt16 nRet = 0; + if (sType == "gtk-index") + nRet = SV_RESID_BITMAP_INDEX; + return nRet; + } + SymbolType mapStockToSymbol(OString sType) { SymbolType eRet = SYMBOL_NOSYMBOL; @@ -54,6 +62,8 @@ namespace eRet = SYMBOL_HELP; else if (sType == "gtk-close") eRet = SYMBOL_CLOSE; + else if (mapStockToImageResource(sType)) + eRet = SYMBOL_IMAGE; return eRet; } } @@ -168,13 +178,19 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri PushButton *pTarget = get<PushButton>(aI->m_sID); FixedImage *pImage = get<FixedImage>(aI->m_sValue); aImagesToBeRemoved.insert(aI->m_sValue); - SymbolType eType = mapStockToSymbol(m_pParserState->m_aStockMap[aI->m_sValue]); + const OString &rImage = m_pParserState->m_aStockMap[aI->m_sValue]; + SymbolType eType = mapStockToSymbol(rImage); SAL_WARN_IF(!pTarget || !pImage || eType == SYMBOL_NOSYMBOL, "vcl", "missing elements of button/image/stock"); + if (!pTarget || eType == SYMBOL_NOSYMBOL) + continue; + //to-do, situation where image isn't a stock image if (pTarget && eType != SYMBOL_NOSYMBOL) { pTarget->SetSymbol(eType); + if (eType == SYMBOL_IMAGE) + pTarget->SetModeImage(VclResId(mapStockToImageResource(rImage))); } } commit c578c327ed9b7f71959b9f300ead479224c5c15c Author: Caolán McNamara <[email protected]> Date: Sat Oct 20 12:21:17 2012 +0100 Only vcl has collate/ncollate now so remove the svtools ones where there are duplicates, move the svtools one to vcl when the vcl one is missing Change-Id: I9e7f77c3088be48bfcbed81e02ff71fa7aeba0d8 diff --git a/icon-themes/galaxy/svtools/res/collate.png b/icon-themes/galaxy/svtools/res/collate.png deleted file mode 100644 index b664152..0000000 Binary files a/icon-themes/galaxy/svtools/res/collate.png and /dev/null differ diff --git a/icon-themes/galaxy/svtools/res/ncollate.png b/icon-themes/galaxy/svtools/res/ncollate.png deleted file mode 100644 index d399afb..0000000 Binary files a/icon-themes/galaxy/svtools/res/ncollate.png and /dev/null differ diff --git a/icon-themes/hicontrast/svtools/res/collate.png b/icon-themes/hicontrast/svtools/res/collate.png deleted file mode 100644 index 38353b7..0000000 Binary files a/icon-themes/hicontrast/svtools/res/collate.png and /dev/null differ diff --git a/icon-themes/hicontrast/svtools/res/ncollate.png b/icon-themes/hicontrast/svtools/res/ncollate.png deleted file mode 100644 index 91e066b..0000000 Binary files a/icon-themes/hicontrast/svtools/res/ncollate.png and /dev/null differ diff --git a/icon-themes/hicontrast/vcl/source/src/collate.png b/icon-themes/hicontrast/vcl/source/src/collate.png deleted file mode 100644 index 407e56c..0000000 Binary files a/icon-themes/hicontrast/vcl/source/src/collate.png and /dev/null differ diff --git a/icon-themes/hicontrast/vcl/source/src/ncollate.png b/icon-themes/hicontrast/vcl/source/src/ncollate.png deleted file mode 100644 index 10ba6bc..0000000 Binary files a/icon-themes/hicontrast/vcl/source/src/ncollate.png and /dev/null differ diff --git a/icon-themes/human/svtools/res/collate.png b/icon-themes/human/svtools/res/collate.png deleted file mode 100644 index 34b5d23..0000000 Binary files a/icon-themes/human/svtools/res/collate.png and /dev/null differ diff --git a/icon-themes/human/svtools/res/ncollate.png b/icon-themes/human/svtools/res/ncollate.png deleted file mode 100644 index 3e1f14b..0000000 Binary files a/icon-themes/human/svtools/res/ncollate.png and /dev/null differ diff --git a/icon-themes/human/vcl/res/collate.png b/icon-themes/human/vcl/res/collate.png new file mode 100644 index 0000000..34b5d23 Binary files /dev/null and b/icon-themes/human/vcl/res/collate.png differ diff --git a/icon-themes/human/vcl/res/ncollate.png b/icon-themes/human/vcl/res/ncollate.png new file mode 100644 index 0000000..3e1f14b Binary files /dev/null and b/icon-themes/human/vcl/res/ncollate.png differ diff --git a/icon-themes/oxygen/svtools/res/collate.png b/icon-themes/oxygen/svtools/res/collate.png deleted file mode 100644 index edbd5ea..0000000 Binary files a/icon-themes/oxygen/svtools/res/collate.png and /dev/null differ diff --git a/icon-themes/oxygen/svtools/res/ncollate.png b/icon-themes/oxygen/svtools/res/ncollate.png deleted file mode 100644 index a927de8..0000000 Binary files a/icon-themes/oxygen/svtools/res/ncollate.png and /dev/null differ diff --git a/icon-themes/oxygen/vcl/res/collate.png b/icon-themes/oxygen/vcl/res/collate.png new file mode 100644 index 0000000..edbd5ea Binary files /dev/null and b/icon-themes/oxygen/vcl/res/collate.png differ diff --git a/icon-themes/oxygen/vcl/res/ncollate.png b/icon-themes/oxygen/vcl/res/ncollate.png new file mode 100644 index 0000000..a927de8 Binary files /dev/null and b/icon-themes/oxygen/vcl/res/ncollate.png differ
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
