/************************************************************************* * * 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 * * for a copy of the LGPLv3 License. * ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" #include "fuparagr.hxx" #include #ifndef _MSGBOX_HXX //autogen #include #endif #include #include #include #include #include #include #include #include "app.hrc" #include "View.hxx" #include "ViewShell.hxx" #include "drawdoc.hxx" #include "sdabstdlg.hxx" #include "paragr.hrc" #include "sdattr.hrc" namespace sd { TYPEINIT1( FuParagraph, FuPoor ); /************************************************************************* |* |* Konstruktor |* \************************************************************************/ FuParagraph::FuParagraph ( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq) : FuPoor(pViewSh, pWin, pView, pDoc, rReq) { } FunctionReference FuParagraph::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) { FunctionReference xFunc( new FuParagraph( pViewSh, pWin, pView, pDoc, rReq ) ); xFunc->DoExecute(rReq); return xFunc; } void FuParagraph::DoExecute( SfxRequest& rReq ) { const SfxItemSet* pArgs = rReq.GetArgs(); OutlinerView* pOutlView = mpView->GetTextEditOutlinerView(); ::Outliner* pOutliner = mpView->GetTextEditOutliner(); if( !pArgs ) { SfxItemSet aEditAttr( mpDoc->GetPool() ); mpView->GetAttributes( aEditAttr ); SfxItemPool *pPool = aEditAttr.GetPool(); SfxItemSet aNewAttr( *pPool, EE_ITEMS_START, EE_ITEMS_END, SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET, ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END, 0 ); aNewAttr.Put( aEditAttr ); // linker Rand als Offset const long nOff = ( (SvxLRSpaceItem&)aNewAttr.Get( EE_PARA_LRSPACE ) ).GetTxtLeft(); // Umrechnung, da TabulatorTabPage immer von Twips ausgeht ! SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff ); aNewAttr.Put( aOff ); if( pOutlView && pOutliner ) { ESelection eSelection = pOutlView->GetSelection(); aNewAttr.Put( SfxInt16Item( ATTR_NUMBER_NEWSTART_AT, pOutliner->GetNumberingStartValue( eSelection.nStartPara ) ) ); aNewAttr.Put( SfxBoolItem( ATTR_NUMBER_NEWSTART, pOutliner->IsParaIsNumberingRestart( eSelection.nStartPara ) ) ); } SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdParagraphTabDlg(NULL, &aNewAttr ) : 0; if( pDlg ) { USHORT nResult = pDlg->Execute(); switch( nResult ) { case RET_OK: { rReq.Done( *( pDlg->GetOutputItemSet() ) ); pArgs = rReq.GetArgs(); } break; default: { delete pDlg; } return; // Abbruch } delete( pDlg ); } } mpView->SetAttributes( *pArgs ); if( pOutlView && pOutliner ) { ESelection eSelection = pOutlView->GetSelection(); const SfxPoolItem *pItem = 0; if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART, sal_False, &pItem ) ) { const sal_Bool bNewStart = ((SfxBoolItem*)pItem)->GetValue() ? sal_True : sal_False; pOutliner->SetParaIsNumberingRestart( eSelection.nStartPara, bNewStart ); } if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART_AT, sal_False, &pItem ) ) { const sal_Int16 nStartAt = ((SfxInt16Item*)pItem)->GetValue(); pOutliner->SetNumberingStartValue( eSelection.nStartPara, nStartAt ); } } // invalidieren der Slots static USHORT SidArray[] = { SID_ATTR_TABSTOP, SID_ATTR_PARA_ADJUST_LEFT, SID_ATTR_PARA_ADJUST_RIGHT, SID_ATTR_PARA_ADJUST_CENTER, SID_ATTR_PARA_ADJUST_BLOCK, SID_ATTR_PARA_LINESPACE_10, SID_ATTR_PARA_LINESPACE_15, SID_ATTR_PARA_LINESPACE_20, SID_ATTR_PARA_LRSPACE, SID_ATTR_PARA_LEFT_TO_RIGHT, SID_ATTR_PARA_RIGHT_TO_LEFT, SID_RULER_TEXT_RIGHT_TO_LEFT, SID_PARASPACE_INCREASE, SID_PARASPACE_DECREASE, 0 }; mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); } void FuParagraph::Activate() { } void FuParagraph::Deactivate() { } } // end of namespace sd o/collabora/lov-6.0.5 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
e85e95cde2d677'>Turn OSL_ENSURE() into static_assert() for NUM_PAPER_ENTRIES enum match
AgeCommit message (Collapse)Author
Eike Rathke
And remove now obsolete include of osl/diagnose.h Change-Id: Ie75a4da463a5c51c6bd763d4a6ecf37be94ff6b2
2017-06-25loplugin:oncevar in helpcompiler..jvmfwkNoel Grandin
Change-Id: Ia9b20a8ca95684cbeb21e3425972c43ba50df3cd Reviewed-on: https://gerrit.libreoffice.org/39187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-07Make use of OUString::startsWith rest parameterStephan Bergmann
Change-Id: Ic743bfbf65533bd317e29c8e1482306603b65b0e
2017-05-30coverity#1411565 'Constant' variable guards dead codeCaolán McNamara
on incomplete fix of commit 922e935c8812b1c1f94347bdbd7cdf277a75644e Date: Mon May 29 17:08:06 2017 +0200 i18nutil: fix invalid string copy that prevents startup for commit ef513fd4b049b214a03fbe6e62a5ea43680a7a9b Date: Fri May 26 10:58:42 2017 +0200 remove unnecessary use of OString::getStr Change-Id: I6cc56bae5e4a5c2fb235663bc6676cdea02b9701
2017-05-29i18nutil: fix invalid string copy that prevents startupMichael Stahl
(regression from ef513fd4b049b214a03fbe6e62a5ea43680a7a9b) Change-Id: Ia3ba5ba853648a4b180d6cc2318a4780fc87bf4d
2017-05-28remove unnecessary use of OString::getStrNoel Grandin
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-22Use nl_langinfo_l with an explicitly created localeStephan Bergmann
(where empty string arg to newlocale, per SUSv4, means "an implementation- defined native environment. This correspons to the value of the associated environment variables, LC_* and LANG") instead of relying on whatever setlocale would be in effect here. Also, nl_langinfo_l is less of an MT nightmare than nl_langinfo, which is of benefit once the last remaining use of nl_langinfo in sal/osl/unx/nlsupport.cxx will also have been changed to nl_langinfo_l. loplugin:nullptr needs a little hack, as SUSv4 locale_t could be anything from an integer type to a pointer type. Change-Id: Ic35dcbc2e0a4f650694b48df12470dd89476dff5
2016-03-31use SAL_N_ELEMENTS more widelyNoel Grandin
found using git grep -n 'sizeof.*/.*sizeof.*[0]' Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
2015-12-19coverity#1343620 Unchecked return valueCaolán McNamara
Change-Id: I5ac69ef416a1317644b451442a51531806d9cf0d
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I55089fde808e9f564f424adc30717dfd8d141c37
2015-10-20com::sun::star->css in i18nutilNoel Grandin
Change-Id: I3148a1a08302fa9b21b0e5459f04ecee6ec30a18 Reviewed-on: https://gerrit.libreoffice.org/19455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-29Updated URLAndrea Gelmini
Change-Id: I20656a78d25bcb767340057c259e9b2d83ec152a Reviewed-on: https://gerrit.libreoffice.org/18933 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-08-19for testing allow disabling configmgr for time critical pathsCaolán McNamara
Change-Id: I08021f18d53e1748927f8847649994f95252bbc2 Reviewed-on: https://gerrit.libreoffice.org/17844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-12-12i18nutil: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: I09f6c1d793c6d4f61c25649cfb463a41d88b23df
2014-01-09Set PAPER_SCREEN_4_3 values back and use it as it wasZolnai Tamás
It breaks things. Change-Id: Ia28391aed27051e5f6a7e0996f30b23c46eb8269
2014-01-09Startcenter: use SCREEN_4_3 as default paper for presentationsZolnai Tamás
Remove static to able to construct items with different paper info. Fix SCREEN_4_3 width and height values and use it for presentations. Change-Id: Ifba44675f6126ebfccf26f53f226214bed92352c
2013-11-11convert OUString !compareToAscii to equalsAsciiNoel Grandin
Convert code like if( ! aStr.compareToAscii("XXX") ) to if( aStr.equalsAscii("XXX") ) which is both clearer and faster. Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b
2013-09-07s/wiki.services.openoffice.org/wiki.openoffice.org/gAndras Timar
Change-Id: I059fbee385a109069c70f3869021c8e2ee48fee1
2013-08-11Mark as constTakeshi Abe
Change-Id: I220204cc5ebec15402ae175aef110abad8b00267
2013-07-29Mark as constTakeshi Abe
Change-Id: Ib78b25641ae20a3eb23545649f08b963e34c74ff
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09