[Libreoffice-commits] core.git: 2 commits - sw/source vcl/inc
Lei De Bin
leidb at apache.org
Fri Apr 12 06:46:34 PDT 2013
sw/source/filter/ww8/ww8atr.cxx | 8 ++++++++
vcl/inc/vcl/layout.hxx | 23 ++++++++++++++---------
2 files changed, 22 insertions(+), 9 deletions(-)
New commits:
commit 1799937b9ec2584c6e6c783ede5f22d72a1f44f9
Author: Lei De Bin <leidb at apache.org>
Date: Wed Jul 4 05:35:24 2012 +0000
Resolves: #i119632# Macro button lost if save template to .doc file
Add export MACROBUTTON field codes in AttributeOutputBase::TextField
Found by: yan ji
Patch by: Lei De Bin
Review by: Chen Zuo Jun(cherry picked from commit b51d354f043d19c1a8f22e1cfff6d0b43eb62b5e)
Conflicts:
sw/source/filter/ww8/ww8atr.cxx
Change-Id: I419ce091bb676aecfe8b53660549da40eec6057f
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index b212337..2f93faf 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2948,6 +2948,14 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
case RES_JUMPEDITFLD:
bWriteExpand = PlaceholderField( pFld );
break;
+ case RES_MACROFLD:
+ sStr.AssignAscii(" MACROBUTTON");
+ sStr += pFld->GetPar1();
+ sStr.SearchAndReplaceAscii("StarOffice.Standard.Modul1.", String(' '));
+ sStr += String(' ');
+ sStr += lcl_GetExpandedField(*pFld);
+ GetExport().OutputField( pFld, ww::eMACROBUTTON, sStr );
+ break;
default:
bWriteExpand = true;
break;
commit f1bdd56b4f983282619a4c1fdc4222f25215ca46
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 12 14:42:24 2013 +0100
document VclContainer a bit
Change-Id: Ib00a0ab1c2e382547041137c11f8955140b8113d
diff --git a/vcl/inc/vcl/layout.hxx b/vcl/inc/vcl/layout.hxx
index cd06ae6..c6b6a12 100644
--- a/vcl/inc/vcl/layout.hxx
+++ b/vcl/inc/vcl/layout.hxx
@@ -21,15 +21,6 @@ class VCL_DLLPUBLIC VclContainer : public Window
{
public:
VclContainer(Window *pParent, WinBits nStyle = WB_HIDE);
- virtual Size GetOptimalSize() const;
- virtual void SetPosSizePixel(const Point& rNewPos, const Size& rNewSize);
- virtual void SetPosPixel(const Point& rAllocPos);
- virtual void SetSizePixel(const Size& rAllocation);
-
- void markLayoutDirty()
- {
- m_bLayoutDirty = true;
- }
//These take into account the external margins of the rWindow widget
//while GetOptimalSize/get_preferred_size and SetPosSizePixel are
@@ -41,10 +32,24 @@ public:
//the rWindows alignment desires within that allocation
static void setLayoutAllocation(Window &rWindow, const Point &rPos, const Size &rSize);
+ void markLayoutDirty()
+ {
+ m_bLayoutDirty = true;
+ }
protected:
+ //these are the two that need to be implemented by
+ //containers, figure out how much space you want...
virtual Size calculateRequisition() const = 0;
+ //..and decide what to do when set to this size
virtual void setAllocation(const Size &rAllocation) = 0;
+
virtual sal_uInt16 getDefaultAccessibleRole() const;
+public:
+ //you don't want to override these
+ virtual Size GetOptimalSize() const;
+ virtual void SetPosSizePixel(const Point& rNewPos, const Size& rNewSize);
+ virtual void SetPosPixel(const Point& rAllocPos);
+ virtual void SetSizePixel(const Size& rAllocation);
private:
bool m_bLayoutDirty;
};
More information about the Libreoffice-commits
mailing list