[Libreoffice-commits] core.git: 4 commits - include/sfx2 sfx2/source

2017-03-19 Thread Matteo Casalin
 include/sfx2/docfac.hxx   |2 
 sfx2/source/view/viewfrm.cxx  |   88 --
 sfx2/source/view/viewfrm2.cxx |   12 +
 3 files changed, 32 insertions(+), 70 deletions(-)

New commits:
commit 7a2f07c4bd5d26657593044dd441ba5fd168e5de
Author: Matteo Casalin 
Date:   Sun Mar 19 17:05:49 2017 +0100

Use just geParameter instead of hasParameter + getParameter

getParameter returns and empty string if the key is not found,
so we can just avoid searching twice for the same key.

Change-Id: Ic48debce05fe94d8e087b64bde5a589e54bfb616

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index bd29aaf003f3..a16fda352944 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2416,9 +2416,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const 
OUString& sMacro )
 aMacroName = aName.getToken( 0, cTok, nIndex );
 
 // get location
-OUString aLocKey("location");
-if ( xUrl->hasParameter( aLocKey ) )
-aLocation = xUrl->getParameter( aLocKey );
+aLocation = xUrl->getParameter( "location" );
 }
 
 BasicManager* pBasMgr = nullptr;
commit e256519a629e88c624c52916f1c38f774cfd445c
Author: Matteo Casalin 
Date:   Sun Mar 19 12:06:20 2017 +0100

OUString-related simplifications

Change-Id: I2f4099410bcdb9e04583cd37bf63ef86ce81f7e5

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 384af9dfe478..bd29aaf003f3 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -239,7 +239,7 @@ static bool AskPasswordToModify_Impl( const uno::Reference< 
task::XInteractionHa
 else
 {
 // the binary format
-bResult = ( SfxMedium::CreatePasswordToModifyHash( 
pPasswordRequest->getPasswordToModify(), OUString( 
"com.sun.star.text.TextDocument"  ).equals( pFilter->GetServiceName() ) ) == 
nPasswordHash );
+bResult = ( SfxMedium::CreatePasswordToModifyHash( 
pPasswordRequest->getPasswordToModify(), 
pFilter->GetServiceName()=="com.sun.star.text.TextDocument" ) == nPasswordHash 
);
 }
 }
 else
@@ -718,7 +718,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 {
 SfxAllItemSet aSet( pApp->GetPool() );
 aSet.Put( SfxStringItem( SID_FILE_NAME, 
pMedium->GetName() ) );
-aSet.Put( SfxStringItem( SID_TARGETNAME, 
OUString("_blank") ) );
+aSet.Put( SfxStringItem( SID_TARGETNAME, "_blank" 
) );
 if ( pSavedOptions )
 aSet.Put( *pSavedOptions );
 if ( pSavedReferer )
@@ -924,30 +924,18 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
 rSet.DisableItem( SID_CLEARHISTORY );
 
 if ( pShUndoMgr && pShUndoMgr->GetUndoActionCount() )
-{
-OUString aTmp(SvtResId(STR_UNDO).toString());
-aTmp+= pShUndoMgr->GetUndoActionComment();
-rSet.Put( SfxStringItem( SID_UNDO, aTmp ) );
-}
+rSet.Put( SfxStringItem( SID_UNDO, 
SvtResId(STR_UNDO).toString()+pShUndoMgr->GetUndoActionComment() ) );
 else
 rSet.DisableItem( SID_UNDO );
 
 if ( pShUndoMgr && pShUndoMgr->GetRedoActionCount() )
-{
-OUString aTmp(SvtResId(STR_REDO).toString());
-aTmp += pShUndoMgr->GetRedoActionComment();
-rSet.Put( SfxStringItem( SID_REDO, aTmp ) );
-}
+rSet.Put( SfxStringItem( SID_REDO, 
SvtResId(STR_REDO).toString()+pShUndoMgr->GetRedoActionComment() ) );
 else
 rSet.DisableItem( SID_REDO );
+
 SfxRepeatTarget *pTarget = pSh->GetRepeatTarget();
-if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() &&
- pShUndoMgr->CanRepeat(*pTarget) )
-{
-OUString aTmp(SvtResId(STR_REPEAT).toString());
-aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget);
-rSet.Put( SfxStringItem( SID_REPEAT, aTmp ) );
-}
+if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() && 
pShUndoMgr->CanRepeat(*pTarget) )
+rSet.Put( SfxStringItem( SID_REPEAT, 
SvtResId(STR_REPEAT).toString()+pShUndoMgr->GetRepeatActionComment(*pTarget) ) 
);
 else
 rSet.DisableItem( SID_REPEAT );
 }
