diff options
Diffstat (limited to 'sw/source/ui')
118 files changed, 884 insertions, 3070 deletions
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index c6e2527ba0c8..a1e6cef80cd1 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -27,19 +27,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <hintids.hxx> -#ifndef _CMDID_H -#include <cmdid.h> // Funktion-Ids -#endif - -#include <com/sun/star/i18n/ScriptType.hpp> #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> -#ifndef _MSGBOX_HXX //autogen +#include <com/sun/star/i18n/ScriptType.hpp> + +#include <hintids.hxx> +#include <cmdid.h> // Funktion-Ids #include <vcl/msgbox.hxx> -#endif #include <svl/eitem.hxx> #include <sfx2/request.hxx> #include <sfx2/app.hxx> @@ -47,9 +43,7 @@ #include <svx/htmlmode.hxx> #include <sfx2/bindings.hxx> #include <editeng/brshitem.hxx> -#ifndef _SVX_TSTPITEM_HXX //autogen #include <editeng/tstpitem.hxx> -#endif #include <svx/optgrid.hxx> #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> @@ -59,37 +53,25 @@ #include <optcomp.hxx> #include <edtwin.hxx> #include <swmodule.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif +#include <doc.hxx> #include <wrtsh.hxx> -#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED #include <IDocumentDeviceAccess.hxx> -#endif #include <uitool.hxx> #include <initui.hxx> // fuer ::GetGlossaries() #include <fldbas.hxx> //fuer UpdateFields -#ifndef _WVIEW_HXX #include <wview.hxx> -#endif #include <cfgitems.hxx> #include <prtopt.hxx> -#ifndef _PVIEW_HXX #include <pview.hxx> -#endif #include <usrpref.hxx> -#ifndef _MODCFG_HXX #include <modcfg.hxx> -#endif #include <glosdoc.hxx> #include <uiitems.hxx> #include <editeng/langitem.hxx> #include <unotools/lingucfg.hxx> #include <editeng/unolingu.hxx> - -#ifndef _GLOBALS_HRC #include <globals.hrc> -#endif #include <globals.h> // globale Konstanten z.B. #include <svl/slstitm.hxx> #include "swabstdlg.hxx" @@ -334,8 +316,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) /*--------------------------------------------------------------------- Seite Dokumentansicht auswerten -----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_DOCDISP, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, FALSE, &pItem )) { const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem; @@ -364,23 +345,20 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Elemente - Item auswerten -----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_ELEM, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, FALSE, &pItem ) ) { const SwElemItem* pElemItem = (const SwElemItem*)pItem; pElemItem->FillViewOptions( aViewOpt ); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, FALSE, &pItem ) ) { SFX_APP()->SetOptions(rSet); const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; ::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, FALSE, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -389,8 +367,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) pAppView->ChangeTabMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, FALSE, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -399,8 +376,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) pAppView->ChangeVLinealMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem ) ) { USHORT nTabDist = ((const SfxUInt16Item*)pItem)->GetValue(); pPref->SetDefTab(nTabDist); @@ -427,8 +403,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Seite Rastereinstellungen auswerten ----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - SID_ATTR_GRID_OPTIONS, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, FALSE, &pItem )) { const SvxGridItem* pGridItem = (const SvxGridItem*)pItem; @@ -458,8 +433,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) // Writer Drucker Zusatzeinstellungen auswerten //---------------------------------------------------------------------------- - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_ADDPRINTER, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE, &pItem )) { SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog); if (pOpt) @@ -473,16 +447,25 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) } - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) { ((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt ); if(pBindings) pBindings->Invalidate(FN_SHADOWCURSOR); } - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) + if( pAppView ) + { + SwWrtShell &rWrtSh = pAppView->GetWrtShell(); + const bool bAlignFormulas = rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + pPref->SetAlignMathObjectsToBaseline( bAlignFormulas ); + + // don't align formulas in documents that are currently loading + if (bAlignFormulas && !rWrtSh.GetDoc()->IsInReading()) + rWrtSh.AlignAllFormulasToBaseline(); + } + + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) { aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue()); } @@ -510,8 +493,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) } #endif // dann an der akt. View und Shell die entsp. Elemente setzen - ApplyUsrPref( aViewOpt, pAppView, - bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); + ApplyUsrPref( aViewOpt, pAppView, bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); } /* -----------------12.02.99 12:28------------------- * @@ -609,6 +591,15 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS if ( fnCreatePage ) pRet = (*fnCreatePage)( pParent, rSet ); } + if (pRet && (nId == RID_SW_TP_OPTSHDWCRSR || nId == RID_SW_TP_HTML_OPTSHDWCRSR)) + { + SwView* pCurrView = GetView(); + if(pCurrView) + { + aSet.Put( SwWrtShellItem( SID_WRT_SHELL, pCurrView->GetWrtShellPtr() ) ); + pRet->PageCreated(aSet); + } + } } break; #ifdef DBG_UTIL @@ -653,5 +644,3 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS return pRet; } - - diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index d01af0213156..c839b5c03f52 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -209,23 +209,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, return 0; } } - if(rMedium.IsStorage()) - { - //SvStorageRef aStor( rMedium.GetStorage() ); - const SfxItemSet* pSet = rMedium.GetItemSet(); - const SfxPoolItem *pItem; - if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pItem)) - { - DBG_ASSERT(pItem->IsA( TYPE(SfxStringItem) ), "Fehler Parametertype"); - comphelper::OStorageHelper::SetCommonStoragePassword( rMedium.GetStorage(), ((const SfxStringItem *)pItem)->GetValue() ); - } - // Fuer's Dokument-Einfuegen noch die FF-Version, wenn's der - // eigene Filter ist. - ASSERT( /*pRead != ReadSw3 || */pRead != ReadXML || pFlt->GetVersion(), - "Am Filter ist keine FF-Version gesetzt" ); - //if( (pRead == ReadSw3 || pRead == ReadXML) && pFlt->GetVersion() ) - // aStor->SetVersion( (long)pFlt->GetVersion() ); - } + // #i30171# set the UpdateDocMode at the SwDocShell SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False); nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE; @@ -1147,6 +1131,23 @@ void SwDocShell::GetState(SfxItemSet& rSet) rSet.Put( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) ); } break; + case SID_MAIL_PREPAREEXPORT: + { + //check if linked content or possibly hidden content is available + //pDoc->UpdateFlds( NULL, false ); + sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager(); + const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); + sal_Bool bRet = sal_False; + if( rLnks.Count() ) + bRet = sal_True; + else + { + //sections with hidden flag, hidden character attribute, hidden paragraph/text or conditional text fields + bRet = pDoc->HasInvisibleContent(); + } + rSet.Put( SfxBoolItem( nWhich, bRet ) ); + } + break; default: DBG_ASSERT(!this,"Hier darfst Du nicht hinein!"); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 17f11b115bf8..5bbc29aab2ee 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1209,7 +1209,19 @@ void SwDocShell::Execute(SfxRequest& rReq) } break; - case SID_MAIL_EXPORT_FINISHED: + case SID_MAIL_PREPAREEXPORT: + { + //pWrtShell is not set in page preview + if(pWrtShell) + pWrtShell->StartAllAction(); + pDoc->UpdateFlds( NULL, false ); + pDoc->EmbedAllLinks(); + pDoc->RemoveInvisibleContent(); + if(pWrtShell) + pWrtShell->EndAllAction(); + } + break; + case SID_MAIL_EXPORT_FINISHED: { if(pWrtShell) pWrtShell->StartAllAction(); diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index c201109ca1cb..98fe7316ecd5 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -336,6 +336,12 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) pColl->SetFmtAttr( aFontHeight ); } } + + // the default for documents created via 'File/New' should be 'on' + // (old documents, where this property was not yet implemented, will get the + // value 'false' in the SwDoc c-tor) + pDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, + SW_MOD()->GetUsrPref( bWeb )->IsAlignMathObjectsToBaseline() ); } /* #106748# If the default frame direction of a document is RTL @@ -823,4 +829,3 @@ void SwDocShell::SubInitNew() IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return pDoc; } const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return pDoc; } IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return pDoc; } - diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk deleted file mode 100644 index 88f9ff9d6398..000000000000 --- a/sw/source/ui/app/makefile.mk +++ /dev/null @@ -1,101 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=app - -LIBTARGET=NO - -# future: DEMO\... - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES =\ - app.src \ - mn.src \ - error.src - - -SLOFILES = \ - $(SLO)$/appenv.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/applab.obj \ - $(SLO)$/appopt.obj \ - $(SLO)$/docsh.obj \ - $(SLO)$/docsh2.obj \ - $(SLO)$/docshdrw.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docstyle.obj \ - $(SLO)$/mainwn.obj \ - $(SLO)$/swmodule.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/swdll.obj \ - $(SLO)$/swwait.obj - -EXCEPTIONSFILES= \ - $(SLO)$/docsh.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/swmodule.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/docsh2.obj - -LIB1TARGET= $(SLB)$/app.lib - -LIB1OBJFILES= \ - $(SLO)$/appenv.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/applab.obj \ - $(SLO)$/appopt.obj \ - $(SLO)$/docsh.obj \ - $(SLO)$/docsh2.obj \ - $(SLO)$/docshdrw.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docstyle.obj \ - $(SLO)$/mainwn.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/swwait.obj - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -$(SRS)$/app.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index 3b23591c84eb..b3ae93cdf6ca 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -25,10 +25,351 @@ * ************************************************************************/ +#include <svx/dialogs.hrc> +#include <svx/globlmn.hrc> +#include "cmdid.h" +#include "app.hrc" +#include "globals.hrc" +#include "helpid.h" +#include "popup.hrc" +/* --------------------- F O R M A T --------------------------------- */ -#include "swmn.hrc" -#include "helpid.h" +#define SEPARATOR MenuItem { Separator = TRUE; } + +//define for ITEM_FORMAT_NUMBERING +#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS +#define MN_NUMBERING ITEM_FORMAT_NUMBERING + +#define MN_TXT\ + MenuItem\ + {\ + ITEM_FORMAT_CHAR_DLG\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_PARA_DLG\ + };\ + MenuItem\ + {\ + Identifier = FN_FORMAT_PAGE_DLG ; \ + HelpId = CMD_FN_FORMAT_PAGE_DLG ; \ + Text [ en-US ] = "Pa~ge..." ; \ + }; + + +#define MN_TEXT_ATTR\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_STYLE ; \ + Command = ".uno:StyleMenu" ; \ + Text [ en-US ] = "St~yle" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_WEIGHT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_POSTURE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_OVERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_SHADOWED\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_CONTOUR\ + };\ + SEPARATOR ; \ + MenuItem\ + {\ + Identifier = FN_SET_SUPER_SCRIPT ; \ + HelpId = CMD_FN_SET_SUPER_SCRIPT ; \ + Text [ en-US ] = "Superscript" ; \ + };\ + MenuItem\ + {\ + Identifier = FN_SET_SUB_SCRIPT ; \ + HelpId = CMD_FN_SET_SUB_SCRIPT ; \ + Text [ en-US ] = "Subscript" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_ALGN ; \ + Command = ".uno:AlignTextMenu" ; \ + Text [ en-US ] = "A~lignment" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ + };\ + MenuItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ + HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \ + RadioCheck = TRUE ; \ + Text [ en-US ] = "Justified" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_LINESPACE ; \ + Command = ".uno:LineSpacingMenu" ; \ + Text [ en-US ] = "Line Spacing" ; \ + _MenuItemFlags = MIB_RADIOCHECK ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_10\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_15\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_20\ + };\ + };\ + };\ + }; + +/* --------------------- M E N U --------------------------------- */ + +/* + + +The application menu bar resource has become obsolete. You can now find the menu bar at the following +location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml + + +*/ + +/* --------------------- D O C U M E N T -------------------------- */ + + +#define _MN_EDIT_FIELD \ + MenuItem \ + { \ + Identifier = FN_EDIT_FIELD ; \ + HelpId = CMD_FN_EDIT_FIELD ; \ + Text [ en-US ] = "Fields..." ; \ + }; +#define _MN_EDIT_FOOTNOTE \ + MenuItem \ + { \ + Identifier = FN_EDIT_FOOTNOTE ; \ + HelpId = CMD_FN_EDIT_FOOTNOTE ; \ + Text [ en-US ] = "Footnote/Endnote~..." ; \ + }; + #define _MN_EDIT_IDX_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG ; \ + Text [ en-US ] = "Inde~x Entry..." ; \ + }; + +#define _MN_EDIT_REDLINE \ + MenuItem \ + { \ + Identifier = FN_REDLINE_ACCEPT_DIRECT; \ + HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \ + Text [ en-US ] = "Accept Change" ; \ + };\ + MenuItem \ + { \ + Identifier = FN_REDLINE_REJECT_DIRECT ; \ + HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \ + Text [ en-US ] = "Reject Change" ; \ + }; \ + SEPARATOR ; +#define _MN_EDIT_BIB_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG ; \ + Text [ en-US ] = "~Bibliography Entry..."; \ + }; \ + SEPARATOR ; + +#define _MN_EDIT_OPEN_HYPERLINK \ + MenuItem \ + { \ + ITEM_OPEN_HYPERLINK \ + };\ + MenuItem \ + { \ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "Edit Hyperlink..."; \ + }; \ + MenuItem \ + { \ + Identifier = FN_COPY_HYPERLINK_LOCATION; \ + HelpId = CMD_FN_COPY_HYPERLINK_LOCATION; \ + Text [ en-US ] = "Copy Hyperlink ~Location"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_HYPERLINK ; \ + HelpId = CMD_FN_REMOVE_HYPERLINK ; \ + Text [ en-US ] = "Remo~ve Hyperlink"; \ + }; + +#define _MN_EDIT_OPEN_SMARTTAGMENU \ + MenuItem \ + { \ + ITEM_OPEN_SMARTTAGMENU \ + }; + +#define _MN_EDIT__HYPERLINK \ + MenuItem\ + {\ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "~Edit Hyperlink" ; \ + }; + +#define _DEFAULT_TEXT_EDIT_ELEMENTS \ + _MN_EDIT_FIELD \ + _MN_EDIT_FOOTNOTE \ + _MN_EDIT_IDX_ENTRY_DLG \ + _MN_EDIT_BIB_ENTRY_DLG \ + _MN_EDIT_REDLINE \ + MenuItem \ + { \ + ITEM_POPUP_TEMPLATE_EDIT \ + }; \ + SEPARATOR ; \ + _MN_EDIT_OPEN_HYPERLINK \ + _MN_EDIT_OPEN_SMARTTAGMENU + + +#define MN_RESET\ + MenuItem\ + {\ + Identifier = FN_FORMAT_RESET ; \ + HelpId = CMD_FN_FORMAT_RESET ; \ + Text [ en-US ] = "~Default Formatting" ; \ + }; + +#define _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MenuItem \ + { \ + Identifier = FN_NUMBER_NEWSTART; \ + HelpId = CMD_FN_NUMBER_NEWSTART; \ + Text[ en-US ] = "Restart Numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_CONTINUE; \ + HelpId = CMD_FN_NUM_CONTINUE; \ + Text[ en-US ] = "Continue previous numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_UP; \ + HelpId = CMD_FN_NUM_BULLET_UP; \ + Text[ en-US ] = "Up One Level"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_DOWN; \ + HelpId = CMD_FN_NUM_BULLET_DOWN; \ + Text[ en-US ] = "Down One Level"; \ + }; + +#define BASE_TEXT_POPUPMENU_BEGIN \ +{ \ + ItemList = \ + { \ + MN_RESET \ + _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MN_TEXT_ATTR \ + SEPARATOR ; \ + MN_TXT \ + MN_NUMBERING \ + ITEM_TRANSLITERATE_MENU \ + SEPARATOR ; + +// not in Writer/Web +#define BASE_TEXT_POPUPMENU_NOWEB \ + MenuItem \ + { \ + Identifier = FN_UPDATE_CUR_TOX ; \ + HelpId = CMD_FN_UPDATE_CUR_TOX ; \ + Text [ en-US ] = "~Update Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_EDIT_CURRENT_TOX; \ + HelpId = CMD_FN_EDIT_CURRENT_TOX; \ + Text [ en-US ] = "~Edit Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_CUR_TOX; \ + HelpId = CMD_FN_REMOVE_CUR_TOX; \ + Text [ en-US ] = "Delete Index/Table"; \ + }; \ + SEPARATOR ; + +#define BASE_TEXT_POPUPMENU_END \ + _DEFAULT_TEXT_EDIT_ELEMENTS \ + }; \ +}; /*------------------------------------------------------------------------ Beschreibung: Menu Window @@ -430,14 +771,14 @@ MenuItem\ {\ Identifier = FN_REPLY ;\ - HelpId = CMD_FN_DELETE_NOTE ;\ + HelpID = CMD_FN_REPLY ;\ Text [ en-US ] = "Reply" ;\ };\ SEPARATOR ; \ MenuItem\ {\ - Identifier = FN_DELETE_NOTE ;\ - HelpId = CMD_FN_DELETE_NOTE ;\ + Identifier = FN_DELETE_COMMENT ;\ + HelpID = CMD_FN_DELETE_COMMENT ;\ Text [ en-US ] = "Delete ~Comment" ;\ };\ MenuItem\ diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk deleted file mode 100644 index 33ba83f34d7c..000000000000 --- a/sw/source/ui/cctrl/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=cctrl - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - actctrl.cxx \ - popbox.cxx \ - swlbox.cxx - -SLOFILES = \ - $(SLO)$/actctrl.obj \ - $(SLO)$/popbox.obj \ - $(SLO)$/swlbox.obj - -EXCEPTIONSFILES = \ - $(SLO)$/popbox.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index cc1f208950dc..63d878006f7e 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -200,7 +200,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : } String aFmtName; - for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i) + for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ))) ::InsertStringSorted(aFmtName, aPageCollBox, 1 ); diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk deleted file mode 100644 index 6b05d0fbfb56..000000000000 --- a/sw/source/ui/chrdlg/makefile.mk +++ /dev/null @@ -1,72 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=chrdlg -LIBTARGET=NO - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - swbreak.src \ - chardlg.src \ - chrdlg.src \ - drpcps.src \ - ccoll.src \ - paradlg.src \ - numpara.src - -SLOFILES = \ - $(SLO)$/break.obj \ - $(SLO)$/chardlg.obj \ - $(SLO)$/drpcps.obj \ - $(SLO)$/ccoll.obj \ - $(SLO)$/swuiccoll.obj \ - $(SLO)$/pardlg.obj \ - $(SLO)$/tblnumfm.obj \ - $(SLO)$/numpara.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/ccoll.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index a9d90a4c02e4..44006ef5cab4 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -109,7 +109,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) aStyleLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); aFilterLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); - aTbLinks.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN); + aTbLinks.SetStyle(aTbLinks.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN); aTbLinks.SetSelectionMode( SINGLE_SELECTION ); aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT ); aTbLinks.Resize(); // OS: Hack fuer richtige Selektion diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 3a462ce452b2..8652970d588f 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -458,4 +458,3 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const #endif - diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 5fa03de5e0a5..726d27b281d1 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -330,7 +330,7 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare m_aStatusLB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); short nEntryHeight = m_aStatusLB.GetEntryHeight(); diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk deleted file mode 100644 index 4b8ed01ca90e..000000000000 --- a/sw/source/ui/config/makefile.mk +++ /dev/null @@ -1,87 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=config -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/config.srs -BMP_IN=$(PRJ)$/win/imglst - -SRS1NAME=$(TARGET) -SRC1FILES = \ - mailconfigpage.src \ - optdlg.src \ - optload.src \ - optcomp.src \ - redlopt.src - -EXCEPTIONSFILES = \ - $(SLO)$/mailconfigpage.obj \ - $(SLO)$/optcomp.obj \ - $(SLO)$/optload.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/barcfg.obj \ - $(SLO)$/caption.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/dbconfig.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/optpage.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/barcfg.obj \ - $(SLO)$/caption.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/dbconfig.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 49c073103501..04b781982979 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -152,7 +152,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe pEntry->SetUserData( (void*)(ULONG)nResId ); } } - m_aOptionsLB.SetWindowBits( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); + m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_aOptionsLB.SetHighlightRange(); FreeResource(); diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc index 4162b656d7e5..5d93219fed98 100644 --- a/sw/source/ui/config/optdlg.hrc +++ b/sw/source/ui/config/optdlg.hrc @@ -30,7 +30,7 @@ #define FL_NOPRINT 2 #define FL_WINDOW 3 -#define CB_GRF 1 +#define CB_GRF 1 #define CB_TBL 2 #define CB_DRWFAST 3 #define CB_FIELD 4 @@ -39,10 +39,10 @@ #define CB_SPACE 7 #define CB_HSPACE 8 #define CB_SHYPH 9 -#define CB_FLD_HIDDEN 10 +#define CB_FLD_HIDDEN 10 #define CB_BREAK 11 #define CB_ANY_RULER 12 -#define CB_CROSS 14 +#define CB_CROSS 14 #define CB_HSCROLL 15 #define CB_VSCROLL 16 #define CB_HRULER 17 @@ -50,7 +50,7 @@ #define FL_LINE 22 #define CB_POSTIT 23 #define CB_VRULER_RIGHT 24 -#define CB_BIGHANDLE 25 +#define CB_BIGHANDLE 25 #define FL_SETTINGS 26 #define LB_METRIC 27 @@ -191,7 +191,7 @@ #define FL_TABLE_SEPARATOR 139 #define CB_PROSPECT_RTL 140 -#define FL_SHDWCRSFLAG 1 +#define FL_SHDWCRSFLAG 1 #define CB_SHDWCRSONOFF 2 #define FL_SHDWCRSMODE 3 #define FT_SHDWCRSFILLMODE 4 @@ -201,5 +201,8 @@ #define RB_SHDWCRSFILLSPACE 8 #define CB_ALLOW_IN_PROT 12 #define FL_CRSR_OPT 13 -#define FL_SEPARATOR_SHDW 14 +#define FL_SEPARATOR_SHDW 14 +#define FL_LAYOUT_OPTIONS 15 +#define CB_MATH_BASELINE_ALIGNMENT 16 + diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index b54cd0d16b4e..0f0eddc5d9ed 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -1021,6 +1021,18 @@ TabPage TP_OPTSHDWCRSR Group = TRUE ; Text [ en-US ] = "Enable"; }; + FixedLine FL_LAYOUT_OPTIONS + { + Pos = MAP_APPFONT ( 6 , 133 ) ; + Size = MAP_APPFONT ( 118 , 8 ) ; + Text [ en-US ] = "Layout assistance"; + }; + CheckBox CB_MATH_BASELINE_ALIGNMENT + { + Pos = MAP_APPFONT ( 12 , 144 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + Text [ en-US ] = "Math baseline alignment"; + }; }; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 81448870d925..6e6ed773a33d 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -32,22 +32,15 @@ #undef SW_DLLIMPLEMENTATION #endif -#include <hintids.hxx> -#include <cmdid.h> -#include <vcl/svapp.hxx> +#ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> -#include <svl/cjkoptions.hxx> -#include <svtools/ctrltool.hxx> -#include <svl/eitem.hxx> -#include <svx/htmlmode.hxx> -#include <sfx2/printer.hxx> -#include <sfx2/bindings.hxx> -#include <svx/xtable.hxx> -#include <editeng/fhgtitem.hxx> -#include <editeng/fontitem.hxx> -#include <editeng/langitem.hxx> -#include <svx/dlgutil.hxx> +#endif + +#include <optpage.hxx> +#include <doc.hxx> +#include <hintids.hxx> +#include <cmdid.h> #include <fmtcol.hxx> #include <charatr.hxx> #include <swtypes.hxx> @@ -57,11 +50,10 @@ #include <swmodule.hxx> #include <wrtsh.hxx> #include <uitool.hxx> -#include <cfgitems.hxx> //Items fuer Sw-Seiten +#include <cfgitems.hxx> #include <poolfmt.hxx> #include <uiitems.hxx> #include <initui.hxx> -#include <optpage.hxx> #include <printdata.hxx> #include <modcfg.hxx> #include <srcview.hxx> @@ -71,13 +63,26 @@ #include <config.hrc> #include <redlopt.hrc> #include <optdlg.hrc> -#include <svx/strarray.hxx> -#include <svl/slstitm.hxx> -#include <sfx2/request.hxx> #include <swwrtshitem.hxx> +#include <unomid.h> + +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/langitem.hxx> +#include <sfx2/request.hxx> +#include <sfx2/printer.hxx> +#include <sfx2/bindings.hxx> +#include <svl/slstitm.hxx> #include <svl/ctloptions.hxx> +#include <svl/eitem.hxx> +#include <svl/cjkoptions.hxx> +#include <svtools/ctrltool.hxx> +#include <svx/htmlmode.hxx> +#include <svx/xtable.hxx> +#include <svx/dlgutil.hxx> +#include <svx/strarray.hxx> +#include <vcl/svapp.hxx> -#include <unomid.h> using namespace ::com::sun::star; @@ -1488,6 +1493,7 @@ IMPL_LINK(SwTableOptionsTabPage, CheckBoxHdl, CheckBox*, EMPTYARG) aRepeatHeaderCB.Enable(aHeaderCB.IsChecked()); return 0; } + void SwTableOptionsTabPage::PageCreated (SfxAllItemSet aSet) { SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False); @@ -1525,15 +1531,17 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, aFillTabRB( this, SW_RES( RB_SHDWCRSFILLTAB )), aFillSpaceRB( this, SW_RES( RB_SHDWCRSFILLSPACE )), aCrsrOptFL ( this, SW_RES( FL_CRSR_OPT)), - aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )) + aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )), + m_aLayoutOptionsFL( this, SW_RES( FL_LAYOUT_OPTIONS ) ), + m_aMathBaselineAlignmentCB( this, SW_RES( CB_MATH_BASELINE_ALIGNMENT ) ), + m_pWrtShell( NULL ) { FreeResource(); const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; + SwShadowCursorItem aOpt; if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; - aOnOffCB.Check( aOpt.IsOn() ); BYTE eMode = aOpt.GetMode(); @@ -1578,6 +1586,15 @@ SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& return new SwShdwCrsrOptionsTabPage( pParent, rSet ); } + +void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet ) +{ + SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False); + if (pWrtSh) + SetWrtShell(pWrtSh->GetValue()); +} + + BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) { SwShadowCursorItem aOpt; @@ -1603,6 +1620,10 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) bRet = TRUE; } + m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, + m_aMathBaselineAlignmentCB.IsChecked() ); + bRet |= m_aMathBaselineAlignmentCB.IsChecked() != m_aMathBaselineAlignmentCB.GetSavedValue(); + if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue()) { rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked())); @@ -1636,11 +1657,10 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; + SwShadowCursorItem aOpt; if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; - aOnOffCB.Check( aOpt.IsOn() ); BYTE eMode = aOpt.GetMode(); @@ -1649,6 +1669,9 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) aFillTabRB.Check( FILL_TAB == eMode ); aFillSpaceRB.Check( FILL_SPACE == eMode ); + m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ); + m_aMathBaselineAlignmentCB.SaveValue(); + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue()); aCrsrInProtCB.SaveValue(); @@ -2593,4 +2616,3 @@ IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) #endif - diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 85d3886fc79f..8d79abfb6244 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -245,27 +245,29 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() { static const char* aPropNames[] = { - "Line/Guide", // 0 - "Line/SimpleControlPoint", // 1 - "Line/LargeControlPoint", // 2 - "Window/HorizontalScroll", // 3 - "Window/VerticalScroll", // 4 - "Window/ShowRulers", // 5 - "Window/HorizontalRuler", // 6 - "Window/VerticalRuler", // 7 - "Window/HorizontalRulerUnit", // 8 - "Window/VerticalRulerUnit", // 9 - "Window/SmoothScroll", //10 - "Zoom/Value", //11 - "Zoom/Type", //12 - "Other/MeasureUnit", //13 - "Other/TabStop", //14 - "Window/IsVerticalRulerRight", //15 - "ViewLayout/Columns", //16 - "ViewLayout/BookMode", //17 - "Other/IsSquaredPageMode" //18 + "Line/Guide", // 0 + "Line/SimpleControlPoint", // 1 + "Line/LargeControlPoint", // 2 + "Window/HorizontalScroll", // 3 + "Window/VerticalScroll", // 4 + "Window/ShowRulers", // 5 + "Window/HorizontalRuler", // 6 + "Window/VerticalRuler", // 7 + "Window/HorizontalRulerUnit", // 8 + "Window/VerticalRulerUnit", // 9 + "Window/SmoothScroll", //10 + "Zoom/Value", //11 + "Zoom/Type", //12 + "Other/IsAlignMathObjectsToBaseline", //13 + "Other/MeasureUnit", //14 + // below properties are not available in WriterWeb + "Other/TabStop", //15 + "Window/IsVerticalRulerRight", //16 + "ViewLayout/Columns", //17 + "ViewLayout/BookMode", //18 + "Other/IsSquaredPageMode" //19 }; - const int nCount = bWeb ? 14 : 19; + const int nCount = bWeb ? 15 : 20; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -302,39 +304,38 @@ void SwLayoutViewConfig::Commit() for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - sal_Bool bSet; + Any &rVal = pValues[nProp]; switch(nProp) { - case 0: bSet = rParent.IsCrossHair(); break;// "Line/Guide", - case 1: bSet = rParent.IsSolidMarkHdl(); break;// "Line/SimpleControlPoint", - case 2: bSet = rParent.IsBigMarkHdl(); break;// "Line/LargeControlPoint", - case 3: bSet = rParent.IsViewHScrollBar(); break;// "Window/HorizontalScroll", - case 4: bSet = rParent.IsViewVScrollBar(); break;// "Window/VerticalScroll", - case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" + case 0: rVal <<= (sal_Bool) rParent.IsCrossHair(); break; // "Line/Guide", + case 1: rVal <<= (sal_Bool) rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint", + case 2: rVal <<= (sal_Bool) rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint", + case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll", + case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll", + case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler() // this preserves the single ruler states even if "Window/ShowRulers" is off - case 6: bSet = rParent.IsViewHRuler(TRUE); break;// "Window/HorizontalRuler", - case 7: bSet = rParent.IsViewVRuler(TRUE); break;// "Window/VerticalRuler", + case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(TRUE); break; // "Window/HorizontalRuler", + case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(TRUE); break; // "Window/VerticalRuler", case 8: if(rParent.bIsHScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" + rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" break; case 9: if(rParent.bIsVScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" + rVal <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" break; - case 10: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll", - case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break;// "Zoom/Value", - case 12: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type", - case 13: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit", - case 14: pValues[nProp] <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", - case 15: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight", - case 16: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns", - case 17: bSet = rParent.IsViewLayoutBookMode(); break;// "ViewLayout/BookMode", - case 18: bSet = rParent.IsSquaredPageMode(); break;// "Other/IsSquaredPageMode", + case 10: rVal <<= (sal_Bool) rParent.IsSmoothScroll(); break; // "Window/SmoothScroll", + case 11: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value", + case 12: rVal <<= (sal_Int32)rParent.GetZoomType(); break; // "Zoom/Type", + case 13: rVal <<= (sal_Bool) rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline" + case 14: rVal <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit", + case 15: rVal <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", + case 16: rVal <<= (sal_Bool) rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight", + case 17: rVal <<= (sal_Int32)rParent.GetViewLayoutColumns(); break; // "ViewLayout/Columns", + case 18: rVal <<= (sal_Bool) rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode", + case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode", } - if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 ) - pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); } PutProperties(aNames, aValues); } @@ -353,7 +354,11 @@ void SwLayoutViewConfig::Load() { if(pValues[nProp].hasValue()) { - sal_Bool bSet = nProp < 8 || nProp == 10 || nProp == 17 || nProp == 18 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; + sal_Int32 nInt32Val = 0; + sal_Bool bSet = sal_False; + pValues[nProp] >>= nInt32Val; + pValues[nProp] >>= bSet; + switch(nProp) { case 0: rParent.SetCrossHair(bSet); break;// "Line/Guide", @@ -367,58 +372,25 @@ void SwLayoutViewConfig::Load() case 8: { rParent.bIsHScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eHScrollMetric = ((FieldUnit)nUnit); // "Window/HorizontalRulerUnit" + rParent.eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit" } break; case 9: { rParent.bIsVScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eVScrollMetric = ((FieldUnit)nUnit); // "Window/VerticalRulerUnit" + rParent.eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit" } break; case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", - case 11: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoom( static_cast< USHORT >(nVal) ); - } - break;// "Zoom/Value", - case 12: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoomType( static_cast< SvxZoomType >(nVal) ); - } - break;// "Zoom/Type", - case 13: - { - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.SetMetric((FieldUnit)nUnit, TRUE); - } - break;// "Other/MeasureUnit", - case 14: - { - sal_Int32 nTab = 0; - pValues[nProp] >>= nTab; - rParent.SetDefTab(MM100_TO_TWIP(nTab), TRUE); - } - break;// "Other/TabStop", - case 15: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", - case 16: - { - sal_Int32 nColumns = 0; - pValues[nProp] >>= nColumns; - rParent.SetViewLayoutColumns( static_cast<USHORT>(nColumns) ); - } - break;// "ViewLayout/Columns", - case 17: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", - case 18: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", + case 11: rParent.SetZoom( static_cast< USHORT >(nInt32Val) ); break;// "Zoom/Value", + case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type", + case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline" + case 14: rParent.SetMetric((FieldUnit)nInt32Val, TRUE); break;// "Other/MeasureUnit", + case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), TRUE); break;// "Other/TabStop", + case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", + case 17: rParent.SetViewLayoutColumns( static_cast<USHORT>(nInt32Val) ); break;// "ViewLayout/Columns", + case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", + case 19: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", } } } diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index dc007fc68e13..331d7035dc56 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -219,7 +219,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) : m_aListLB.SetHelpId(HID_MM_ADDRESSLIST_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aListLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aListLB.SetStyle( m_aListLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aListLB.SetSelectionMode( SINGLE_SELECTION ); m_aListLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aOK.SetClickHdl( LINK( this, SwAddressListDialog, OKHdl_Impl)); diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 349a419e1c35..90eeb6ee1982 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -134,6 +134,7 @@ #include <memory> #include <vector> #include <unomid.h> +#include <section.hxx> using namespace ::osl; using namespace ::svx; @@ -842,6 +843,23 @@ void lcl_CopyFollowPageDesc( } } +void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell ) +{ + //reset all links of the sections of synchronized labels + USHORT nSections = rWorkShell.GetSectionFmtCount(); + for( USHORT nSection = 0; nSection < nSections; ++nSection ) + { + SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() ); + if( aSectionData.GetType() == FILE_LINK_SECTION ) + { + aSectionData.SetType( CONTENT_SECTION ); + aSectionData.SetLinkFileName( String() ); + rWorkShell.UpdateSection( nSection, aSectionData ); + } + } + rWorkShell.SetLabelDoc( sal_False ); +} + BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, const SwMergeDescriptor& rMergeDescriptor) { @@ -1082,6 +1100,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // copy created file into the target document rWorkShell.ConvertFieldsToText(); rWorkShell.SetNumberingRestart(); + if( bSynchronizedDoc ) + { + lcl_RemoveSectionLinks( rWorkShell ); + } // insert the document into the target document rWorkShell.SttEndDoc(FALSE); @@ -2931,7 +2953,10 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, rWorkShell.RemoveInvisibleContent(); rWorkShell.ConvertFieldsToText(); rWorkShell.SetNumberingRestart(); - + if( bSynchronizedDoc ) + { + lcl_RemoveSectionLinks( rWorkShell ); + } // insert the document into the target document rWorkShell.SttEndDoc(FALSE); diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx index 1e0a1faf1cbc..83259add5238 100644 --- a/sw/source/ui/dbui/dbtree.cxx +++ b/sw/source/ui/dbui/dbtree.cxx @@ -260,7 +260,7 @@ void SwDBTreeList::InitTreeList() if(!pImpl->HasContext() && pImpl->GetWrtShell()) return; SetSelectionMode(SINGLE_SELECTION); - SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + SetStyle(GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! SetSpaceBetweenEntries(0); SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 758f52840230..06d7dffab0ed 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -418,7 +418,7 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf m_aStatusLB.SetHelpId(HID_MM_MAILSTATUS_TLB); static long nTabs[] = {3, 0, nPos1, aSz.Width() }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aStatusLB.SetSpaceBetweenEntries(3); diff --git a/sw/source/ui/dbui/makefile.mk b/sw/source/ui/dbui/makefile.mk deleted file mode 100644 index c2477b02ca4a..000000000000 --- a/sw/source/ui/dbui/makefile.mk +++ /dev/null @@ -1,122 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dbui -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/dbui.srs -BMP_IN=$(PRJ)$/win/imglst - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - addresslistdialog.src \ - createaddresslistdialog.src \ - customizeaddresslistdialog.src \ - dbinsdlg.src \ - dbui.src \ - dbtablepreviewdialog.src \ - mailmergechildwindow.src \ - mailmergewizard.src \ - mmdocselectpage.src \ - mmlayoutpage.src \ - mmoutputpage.src \ - mmoutputtypepage.src \ - mmaddressblockpage.src \ - mmgreetingspage.src \ - mmmergepage.src \ - mmpreparemergepage.src \ - selectdbtabledialog.src \ - -EXCEPTIONSFILES= \ - $(SLO)$/addresslistdialog.obj \ - $(SLO)$/createaddresslistdialog.obj \ - $(SLO)$/customizeaddresslistdialog.obj \ - $(SLO)$/dbinsdlg.obj \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtablepreviewdialog.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mmaddressblockpage.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/mmlayoutpage.obj \ - $(SLO)$/mmgreetingspage.obj \ - $(SLO)$/mmoutputpage.obj - -SLOFILES = \ - $(SLO)$/addresslistdialog.obj \ - $(SLO)$/createaddresslistdialog.obj \ - $(SLO)$/customizeaddresslistdialog.obj \ - $(SLO)$/dbinsdlg.obj \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/dbtablepreviewdialog.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mailmergewizard.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/mmdocselectpage.obj \ - $(SLO)$/mmlayoutpage.obj \ - $(SLO)$/mmoutputpage.obj \ - $(SLO)$/mmoutputtypepage.obj \ - $(SLO)$/mmaddressblockpage.obj \ - $(SLO)$/mmgreetingspage.obj \ - $(SLO)$/mmmergepage.obj \ - $(SLO)$/mmpreparemergepage.obj \ - $(SLO)$/dbui.obj \ - $(SLO)$/selectdbtabledialog.obj \ - $(SLO)$/swdbtoolsclient.obj - - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/dbui.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/swdbtoolsclient.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 887ec3151fc5..1c45831e97e2 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1453,7 +1453,7 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId) SvTreeListBox(pParent, rResId), m_pParentDialog(pParent) { - SetWindowBits( /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/ + SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/ WB_CLIPCHILDREN ); // SetSpaceBetweenEntries(3); SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 0fe1a3717ca1..ee2803e73aad 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1106,8 +1106,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) if(nRet != RET_OK && nRet != RET_YES) return 0; } - //create the send dialog - SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem ); //add the documents sal_uInt32 nBegin = 0; sal_uInt32 nEnd = 0; @@ -1133,7 +1131,26 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) switch( nDocType ) { case MM_DOCTYPE_OOO : break; - case MM_DOCTYPE_PDF : bIsPDF = true; break; + case MM_DOCTYPE_PDF : bIsPDF = true; + { + //the method SwIOSystemGetFilterOfFormat( ) returns the template filter + //because it uses the same user data :-( + SfxFilterMatcher aMatcher( pFilterContainer->GetName() ); + SfxFilterMatcherIter aIter( &aMatcher ); + const SfxFilter* pFilter = aIter.First(); + String sFilterMime( String::CreateFromAscii( "application/pdf" )); + while ( pFilter ) + { + if( pFilter->GetMimeType() == sFilterMime && pFilter->CanExport() ) + { + pSfxFlt = pFilter; + break; + } + pFilter = aIter.Next(); + } + + } + break; case MM_DOCTYPE_WORD: { //the method SwIOSystemGetFilterOfFormat( ) returns the template filter @@ -1239,6 +1256,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY); xStore->storeToURL( sTargetTempURL, aValues ); + //create the send dialog + SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem ); pDlg->SetDocumentCount( nEnd ); pDlg->ShowDialog(); //help to force painting the dialog diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 6cb7b87336c8..41f9a18a0325 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -109,7 +109,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent, static long nTabs[] = {3, 0, aSz.Width()/2, aSz.Width() }; m_aTableLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aTableLB.SetHelpId(HID_MM_SELECTDBTABLEDDIALOG_LISTBOX); - m_aTableLB.SetWindowBits( WB_CLIPCHILDREN ); + m_aTableLB.SetStyle( m_aTableLB.GetStyle() | WB_CLIPCHILDREN ); m_aTableLB.SetSpaceBetweenEntries(3); m_aTableLB.SetSelectionMode( SINGLE_SELECTION ); m_aTableLB.SetDragDropMode( 0 ); diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk deleted file mode 100644 index 758ea00fcb10..000000000000 --- a/sw/source/ui/dialog/makefile.mk +++ /dev/null @@ -1,99 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dialog -LIBTARGET=no - -# future: DEMO\dialog.srs - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - abstract.src \ - ascfldlg.src \ - dialog.src \ - docstdlg.src \ - regionsw.src \ - wordcountdialog.src - -EXCEPTIONSFILES = \ - $(SLO)$/SwSpellDialogChildWindow.obj - -SLOFILES = \ - $(SLO)$/abstract.obj \ - $(SLO)$/addrdlg.obj \ - $(SLO)$/ascfldlg.obj \ - $(SLO)$/docstdlg.obj \ - $(SLO)$/macassgn.obj \ - $(SLO)$/SwSpellDialogChildWindow.obj \ - $(SLO)$/regionsw.obj \ - $(SLO)$/uiregionsw.obj \ - $(SLO)$/swabstdlg.obj \ - $(SLO)$/swuiexp.obj \ - $(SLO)$/swwrtshitem.obj \ - $(SLO)$/swdialmgr.obj \ - $(SLO)$/wordcountdialog.obj \ - $(SLO)$/swdlgfact.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/regionsw.obj \ - $(SLO)$/swabstdlg.obj \ - $(SLO)$/SwSpellDialogChildWindow.obj \ - $(SLO)$/swwrtshitem.obj - -# $(SLO)$/macassgn.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk -$(INCCOM)$/swuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - $(RM) $@ - echo \#define DLL_NAME \"libswui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE - echo \#define DLL_NAME \"swui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ENDIF - -$(SLO)$/swabstdlg.obj : $(INCCOM)$/swuilib.hxx - - - - - - - diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx index a39c1866b717..b873d8028024 100644 --- a/sw/source/ui/dialog/swabstdlg.cxx +++ b/sw/source/ui/dialog/swabstdlg.cxx @@ -29,10 +29,10 @@ #include "precompiled_sw.hxx" #include "swabstdlg.hxx" -#include "swuilib.hxx" #include <osl/module.hxx> #include <tools/string.hxx> +#include <vcl/unohelp.hxx> typedef SwAbstractDialogFactory* (__LOADONCALLAPI *SwFuncPtrCreateDialogFactory)(); @@ -42,7 +42,8 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() { SwFuncPtrCreateDialogFactory fp = 0; static ::osl::Module aDialogLibrary; - if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( DLL_NAME ) ) ) ) + static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", TRUE)); + if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ) ) ) fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() ) aDialogLibrary.getFunctionSymbol( ::rtl::OUString::createFromAscii("CreateDialogFactory") ); if ( fp ) diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 26a86ec2cbfa..c8c19d5bcc0b 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -582,5 +582,3 @@ struct SwDialogsResMgr }; #endif - - diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index b4151f6d1462..5acc169c4979 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -432,7 +432,7 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) aTree.SetHelpId(HID_REGION_TREE); aTree.SetSelectionMode( MULTIPLE_SELECTION ); - aTree.SetWindowBits(WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); + aTree.SetStyle(aTree.GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); aTree.SetSpaceBetweenEntries(0); if(bWeb) diff --git a/sw/source/ui/dochdl/makefile.mk b/sw/source/ui/dochdl/makefile.mk deleted file mode 100644 index 48400052f5c5..000000000000 --- a/sw/source/ui/dochdl/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dochdl -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - dochdl.src \ - selglos.src - -SLOFILES = \ - $(SLO)$/gloshdl.obj \ - $(SLO)$/selglos.obj \ - $(SLO)$/swdtflvr.obj - -EXCEPTIONSFILES = \ - $(SLO)$/swdtflvr.obj - -# $(SLO)$/dataex.obj \ - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/gloshdl.obj \ - $(SLO)$/swdtflvr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index 6022a4646ae6..c49c689851ba 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -85,20 +85,13 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) if ( mrSidebarWin.IsReadOnly() ) { pButtonPopup->EnableItem( FN_REPLY, false ); - pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); + pButtonPopup->EnableItem( FN_DELETE_COMMENT, false ); pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, false ); pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, false ); } else { - if ( mrSidebarWin.IsProtected() ) - { - pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); - } - else - { - pButtonPopup->EnableItem( FN_DELETE_NOTE, true ); - } + pButtonPopup->EnableItem( FN_DELETE_COMMENT, !mrSidebarWin.IsProtected() ); pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, true ); pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, true ); } diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index 884409826362..413ffaef4333 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -935,7 +935,6 @@ void SwSidebarWin::ExecuteCommand(USHORT nSlot) break; } case FN_DELETE_COMMENT: - case FN_DELETE_NOTE: //Delete(); // do not kill the parent of our open popup menu mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 ); diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk deleted file mode 100644 index a2914b2f86b7..000000000000 --- a/sw/source/ui/docvw/makefile.mk +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=docvw -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - access.src \ - docvw.src \ - annotation.src - -SLOFILES = \ - $(SLO)$/edtdd.obj \ - $(SLO)$/edtwin.obj \ - $(SLO)$/edtwin2.obj \ - $(SLO)$/edtwin3.obj \ - $(SLO)$/romenu.obj \ - $(SLO)$/srcedtw.obj \ - $(SLO)$/PostItMgr.obj \ - $(SLO)$/frmsidebarwincontainer.obj \ - $(SLO)$/AnchorOverlayObject.obj \ - $(SLO)$/ShadowOverlayObject.obj \ - $(SLO)$/SidebarWin.obj \ - $(SLO)$/SidebarWinAcc.obj \ - $(SLO)$/AnnotationWin.obj \ - $(SLO)$/AnnotationMenuButton.obj \ - $(SLO)$/SidebarTxtControl.obj \ - $(SLO)$/SidebarTxtControlAcc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 279ce515c1d9..d10a938c3046 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -103,9 +103,9 @@ void SwEnvPreview::Paint(const Rectangle &) USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight), nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight); - float fx = static_cast< float >(GetOutputSizePixel().Width () / nPageW), - fy = static_cast< float >(GetOutputSizePixel().Height() / nPageH), - f = static_cast< float >(0.8 * ( fx < fy ? fx : fy )); + float fx = (float)GetOutputSizePixel().Width () / (float)nPageW, + fy = (float)GetOutputSizePixel().Height() / (float)nPageH, + f = 0.8f * ( fx < fy ? fx : fy ); Color aBack = rSettings.GetWindowColor( ); Color aFront = SwViewOption::GetFontColor(); diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 162a6a5cea4f..c18e5587445f 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -724,7 +724,7 @@ SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) pExampleFrame(0) { FreeResource(); - aAutoTextLB.SetWindowBits( WB_HSCROLL ); + aAutoTextLB.SetStyle( aAutoTextLB.GetStyle() | WB_HSCROLL ); aAutoTextLB.SetSpaceBetweenEntries(0); aAutoTextLB.SetSelectionMode( SINGLE_SELECTION ); aAutoTextLB.SetHelpId(HID_BUSINESS_CARD_CONTENT); diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 141adf35ddf0..43ef58b11d7c 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -779,7 +779,7 @@ bool SwMailMergeDlg::ExecQryShell() m_aSelection.realloc(nEnd - nStart + 1); Any* pSelection = m_aSelection.getArray(); - for (sal_Int32 i = nStart; i != nEnd; ++i, ++pSelection) + for (sal_Int32 i = nStart; i <= nEnd; ++i, ++pSelection) *pSelection <<= i; } else if (aAllRB.IsChecked() ) diff --git a/sw/source/ui/envelp/makefile.mk b/sw/source/ui/envelp/makefile.mk deleted file mode 100644 index 3010601b0ac2..000000000000 --- a/sw/source/ui/envelp/makefile.mk +++ /dev/null @@ -1,80 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=envelp -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES =\ - envelp.src \ - envfmt.src \ - envlop.src \ - envprt.src \ - label.src \ - labfmt.src \ - labprt.src \ - mailmrge.src - -SLOFILES = \ - $(SLO)$/envfmt.obj \ - $(SLO)$/envimg.obj \ - $(SLO)$/envlop1.obj \ - $(SLO)$/envprt.obj \ - $(SLO)$/labelcfg.obj \ - $(SLO)$/label1.obj \ - $(SLO)$/labelexp.obj \ - $(SLO)$/labfmt.obj \ - $(SLO)$/labprt.obj \ - $(SLO)$/labimg.obj \ - $(SLO)$/mailmrge.obj \ - $(SLO)$/syncbtn.obj - -EXCEPTIONSFILES= \ - $(SLO)$/labelexp.obj \ - $(SLO)$/mailmrge.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/envimg.obj \ - $(SLO)$/labelcfg.obj \ - $(SLO)$/labimg.obj \ - $(SLO)$/syncbtn.obj -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index 7d607b803536..a08e717f6948 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -115,7 +115,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) : aAddDBPB.SetClickHdl(LINK(this, SwChangeDBDlg, AddDBHdl)); aUsedDBTLB.SetSelectionMode(MULTIPLE_SELECTION); - aUsedDBTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + aUsedDBTLB.SetStyle(aUsedDBTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); aUsedDBTLB.SetSpaceBetweenEntries(0); aUsedDBTLB.SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 07ab852e199e..1fd345c832d4 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -89,7 +89,7 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) : aTypeTLB.SetHelpId(HID_FIELD_DINF_TYPE); aTypeTLB.SetSelectionMode(SINGLE_SELECTION); - aTypeTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + aTypeTLB.SetStyle(aTypeTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! // Sonst bei falschem Font Bug an OV. aTypeTLB.SetSpaceBetweenEntries(0); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 1c7ff9e09564..4713e30775bc 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -124,7 +124,7 @@ SwFldRefPage::SwFldRefPage(Window* pParent, const SfxItemSet& rCoreSet ) : // --> OD 2007-11-21 #i83479# aSelectionToolTipLB.SetSelectHdl( LINK(this, SwFldRefPage, SubTypeHdl) ); aSelectionToolTipLB.SetDoubleClickHdl( LINK(this, SwFldRefPage, InsertHdl) ); - aSelectionToolTipLB.SetWindowBits( aSelectionToolTipLB.GetWindowBits() | WB_HSCROLL ); + aSelectionToolTipLB.SetStyle( aSelectionToolTipLB.GetStyle() | WB_HSCROLL ); aSelectionToolTipLB.SetSpaceBetweenEntries(1); aSelectionToolTipLB.SetHighlightRange(); // <-- diff --git a/sw/source/ui/fldui/makefile.mk b/sw/source/ui/fldui/makefile.mk deleted file mode 100644 index ee9dbff9cf7e..000000000000 --- a/sw/source/ui/fldui/makefile.mk +++ /dev/null @@ -1,94 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. -LIBTARGET=no -PRJNAME=sw -TARGET=fldui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - changedb.src \ - DropDownFieldDialog.src\ - flddb.src \ - flddinf.src \ - flddok.src \ - fldfunc.src \ - fldref.src \ - fldtdlg.src \ - fldui.src \ - fldvar.src \ - javaedit.src \ - inpdlg.src - -SLOFILES = \ - $(SLO)$/changedb.obj \ - $(SLO)$/DropDownFieldDialog.obj \ - $(SLO)$/flddb.obj \ - $(SLO)$/flddinf.obj \ - $(SLO)$/flddok.obj \ - $(SLO)$/fldedt.obj \ - $(SLO)$/fldfunc.obj \ - $(SLO)$/fldmgr.obj \ - $(SLO)$/fldpage.obj \ - $(SLO)$/fldref.obj \ - $(SLO)$/fldtdlg.obj \ - $(SLO)$/fldvar.obj \ - $(SLO)$/javaedit.obj \ - $(SLO)$/inpdlg.obj \ - $(SLO)$/fldwrap.obj \ - $(SLO)$/xfldui.obj \ - $(SLO)$/FldRefTreeListBox.obj - - -EXCEPTIONSFILES = \ - $(SLO)$/fldtdlg.obj \ - $(SLO)$/fldedt.obj \ - $(SLO)$/flddinf.obj \ - $(SLO)$/xfldui.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/fldmgr.obj \ - $(SLO)$/fldwrap.obj \ - $(SLO)$/xfldui.obj - -# $(SLO)$/DropDownFieldDialog.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fmtui/fmtui.src b/sw/source/ui/fmtui/fmtui.src deleted file mode 100644 index 63067902178f..000000000000 --- a/sw/source/ui/fmtui/fmtui.src +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * - * 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 "fmtui.hrc" -#include "globals.hrc" - -String STR_FMT_STD -{ - Text [ en-US ] = "(none)" ; -}; -String STR_TEMPLATE_WILDCARD -{ - TEXT = "*.vor" ; -}; - //String STR_NONAME //!! VB - //{ - // TEXT = "Unbenannt "; - // TEXT [English] = "Noname "; - // TEXT [norwegian] = "Noname "; - // TEXT [italian] = "Senza nome"; - // TEXT [portuguese_brazilian] = "Semnome "; - // TEXT [portuguese] = "Semnome "; - // TEXT [finnish] = "Nimetn "; - // TEXT [danish] = "Intet navn"; - // TEXT [french] = "Sansnom "; - // TEXT [swedish] = "Namnls"; - // TEXT [dutch] = "Naamloos"; - // TEXT [spanish] = "Sin nombre "; - // TEXT [english_us] = "Noname "; - //}; -String STR_OVERWRITE -{ - /* ### ACHTUNG: Neuer Text in Resource? Wollen Sie die Vorlage wirklich berschreiben? : Wollen Sie die Vorlage wirklich berschreiben? */ - Text [ en-US ] = "\nAre you sure you want to delete this template?" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/fmtui/makefile.mk b/sw/source/ui/fmtui/makefile.mk deleted file mode 100644 index 37ad48df008e..000000000000 --- a/sw/source/ui/fmtui/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=fmtui -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tmpdlg.src - -SLOFILES = \ - $(SLO)$/tmpdlg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index c78f51f4796f..015a31fce90e 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -41,7 +41,7 @@ #endif #include <vcl/msgbox.hxx> #include <sfx2/viewfrm.hxx> -#include <svx/hdft2.hxx> +#include <svx/hdft.hxx> #include <editeng/flstitem.hxx> #include <svx/htmlmode.hxx> #include <svtools/htmlcfg.hxx> diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 5e620ce6955c..e92cd4e0ae81 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -382,6 +382,7 @@ IMPL_LINK(SwCaptionDialog, CaptionHdl, PushButton*, EMPTYARG) void SwCaptionDialog::DrawSample() { String aStr; + String sCaption = aTextEdit.GetText(); // Nummer String sFldTypeName = aCategoryBox.GetText(); @@ -436,9 +437,12 @@ void SwCaptionDialog::DrawSample() } } - aStr += aSepEdit.GetText(); + if( sCaption.Len() > 0 ) + { + aStr += aSepEdit.GetText(); + } } - aStr += aTextEdit.GetText(); + aStr += sCaption; // do preview! aPrevWin.SetPreviewText( aStr ); } diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 740d31c5e88c..54078db0f9a7 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -93,6 +93,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, aTmp += *pStr; aTmp += ')'; } + AddTabPage(TP_FRM_STD, SwFrmPage::Create, 0); AddTabPage(TP_FRM_ADD, SwFrmAddPage::Create, 0); AddTabPage(TP_FRM_WRAP, SwWrapTabPage::Create, 0); @@ -217,3 +218,4 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) break; } } + diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 49bd1b2a0c7e..c1747efaa962 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -677,7 +677,10 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : nOldV(text::VertOrientation::TOP), nOldVRel(text::RelOrientation::PRINT_AREA), pVMap( 0 ), - pHMap( 0 ) + pHMap( 0 ), + m_bAllowVertPositioning( true ), + m_bIsMathOLE( false ), + m_bIsMathBaselineAlignment( true ) { FreeResource(); SetExchangeSupport(); @@ -782,9 +785,17 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) SetMetric( aAtHorzPosED, aMetric ); SetMetric( aAtVertPosED, aMetric ); + const SfxPoolItem* pItem = NULL; const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); + if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, FALSE, &pItem)) + m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue(); + if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, FALSE, &pItem)) + m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue(); + EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment + && FLY_AS_CHAR == rAnchor.GetAnchorId()) ); + if (bFormat) { // Bei Formaten keine Ankerbearbeitung @@ -812,7 +823,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) if ( nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE ) { ASSERT(pSh , "shell not found"); - const SfxPoolItem* pItem; //OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, FALSE, &pItem)) aGrfSize = ((const SvxSizeItem*)pItem)->GetSize(); @@ -1280,8 +1290,8 @@ void SwFrmPage::InitPos(RndStdIds eId, if ( nY != LONG_MAX ) aAtVertPosED.SetValue( aAtVertPosED.Normalize(nY), FUNIT_TWIP ); } - aAtVertPosFT.Enable( bEnable ); - aAtVertPosED.Enable( bEnable ); + aAtVertPosFT.Enable( bEnable && m_bAllowVertPositioning ); + aAtVertPosED.Enable( bEnable && m_bAllowVertPositioning ); UpdateExample(); } @@ -1488,8 +1498,10 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, } } - _rLB.Enable(_rLB.GetEntryCount() != 0); - _rFT.Enable(_rLB.GetEntryCount() != 0); + const bool bEnable = _rLB.GetEntryCount() != 0 + && (&_rLB != &aVertRelationLB || m_bAllowVertPositioning); + _rLB.Enable( bEnable ); + _rFT.Enable( bEnable ); RelHdl(&_rLB); @@ -1850,6 +1862,10 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG ) PosHdl(&aHorizontalDLB); PosHdl(&aVerticalDLB); } + + EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment + && FLY_AS_CHAR == eId) ); + return 0; } @@ -1875,7 +1891,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) } else { - BOOL bEnable = text::VertOrientation::NONE == nAlign; + BOOL bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning; aAtVertPosED.Enable( bEnable ); aAtVertPosFT.Enable( bEnable ); } @@ -2304,6 +2320,19 @@ void SwFrmPage::SetFormatUsed(BOOL bFmt) } } + +void SwFrmPage::EnableVerticalPositioning( bool bEnable ) +{ + m_bAllowVertPositioning = bEnable; + aVerticalFT.Enable( bEnable ); + aVerticalDLB.Enable( bEnable ); + aAtVertPosFT.Enable( bEnable ); + aAtVertPosED.Enable( bEnable ); + aVertRelationFT.Enable( bEnable ); + aVertRelationLB.Enable( bEnable ); +} + + /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ @@ -3246,4 +3275,3 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) } return 0; } - diff --git a/sw/source/ui/frmdlg/makefile.mk b/sw/source/ui/frmdlg/makefile.mk deleted file mode 100644 index a7addb0b9493..000000000000 --- a/sw/source/ui/frmdlg/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=frmdlg -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - column.src \ - cption.src \ - frmpage.src \ - frmui.src \ - wrap.src - -SLOFILES = \ - $(SLO)$/colmgr.obj \ - $(SLO)$/column.obj \ - $(SLO)$/colex.obj \ - $(SLO)$/cption.obj \ - $(SLO)$/frmdlg.obj \ - $(SLO)$/frmmgr.obj \ - $(SLO)$/frmpage.obj \ - $(SLO)$/pattern.obj \ - $(SLO)$/uiborder.obj \ - $(SLO)$/wrap.obj - -EXCEPTIONSFILES = \ - $(SLO)$/frmpage.obj \ - $(SLO)$/cption.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/colmgr.obj \ - $(SLO)$/colex.obj \ - $(SLO)$/frmmgr.obj - - - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/globdoc/makefile.mk b/sw/source/ui/globdoc/makefile.mk deleted file mode 100644 index d75eb7af8807..000000000000 --- a/sw/source/ui/globdoc/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=globdoc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - globdoc.src - -SLOFILES = \ - $(SLO)$/globdoc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx index 1cc6ecf33cb9..f2a5e37d283b 100644 --- a/sw/source/ui/inc/column.hxx +++ b/sw/source/ui/inc/column.hxx @@ -49,7 +49,7 @@ #endif #include <vcl/timer.hxx> #ifndef _IMAGEBTN_HXX //autogen -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif #include <svtools/ctrlbox.hxx> #include <svtools/valueset.hxx> diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx index b7ae315a9beb..849bb63b9d51 100644 --- a/sw/source/ui/inc/envlop.hxx +++ b/sw/source/ui/inc/envlop.hxx @@ -45,7 +45,7 @@ #endif #ifndef _IMAGEBTN_HXX //autogen -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif #include "envimg.hxx" diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx index cb27672de865..83f4b5b758f3 100644 --- a/sw/source/ui/inc/fldedt.hxx +++ b/sw/source/ui/inc/fldedt.hxx @@ -27,7 +27,7 @@ #ifndef _FLDEDT_HXX #define _FLDEDT_HXX #include <sfx2/basedlgs.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> class SwView; class SwWrtShell; diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx index 5776cc9f3dd8..decce61e2606 100644 --- a/sw/source/ui/inc/frmdlg.hxx +++ b/sw/source/ui/inc/frmdlg.hxx @@ -41,6 +41,7 @@ class SwFrmDlg : public SfxTabDialog BOOL m_bFormat; BOOL m_bNew; BOOL m_bHTMLMode; + bool m_bEnableVertPos; const SfxItemSet& m_rSet; USHORT m_nDlgType; SwWrtShell* m_pWrtShell; diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index 219f6c37a308..979f5cf12dd6 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -28,27 +28,17 @@ #ifndef _FRMPAGE_HXX #define _FRMPAGE_HXX -#ifndef _FIXED_HXX //autogen #include <vcl/fixed.hxx> -#endif -#ifndef _BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif -#ifndef _LSTBOX_HXX //autogen #include <vcl/lstbox.hxx> -#endif -#ifndef _FIELD_HXX //autogen #include <vcl/field.hxx> -#endif #include <sfx2/tabdlg.hxx> #include <svx/swframeposstrings.hxx> #include <swtypes.hxx> #include <bmpwin.hxx> #include <svx/swframeexample.hxx> #include <prcntfld.hxx> -#ifndef _GLOBALS_HRC #include <globals.hrc> -#endif namespace sfx2{class FileDialogHelper;} @@ -142,6 +132,10 @@ class SwFrmPage: public SfxTabPage FrmMap* pVMap; FrmMap* pHMap; + bool m_bAllowVertPositioning; + bool m_bIsMathOLE; + bool m_bIsMathBaselineAlignment; + virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); @@ -205,6 +199,7 @@ public: void SetFormatUsed(BOOL bFmt); void SetFrmType(USHORT nType) { nDlgType = nType; } inline BOOL IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; } + void EnableVerticalPositioning( bool bEnable ); }; class SwGrfExtPage: public SfxTabPage diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx index 6fecb6c82b30..239c67185e07 100644 --- a/sw/source/ui/inc/javaedit.hxx +++ b/sw/source/ui/inc/javaedit.hxx @@ -44,7 +44,7 @@ #endif #ifndef _IMAGEBTN_HXX //autogen -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif class SwWrtShell; diff --git a/sw/source/ui/inc/makefile.mk b/sw/source/ui/inc/makefile.mk deleted file mode 100644 index cb9b968dcc06..000000000000 --- a/sw/source/ui/inc/makefile.mk +++ /dev/null @@ -1,42 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=uiinc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -LOCALIZE_ME=swmn_tmpl.hrc toolbox_tmpl.hrc - -.INCLUDE : target.mk - diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index d05e68588b2d..61b8056aa309 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -353,6 +353,12 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage FixedLine aCrsrOptFL; CheckBox aCrsrInProtCB; + FixedLine m_aLayoutOptionsFL; + CheckBox m_aMathBaselineAlignmentCB; + + SwWrtShell * m_pWrtShell; + + SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet ); ~SwShdwCrsrOptionsTabPage(); @@ -362,6 +368,9 @@ public: virtual BOOL FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); + + void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; } + virtual void PageCreated( SfxAllItemSet aSet ); }; /*----------------------------------------------------------------------- @@ -498,5 +507,3 @@ private: }; #endif //PRODUCT #endif - - diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx index 9d96d6ac3a9d..eafe394d2b27 100644 --- a/sw/source/ui/inc/split.hxx +++ b/sw/source/ui/inc/split.hxx @@ -38,7 +38,7 @@ #endif #ifndef _IMAGEBTN_HXX //autogen -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif #ifndef _BUTTON_HXX //autogen diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc deleted file mode 100644 index 0d5b3265e79a..000000000000 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ /dev/null @@ -1,379 +0,0 @@ -/************************************************************************* - * - * 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. - * - ************************************************************************/ - -#ifndef _SWMN_HRC -#define _SWMN_HRC - -#include <svx/dialogs.hrc> -#include <svx/globlmn.hrc> -#include "cmdid.h" -#include "app.hrc" -#include "globals.hrc" -#include "helpid.h" -#include "popup.hrc" -//#include "cfgid.h" - -/* --------------------- F O R M A T --------------------------------- */ - -#define SEPARATOR MenuItem { Separator = TRUE; } - -//define for ITEM_FORMAT_NUMBERING -#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS -#define MN_NUMBERING ITEM_FORMAT_NUMBERING - -#define MN_TXT\ - MenuItem\ - {\ - ITEM_FORMAT_CHAR_DLG\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_PARA_DLG\ - };\ - MenuItem\ - {\ - Identifier = FN_FORMAT_PAGE_DLG ; \ - HelpId = CMD_FN_FORMAT_PAGE_DLG ; \ - Text [ en-US ] = "Pa~ge..." ; \ - }; - - -#define MN_TEXT_ATTR\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_STYLE ; \ - Command = ".uno:StyleMenu" ; \ - Text [ en-US ] = "St~yle" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_WEIGHT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_POSTURE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_OVERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_SHADOWED\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_CONTOUR\ - };\ - SEPARATOR ; \ - MenuItem\ - {\ - Identifier = FN_SET_SUPER_SCRIPT ; \ - HelpId = CMD_FN_SET_SUPER_SCRIPT ; \ - Text [ en-US ] = "Superscript" ; \ - };\ - MenuItem\ - {\ - Identifier = FN_SET_SUB_SCRIPT ; \ - HelpId = CMD_FN_SET_SUB_SCRIPT ; \ - Text [ en-US ] = "Subscript" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_ALGN ; \ - Command = ".uno:AlignTextMenu" ; \ - Text [ en-US ] = "A~lignment" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ - };\ - MenuItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ - HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \ - RadioCheck = TRUE ; \ - Text [ en-US ] = "Justified" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_LINESPACE ; \ - Command = ".uno:LineSpacingMenu" ; \ - Text [ en-US ] = "Line Spacing" ; \ - _MenuItemFlags = MIB_RADIOCHECK ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_10\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_15\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_20\ - };\ - };\ - };\ - }; - -/* --------------------- M E N U --------------------------------- */ - -/* - - -The application menu bar resource has become obsolete. You can now find the menu bar at the following -location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml - - -*/ - -/* --------------------- D O C U M E N T -------------------------- */ - - -#define _MN_EDIT_FIELD \ - MenuItem \ - { \ - Identifier = FN_EDIT_FIELD ; \ - HelpId = CMD_FN_EDIT_FIELD ; \ - Text [ en-US ] = "Fields..." ; \ - }; -#define _MN_EDIT_FOOTNOTE \ - MenuItem \ - { \ - Identifier = FN_EDIT_FOOTNOTE ; \ - HelpId = CMD_FN_EDIT_FOOTNOTE ; \ - Text [ en-US ] = "Footnote/Endnote~..." ; \ - }; - #define _MN_EDIT_IDX_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ - HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG ; \ - Text [ en-US ] = "Inde~x Entry..." ; \ - }; - -#define _MN_EDIT_REDLINE \ - MenuItem \ - { \ - Identifier = FN_REDLINE_ACCEPT_DIRECT; \ - HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \ - Text [ en-US ] = "Accept Change" ; \ - };\ - MenuItem \ - { \ - Identifier = FN_REDLINE_REJECT_DIRECT ; \ - HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \ - Text [ en-US ] = "Reject Change" ; \ - }; \ - SEPARATOR ; -#define _MN_EDIT_BIB_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ - HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG ; \ - Text [ en-US ] = "~Bibliography Entry..."; \ - }; \ - SEPARATOR ; - -#define _MN_EDIT_OPEN_HYPERLINK \ - MenuItem \ - { \ - ITEM_OPEN_HYPERLINK \ - };\ - MenuItem \ - { \ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpId = CMD_FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "Edit Hyperlink..."; \ - }; \ - MenuItem \ - { \ - Identifier = FN_COPY_HYPERLINK_LOCATION; \ - HelpId = CMD_FN_COPY_HYPERLINK_LOCATION; \ - Text [ en-US ] = "Copy Hyperlink ~Location"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_HYPERLINK ; \ - HelpId = CMD_FN_REMOVE_HYPERLINK ; \ - Text [ en-US ] = "Remo~ve Hyperlink"; \ - }; - -#define _MN_EDIT_OPEN_SMARTTAGMENU \ - MenuItem \ - { \ - ITEM_OPEN_SMARTTAGMENU \ - }; - -#define _MN_EDIT__HYPERLINK \ - MenuItem\ - {\ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpId = CMD_FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "~Edit Hyperlink" ; \ - }; - -#define _DEFAULT_TEXT_EDIT_ELEMENTS \ - _MN_EDIT_FIELD \ - _MN_EDIT_FOOTNOTE \ - _MN_EDIT_IDX_ENTRY_DLG \ - _MN_EDIT_BIB_ENTRY_DLG \ - _MN_EDIT_REDLINE \ - MenuItem \ - { \ - ITEM_POPUP_TEMPLATE_EDIT \ - }; \ - SEPARATOR ; \ - _MN_EDIT_OPEN_HYPERLINK \ - _MN_EDIT_OPEN_SMARTTAGMENU - - -#define MN_RESET\ - MenuItem\ - {\ - Identifier = FN_FORMAT_RESET ; \ - HelpId = CMD_FN_FORMAT_RESET ; \ - Text [ en-US ] = "~Default Formatting" ; \ - }; - -#define _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MenuItem \ - { \ - Identifier = FN_NUMBER_NEWSTART; \ - HelpId = CMD_FN_NUMBER_NEWSTART; \ - Text[ en-US ] = "Restart Numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_CONTINUE; \ - HelpId = CMD_FN_NUM_CONTINUE; \ - Text[ en-US ] = "Continue previous numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_UP; \ - HelpId = CMD_FN_NUM_BULLET_UP; \ - Text[ en-US ] = "Up One Level"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_DOWN; \ - HelpId = CMD_FN_NUM_BULLET_DOWN; \ - Text[ en-US ] = "Down One Level"; \ - }; - -#define BASE_TEXT_POPUPMENU_BEGIN \ -{ \ - ItemList = \ - { \ - MN_RESET \ - _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MN_TEXT_ATTR \ - SEPARATOR ; \ - MN_TXT \ - MN_NUMBERING \ - ITEM_TRANSLITERATE_MENU \ - SEPARATOR ; - -// not in Writer/Web -#define BASE_TEXT_POPUPMENU_NOWEB \ - MenuItem \ - { \ - Identifier = FN_UPDATE_CUR_TOX ; \ - HelpId = CMD_FN_UPDATE_CUR_TOX ; \ - Text [ en-US ] = "~Update Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_EDIT_CURRENT_TOX; \ - HelpId = CMD_FN_EDIT_CURRENT_TOX; \ - Text [ en-US ] = "~Edit Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_CUR_TOX; \ - HelpId = CMD_FN_REMOVE_CUR_TOX; \ - Text [ en-US ] = "Delete Index/Table"; \ - }; \ - SEPARATOR ; - -#define BASE_TEXT_POPUPMENU_END \ - _DEFAULT_TEXT_EDIT_ELEMENTS \ - }; \ -}; - -#endif - diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx index 8c7160433837..4a1294187876 100644 --- a/sw/source/ui/inc/swuicnttab.hxx +++ b/sw/source/ui/inc/swuicnttab.hxx @@ -163,6 +163,8 @@ class SwTOXSelectTabPage : public SfxTabPage // PushButton aChapterDlgPB; //#outline level,removed by zhaojianwei CheckBox aAddStylesCB; PushButton aAddStylesPB; + Point aAddStylesPosDef; + Point aAddStylesPosUser; //user CheckBox aFromTablesCB; CheckBox aFromFramesCB; diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx index 037aac07fe16..3f529f91affe 100644 --- a/sw/source/ui/inc/swuiidxmrk.hxx +++ b/sw/source/ui/inc/swuiidxmrk.hxx @@ -52,7 +52,7 @@ #endif #ifndef _IMAGEBTN_HXX //autogen -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif #include <sfx2/childwin.hxx> #include "toxe.hxx" diff --git a/sw/source/ui/inc/toolbox_tmpl.hrc b/sw/source/ui/inc/toolbox.hrc index 73ab3059d705..73ab3059d705 100644 --- a/sw/source/ui/inc/toolbox_tmpl.hrc +++ b/sw/source/ui/inc/toolbox.hrc diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx index 7864bf135934..0758f89af8bf 100644 --- a/sw/source/ui/inc/usrpref.hxx +++ b/sw/source/ui/inc/usrpref.hxx @@ -147,6 +147,8 @@ class SwMasterUsrPref : public SwViewOption sal_Int32 nDefTab; //default tab stop distance sal_Bool bIsSquaredPageMode; //default page mode for text grid + sal_Bool bIsAlignMathObjectsToBaseline; + SwContentViewConfig aContentConfig; SwLayoutViewConfig aLayoutConfig; SwGridConfig aGridConfig; @@ -271,6 +273,13 @@ public: aLayoutConfig.SetModified(); } + sal_Bool IsAlignMathObjectsToBaseline() const { return bIsAlignMathObjectsToBaseline; } + void SetAlignMathObjectsToBaseline( sal_Bool bVal, sal_Bool bNoModify = sal_False ) + { + bIsAlignMathObjectsToBaseline = bVal; + if(!bNoModify) + aLayoutConfig.SetModified(); + } }; #endif diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx index 4ca42086d93e..f6a6b19c3c73 100644 --- a/sw/source/ui/inc/workctrl.hxx +++ b/sw/source/ui/inc/workctrl.hxx @@ -31,7 +31,7 @@ #include <vcl/toolbox.hxx> #include <svtools/stdctrl.hxx> #ifndef _IMAGEBTN_HXX //autogen -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif class PopupMenu; diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx index 7d435f90cd17..e0fc8a394c5f 100644 --- a/sw/source/ui/inc/wrap.hxx +++ b/sw/source/ui/inc/wrap.hxx @@ -31,7 +31,7 @@ #include <sfx2/basedlgs.hxx> #ifndef _IMAGEBTN_HXX //autogen -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif #ifndef _BUTTON_HXX //autogen diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a8a01a4f8222..a453a46988ee 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -828,7 +828,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, rHB.Show(); SwIndexTreeLB& rTLB = aHeaderTree.GetTreeListBox(); - rTLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT); + rTLB.SetStyle(rTLB.GetStyle()|WB_CLIPCHILDREN|WB_SORT); //aStylesTLB.SetSelectHdl(LINK(this, SwAddStylesDlg_Impl, SelectHdl)); rTLB.GetModel()->SetSortMode(SortAscending); for(i = 0; i < MAXLEVEL; ++i) @@ -1523,6 +1523,18 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) //aAddStylesPB.SetPosPixel(aPos); //} //else if( nType & TO_ILLUSTRATION )//<-removed end. + // initialize button positions + + //#i111993# add styles button has two different positions + if( !aAddStylesPosDef.X() ) + { + aAddStylesPosDef = ( aAddStylesPB.GetPosPixel() ); + // move left! + Point aPos(aAddStylesPosDef); + aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); + aAddStylesPosUser = aPos; + } + if( nType & TO_ILLUSTRATION ) //add by zhaojianwei aCaptionSequenceLB.SelectEntry( SwStyleNameMapper::GetUIName( RES_POOLCOLL_LABEL_ABB, aEmptyStr )); @@ -1532,11 +1544,11 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) else if( nType & TO_USER ) { aAddStylesCB.SetText(sAddStyleUser); - // move left! - Point aPos(aAddStylesPB.GetPosPixel()); - // aPos.X() = aChapterDlgPB.GetPosPixel().X(); - aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); - aAddStylesPB.SetPosPixel(aPos); + aAddStylesPB.SetPosPixel(aAddStylesPosUser); + } + else if( nType & TO_CONTENT ) + { + aAddStylesPB.SetPosPixel(aAddStylesPosDef); } aCollectSameCB.Show( 0 != (nType & TO_INDEX) ); @@ -1826,8 +1838,8 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt ) { const Selection& rSel = GetSelection(); sal_uInt16 nTextLen = GetText().Len(); - if(rSel.A() == rSel.B() && - !rSel.A() || rSel.A() == nTextLen ) + if( (rSel.A() == rSel.B() && + !rSel.A() ) || rSel.A() == nTextLen ) { sal_Bool bCall = sal_False; KeyCode aCode = rKEvt.GetKeyCode(); @@ -2124,7 +2136,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet FreeResource(); sLevelStr = aLevelFT.GetText(); - aLevelLB.SetWindowBits( WB_HSCROLL ); + aLevelLB.SetStyle( aLevelLB.GetStyle() | WB_HSCROLL ); aLevelLB.SetSpaceBetweenEntries(0); aLevelLB.SetSelectionMode( SINGLE_SELECTION ); aLevelLB.SetHighlightRange(); // select full width @@ -3804,8 +3816,8 @@ IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit) IMPL_LINK(SwTokenWindow, NextItemHdl, SwTOXEdit*, pEdit) { sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pEdit); - if(nPos && !pEdit->IsNextControl() || - nPos < aControlList.Count() - 1 && pEdit->IsNextControl()) + if( (nPos && !pEdit->IsNextControl()) || + (nPos < aControlList.Count() - 1 && pEdit->IsNextControl())) { aControlList.Seek(nPos); Control* pNextPrev = pEdit->IsNextControl() ? aControlList.Next() : aControlList.Prev(); @@ -3840,8 +3852,8 @@ IMPL_LINK(SwTokenWindow, TbxFocusHdl, SwTOXEdit*, pEdit) IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn ) { sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pBtn); - if(nPos && !pBtn->IsNextControl() || - nPos < aControlList.Count() - 1 && pBtn->IsNextControl()) + if( (nPos && !pBtn->IsNextControl()) || + (nPos < aControlList.Count() - 1 && pBtn->IsNextControl())) { aControlList.Seek(nPos); sal_Bool bNext = pBtn->IsNextControl(); diff --git a/sw/source/ui/index/makefile.mk b/sw/source/ui/index/makefile.mk deleted file mode 100644 index 647b579e531b..000000000000 --- a/sw/source/ui/index/makefile.mk +++ /dev/null @@ -1,68 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=index -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - cnttab.src \ - idxmrk.src \ - multmrk.src - -EXCEPTIONSFILES = \ - $(SLO)$/cnttab.obj \ - $(SLO)$/cntex.obj - -SLOFILES = \ - $(SLO)$/cnttab.obj \ - $(SLO)$/cntex.obj \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/swuiidxmrk.obj \ - $(SLO)$/multmrk.obj \ - $(SLO)$/toxmgr.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/toxmgr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/lingu/makefile.mk b/sw/source/ui/lingu/makefile.mk deleted file mode 100644 index 617910a61060..000000000000 --- a/sw/source/ui/lingu/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=lingu - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/olmenu.obj \ - -SLOFILES = \ - $(SLO)$/hyp.obj \ - $(SLO)$/olmenu.obj \ - $(SLO)$/sdrhhcwrap.obj \ - $(SLO)$/hhcwrp.obj - -SRS1NAME=$(TARGET) -SRC1FILES = \ - olmenu.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk deleted file mode 100644 index b331a2a00765..000000000000 --- a/sw/source/ui/makefile.mk +++ /dev/null @@ -1,101 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sw -TARGET=ui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(GUI)" != "OS2" -.IF "$(GUI)" != "WNT" -.IF "$(COM)" != "BLC" -.IF "$(COM)" != "WTC" -LIBFLAGS=/NOI /NOE /PAGE:256 -.ENDIF -.ENDIF -.ENDIF -.ENDIF - -# --- Files -------------------------------------------------------- - -# andere Label als Verzeichnisnamen fuer VC++/NT - -SUBLIBS1= \ - $(SLB)$/app.lib \ - $(SLB)$/cctrl.lib \ - $(SLB)$/chrdlg.lib \ - $(SLB)$/config.lib \ - $(SLB)$/dbui.lib \ - $(SLB)$/dialog.lib \ - $(SLB)$/dochdl.lib \ - $(SLB)$/docvw.lib \ - $(SLB)$/envelp.lib \ - $(SLB)$/fldui.lib \ - $(SLB)$/frmdlg.lib \ - $(SLB)$/globdoc.lib - -SUBLIBS2= \ - $(SLB)$/index.lib \ - $(SLB)$/lingu.lib \ - $(SLB)$/misc.lib \ - $(SLB)$/ribbar.lib \ - $(SLB)$/shells.lib \ - $(SLB)$/smartmenu.lib \ - $(SLB)$/table.lib \ - $(SLB)$/unoidl.lib \ - $(SLB)$/utlui.lib \ - $(SLB)$/web.lib \ - $(SLB)$/uiview.lib \ - $(SLB)$/wrtsh.lib - -# ----------------------------------------------------------- - -################################################################ - -LIB1TARGET=$(SLB)$/ui1.lib -LIB1FILES= \ - $(SUBLIBS1) - -LIB2TARGET=$(SLB)$/ui2.lib -LIB2FILES= \ - $(SUBLIBS2) - -.INCLUDE : target.mk - -################################################################ - -kill: - @$(RM) $(SLB)$/ui.lst - @$(RM) $(SLB)$/ui.lib - - diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 06a2e1ae69f4..67fc32bcf1c9 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -265,7 +265,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) } // Seite - for( i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_LANDSCAPE; ++i ) + for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i ) aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr )); USHORT nCount = pSh->GetPageDescCnt(); diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 59a918fc4030..e462eb7530b6 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -107,7 +107,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, aGroupTLB.SetHelpId(HID_GLOS_GROUP_TREE); aGroupTLB.SetTabs( &nTabs[0], MAP_APPFONT ); - aGroupTLB.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); + aGroupTLB.SetStyle(aGroupTLB.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); aGroupTLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); aGroupTLB.GetModel()->SetSortMode(SortAscending); aNewPB.SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl)); diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx index 9ce1038eb898..6ed886fb3974 100644 --- a/sw/source/ui/misc/glosdoc.cxx +++ b/sw/source/ui/misc/glosdoc.cxx @@ -523,7 +523,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull) aDirArr.DeleteAndDestroy(0, aDirArr.Count()); if(!nTokenCount || - m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath) ) + (m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath)) ) { m_sOldErrPath = m_sErrPath; // Falscher Pfad, d.h. AutoText-Verzeichnis existiert nicht diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index a2b6b85a7449..2d2c1989d65c 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -294,7 +294,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, aInsertBtn.Enable(sal_False); aNameED.GrabFocus(); aCategoryBox.SetHelpId(HID_MD_GLOS_CATEGORY); - aCategoryBox.SetWindowBits(WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); + aCategoryBox.SetStyle(aCategoryBox.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren aCategoryBox.SetNodeDefaultImages( ); diff --git a/sw/source/ui/misc/makefile.mk b/sw/source/ui/misc/makefile.mk deleted file mode 100644 index 72d9f80aec3f..000000000000 --- a/sw/source/ui/misc/makefile.mk +++ /dev/null @@ -1,96 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=misc -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - bookmark.src \ - docfnote.src \ - glossary.src \ - glosbib.src \ - insfnote.src \ - insrule.src \ - linenum.src \ - num.src \ - numberingtypelistbox.src \ - outline.src \ - pgfnote.src \ - pggrid.src \ - redlndlg.src \ - srtdlg.src - -EXCEPTIONSFILES = \ - $(SLO)$/glossary.obj \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/outline.obj \ - $(SLO)$/redlndlg.obj - - -SLOFILES = \ - $(SLO)$/bookmark.obj \ - $(SLO)$/docfnote.obj \ - $(SLO)$/glosbib.obj \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glossary.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/insfnote.obj \ - $(SLO)$/insrule.obj \ - $(SLO)$/linenum.obj \ - $(SLO)$/num.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/outline.obj \ - $(SLO)$/pgfnote.obj \ - $(SLO)$/pggrid.obj \ - $(SLO)$/redlndlg.obj \ - $(SLO)$/swmodalredlineacceptdlg.obj \ - $(SLO)$/srtdlg.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/redlndlg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index e733aa0389c2..5380a00afbaf 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -617,8 +617,8 @@ void SwOutlineSettingsTabPage::Update() bSameSuffix &= aNumFmtArr[i]->GetSuffix() == aNumFmtArr[0]->GetSuffix(); bSameComplete &= aNumFmtArr[i]->GetIncludeUpperLevels() == aNumFmtArr[0]->GetIncludeUpperLevels(); const SwCharFmt* pFmt = aNumFmtArr[i]->GetCharFmt(); - bSameCharFmt &= !pFirstFmt && !pFmt - || pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName(); + bSameCharFmt &= (!pFirstFmt && !pFmt) + || (pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName()); } } CheckForStartValue_Impl(aNumFmtArr[0]->GetNumberingType()); diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index b87060bd19b0..0101e92a0081 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -273,7 +273,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : pActLB->SelectEntryPos(0); - pTable->SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + pTable->SetStyle(pTable->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); pTable->SetNodeDefaultImages(); pTable->SetSelectionMode(MULTIPLE_SELECTION); pTable->SetHighlightRange(1); diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk deleted file mode 100644 index 2adb59eec185..000000000000 --- a/sw/source/ui/ribbar/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ribbar - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tbxanchr.src \ - inputwin.src \ - workctrl.src - -EXCEPTIONSFILES = \ - $(SLO)$/tblctrl.obj \ - $(SLO)$/tbxanchr.obj \ - $(SLO)$/workctrl.obj - -SLOFILES = \ - $(SLO)$/inputwin.obj \ - $(SLO)$/tbxanchr.obj \ - $(SLO)$/conrect.obj \ - $(SLO)$/conform.obj \ - $(SLO)$/conpoly.obj \ - $(SLO)$/conarc.obj \ - $(SLO)$/concustomshape.obj \ - $(SLO)$/dselect.obj \ - $(SLO)$/drawbase.obj \ - $(SLO)$/tblctrl.obj \ - $(SLO)$/workctrl.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/ribbar.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index e795c123d3a2..8115b4ec7438 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -1010,7 +1010,6 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq) case FN_REPLY: case FN_POSTIT: case FN_DELETE_COMMENT: - case FN_DELETE_NOTE: if ( pPostItMgr->HasActiveSidebarWin() ) pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot); break; @@ -1058,24 +1057,15 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) switch( nSlotId ) { case FN_POSTIT: - case FN_DELETE_NOTE: case FN_DELETE_NOTE_AUTHOR: case FN_DELETE_ALL_NOTES: case FN_HIDE_NOTE: case FN_HIDE_NOTE_AUTHOR: case FN_HIDE_ALL_NOTES: - { - if ( !pPostItMgr || - !pPostItMgr->HasActiveAnnotationWin() ) - { - rSet.DisableItem(nWhich); - } - break; - } case FN_DELETE_COMMENT: { if ( !pPostItMgr || - !pPostItMgr->HasActiveSidebarWin() /*HasActiveRedCommentWin()*/ ) + !pPostItMgr->HasActiveAnnotationWin() ) { rSet.DisableItem(nWhich); } @@ -1108,7 +1098,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) if (pPostItMgr->HasActiveSidebarWin()) { if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) && - ( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) ) + ( (nSlotId==FN_DELETE_COMMENT) || (nSlotId==FN_REPLY) ) ) rSet.DisableItem( nWhich ); } nWhich = aIter.NextWhich(); diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 0500b4a88310..15c97f67c847 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -1080,6 +1080,14 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.SetFlyFrmAttr(aSet); } + // if new anchor is 'as char' and it is a Math object and the usual + // pre-conditions are met then align the formula to the baseline of the text + const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); + const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() ) + && FLY_AS_CHAR == eSet && rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + if (bDoMathBaselineAlignment) + rSh.AlignFormulaToBaseline( xObj ); + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); if( nHtmlMode ) { diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 5d972af52f72..1bb2ae01ba6e 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -52,7 +52,7 @@ #include <vcl/msgbox.hxx> // <-- - +#include <doc.hxx> #include <fmturl.hxx> #include <fmtclds.hxx> #include <fmtcnct.hxx> @@ -78,6 +78,7 @@ #include <helpid.h> #include <cmdid.h> +#include <cfgitems.hxx> #include <globals.hrc> #include <popup.hrc> #include <shells.hrc> @@ -408,14 +409,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) SID_HTML_MODE, SID_HTML_MODE, FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT, + FN_OLE_IS_MATH, FN_OLE_IS_MATH, + FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT, 0); const SwViewOption* pVOpt = rSh.GetViewOptions(); if(nSel & nsSelectionType::SEL_OLE) - { - aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, - pVOpt->IsKeepRatio())); - } + aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) ); aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); if( nSel & nsSelectionType::SEL_OLE ) @@ -446,6 +446,12 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff) rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); + // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated + aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT, + rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) ); + const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); + aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) ); + UINT16 nDefPage = 0; if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET) nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); @@ -711,7 +717,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_HORZ_LEFT: if ( (eFrmType & FRMTYPE_FLY_INCNT) || bProtect || - (nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode ) + ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode) ) rSet.DisableItem( nWhich ); break; case FN_FRAME_ALIGN_VERT_ROW_TOP: @@ -721,7 +727,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_CHAR_CENTER: case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM: if ( !(eFrmType & FRMTYPE_FLY_INCNT) || bProtect - || bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich ) + || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) ) rSet.DisableItem( nWhich ); break; @@ -732,7 +738,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_TOP: case FN_FRAME_ALIGN_VERT_CENTER: case FN_FRAME_ALIGN_VERT_BOTTOM: - if ( bProtect || bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) + if ( bProtect || (bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) ) rSet.DisableItem( nWhich ); else { @@ -1146,3 +1152,4 @@ void SwFrameShell::StateInsert(SfxItemSet &rSet) if ((nSel & nsSelectionType::SEL_GRF) || (nSel & nsSelectionType::SEL_OLE)) rSet.DisableItem(FN_INSERT_FRAME); } + diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk deleted file mode 100644 index dce62a2c9336..000000000000 --- a/sw/source/ui/shells/makefile.mk +++ /dev/null @@ -1,94 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=shells - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - shells.src - -SLOFILES = \ - $(SLO)$/langhelper.obj \ - $(SLO)$/annotsh.obj \ - $(SLO)$/basesh.obj \ - $(SLO)$/beziersh.obj \ - $(SLO)$/drawdlg.obj \ - $(SLO)$/drawsh.obj \ - $(SLO)$/drformsh.obj \ - $(SLO)$/drwbassh.obj \ - $(SLO)$/drwtxtex.obj \ - $(SLO)$/drwtxtsh.obj \ - $(SLO)$/frmsh.obj \ - $(SLO)$/grfsh.obj \ - $(SLO)$/grfshex.obj \ - $(SLO)$/mediash.obj \ - $(SLO)$/listsh.obj \ - $(SLO)$/olesh.obj \ - $(SLO)$/slotadd.obj \ - $(SLO)$/tabsh.obj \ - $(SLO)$/textdrw.obj \ - $(SLO)$/textfld.obj \ - $(SLO)$/textglos.obj \ - $(SLO)$/textidx.obj \ - $(SLO)$/textsh.obj \ - $(SLO)$/textsh1.obj \ - $(SLO)$/textsh2.obj \ - $(SLO)$/txtattr.obj \ - $(SLO)$/txtcrsr.obj \ - $(SLO)$/txtnum.obj - -EXCEPTIONSFILES = \ - $(SLO)$/basesh.obj \ - $(SLO)$/annotsh.obj \ - $(SLO)$/drwtxtsh.obj \ - $(SLO)$/textsh.obj \ - $(SLO)$/textsh2.obj \ - $(SLO)$/grfshex.obj \ - $(SLO)$/drawsh.obj \ - $(SLO)$/drwtxtsh.obj \ - $(SLO)$/frmsh.obj \ - $(SLO)$/drwtxtex.obj \ - $(SLO)$/slotadd.obj \ - $(SLO)$/textsh1.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/shells.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index f87bc0d41208..bb4f1c7fb609 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -220,7 +220,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) // Tabellenvariante, wenn mehrere Tabellenzellen selektiert rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert - aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1 || + aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) || !bTableSel); // Abstandsfeld immer anzeigen aBoxInfo.SetDist ((BOOL) TRUE); @@ -663,7 +663,7 @@ void SwTableShell::Execute(SfxRequest &rReq) else aCoreSet.InvalidateItem( RES_BACKGROUND ); - if ( !pDlg && rReq.GetArgs() || pDlg->Execute() == RET_OK ) + if ( (!pDlg && rReq.GetArgs()) || pDlg->Execute() == RET_OK ) { const SfxItemSet* pOutSet = pDlg ? pDlg->GetOutputItemSet() : rReq.GetArgs(); if ( pDlg ) @@ -1330,9 +1330,9 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_VERT_BOTTOM: { USHORT nAlign = rSh.GetBoxAlign(); - BOOL bSet = nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE|| - nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER || - nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM; + BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) || + (nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) || + (nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM); rSet.Put(SfxBoolItem(nSlot, bSet)); } break; @@ -1342,9 +1342,9 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_MODE_VARIABLE : { TblChgMode nMode = rSh.GetTblChgMode(); - BOOL bSet = nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS || - nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP || - nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS; + BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) || + (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) || + (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS); rSet.Put(SfxBoolItem(nSlot, bSet)); } break; diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index 3f26e47c8823..5ac611fed854 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -313,7 +313,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) rReq.Ignore(); } break; - case FN_DELETE_NOTE: + case FN_DELETE_COMMENT: if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->HasActiveSidebarWin() ) { @@ -622,7 +622,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { switch (nWhich) { - case FN_DELETE_NOTE: + case FN_DELETE_COMMENT: case FN_DELETE_NOTE_AUTHOR: case FN_DELETE_ALL_NOTES: case FN_HIDE_NOTE: @@ -634,7 +634,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) rSet.InvalidateItem( nWhich ); else if ( !pPostItMgr->HasActiveSidebarWin() ) { - rSet.InvalidateItem( FN_DELETE_NOTE ); + rSet.InvalidateItem( FN_DELETE_COMMENT ); rSet.InvalidateItem( FN_HIDE_NOTE ); } } diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 52b60c66d178..0d217532e32a 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -627,16 +627,18 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) DBG_ASSERT(pDlg, "Dialogdiet fail!"); if(pDlg->Execute() && pDlg->GetOutputItemSet()) { - GetShell().LockPaint(); - GetShell().StartAllAction(); - GetShell().StartUndo(UNDO_INSERT); + //local variable necessary at least after call of .AutoCaption() because this could be deleted at this point + SwWrtShell& rShell = GetShell(); + rShell.LockPaint(); + rShell.StartAllAction(); + rShell.StartUndo(UNDO_INSERT); const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); aMgr.SetAttrSet(*pOutSet); // beim ClickToEditFeld erst die Selektion loeschen - if( GetShell().IsInClickToEdit() ) - GetShell().DelRight(); + if( rShell.IsInClickToEdit() ) + rShell.DelRight(); aMgr.InsertFlyFrm(); @@ -647,8 +649,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) //FN_INSERT_FRAME USHORT nAnchor = (USHORT)aMgr.GetAnchor(); rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor)); - rReq.AppendItem(SfxPointItem(FN_PARAM_1, GetShell().GetObjAbsPos())); - rReq.AppendItem(SvxSizeItem(FN_PARAM_2, GetShell().GetObjSize())); + rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos())); + rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize())); rReq.Done(); } @@ -659,10 +661,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME)); - GetShell().EndUndo(UNDO_INSERT, &aRewriter); + rShell.EndUndo(UNDO_INSERT, &aRewriter); } - GetShell().EndAllAction(); - GetShell().UnlockPaint(); + rShell.EndAllAction(); + rShell.UnlockPaint(); } DELETEZ(pDlg); @@ -900,7 +902,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) } break; case FN_INSERT_HRULER : - if(rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() || bCrsrInHidden ) + if((rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden ) rSet.DisableItem(nWhich); break; case FN_FORMAT_COLUMN : diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 2dff1eddc4b4..e084c539da19 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -1743,8 +1743,8 @@ void SwTextShell::ChangeHeaderOrFooter( if( !rStyleName.Len() || rStyleName == sTmp ) { if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() && - (bHeader && aDesc.GetMaster().GetHeader().IsActive() || - !bHeader && aDesc.GetMaster().GetFooter().IsActive())) + ((bHeader && aDesc.GetMaster().GetHeader().IsActive()) || + (!bHeader && aDesc.GetMaster().GetFooter().IsActive()))) { bShowWarning = FALSE; //Actions have to be closed while the dialog is showing diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 9e89620bed28..9d90ac5d5b26 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -119,8 +119,8 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) eEscape = nWhich == FN_SET_SUPER_SCRIPT ? SVX_ESCAPEMENT_SUPERSCRIPT: SVX_ESCAPEMENT_SUBSCRIPT; - if( nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0 || - nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0 ) + if( (nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0) || + (nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0) ) eEscape = SVX_ESCAPEMENT_OFF; SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); diff --git a/sw/source/ui/smartmenu/makefile.mk b/sw/source/ui/smartmenu/makefile.mk deleted file mode 100644 index 1950430cf378..000000000000 --- a/sw/source/ui/smartmenu/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=smartmenu - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/stmenu.obj - -SLOFILES = \ - $(SLO)$/stmenu.obj - -SRS1NAME=$(TARGET) -SRC1FILES = \ - stmenu.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/table/makefile.mk b/sw/source/ui/table/makefile.mk deleted file mode 100644 index 8b2ba850d174..000000000000 --- a/sw/source/ui/table/makefile.mk +++ /dev/null @@ -1,81 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=table -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/chartins.obj\ - -SRS1NAME=$(TARGET) -SRC1FILES = \ - colwd.src \ - convert.src \ - chartins.src \ - instable.src \ - mergetbl.src \ - rowht.src \ - splittbl.src \ - table.src \ - tabledlg.src \ - tautofmt.src - -SLOFILES = \ - $(SLO)$/colwd.obj \ - $(SLO)$/convert.obj \ - $(SLO)$/chartins.obj \ - $(SLO)$/instable.obj \ - $(SLO)$/mergetbl.obj \ - $(SLO)$/rowht.obj \ - $(SLO)$/splittbl.obj \ - $(SLO)$/tabledlg.obj \ - $(SLO)$/tablemgr.obj \ - $(SLO)$/swtablerep.obj \ - $(SLO)$/tautofmt.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/chartins.obj \ - $(SLO)$/swtablerep.obj \ - $(SLO)$/tablemgr.obj - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index d8e1eed0f3fc..5b26b99d012f 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1643,7 +1643,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) } String aFmtName; - for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i) + for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if( LISTBOX_ENTRY_NOTFOUND == aPageCollLB.GetEntryPos( aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) )) aPageCollLB.InsertEntry( aFmtName ); diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index 51e39a65dce9..86eff4a23f08 100644 --- a/sw/source/ui/table/tablepg.hxx +++ b/sw/source/ui/table/tablepg.hxx @@ -31,7 +31,7 @@ #include <vcl/fixed.hxx> #endif #ifndef _IMAGEBTN_HXX //autogen -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif #ifndef _LSTBOX_HXX //autogen #include <vcl/lstbox.hxx> diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk deleted file mode 100644 index 337ee85da580..000000000000 --- a/sw/source/ui/uiview/makefile.mk +++ /dev/null @@ -1,90 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=uiview - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - view.src \ - pview.src - -EXCEPTIONSFILES= \ - $(SLO)$/formatclipboard.obj \ - $(SLO)$/srcview.obj \ - $(SLO)$/swcli.obj \ - $(SLO)$/uivwimp.obj \ - $(SLO)$/view.obj \ - $(SLO)$/view0.obj \ - $(SLO)$/view1.obj \ - $(SLO)$/view2.obj \ - $(SLO)$/viewdraw.obj \ - $(SLO)$/viewport.obj \ - $(SLO)$/viewprt.obj \ - $(SLO)$/viewsrch.obj \ - $(SLO)$/viewling.obj \ - $(SLO)$/viewmdi.obj \ - -SLOFILES = \ - $(SLO)$/view0.obj \ - $(SLO)$/view.obj \ - $(SLO)$/view1.obj \ - $(SLO)$/view2.obj \ - $(SLO)$/viewcoll.obj \ - $(SLO)$/viewdlg2.obj \ - $(SLO)$/viewdlg.obj \ - $(SLO)$/viewdraw.obj \ - $(SLO)$/viewling.obj \ - $(SLO)$/viewmdi.obj \ - $(SLO)$/pview.obj \ - $(SLO)$/viewport.obj \ - $(SLO)$/viewstat.obj \ - $(SLO)$/viewtab.obj \ - $(SLO)$/viewprt.obj \ - $(SLO)$/viewsrch.obj \ - $(SLO)$/scroll.obj \ - $(SLO)$/swcli.obj \ - $(SLO)$/srcview.obj \ - $(SLO)$/uivwimp.obj \ - $(SLO)$/formatclipboard.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/uiview.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 669d3eb446b8..addf6f9db512 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -92,7 +92,6 @@ using namespace ::com::sun::star; - SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview") { SFX_VIEW_REGISTRATION(SwDocShell); diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 667beb8ab4ca..af7e12629a73 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -49,6 +49,8 @@ #include <svl/whiter.hxx> #include <unotools/saveopt.hxx> #include <svtools/transfer.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <svx/svxids.hrc> #include <svtools/htmlcfg.hxx> #include <sfx2/app.hxx> @@ -123,14 +125,11 @@ using ::com::sun::star::util::SearchOptions; #define BMARGPRN 1000 #define BORDERPRN 300 - - SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView") { SFX_VIEW_REGISTRATION(SwWebDocShell); } - SFX_IMPL_INTERFACE( SwSrcView, SfxViewShell, SW_RES(0) ) { SFX_POPUPMENU_REGISTRATION(SW_RES(MN_SRCVIEW_POPUPMENU)); @@ -561,7 +560,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) nCount = rMgr.GetUndoActionCount(); if(nCount) { - String aStr(ResId( STR_UNDO, *SFX_APP()->GetSfxResManager() ));; + String aStr(SvtResId( STR_UNDO));; aStr += rMgr.GetUndoActionComment(--nCount); rSet.Put(SfxStringItem(nWhich, aStr)); } @@ -573,7 +572,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) nCount = rMgr.GetRedoActionCount(); if(nCount) { - String aStr(ResId( STR_REDO, *SFX_APP()->GetSfxResManager() ));; + String aStr(SvtResId( STR_REDO));; aStr += rMgr.GetRedoActionComment(--nCount); rSet.Put(SfxStringItem(nWhich,aStr)); } diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx index 6da603c893b3..4265f3cf8cd0 100644 --- a/sw/source/ui/uiview/swcli.cxx +++ b/sw/source/ui/uiview/swcli.cxx @@ -27,16 +27,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> +#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #include <wrtsh.hxx> +#include <doc.hxx> #include <swtypes.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <edtwin.hxx> #include <swcli.hxx> +#include <cmdid.h> +#include <cfgitems.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -169,3 +170,18 @@ void SwOleClient::MakeVisible() const SwWrtShell &rSh = ((SwView*)GetViewShell())->GetWrtShell(); rSh.MakeObjVisible( GetObject() ); } + +// --> #i972# +void SwOleClient::FormatChanged() +{ + const uno::Reference < embed::XEmbeddedObject >& xObj( GetObject() ); + SwView * pView = dynamic_cast< SwView * >( GetViewShell() ); + if ( pView && xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) + { + SwWrtShell & rWrtSh = pView->GetWrtShell(); + if (rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT )) + rWrtSh.AlignFormulaToBaseline( xObj ); + } +} +// <-- + diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index b1fd76c63aff..5abe83c3a53d 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1179,8 +1179,8 @@ bool lcl_IsOwnDocument( SwView& rView ) String Created = xDocProps->getAuthor(); String Changed = xDocProps->getModifiedBy(); String FullName = SW_MOD()->GetUserOptions().GetFullName(); - return FullName.Len() && - (Changed.Len() && Changed == FullName ) || + return (FullName.Len() && + (Changed.Len() && Changed == FullName )) || (!Changed.Len() && Created.Len() && Created == FullName ); } diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index 93a29f699f5a..84000c3ae049 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -104,7 +104,6 @@ using ::rtl::OUString; #include <unomid.h> - SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default") { if ( SvtModuleOptions().IsWriter() ) diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 44e314a7475b..ca65184c74e6 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -529,7 +529,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aUL.SetLower( (USHORT)aLongULSpace.GetLower() ); aDesc.GetMaster().SetFmtAttr( aUL ); - if( bHead && pHeaderFmt || !bHead && pFooterFmt ) + if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) ) { SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() : pFooterFmt->GetFrmSize() ); @@ -694,7 +694,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() ) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { ASSERT(aColItem.Count(), "ColDesc ist leer!!"); @@ -826,7 +826,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() ) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { ASSERT(aColItem.Count(), "ColDesc ist leer!!"); @@ -1078,8 +1078,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) (nSelType & nsSelectionType::SEL_FRM) || (nSelType & nsSelectionType::SEL_OLE) || SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE)|| - !bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich)|| - bVerticalWriting && (RES_PARATR_TABSTOP == nWhich) + (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich))|| + (bVerticalWriting && (RES_PARATR_TABSTOP == nWhich)) ) rSet.DisableItem( nWhich ); else @@ -1106,8 +1106,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || nFrmType == FRMTYPE_DRAWOBJ || - !bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)|| - bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich) + (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich))|| + (bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich)) ) { rSet.DisableItem(nWhich); @@ -1282,9 +1282,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) BOOL bTableVertical = bHasTable && rSh.IsTableVertical(); - if((SID_RULER_BORDERS_VERTICAL == nWhich) && + if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) && ((bHasTable && !bTableVertical)|| - (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) || + (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) ) || ((SID_RULER_BORDERS == nWhich) && ((bHasTable && bTableVertical)|| (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns))) @@ -1501,8 +1501,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) BOOL bFrameRTL; BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; - if((SID_RULER_ROWS == nWhich) && - ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) || + if( ( (SID_RULER_ROWS == nWhich) && + ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) || ((SID_RULER_ROWS_VERTICAL == nWhich) && ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index a3ef96d1a613..9b847644234f 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -123,7 +123,8 @@ enum SwDocumentSettingsPropertyHandles // --> OD 2008-06-05 #i89181# HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, // <-- - HANDLE_MODIFYPASSWORDINFO + HANDLE_MODIFYPASSWORDINFO, + HANDLE_MATH_BASELINE_ALIGNMENT }; MasterPropertySetInfo * lcl_createSettingsInfo() @@ -178,6 +179,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo() // --> OD 2008-06-05 #i89181# { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0}, /* * As OS said, we don't have a view when we need to set this, so I have to @@ -686,6 +688,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf uno::Reference< uno::XInterface >() ); } break; + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); + mpDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, bTmp ); + } + break; default: throw UnknownPropertyException(); } @@ -1018,6 +1026,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf rValue <<= mpDocSh->GetModifyPasswordInfo(); } break; + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + rValue.setValue( &bTmp, ::getBooleanCppuType() ); + } + break; default: throw UnknownPropertyException(); diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk deleted file mode 100644 index ac4b6dde697b..000000000000 --- a/sw/source/ui/uno/makefile.mk +++ /dev/null @@ -1,81 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=unoidl -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(DVO_XFORMS)" != "" -CDEFS+=-DDVO_XFORMS -.ENDIF - -# --- Files -------------------------------------------------------- - -SLO1FILES = \ - $(SLO)$/unodefaults.obj\ - $(SLO)$/unodispatch.obj\ - $(SLO)$/unotxdoc.obj\ - $(SLO)$/unoatxt.obj \ - $(SLO)$/unomailmerge.obj \ - $(SLO)$/unomod.obj \ - $(SLO)$/unotxvw.obj \ - $(SLO)$/dlelstnr.obj \ - $(SLO)$/unofreg.obj \ - $(SLO)$/SwXDocumentSettings.obj \ - $(SLO)$/SwXFilterOptions.obj\ - $(SLO)$/RefreshListenerContainer.obj \ - $(SLO)$/unomodule.obj \ - $(SLO)$/unodoc.obj - -SLO2FILES = \ - $(SLO)$/swdetect.obj \ - $(SLO)$/swdet2.obj \ - $(SLO)$/detreg.obj - -SLOFILES = \ - $(SLO1FILES) \ - $(SLO2FILES) - -LIB1TARGET = \ - $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO1FILES) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index cbde03479433..aa54b4707935 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -278,18 +278,17 @@ SwFilterDetect::~SwFilterDetect() if ( !bRepairPackage ) { // ask the user whether he wants to try to repair - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pRequest ); - xInteraction->handle( xRequest ); - bRepairAllowed = pRequest->isApproved(); + RequestPackageReparation aRequest( aDocumentTitle ); + xInteraction->handle( aRequest.GetRequest() ); + bRepairAllowed = aRequest.isApproved(); } if ( !bRepairAllowed ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + // repair either not allowed or not successful + NotifyBrokenPackage aNotifyRequest( aDocumentTitle ); + xInteraction->handle( aNotifyRequest.GetRequest() ); rtl::Reference< ::comphelper::OIHWrapNoFilterDialog > xHandler = new ::comphelper::OIHWrapNoFilterDialog( xInteraction ); if ( nIndexOfInteractionHandler != -1 ) diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index c9c80599541d..b0b95657600c 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -83,7 +83,6 @@ #include <globals.hrc> #include <unomid.h> #include <unotools/printwarningoptions.hxx> - #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/lang/DisposedException.hpp> @@ -948,7 +947,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, RES_FRMATR_BEGIN, RES_FRMATR_END-1, - RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, + RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT, 0); pSearch->FillSearchItemSet(aSearch); BOOL bCancel; diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 0b0bca564f48..6eab64f68a60 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -952,6 +952,7 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) : aUpdTimer.SetTimeout(1000); Clear(); EnableContextMenuHandling(); + SetStyle( GetStyle() | WB_QUICK_SEARCH ); } /*************************************************************************** @@ -2070,7 +2071,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier) SvLBoxEntry* pFirstEntry = FirstSelected(); if (pFirstEntry && lcl_IsContent(pFirstEntry)) { - if(bIsRoot && nRootType == CONTENT_TYPE_OUTLINE || + if((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE) || ((SwContent*)pFirstEntry->GetUserData())->GetParent()->GetType() == CONTENT_TYPE_OUTLINE) { @@ -2088,8 +2089,8 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier) if( nMove ) { short nDir = nCmd == FN_ITEM_UP ? -1 : 1; - if( !bModifier && (nDir == -1 && nActPos > 0 || - nDir == 1 && nActPos < GetEntryCount() - 2 ) ) + if( !bModifier && ((nDir == -1 && nActPos > 0) || + (nDir == 1 && nActPos < GetEntryCount() - 2 )) ) { pShell->MoveOutlinePara( nDir ); //Cursor wieder an die aktuelle Position setzen @@ -2761,8 +2762,8 @@ sal_Bool SwContentTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect ) sal_Bool bEnable = sal_False; SvLBoxEntry* pParentEntry = GetParent(pEntry); if(!bIsLastReadOnly && (!IsVisible() || - (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry || - lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE))) + ((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry) || + (lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE)))) bEnable = sal_True; SwNavigationPI* pNavi = GetParentWindow(); pNavi->aContentToolBox.EnableItem(FN_ITEM_UP , bEnable); diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk deleted file mode 100644 index cded61eee357..000000000000 --- a/sw/source/ui/utlui/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=utlui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - initui.src \ - gloslst.src \ - navipi.src \ - poolfmt.src \ - attrdesc.src \ - unotools.src \ - utlui.src - -EXCEPTIONSFILES= \ - $(SLO)$/bookctrl.obj \ - $(SLO)$/glbltree.obj \ - $(SLO)$/navipi.obj \ - $(SLO)$/unotools.obj \ - $(SLO)$/content.obj \ - $(SLO)$/swrenamexnameddlg.obj - -SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/condedit.obj \ - $(SLO)$/gloslst.obj \ - $(SLO)$/initui.obj \ - $(SLO)$/navicfg.obj \ - $(SLO)$/numfmtlb.obj \ - $(SLO)$/prcntfld.obj \ - $(SLO)$/textcontrolcombo.obj \ - $(SLO)$/tmplctrl.obj \ - $(SLO)$/uitool.obj \ - $(SLO)$/uiitems.obj \ - $(SLO)$/attrdesc.obj \ - $(SLO)$/shdwcrsr.obj \ - $(SLO)$/zoomctrl.obj \ - $(SLO)$/viewlayoutctrl.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index ca2367744713..25633a7b691f 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -868,7 +868,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, ((SfxDockingWindow*)pParent)->SetOutputSizePixel(aMinSize); aContentTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); - aContentTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aContentTree.SetStyle( aContentTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE ); aContentTree.SetSpaceBetweenEntries(3); aContentTree.SetSelectionMode( SINGLE_SELECTION ); @@ -882,7 +882,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, // TreeListBox fuer Globaldokument aGlobalTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); aGlobalTree.SetSelectionMode( MULTIPLE_SELECTION ); - aGlobalTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aGlobalTree.SetStyle( aGlobalTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL ); Size aGlblSize(aGlobalToolBox.CalcWindowSizePixel()); aGlobalToolBox.SetSizePixel(aGlblSize); diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk deleted file mode 100644 index b6d0d7994295..000000000000 --- a/sw/source/ui/vba/makefile.mk +++ /dev/null @@ -1,108 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=vbaswobj -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -DLLPRE = - -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ENDIF - -INCPRE=$(INCCOM)$/$(TARGET) -CDEFS+=-DVBA_OOBUILD_HACK -# ------------------------------------------------------------------ - -SLOFILES= \ - $(SLO)$/vbaglobals.obj \ - $(SLO)$/vbaapplication.obj \ - $(SLO)$/vbadocument.obj \ - $(SLO)$/vbawindow.obj \ - $(SLO)$/vbasystem.obj \ - $(SLO)$/vbarangehelper.obj \ - $(SLO)$/vbarange.obj \ - $(SLO)$/vbabookmark.obj \ - $(SLO)$/vbabookmarks.obj \ - $(SLO)$/vbavariable.obj \ - $(SLO)$/vbavariables.obj \ - $(SLO)$/vbaview.obj \ - $(SLO)$/wordvbahelper.obj \ - $(SLO)$/service.obj \ - $(SLO)$/vbadocumentproperties.obj \ - $(SLO)$/vbapane.obj \ - $(SLO)$/vbapanes.obj \ - $(SLO)$/vbaoptions.obj \ - $(SLO)$/vbaselection.obj \ - $(SLO)$/vbatemplate.obj \ - $(SLO)$/vbaparagraphformat.obj \ - $(SLO)$/vbaautotextentry.obj \ - $(SLO)$/vbaparagraph.obj \ - $(SLO)$/vbafind.obj \ - $(SLO)$/vbareplacement.obj \ - $(SLO)$/vbastyle.obj \ - $(SLO)$/vbastyles.obj \ - $(SLO)$/vbafont.obj \ - $(SLO)$/vbapalette.obj \ - $(SLO)$/vbainformationhelper.obj \ - $(SLO)$/vbatable.obj \ - $(SLO)$/vbatables.obj \ - $(SLO)$/vbafield.obj \ - $(SLO)$/vbaborders.obj \ - $(SLO)$/vbadocuments.obj \ - $(SLO)$/vbaheaderfooter.obj \ - $(SLO)$/vbaheaderfooterhelper.obj \ - $(SLO)$/vbaaddin.obj \ - $(SLO)$/vbaaddins.obj \ - $(SLO)$/vbadialogs.obj \ - $(SLO)$/vbadialog.obj \ - $(SLO)$/vbawrapformat.obj \ - $(SLO)$/vbapagesetup.obj \ - $(SLO)$/vbasection.obj \ - $(SLO)$/vbasections.obj \ - $(SLO)$/vbaeventshelper.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -ALLTAR : \ - $(MISC)$/$(TARGET).don \ - -$(SLOFILES) : $(MISC)$/$(TARGET).don - -$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb - +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ - echo $@ - diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index d7779fc653be..bff007751562 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -59,14 +59,14 @@ extern sdecl::ServiceDecl const serviceDecl; extern "C" { - void SAL_CALL component_getImplementationEnvironment( + SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { OSL_TRACE("In component_getImplementationEnv"); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - void * SAL_CALL component_getFactory( + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { @@ -77,3 +77,4 @@ extern "C" return pRet; } } + diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index 41a7e607533e..195adb2ffca4 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -120,7 +120,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, { return Open( sFileName, uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any()); } - uno::Reference <text::XTextDocument> xTextDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW ); + uno::Reference <text::XTextDocument> xTextDoc( createDocument() , uno::UNO_QUERY_THROW ); if( xTextDoc.is() ) return getDocument( mxContext, xTextDoc, Application() ); @@ -131,7 +131,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, void SAL_CALL SwVbaDocuments::Close( const uno::Any& /*SaveChanges*/, const uno::Any& /*OriginalFormat*/, const uno::Any& /*RouteDocument*/ ) throw (uno::RuntimeException) { - VbaDocumentsBase::Close(); + closeDocuments(); } // #TODO# #FIXME# can any of the unused params below be used? @@ -150,7 +150,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm uno::Sequence< beans::PropertyValue > sProps(0); - uno::Reference <text::XTextDocument> xSpreadDoc( VbaDocumentsBase::Open( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); + uno::Reference <text::XTextDocument> xSpreadDoc( openDocument( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); uno::Any aRet = getDocument( mxContext, xSpreadDoc, Application() ); uno::Reference< word::XDocument > xDocument( aRet, uno::UNO_QUERY ); if ( xDocument.is() ) @@ -158,25 +158,6 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm return aRet; } - // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci) -uno::Any SAL_CALL -SwVbaDocuments::Add() throw (uno::RuntimeException) -{ - return VbaDocumentsBase::Add(); -} - -void SAL_CALL -SwVbaDocuments::Close( ) throw (uno::RuntimeException) -{ - VbaDocumentsBase::Close(); -} - -uno::Any SAL_CALL -SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) -{ - return VbaDocumentsBase::Open( Filename, ReadOnly, rProps ); -} - rtl::OUString& SwVbaDocuments::getServiceImplName() { diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx index 81b936a1ae76..dc0f75543979 100644 --- a/sw/source/ui/vba/vbadocuments.hxx +++ b/sw/source/ui/vba/vbadocuments.hxx @@ -56,11 +56,6 @@ public: virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Template, const css::uno::Any& NewTemplate, const css::uno::Any& DocumentType, const css::uno::Any& Visible ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ConfirmConversions, const css::uno::Any& ReadOnly, const css::uno::Any& AddToRecentFiles, const css::uno::Any& PasswordDocument, const css::uno::Any& PasswordTemplate, const css::uno::Any& Revert, const css::uno::Any& WritePasswordDocument, const css::uno::Any& WritePasswordTemplate, const css::uno::Any& Format, const css::uno::Any& Encoding, const css::uno::Any& Visible, const css::uno::Any& OpenAndRepair, const css::uno::Any& DocumentDirection, const css::uno::Any& NoEncodingDialog, const css::uno::Any& XMLTransform ) throw (css::uno::RuntimeException); virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& OriginalFormat, const css::uno::Any& RouteDocument ) throw (css::uno::RuntimeException); - - // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci) - virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException); - virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); }; #endif /* SW_VBA_DOCUMENTS_HXX */ diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx index abe4abb6e757..b2270b009ca9 100755 --- a/sw/source/ui/vba/vbaeventshelper.cxx +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -50,11 +50,6 @@ SwVbaEventsHelper::~SwVbaEventsHelper() { } -bool SwVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException) -{ - return true; -} - bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (uno::RuntimeException) { diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx index af1c06c0341f..7f951bdaa452 100755 --- a/sw/source/ui/vba/vbaeventshelper.hxx +++ b/sw/source/ui/vba/vbaeventshelper.hxx @@ -41,7 +41,6 @@ public: virtual ~SwVbaEventsHelper(); protected: - virtual bool implEventsEnabled() throw (css::uno::RuntimeException); virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException); virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException); virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException); diff --git a/sw/source/ui/web/makefile.mk b/sw/source/ui/web/makefile.mk deleted file mode 100644 index 2b1eb7590b9a..000000000000 --- a/sw/source/ui/web/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=web - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - web.src - -SLOFILES = \ - $(SLO)$/wformsh.obj \ - $(SLO)$/wgrfsh.obj \ - $(SLO)$/wlistsh.obj \ - $(SLO)$/wolesh.obj \ - $(SLO)$/wtabsh.obj \ - $(SLO)$/wfrmsh.obj \ - $(SLO)$/wtextsh.obj \ - $(SLO)$/wdocsh.obj \ - $(SLO)$/wview.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src index 8f1d783595d6..9907982a6bca 100644 --- a/sw/source/ui/web/web.src +++ b/sw/source/ui/web/web.src @@ -25,15 +25,10 @@ * ************************************************************************/ -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include "globals.hrc" #include "cmdid.h" #include "web.hrc" -#include "swmn.hrc" -#define ACC_SW_WEB -#include "toolbox.hrc" #include "helpid.h" #include "cfgid.h" @@ -84,10 +79,5 @@ String RID_WEBOLE_TOOLBOX { Text [ en-US ] = "Object/Web" ; }; -/************************************************************************* -*************************************************************************/ -Menu MN_WEB_TEXT_POPUPMENU - BASE_TEXT_POPUPMENU_BEGIN - BASE_TEXT_POPUPMENU_END diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx index 05c454d5c431..6a77edb155b8 100644 --- a/sw/source/ui/web/wtextsh.cxx +++ b/sw/source/ui/web/wtextsh.cxx @@ -68,7 +68,7 @@ SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT)) { - SFX_POPUPMENU_REGISTRATION(SW_RES(MN_WEB_TEXT_POPUPMENU)); + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU)); SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX)); SFX_CHILDWINDOW_REGISTRATION(FN_EDIT_FORMULA); SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD); diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index 1822ab2de4e8..d1e7fe672a38 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -98,7 +98,6 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default") SFX_VIEW_REGISTRATION(SwWebDocShell); } - SFX_IMPL_INTERFACE( SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) ) { SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId()); diff --git a/sw/source/ui/wrtsh/makefile.mk b/sw/source/ui/wrtsh/makefile.mk deleted file mode 100644 index baeb3acd25e5..000000000000 --- a/sw/source/ui/wrtsh/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=wrtsh - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - wrtsh.src - -SLOFILES = \ - $(SLO)$/move.obj \ - $(SLO)$/select.obj \ - $(SLO)$/wrtsh1.obj \ - $(SLO)$/wrtsh2.obj \ - $(SLO)$/wrtsh3.obj \ - $(SLO)$/wrtsh4.obj \ - $(SLO)$/delete.obj \ - $(SLO)$/wrtundo.obj - -EXCEPTIONSFILES = \ - $(SLO)$/wrtsh1.obj \ - $(SLO)$/wrtsh2.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 64199404687c..919ebbe079ba 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/embed/XVisualObject.hpp> #include <com/sun/star/embed/EmbedMisc.hpp> @@ -42,9 +43,7 @@ #include <svx/svdview.hxx> #include <sot/factory.hxx> #include <svl/itemiter.hxx> -#ifndef _SOUND_HXX //autogen #include <vcl/sound.hxx> -#endif #include <tools/bigint.hxx> #include <sot/storage.hxx> #include <svtools/insdlg.hxx> @@ -60,28 +59,21 @@ #include <vcl/graph.hxx> #include <sfx2/printer.hxx> #include <unotools/charclass.hxx> - #include <comphelper/storagehelper.hxx> #include <svx/svxdlg.hxx> #include <svx/extrusionbar.hxx> #include <svx/fontworkbar.hxx> +#include <frmfmt.hxx> #include <fmtftn.hxx> #include <fmtpdsc.hxx> -#ifndef _WDOCSH_HXX #include <wdocsh.hxx> -#endif -#ifndef _BASESH_HXX #include <basesh.hxx> -#endif #include <swmodule.hxx> #include <wrtsh.hxx> -#ifndef _VIEW_HXX #include <view.hxx> -#endif #include <uitool.hxx> -#ifndef _CMDID_H #include <cmdid.h> -#endif +#include <cfgitems.hxx> #include <pagedesc.hxx> #include <frmmgr.hxx> #include <shellio.hxx> @@ -89,9 +81,7 @@ #include <swundo.hxx> // fuer Undo-Ids #include <swcli.hxx> #include <poolfmt.hxx> -#ifndef _WVIEW_HXX #include <wview.hxx> -#endif #include <edtwin.hxx> #include <fmtcol.hxx> #include <swtable.hxx> @@ -100,15 +90,12 @@ #include <swdtflvr.hxx> #include <crsskip.hxx> #include <doc.hxx> -#ifndef _WRTSH_HRC #include <wrtsh.hrc> -#endif #include <SwStyleNameMapper.hxx> #include <sfx2/request.hxx> #include <paratr.hxx> #include <ndtxt.hxx> #include <editeng/acorrcfg.hxx> -//#include <svx/acorrcfg.hxx> #include <IMark.hxx> // -> #111827# @@ -609,6 +596,11 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm aFrmMgr.SetSize( aSz ); SwFlyFrmFmt *pFmt = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); + // --> #i972# + if ( bStarMath && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) + AlignFormulaToBaseline( xRef.GetObject() ); + // <-- + if (pFlyFrmFmt) *pFlyFrmFmt = pFmt; @@ -769,6 +761,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc) || bLinkingChart // TODO/LATER: ResizeOnPrinterChange //|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus() + || nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE // non-resizable objects need to be + // set the size back by this method ) { pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); @@ -879,6 +873,17 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( bUseObjectSize ) { + // --> this moves non-resizable object so that when adding borders the baseline remains the same + const SwFlyFrmFmt *pFlyFrmFmt = dynamic_cast< const SwFlyFrmFmt * >( GetFlyFrmFmt() ); + ASSERT( pFlyFrmFmt, "Could not find fly frame." ); + if ( pFlyFrmFmt ) + { + const Point &rPoint = pFlyFrmFmt->GetLastFlyFrmPrtRectPos(); + SwRect aRect( pFlyPrtRect ? *pFlyPrtRect + : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() )); + aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct. + } + // <-- aArea.Width ( _aVisArea.Width() ); aArea.Height( _aVisArea.Height() ); RequestObjectResize( aArea, xObj.GetObject() ); @@ -1864,3 +1869,4 @@ String SwWrtShell::GetSelDescr() const return aResult; } + diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx index f3c62f9f9dff..8a20a03be0f0 100644 --- a/sw/source/ui/wrtsh/wrtundo.cxx +++ b/sw/source/ui/wrtsh/wrtundo.cxx @@ -37,10 +37,10 @@ #include <wrtsh.hxx> #include <swundo.hxx> // fuer Undo-Ids #include <swdtflvr.hxx> - -#ifndef _WRTSH_HRC +#include <svtools/svtdata.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <wrtsh.hrc> -#endif #include <sfx2/sfx.hrc> @@ -128,7 +128,7 @@ String SwWrtShell::GetDoString( DoType eDoType ) const default:;//prevent warning } - aStr.Insert( String(ResId( nResStr, *SFX_APP()->GetSfxResManager())), 0 ); + aStr.Insert( String( SvtResId( nResStr)), 0 ); aStr += aUndoStr; return aStr; @@ -172,7 +172,7 @@ String SwWrtShell::GetRepeatString() const if (aUndoStr.Len() > 0) { - aStr.Insert( ResId( STR_REPEAT, *SFX_APP()->GetSfxResManager()), 0 ); + aStr.Insert( SvtResId( STR_REPEAT ), 0 ); aStr += aUndoStr; } |