summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-11-23 23:59:10 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-11-24 00:58:04 +0100
commit3be15a051444d4d2f805d95e27831d5f466c1497 (patch)
tree1c150b4c76752fccb81cb4ac31c7a29889e2ee62 /sw
parent47cf2c9441d2d73c8626ba42dcbad0331274cf43 (diff)
Removed horizontal rule ugly 1990 thing
Change-Id: Ifafd8b2ffd9af90b6ac4ed2ee0ccd3c5e980731c Conflicts: sw/source/ui/misc/insrule.cxx
Diffstat (limited to 'sw')
-rw-r--r--sw/Library_swui.mk1
-rw-r--r--sw/UI_swriter.mk1
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/swabstdlg.hxx1
-rw-r--r--sw/inc/swundo.hxx1
-rw-r--r--sw/sdi/_textsh.sdi5
-rw-r--r--sw/sdi/swriter.sdi27
-rw-r--r--sw/source/core/undo/undo.hrc17
-rw-r--r--sw/source/core/undo/undo.src4
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx22
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx12
-rw-r--r--sw/source/ui/inc/insrule.hxx51
-rw-r--r--sw/source/ui/misc/insrule.cxx185
-rw-r--r--sw/source/ui/shells/textsh.cxx71
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/sweb/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swform/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swreport/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swriter/ui/horizontalrule.ui122
-rw-r--r--sw/uiconfig/swxform/menubar/menubar.xml1
21 files changed, 8 insertions, 519 deletions
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index eaa68dac9404..f5dd9a854484 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -132,7 +132,6 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
sw/source/ui/misc/glosbib \
sw/source/ui/misc/glossary \
sw/source/ui/misc/insfnote \
- sw/source/ui/misc/insrule \
sw/source/ui/misc/linenum \
sw/source/ui/misc/num \
sw/source/ui/misc/outline \
diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index 034d6b7e1ac4..5c783317324a 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -17,7 +17,6 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/converttexttable \
sw/uiconfig/swriter/ui/endnotepage \
sw/uiconfig/swriter/ui/footnotepage \
- sw/uiconfig/swriter/ui/horizontalrule \
sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/insertbreak \
sw/uiconfig/swriter/ui/inserttable \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 7bb7098d07c5..4660bae22025 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -297,7 +297,6 @@ included in c-context files, so c++ style stuff will cause problems.
#define FN_SBA_BRW_INSERT (FN_INSERT2 + 8) /* insert records into text */
#define FN_SBA_BRW_MERGE (FN_INSERT2 + 9) /* serial letter print */
#define FN_JAVAEDIT (FN_INSERT2 + 10) /* edit script field */
-#define FN_INSERT_HRULER (FN_INSERT2 + 11) /* insert horizontal ruler */
#define FN_TOOL_ANCHOR_AT_CHAR (FN_INSERT2 + 12) /* anchor object to character*/
#define FN_INSERT_PAGEHEADER (FN_INSERT2 + 13) /* insert default header */
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 6bc093c2b182..f77e274ce4c0 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -444,7 +444,6 @@ public:
virtual VclAbstractDialog* CreateTitlePageDlg ( Window * pParent ) = 0;
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
SwView& rView, sal_Bool bCol = sal_False ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
- virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg(Window * pParent) = 0; //add for SwInsertGrfRulerDlg
virtual AbstractInsTableDlg* CreateInsTableDlg(SwView& rView) = 0; //add for SwInsTableDlg
virtual AbstractJavaEditDialog* CreateJavaEditDialog( int nResId,
Window* pParent, SwWrtShell* pWrtSh ) = 0; //add for SwJavaEditDialog
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
index ade8718199b5..820ce870d1e2 100644
--- a/sw/inc/swundo.hxx
+++ b/sw/inc/swundo.hxx
@@ -171,7 +171,6 @@ enum SwUndoId
UNDO_UI_INSERT_ENVELOPE,
UNDO_UI_DRAG_AND_COPY,
UNDO_UI_DRAG_AND_MOVE,
- UNDO_UI_INSERT_RULER,
UNDO_UI_INSERT_CHART,
UNDO_UI_INSERT_FOOTNOTE,
UNDO_UI_INSERT_URLBTN,
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index c0f1126ec5cf..4a38efc6c961 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -278,11 +278,6 @@ interface BaseText
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
- FN_INSERT_HRULER // status()
- [
- ExecMethod = ExecInsert ;
- StateMethod = StateInsert ;
- ]
SID_INSERT_DIAGRAM // status(final|play)
[
ExecMethod = ExecInsert ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 3f2941b9766a..dc8f8bcb872a 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -4239,33 +4239,6 @@ SfxVoidItem InsertFrameInteractNoColumns FN_INSERT_FRAME_INTERACT_NOCOL
]
//--------------------------------------------------------------------------
-SfxBoolItem InsertGraphicRuler FN_INSERT_HRULER
-(SfxStringItem GraphicName FN_INSERT_HRULER,SfxBoolItem IsSimpleLine FN_PARAM_1)
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = TRUE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_INSERT;
-]
-
-
-
-//--------------------------------------------------------------------------
SfxVoidItem InsertHyperlinkDlg FN_INSERT_HYPERLINK
()
[
diff --git a/sw/source/core/undo/undo.hrc b/sw/source/core/undo/undo.hrc
index 57a56a36395b..02b610a5c3d4 100644
--- a/sw/source/core/undo/undo.hrc
+++ b/sw/source/core/undo/undo.hrc
@@ -153,15 +153,14 @@
#define STR_INSERT_ENV_UNDO (UI_UNDO_BEGIN + 4)
#define STR_DRAG_AND_COPY (UI_UNDO_BEGIN + 5)
#define STR_DRAG_AND_MOVE (UI_UNDO_BEGIN + 6)
-#define STR_INSERT_RULER (UI_UNDO_BEGIN + 7)
-#define STR_INSERT_CHART (UI_UNDO_BEGIN + 8)
-#define STR_INSERT_FOOTNOTE (UI_UNDO_BEGIN + 9)
-#define STR_INSERT_URLBTN (UI_UNDO_BEGIN + 10)
-#define STR_INSERT_URLTXT (UI_UNDO_BEGIN + 11)
-#define STR_DELETE_INVISIBLECNTNT (UI_UNDO_BEGIN + 12)
-#define STR_REPLACE_STYLE (UI_UNDO_BEGIN + 13)
-#define STR_DELETE_PAGE_BREAK (UI_UNDO_BEGIN + 14)
-#define STR_TEXT_CORRECTION (UI_UNDO_BEGIN + 15)
+#define STR_INSERT_CHART (UI_UNDO_BEGIN + 7)
+#define STR_INSERT_FOOTNOTE (UI_UNDO_BEGIN + 8)
+#define STR_INSERT_URLBTN (UI_UNDO_BEGIN + 9)
+#define STR_INSERT_URLTXT (UI_UNDO_BEGIN + 10)
+#define STR_DELETE_INVISIBLECNTNT (UI_UNDO_BEGIN + 11)
+#define STR_REPLACE_STYLE (UI_UNDO_BEGIN + 12)
+#define STR_DELETE_PAGE_BREAK (UI_UNDO_BEGIN + 13)
+#define STR_TEXT_CORRECTION (UI_UNDO_BEGIN + 14)
#define UI_UNDO_END STR_TEXT_CORRECTION
#define UNDO_MORE_STRINGS_BEGIN (UI_UNDO_END + 1)
diff --git a/sw/source/core/undo/undo.src b/sw/source/core/undo/undo.src
index a8104f750b7a..52bcb7919922 100644
--- a/sw/source/core/undo/undo.src
+++ b/sw/source/core/undo/undo.src
@@ -137,10 +137,6 @@ String STR_DRAG_AND_MOVE
{
Text [ en-US ] = "Move: $1" ;
};
-String STR_INSERT_RULER
-{
- Text [ en-US ] = "Insert horizontal rule" ;
-};
String STR_INSERT_CHART
{
Text [ en-US ] = "Insert %PRODUCTNAME Chart" ;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 51e1b809afaa..7ed62991b6e2 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -81,7 +81,6 @@
#include <glossary.hxx> //add for SwGlossaryDlg
#include <inpdlg.hxx> //add for SwFldInputDlg
#include <insfnote.hxx> //add for SwInsFootNoteDlg
-#include <insrule.hxx> //add for SwInsertGrfRulerDlg
#include <instable.hxx> //add for SwInsTableDlg
#include <javaedit.hxx> //add for SwJavaEditDialog
#include <linenum.hxx> //add for SwLineNumberingDlg
@@ -125,7 +124,6 @@ IMPL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl); //add for SwModalRedlin
IMPL_ABSTDLG_BASE(AbstractGlossaryDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractFldInputDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractInsertGrfRulerDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractInsTableDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl);
@@ -421,19 +419,6 @@ void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr )
pDlg->SetText( rStr );
}
-String AbstractInsertGrfRulerDlg_Impl::GetGraphicName()
-{
- return pDlg->GetGraphicName();
-}
-sal_Bool AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
-{
- return pDlg->IsSimpleLine();
-}
-sal_Bool AbstractInsertGrfRulerDlg_Impl::HasImages() const
-{
- return pDlg->HasImages();
-}
-
void AbstractInsTableDlg_Impl::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt )
@@ -1230,13 +1215,6 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nRe
return 0;
}
-//add for SwInsertGrfRulerDlg
-AbstractInsertGrfRulerDlg * SwAbstractDialogFactory_Impl::CreateInsertGrfRulerDlg(Window * pParent)
-{
- SwInsertGrfRulerDlg* pDlg = new SwInsertGrfRulerDlg(pParent);
- return new AbstractInsertGrfRulerDlg_Impl(pDlg);
-}
-
AbstractInsTableDlg * SwAbstractDialogFactory_Impl::CreateInsTableDlg(SwView& rView) //add for SwInsTableDlg
{
SwInsTableDlg* pDlg = new SwInsTableDlg(rView);
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index cbadc6ecb602..e59b68502596 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -288,17 +288,6 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg
};
//for SwInsFootNoteDlg end
-//for SwInsertGrfRulerDlg begin
-class SwInsertGrfRulerDlg;
-class AbstractInsertGrfRulerDlg_Impl : public AbstractInsertGrfRulerDlg
-{
- DECL_ABSTDLG_BASE(AbstractInsertGrfRulerDlg_Impl,SwInsertGrfRulerDlg)
- virtual String GetGraphicName();
- virtual sal_Bool IsSimpleLine();
- virtual sal_Bool HasImages() const ;
-};
-//for SwInsertGrfRulerDlg end
-
//for SwInsTableDlg begin
class SwInsTableDlg;
class AbstractInsTableDlg_Impl : public AbstractInsTableDlg
@@ -523,7 +512,6 @@ public:
virtual VclAbstractDialog * CreateTitlePageDlg ( Window * pParent );
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
SwView& rView, sal_Bool bCol = sal_False ); //add for SwInsRowColDlg, SwLineNumberingDlg
- virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg(Window * pParent); //add for SwInsertGrfRulerDlg
virtual AbstractInsTableDlg* CreateInsTableDlg(SwView& rView); //add for SwInsTableDlg
virtual AbstractJavaEditDialog* CreateJavaEditDialog( int nResId,
Window* pParent, SwWrtShell* pWrtSh ); //add for SwJavaEditDialog
diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx
deleted file mode 100644
index 5d9f37e9eef3..000000000000
--- a/sw/source/ui/inc/insrule.hxx
+++ /dev/null
@@ -1,51 +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 _INSRULE_HXX
-#define _INSRULE_HXX
-
-#include <vector>
-
-#include "num.hxx"
-
-class SwRulerValueSet;
-class ValueSet;
-
-class SwInsertGrfRulerDlg : public SfxModalDialog
-{
- OKButton* m_pOkPB;
- SwRulerValueSet* m_pExampleVS;
-
- std::vector<OUString> m_aGrfNames;
- OUString m_sSimple;
-
-protected:
- DECL_LINK(DoubleClickHdl, void *);
-
-public:
- SwInsertGrfRulerDlg(Window* pParent);
- ~SwInsertGrfRulerDlg();
-
- OUString GetGraphicName() const;
- bool IsSimpleLine() const;
- bool HasImages() const {return !m_aGrfNames.empty();}
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx
deleted file mode 100644
index 86771ebc4fe5..000000000000
--- a/sw/source/ui/misc/insrule.cxx
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "hintids.hxx"
-#include <svx/gallery.hxx>
-#include <vcl/msgbox.hxx>
-#include <editeng/brshitem.hxx>
-#include <svl/urihelper.hxx>
-#include <vcl/graph.hxx>
-
-#include "swtypes.hxx"
-#include "docsh.hxx"
-#include "insrule.hxx"
-#include "swvset.hxx"
-#include "app.hrc"
-#include "misc.hrc"
-#include "helpid.h"
-
-SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent )
- : SfxModalDialog(pParent, "HorizontalRuleDialog", "modules/swriter/ui/horizontalrule.ui")
- , m_sSimple(SW_RESSTR(STR_SIMPLE))
-{
- get(m_pOkPB, "ok");
- get(m_pExampleVS, "rulers");
-
- m_pExampleVS->SetLineCount(6);
- m_pExampleVS->SetColCount(1);
- m_pExampleVS->SetDoubleClickHdl(LINK(this, SwInsertGrfRulerDlg, DoubleClickHdl));
-
- // determine graphic name
- GalleryExplorer::BeginLocking(GALLERY_THEME_RULERS);
- GalleryExplorer::FillObjList(GALLERY_THEME_RULERS, m_aGrfNames);
- m_pExampleVS->InsertItem(1, 1);
- m_pExampleVS->SetItemText(1, m_sSimple);
-
- for(sal_uInt16 i = 1; i <= m_aGrfNames.size(); ++i)
- {
- m_pExampleVS->InsertItem( i + 1, i);
- m_pExampleVS->SetItemText( i + 1, m_aGrfNames[i-1]);
- }
-
- m_pExampleVS->SelectItem(1);
-}
-
-SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg()
-{
- GalleryExplorer::EndLocking(GALLERY_THEME_RULERS);
-}
-
-bool SwInsertGrfRulerDlg::IsSimpleLine() const
-{
- return m_pExampleVS->GetSelectItemId() == 1;
-}
-
-OUString SwInsertGrfRulerDlg::GetGraphicName() const
-{
- sal_uInt16 nSelPos = m_pExampleVS->GetSelectItemId();
-
- sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index
- if(nSel < m_aGrfNames.size())
- {
- return URIHelper::SmartRel2Abs(INetURLObject(), m_aGrfNames[nSel],
- URIHelper::GetMaybeFileHdl());
- }
- return OUString();
-}
-
-SwRulerValueSet::SwRulerValueSet(Window* pParent, WinBits nWinStyle)
- : SvxBmpNumValueSet(pParent, nWinStyle)
-{
- SetStyle(GetStyle() & ~WB_ITEMBORDER);
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwRulerValueSet(Window *pParent, VclBuilder::stringmap &)
-{
- return new SwRulerValueSet(pParent, WB_ITEMBORDER | WB_TABSTOP);
-}
-
-SwRulerValueSet::~SwRulerValueSet()
-{
-}
-
-void SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
-{
- Rectangle aRect = rUDEvt.GetRect();
- OutputDevice* pDev = rUDEvt.GetDevice();
- sal_uInt16 nItemId = rUDEvt.GetItemId();
- Point aBLPos = aRect.TopLeft();
-
- // item count starts with 1 and the 1st is the simple line
- if(nItemId > 1)
- {
- Graphic aGraphic;
- if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_RULERS, nItemId - 2,
- &aGraphic))
- {
- Size aGrfSize = aGraphic.GetPrefSize();
- if(aGrfSize.Width() && aGrfSize.Height())
- {
- int nRelGrf = aGrfSize.Height() * 100 / aGrfSize.Width();
- Size aWinSize = aRect.GetSize();
- Size aPaintSize = aWinSize;
- int nRelWin = aWinSize.Height() * 100 / aWinSize.Width();
- if(nRelGrf > nRelWin)
- {
- aPaintSize.Width() = aWinSize.Height() * 100 / nRelGrf;
- aBLPos.X() += (aWinSize.Width() - aPaintSize.Width()) /2;
- }
- else
- {
- aPaintSize.Height() = aWinSize.Width() * nRelGrf/100;
- aBLPos.Y() += (aWinSize.Height() - aPaintSize.Height()) /2;
- }
- aBLPos.X() -= aPaintSize.Width() /2;
- aBLPos.Y() -= aPaintSize.Height() /2;
-
- aPaintSize.Width() *= 2;
- aPaintSize.Height() *= 2;
- if(aPaintSize.Height() < 2)
- aPaintSize.Height() = 2;
- Region aRegion = pDev->GetClipRegion();
- pDev->SetClipRegion(aRect);
- aGraphic.Draw(pDev, aBLPos, aPaintSize);
- pDev->SetClipRegion(aRegion);
- }
- }
- else
- {
- SetGrfNotFound(sal_True);
- }
- }
- else
- {
- // paint text for simple line
- Font aOldFont = pDev->GetFont();
- Font aFont = pDev->GetFont();
- Size aSize = aFont.GetSize();
- int nRectHeight = aRect.GetHeight();
- aSize.Height() = nRectHeight * 2 / 3;
- aFont.SetSize(aSize);
- pDev->SetFont(aFont);
- String aText(GetItemText(nItemId));
- aSize.Width() = pDev->GetTextWidth(aText);
- aSize.Height() = pDev->GetTextHeight();
- Point aPos(aBLPos);
- aPos.Y() += (nRectHeight - aSize.Height()) / 2;
- aPos.X() += (aRect.GetWidth() - aSize.Width()) / 2;
- pDev->DrawText(aPos, aText);
-
- pDev->SetFont(aOldFont);
- }
-}
-
-IMPL_LINK_NOARG(SwInsertGrfRulerDlg, DoubleClickHdl)
-{
- EndDialog(RET_OK);
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 1fdaf20270e8..01940e380acc 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -643,73 +643,6 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
break;
}
- case FN_INSERT_HRULER:
- {
- String sPath;
- sal_Bool bSimpleLine = sal_False;
- sal_Bool bRet = sal_False;
- Window* pParent = GetView().GetWindow();
- if ( pItem )
- {
- sPath = ((SfxStringItem*)pItem)->GetValue();
- SFX_REQUEST_ARG( rReq, pSimple, SfxBoolItem, FN_PARAM_1 , sal_False );
- if ( pSimple )
- bSimpleLine = pSimple->GetValue();
- }
- else
- {
- SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialogdiet fail!");
- AbstractInsertGrfRulerDlg* pDlg = pFact->CreateInsertGrfRulerDlg(pParent);
- OSL_ENSURE(pDlg, "Dialogdiet fail!");
- // MessageBox fuer fehlende Grafiken
- if(!pDlg->HasImages())
- InfoBox( pParent, SW_RES(MSG_NO_RULER)).Execute();
- if(RET_OK == pDlg->Execute())
- {
- sPath = pDlg->GetGraphicName();
- bSimpleLine = pDlg->IsSimpleLine();
- }
-
- delete pDlg;
- rReq.AppendItem( SfxStringItem( FN_INSERT_HRULER, sPath ) );
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bSimpleLine ) );
- }
-
- rSh.StartAllAction();
- rSh.StartUndo(UNDO_UI_INSERT_RULER);
- if(bSimpleLine)
- {
- if(!(rSh.IsSttOfPara() && rSh.IsEndOfPara())) // kein leerer Absatz?
- rSh.SplitNode( sal_False, sal_False ); // dann Platz schaffen
- rSh.SplitNode( sal_False, sal_False );
- rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
- rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_HTML_HR ));
- rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
- bRet = sal_True;
- }
- else if(sPath.Len())
- {
- SwFlyFrmAttrMgr aFrmMgr( sal_True, &rSh, FRMMGR_TYPE_GRF );
- // am FrmMgr muessen die richtigen Parameter eingestellt werden
-
- aFrmMgr.SetAnchor(FLY_AS_CHAR);
-
- rSh.SplitNode( sal_False, sal_False );
- rSh.SplitNode( sal_False, sal_False );
- rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
- rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
- if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, sal_True, 0, 0 ))
- bRet = sal_True;
- rSh.EnterStdMode();
- rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
- }
- rSh.EndAllAction();
- rSh.EndUndo(UNDO_UI_INSERT_RULER);
- rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
- rReq.Done();
- }
- break;
case FN_FORMAT_COLUMN :
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -868,10 +801,6 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
rSet.DisableItem(nWhich);
}
break;
- case FN_INSERT_HRULER :
- if ( (rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden )
- rSet.DisableItem(nWhich);
- break;
case FN_FORMAT_COLUMN :
{
//#i80458# column dialog cannot work if the selection contains different page styles and different sections
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml
index 95806e80ef73..ae37597f1e98 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -193,7 +193,6 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:InsertFrame"/>
<menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
<menu:menu menu:id=".uno:GraphicMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:InsertGraphic"/>
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml
index 49d96f6603ad..396efea183f6 100644
--- a/sw/uiconfig/sweb/menubar/menubar.xml
+++ b/sw/uiconfig/sweb/menubar/menubar.xml
@@ -151,7 +151,6 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:InsertFrame"/>
<menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
<menu:menuitem menu:id=".uno:InsertGraphic"/>
<menu:menuitem menu:id=".uno:InsertAVMedia"/>
<menu:menu menu:id=".uno:ObjectMenu">
diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml
index 2fbd4c3da861..a0c80fe78f87 100644
--- a/sw/uiconfig/swform/menubar/menubar.xml
+++ b/sw/uiconfig/swform/menubar/menubar.xml
@@ -193,7 +193,6 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:InsertFrame"/>
<menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
<menu:menu menu:id=".uno:GraphicMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:InsertGraphic"/>
diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml
index a1de857e5010..e93a3dd96140 100644
--- a/sw/uiconfig/swreport/menubar/menubar.xml
+++ b/sw/uiconfig/swreport/menubar/menubar.xml
@@ -193,7 +193,6 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:InsertFrame"/>
<menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
<menu:menu menu:id=".uno:GraphicMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:InsertGraphic"/>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index b1c5ac7891a4..473cebf12a45 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -199,7 +199,6 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:InsertFrame"/>
<menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
<menu:menu menu:id=".uno:GraphicMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:InsertGraphic"/>
diff --git a/sw/uiconfig/swriter/ui/horizontalrule.ui b/sw/uiconfig/swriter/ui/horizontalrule.ui
deleted file mode 100644
index 43c9eb7d6275..000000000000
--- a/sw/uiconfig/swriter/ui/horizontalrule.ui
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkDialog" id="HorizontalRuleDialog">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Insert Horizontal Rule</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button2">
- <property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="swuilo:SwRulerValueSet" id="rulers">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="width_request">400</property>
- <property name="height_request">250</property>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Selection</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">ok</action-widget>
- <action-widget response="0">button2</action-widget>
- <action-widget response="0">help</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml
index 7bf5e6b479fe..9f43e34d364b 100644
--- a/sw/uiconfig/swxform/menubar/menubar.xml
+++ b/sw/uiconfig/swxform/menubar/menubar.xml
@@ -194,7 +194,6 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:InsertFrame"/>
<menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
<menu:menu menu:id=".uno:GraphicMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:InsertGraphic"/>