@@ -1171,7 +1159,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint )
 
 SignatureState nSignatureState = 
GetObjectShell()->GetDocumentSignatureState();
 InfoBarType aInfoBarType(InfoBarType::Info);
-OUString sMessage("");
+OUString sMessage;
 
 switch (nSignatureState)
 {
@@ -2370,9 +2358,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, 
sal_Int32 nLines, bool bEra
 else

[Libreoffice-commits] core.git: 4 commits - include/sfx2 sfx2/source svtools/source

2016-10-07 Thread Caolán McNamara
 include/sfx2/sidebar/Sidebar.hrc  |   60 -
 include/sfx2/sidebar/SidebarResource.hxx  |   35 -
 sfx2/source/sidebar/DeckTitleBar.cxx  |2 
 sfx2/source/sidebar/PanelTitleBar.cxx |2 
 sfx2/source/sidebar/Sidebar.hrc   |   60 +
 sfx2/source/sidebar/Sidebar.src   |   29 +++---
 sfx2/source/sidebar/SidebarController.cxx |   10 +---
 sfx2/source/sidebar/TabBar.cxx|2 
 sfx2/source/sidebar/Theme.cxx |3 -
 svtools/source/svhtml/htmlout.cxx |   61 +-
 10 files changed, 110 insertions(+), 154 deletions(-)

New commits:
commit 6a64d97ea118c3252ce21a157368a3a15f1607f5
Author: Caolán McNamara 
Date:   Fri Oct 7 10:22:05 2016 +0100

we don't need the code, but we need the images in the src file

apparently so they can be found at postprocess time and
inserted into the image zips for the use of the pngs by
other consumers

Change-Id: Ib45834da69462109fdf7502176a6f4721057d980

diff --git a/include/sfx2/sidebar/SidebarResource.hxx 
b/include/sfx2/sidebar/SidebarResource.hxx
deleted file mode 100644
index 78ce96b..000
--- a/include/sfx2/sidebar/SidebarResource.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SFX2_SOURCE_SIDEBAR_SIDEBARRESOURCE_HXX
-#define INCLUDED_SFX2_SOURCE_SIDEBAR_SIDEBARRESOURCE_HXX
-
-#include 
-#include 
-#include 
-
-class SidebarResource : public Resource
-{
-public:
-SidebarResource() : Resource(SfxResId(RID_SIDEBAR_RESOURCE)){}
-~SidebarResource() { FreeResource(); }
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx 
b/sfx2/source/sidebar/DeckTitleBar.cxx
index 22ddec1..29067d1 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -21,7 +21,7 @@
 #include 
 #include 
 
-#include 
+#include "Sidebar.hrc"
 
 #include 
 
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx 
b/sfx2/source/sidebar/PanelTitleBar.cxx
index 7a16f33..d13dc74 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -20,7 +20,7 @@
 #include 
 #include 
 
-#include 
+#include "Sidebar.hrc"
 
 #include 
 #include 
diff --git a/include/sfx2/sidebar/Sidebar.hrc b/sfx2/source/sidebar/Sidebar.hrc
similarity index 84%
rename from include/sfx2/sidebar/Sidebar.hrc
rename to sfx2/source/sidebar/Sidebar.hrc
index 96597cf..79d5a81 100644
--- a/include/sfx2/sidebar/Sidebar.hrc
+++ b/sfx2/source/sidebar/Sidebar.hrc
@@ -49,12 +49,12 @@
 #define IMAGE_SIDEBAR_DECK_TRANSITION_SMALL 122
 #define IMAGE_SIDEBAR_DECK_FUNCTIONS_LARGE  130
 #define IMAGE_SIDEBAR_DECK_FUNCTIONS_SMALL  132
-#define STRING_CUSTOMIZATION200
-#define STRING_RESTORE  201
-#define STRING_HIDE_SIDEBAR 202
 
-#define SFX_STR_SIDEBAR_MORE_OPTIONS(RID_SFX_SIDEBAR_START +  
1)
-#define SFX_STR_SIDEBAR_CLOSE_DECK  (RID_SFX_SIDEBAR_START +  
2)
-#define SFX_STR_SIDEBAR_SETTINGS(RID_SFX_SIDEBAR_START +  
3)
+#define SFX_STR_SIDEBAR_MORE_OPTIONS(RID_SFX_SIDEBAR_START + 1)
+#define SFX_STR_SIDEBAR_CLOSE_DECK  (RID_SFX_SIDEBAR_START + 2)
+#define SFX_STR_SIDEBAR_SETTINGS(RID_SFX_SIDEBAR_START + 3)
+#define SFX_STR_SIDEBAR_CUSTOMIZATION   (RID_SFX_SIDEBAR_START + 4)
+#define SFX_STR_SIDEBAR_RESTORE (RID_SFX_SIDEBAR_START + 5)
+#define SFX_STR_SIDEBAR_HIDE_SIDEBAR(RID_SFX_SIDEBAR_START + 6)
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/Sidebar.src b/sfx2/source/sidebar/Sidebar.src
index 2320307..9179a2f 100644
--- a/sfx2/source/sidebar/Sidebar.src
+++ b/sfx2/source/sidebar/Sidebar.src
@@ -16,7 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#include 
+#include "Sideba

[Libreoffice-commits] core.git: 4 commits - include/sfx2 sfx2/source sw/source

2016-02-24 Thread Miklos Vajna
 include/sfx2/classificationhelper.hxx |6 
 sfx2/source/view/classificationhelper.cxx |   37 +++-
 sw/source/core/edit/edfcol.cxx|  246 +++---
 3 files changed, 263 insertions(+), 26 deletions(-)

New commits:
commit 9cf13c9f07311731757127ba50bd3f2eb0d22272
Author: Miklos Vajna 
Date:   Wed Feb 24 17:11:51 2016 +0100

sw classification: don't insert multiple watermark objects in header

If the text is different, remove the old shape and then insert the new
one. Otherwise just don't insert a new (identical) shape.

Delete and insert is needed because the shape size depends on its
textural content.

Change-Id: I0c8faa0e3e69416ea0b89fa33155826bc2dc7a4f

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 14ef654..9acb496 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -112,6 +113,47 @@ bool lcl_hasField(const uno::Reference& 
xText, const OUString& rSer
 return false;
 }
 
+/// Search for a frame named rShapeName of type rServiceName in xText.
+uno::Reference lcl_getWatermark(const 
uno::Reference& xText, const OUString& rServiceName, const 
OUString& rShapeName)
+{
+uno::Reference 
xParagraphEnumerationAccess(xText, uno::UNO_QUERY);
+uno::Reference xParagraphs = 
xParagraphEnumerationAccess->createEnumeration();
+while (xParagraphs->hasMoreElements())
+{
+uno::Reference 
xTextPortionEnumerationAccess(xParagraphs->nextElement(), uno::UNO_QUERY);
+uno::Reference xTextPortions = 
xTextPortionEnumerationAccess->createEnumeration();
+while (xTextPortions->hasMoreElements())
+{
+uno::Reference 
xTextPortion(xTextPortions->nextElement(), uno::UNO_QUERY);
+OUString aTextPortionType;
+xTextPortion->getPropertyValue(UNO_NAME_TEXT_PORTION_TYPE) >>= 
aTextPortionType;
+if (aTextPortionType != "Frame")
+continue;
+
+uno::Reference 
xContentEnumerationAccess(xTextPortion, uno::UNO_QUERY);
+if (!xContentEnumerationAccess.is())
+continue;
+
+uno::Reference xEnumeration = 
xContentEnumerationAccess->createContentEnumeration("com.sun.star.text.TextContent");
+if (!xEnumeration->hasMoreElements())
+continue;
+
+uno::Reference 
xWatermark(xEnumeration->nextElement(), uno::UNO_QUERY);
+if (!xWatermark->supportsService(rServiceName))
+continue;
+
+uno::Reference xNamed(xWatermark, 
uno::UNO_QUERY);
+if (xNamed->getName() != rShapeName)
+continue;
+
+uno::Reference xShape(xWatermark, uno::UNO_QUERY);
+return xShape;
+}
+}
+
+return uno::Reference();
+}
+
 } // anonymous namespace
 
 SwTextFormatColl& SwEditShell::GetDfltTextFormatColl() const
@@ -184,103 +226,122 @@ void SwEditShell::SetClassification(const OUString& 
rName)
 
 if (!aWatermark.isEmpty())
 {
-// Calc the ratio.
-double fRatio = 0;
-OutputDevice* pOut = Application::GetDefaultDevice();
-vcl::Font aFont(pOut->GetFont());
-fRatio = aFont.GetFontSize().Height();
-fRatio /= pOut->GetTextWidth(aWatermark);
-
-// Calc the size.
-sal_Int32 nWidth = 0;
-awt::Size aSize;
-xPageStyle->getPropertyValue(UNO_NAME_SIZE) >>= aSize;
-if (aSize.Width < aSize.Height)
+OUString aShapeServiceName = 
"com.sun.star.drawing.CustomShape";
+uno::Reference xWatermark = 
lcl_getWatermark(xHeaderText, aShapeServiceName, 
SfxClassificationHelper::PROP_DOCWATERMARK());
+
+if (xWatermark.is())
 {
-// Portrait.
-sal_Int32 nLeftMargin = 0;
-xPageStyle->getPropertyValue(UNO_NAME_LEFT_MARGIN) >>= 
nLeftMargin;
-sal_Int32 nRightMargin = 0;
-xPageStyle->getPropertyValue(UNO_NAME_RIGHT_MARGIN) >>= 
nRightMargin;
-nWidth = aSize.Width - nLeftMargin - nRightMargin;
+// If the header already contains a watermark, see if it 
its text is up to date.
+uno::Reference xTextRange(xWatermark, 
uno::UNO_QUERY);
+if (xTextRange->getString() != aWatermark)
+{
+// No: delete it and we'll insert a replacement.
+uno::Reference 
xComponent(xWatermark, uno::UNO_QUERY);
+xComponent->dispose();
+xWatermark.clear();
+}
 }
-else
+
+if (!xWatermark.is())
 

[Libreoffice-commits] core.git: 4 commits - include/sfx2 sfx2/source sw/source

2016-02-23 Thread Miklos Vajna
 include/sfx2/classificationhelper.hxx |2 
 sfx2/source/view/classificationhelper.cxx |  298 +-
 sw/source/core/edit/edfcol.cxx|   11 -
 3 files changed, 308 insertions(+), 3 deletions(-)

New commits:
commit 0926adba5557eab2114a57c30d92c977d334f57a
Author: Miklos Vajna 
Date:   Tue Feb 23 12:26:11 2016 +0100

sfx2 classification result: copy category labels to document labels

Still need to push them back to the user-defined document property map,
though.

Change-Id: Ic6f48ce30af42e975cd69b2a9cc7fad01702c1dc

diff --git a/sfx2/source/view/classificationhelper.cxx 
b/sfx2/source/view/classificationhelper.cxx
index 55b1efa..58e17c6 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -431,10 +431,19 @@ OUString SfxClassificationHelper::GetDocumentWatermark()
 return OUString();
 }
 
-void SfxClassificationHelper::SetBACName(const OUString& /*rName*/)
+void SfxClassificationHelper::SetBACName(const OUString& rName)
 {
 if (m_pImpl->m_aCategories.empty())
 m_pImpl->parsePolicy();
+
+std::map::iterator it = 
m_pImpl->m_aCategories.find(rName);
+if (it == m_pImpl->m_aCategories.end())
+{
+SAL_WARN("sfx.view", "'" << rName << "' is not a recognized category 
name");
+return;
+}
+
+m_pImpl->m_aLabels = it->second.m_aLabels;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 24d6ac273bc272dd19f795919df643388e974be2
Author: Miklos Vajna 
Date:   Tue Feb 23 10:50:41 2016 +0100

sfx2 classification: initial policy parser

Change-Id: Ia7406bdc94cbceb5b66ab9d12355c1e9f4061206

diff --git a/sfx2/source/view/classificationhelper.cxx 
b/sfx2/source/view/classificationhelper.cxx
index 979f60c..55b1efa 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -13,12 +13,24 @@
 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 using namespace com::sun::star;
 
+namespace
+{
+
 /// Represents one category of a classification policy.
 class SfxClassificationCategory
 {
@@ -26,14 +38,274 @@ public:
 std::map m_aLabels;
 };
 
+/// Parses a policy XML conforming to the TSCP BAF schema.
+class SfxClassificationParser : public 
cppu::WeakImplHelper
+{
+public:
+std::map m_aCategories;
+
+OUString m_aPolicyAuthorityName;
+bool m_bInPolicyAuthorityName;
+OUString m_aPolicyName;
+bool m_bInPolicyName;
+OUString m_aProgramID;
+bool m_bInProgramID;
+OUString m_aScale;
+bool m_bInScale;
+OUString m_aConfidentalityValue;
+bool m_bInConfidentalityValue;
+OUString m_aIdentifier;
+bool m_bInIdentifier;
+OUString m_aValue;
+bool m_bInValue;
+
+/// Pointer to a value in m_aCategories, the currently parsed category.
+SfxClassificationCategory* m_pCategory;
+
+SfxClassificationParser();
+virtual ~SfxClassificationParser();
+
+virtual void SAL_CALL startDocument() throw (xml::sax::SAXException, 
uno::RuntimeException, std::exception) override;
+
+virtual void SAL_CALL endDocument() throw (xml::sax::SAXException, 
uno::RuntimeException, std::exception) override;
+
+virtual void SAL_CALL startElement(const OUString& aName, const 
uno::Reference& xAttribs)
+throw (xml::sax::SAXException, uno::RuntimeException, std::exception) 
override;
+
+virtual void SAL_CALL endElement(const OUString& aName) throw 
(xml::sax::SAXException, uno::RuntimeException, std::exception) override;
+
+virtual void SAL_CALL characters(const OUString& aChars) throw 
(xml::sax::SAXException, uno::RuntimeException, std::exception) override;
+
+virtual void SAL_CALL ignorableWhitespace(const OUString& aWhitespaces) 
throw (xml::sax::SAXException, uno::RuntimeException, std::exception) override;
+
+virtual void SAL_CALL processingInstruction(const OUString& aTarget, const 
OUString& aData) throw (xml::sax::SAXException, uno::RuntimeException, 
std::exception) override;
+
+virtual void SAL_CALL setDocumentLocator(const 
uno::Reference& xLocator)
+throw (xml::sax::SAXException, uno::RuntimeException, std::exception) 
override;
+};
+
+SfxClassificationParser::SfxClassificationParser()
+: m_bInPolicyAuthorityName(false)
+, m_bInPolicyName(false)
+, m_bInProgramID(false)
+, m_bInConfidentalityValue(false)
+, m_bInIdentifier(false)
+, m_bInValue(false)
+, m_pCategory(nullptr)
+{
+}
+
+SfxClassificationParser::~SfxClassificationParser()
+{
+}
+
+void SAL_CALL SfxClassificationParser::startDocument() throw 
(xml::sax::SAXException, uno::RuntimeException, std::exception)
+{
+}
+
+void SAL_CALL SfxClassificationParser::endDocument() throw 
(xml::sax::SAXException, uno::RuntimeException, std::exception)
+{
+}
+
+void SAL_CALL SfxClassificationParser::startElement(const OUString& rName, 
const uno::Refe

[Libreoffice-commits] core.git: 4 commits - include/sfx2 sfx2/source sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk

2013-08-21 Thread Caolán McNamara
 include/sfx2/basedlgs.hxx |   10 +-
 include/sfx2/tabdlg.hxx   |4 
 sfx2/source/dialog/basedlgs.cxx   |   12 ++
 sfx2/source/dialog/tabdlg.cxx |8 +
 sw/UIConfig_swriter.mk|1 
 sw/inc/fldui.hrc  |9 -
 sw/inc/helpid.h   |9 -
 sw/source/ui/dbui/dbtree.cxx  |   19 ---
 sw/source/ui/fldui/fldedt.cxx |   77 ---
 sw/source/ui/fldui/fldpage.cxx|4 
 sw/source/ui/fldui/fldui.src  |   32 --
 sw/source/ui/inc/dbtree.hxx   |4 
 sw/source/ui/inc/fldedt.hxx   |   10 +-
 sw/uiconfig/swriter/ui/editfielddialog.ui |  147 ++
 14 files changed, 206 insertions(+), 140 deletions(-)

New commits:
commit 962c5052eec48774255f3115f88170c3ebb246b0
Author: Caolán McNamara 
Date:   Wed Aug 21 15:05:46 2013 +0100

convert edit fields singletab dialog to layout .ui

Change-Id: I3d58d93ac2686ea16fde4118b7133176d3713af7

diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 609d639..11854d2 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -181,9 +181,11 @@ typedef sal_uInt16* (*GetTabPageRanges)(); // liefert 
internationale Which-Werte
 class SFX2_DLLPUBLIC SfxSingleTabDialogBase : public SfxModalDialog
 {
 public:
-//layout ctor
+//layout ctors
 SfxSingleTabDialogBase(Window *pParent, const SfxItemSet& rOptionsSet,
 const OString& rID, const OUString& rUIXMLDescription);
+SfxSingleTabDialogBase(Window *pParent, const SfxItemSet* pInSet,
+const OString& rID, const OUString& rUIXMLDescription);
 
 //non-layout ctors
 SfxSingleTabDialogBase( Window* pParent, const SfxItemSet& rOptionsSet, 
sal_uInt16 nUniqueId );
@@ -217,6 +219,12 @@ public:
 : SfxSingleTabDialogBase(pParent, rOptionsSet, rID, rUIXMLDescription)
 {
 }
+SfxSingleTabDialog(Window *pParent, const SfxItemSet* pInSet = 0,
+const OString& rID = OString("SingleTabDialog"),
+const OUString& rUIXMLDescription = 
OUString("sfx/ui/singletabdialog.ui"))
+: SfxSingleTabDialogBase(pParent, pInSet, rID, rUIXMLDescription)
+{
+}
 void setTabPage(SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0, 
sal_uInt32 nSettingsId = 0);
 };
 
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 24cfb9e..4f52052 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -761,6 +761,18 @@ SfxSingleTabDialogBase::SfxSingleTabDialogBase(Window 
*pParent, const SfxItemSet
 SetInputSet( &rSet );
 }
 
+SfxSingleTabDialogBase::SfxSingleTabDialogBase(Window* pParent, const 
SfxItemSet* pInSet,
+const OString& rID, const OUString& rUIXMLDescription)
+: SfxModalDialog(pParent, rID, rUIXMLDescription)
+, pImpl(new SingleTabDlgImpl)
+{
+get(pOKBtn, "ok");
+pOKBtn->SetClickHdl( LINK( this, SfxSingleTabDialogBase, OKHdl_Impl ) );
+get(pCancelBtn, "cancel");
+get(pHelpBtn, "help");
+SetInputSet( pInSet );
+}
+
 // ---
 
 SfxSingleTabDialogBase::~SfxSingleTabDialogBase()
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index b81d8f8..dbc3b7f 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -83,6 +83,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/dropcapspage \
sw/uiconfig/swriter/ui/dropdownfielddialog \
sw/uiconfig/swriter/ui/editcategories \
+   sw/uiconfig/swriter/ui/editfielddialog \
sw/uiconfig/swriter/ui/editsectiondialog \
sw/uiconfig/swriter/ui/endnotepage \
sw/uiconfig/swriter/ui/envaddresspage \
diff --git a/sw/inc/fldui.hrc b/sw/inc/fldui.hrc
index 655bf2e..b5ff6f3 100644
--- a/sw/inc/fldui.hrc
+++ b/sw/inc/fldui.hrc
@@ -240,14 +240,6 @@
 #define STR_EXTRA   (STR_FLDUI + 2)
 
 /*
-Buttons for Field-Edit-Dlg
- */
-
-#define BTN_FLDEDT_PREV STR_EXTRA
-#define BTN_FLDEDT_NEXT (STR_EXTRA  + 1)
-#define PB_FLDEDT_ADDRESS   (STR_EXTRA  + 2)
-
-/*
 Additional Strings
  */
 
@@ -265,7 +257,6 @@
 #define STR_URLPROMPT   (STR_EXTRA  + 11)
 #define STR_FORMULA (STR_EXTRA  + 12)
 #define STR_ALL_DATABASE(STR_EXTRA  + 13)
-#define STR_FLD_EDIT_DLG(STR_EXTRA  + 14)
 
 
 
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index d400483..431a8c9 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -112,7 +112,6 @@
 #define HID_NAVI_CONTENT
"SW_HID_NAVI