This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 46d9d39 Fixed typos, removed whitespace
46d9d39 is described below
commit 46d9d3979fdc0063f6d44c300d3225cf267eae57
Author: mseidel <[email protected]>
AuthorDate: Sun Nov 8 15:46:02 2020 +0100
Fixed typos, removed whitespace
---
main/extensions/source/dbpilots/controlwizard.cxx | 64 ++---
.../source/xml/acceleratorconfigurationreader.cxx | 89 +++----
main/framework/source/xml/imagesconfiguration.cxx | 18 +-
.../framework/source/xml/imagesdocumenthandler.cxx | 29 +--
main/l10ntools/source/directory.cxx | 74 +++---
main/sw/source/core/doc/doc.cxx | 277 +++++++++++----------
6 files changed, 276 insertions(+), 275 deletions(-)
diff --git a/main/extensions/source/dbpilots/controlwizard.cxx
b/main/extensions/source/dbpilots/controlwizard.cxx
index 045e55b..565a242 100644
--- a/main/extensions/source/dbpilots/controlwizard.cxx
+++ b/main/extensions/source/dbpilots/controlwizard.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -184,7 +184,7 @@ namespace dbp
// nothing to do
return;
- ModuleRes aModuleRes(RID_PAGE_FORM_DATASOURCE_STATUS);
+ ModuleRes aModuleRes(RID_PAGE_FORM_DATASOURCE_STATUS);
OLocalResourceAccess aLocalControls(aModuleRes, RSC_TABPAGE);
m_pFormSettingsSeparator = new FixedLine(this,
ModuleRes(FL_FORMSETINGS));
@@ -402,7 +402,7 @@ namespace dbp
Reference< XController > xController =
xModel->getCurrentController();
DBG_ASSERT(xController.is(),
"OControlWizard::implDeterminePage: no current controller!");
- // maybe it's a spredsheet
+ // maybe it's a spreadsheet
Reference< XSpreadsheetView >
xView(xController, UNO_QUERY);
if (xView.is())
{ // okay, it is one
@@ -413,7 +413,7 @@ namespace dbp
xPage =
xPageSupp->getDrawPage();
}
else
- { // can be a draw/impress doc
only
+ { // can be a Draw/Impress doc
only
Reference< XDrawView >
xDrawView(xController, UNO_QUERY);
DBG_ASSERT(xDrawView.is(),
"OControlWizard::implDeterminePage: no alternatives left ... can't determine
the page!");
if (xDrawView.is())
@@ -422,7 +422,7 @@ namespace dbp
}
}
else
- {
+ {
DBG_ASSERT(xPage.is(),
"OControlWizard::implDeterminePage: can't determine the page (no model)!");
}
m_aContext.xDrawPage = xPage;
@@ -457,17 +457,17 @@ namespace dbp
//---------------------------------------------------------------------
Reference< XConnection > OControlWizard::getFormConnection(const
OAccessRegulator&) const
- {
+ {
return getFormConnection();
}
- //---------------------------------------------------------------------
+ //---------------------------------------------------------------------
Reference< XConnection > OControlWizard::getFormConnection() const
{
Reference< XConnection > xConn;
try
{
if (
!::dbtools::isEmbeddedInDatabase(m_aContext.xForm,xConn) )
-
m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("ActiveConnection"))
>>= xConn;
+
m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("ActiveConnection"))
>>= xConn;
}
catch(const Exception&)
{
@@ -490,7 +490,7 @@ namespace dbp
// set the new connection
if ( _bAutoDispose )
{
- // for this, use a AutoDisposer (so the conn is
cleaned up when the form dies or get's another connection)
+ // for this, use a AutoDisposer (so the conn is
cleaned up when the form dies or gets another connection)
Reference< XRowSet > xFormRowSet(
m_aContext.xForm, UNO_QUERY );
OAutoConnectionDisposer* pAutoDispose = new
OAutoConnectionDisposer( xFormRowSet, _rxConn );
Reference< XPropertyChangeListener >
xEnsureDelete( pAutoDispose );
@@ -511,10 +511,10 @@ namespace dbp
{
return initContext();
}
- //---------------------------------------------------------------------
- Reference< XInteractionHandler >
OControlWizard::getInteractionHandler(Window* _pWindow) const
- {
- const ::rtl::OUString sInteractionHandlerServiceName =
::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandler");
+ //---------------------------------------------------------------------
+ Reference< XInteractionHandler >
OControlWizard::getInteractionHandler(Window* _pWindow) const
+ {
+ const ::rtl::OUString sInteractionHandlerServiceName =
::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandler");
Reference< XInteractionHandler > xHandler;
try
{
@@ -524,8 +524,8 @@ namespace dbp
catch(Exception&) { }
if (!xHandler.is())
ShowServiceNotAvailableError(_pWindow,
sInteractionHandlerServiceName, sal_True);
- return xHandler;
- }
+ return xHandler;
+ }
//---------------------------------------------------------------------
sal_Bool OControlWizard::initContext()
{
@@ -546,7 +546,7 @@ namespace dbp
m_aContext.bEmbedded = sal_False;
Any aSQLException;
- Reference< XPreparedStatement > xStatement;
+ Reference< XPreparedStatement > xStatement;
try
{
// get the datasource context
@@ -561,8 +561,8 @@ namespace dbp
// the shape of the control
implDetermineShape();
- // get the columns of the object the settins refer to
- Reference< XNameAccess > xColumns;
+ // get the columns of the object the settings refer to
+ Reference< XNameAccess > xColumns;
if (m_aContext.xForm.is())
{
@@ -572,9 +572,9 @@ namespace dbp
// calculate the connection the rowset is
working with
Reference< XConnection > xConnection;
- m_aContext.bEmbedded = ::dbtools::isEmbeddedInDatabase(
m_aContext.xForm, xConnection );
+ m_aContext.bEmbedded =
::dbtools::isEmbeddedInDatabase( m_aContext.xForm, xConnection );
if ( !m_aContext.bEmbedded )
- xConnection = ::dbtools::connectRowset(
m_aContext.xRowSet, getServiceFactory(), sal_True );
+ xConnection = ::dbtools::connectRowset(
m_aContext.xRowSet, getServiceFactory(), sal_True );
// get the fields
if (xConnection.is())
@@ -583,10 +583,10 @@ namespace dbp
{
case 0:
{
- Reference<
XTablesSupplier > xSupplyTables(xConnection, UNO_QUERY);
+ Reference<
XTablesSupplier > xSupplyTables(xConnection, UNO_QUERY);
if (xSupplyTables.is()
&& xSupplyTables->getTables().is() &&
xSupplyTables->getTables()->hasByName(sObjectName))
{
- Reference<
XColumnsSupplier > xSupplyColumns;
+ Reference<
XColumnsSupplier > xSupplyColumns;
m_aContext.xObjectContainer = xSupplyTables->getTables();
m_aContext.xObjectContainer->getByName(sObjectName) >>= xSupplyColumns;
DBG_ASSERT(xSupplyColumns.is(), "OControlWizard::initContext: invalid table
columns!");
@@ -596,14 +596,14 @@ namespace dbp
break;
case 1:
{
- Reference<
XQueriesSupplier > xSupplyQueries(xConnection, UNO_QUERY);
+ Reference<
XQueriesSupplier > xSupplyQueries(xConnection, UNO_QUERY);
if (xSupplyQueries.is()
&& xSupplyQueries->getQueries().is() &&
xSupplyQueries->getQueries()->hasByName(sObjectName))
{
- Reference<
XColumnsSupplier > xSupplyColumns;
+ Reference<
XColumnsSupplier > xSupplyColumns;
m_aContext.xObjectContainer = xSupplyQueries->getQueries();
m_aContext.xObjectContainer->getByName(sObjectName) >>= xSupplyColumns;
DBG_ASSERT(xSupplyColumns.is(), "OControlWizard::initContext: invalid query
columns!");
- xColumns =
xSupplyColumns->getColumns();
+ xColumns =
xSupplyColumns->getColumns();
}
}
break;
@@ -616,7 +616,7 @@ namespace dbp
xStatementProps->setPropertyValue(::rtl::OUString::createFromAscii("MaxRows"),
makeAny(sal_Int32(0)));
// TODO: think about
handling local SQLExceptions here ...
- Reference<
XColumnsSupplier > xSupplyCols(xStatement->executeQuery(), UNO_QUERY);
+ Reference<
XColumnsSupplier > xSupplyCols(xStatement->executeQuery(), UNO_QUERY);
if (xSupplyCols.is())
xColumns =
xSupplyCols->getColumns();
}
@@ -658,7 +658,7 @@ namespace dbp
::comphelper::disposeComponent(xStatement);
if (aSQLException.hasValue())
- { // an SQLException (or derivee) was thrown ...
+ { // an SQLException (or derive) was thrown ...
// prepend an extra SQLContext explaining what we were
doing
SQLContext aContext;
@@ -716,7 +716,7 @@ namespace dbp
if (!m_aContext.xObjectModel.is())
return;
- // initialize some settings from the control model give
+ // initialize some settings from the control model given
try
{
::rtl::OUString sLabelPropertyName =
::rtl::OUString::createFromAscii("Label");
@@ -737,7 +737,7 @@ namespace dbp
//---------------------------------------------------------------------
sal_Bool OControlWizard::needDatasourceSelection()
{
- // lemme see ...
+ // let me see...
return (0 == getContext().aFieldNames.getLength());
// if we got fields, the data source is valid ...
// try
diff --git a/main/framework/source/xml/acceleratorconfigurationreader.cxx
b/main/framework/source/xml/acceleratorconfigurationreader.cxx
index 1d464f3..957f92c 100644
--- a/main/framework/source/xml/acceleratorconfigurationreader.cxx
+++ b/main/framework/source/xml/acceleratorconfigurationreader.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -53,13 +53,13 @@ namespace framework{
//-----------------------------------------------
/* Throws a SaxException in case a wrong formatted XML
structure was detected.
-
+
This macro combined the given comment with a generic
way to find out the XML line (where the error occurred)
to format a suitable message.
-
+
@param COMMENT
- an ascii string, which describe the problem.
+ an ascii string, which describes the problem.
*/
#define THROW_PARSEEXCEPTION(COMMENT) \
{ \
@@ -73,12 +73,12 @@ namespace framework{
css::uno::Any()); \
}
-//-----------------------------------------------
+//-----------------------------------------------
// XInterface
DEFINE_XINTERFACE_1(AcceleratorConfigurationReader ,
OWeakObject ,
DIRECT_INTERFACE(css::xml::sax::XDocumentHandler))
-
+
//-----------------------------------------------
AcceleratorConfigurationReader::AcceleratorConfigurationReader(AcceleratorCache&
rContainer)
: ThreadHelpBase (&Application::GetSolarMutex())
@@ -88,12 +88,12 @@
AcceleratorConfigurationReader::AcceleratorConfigurationReader(AcceleratorCache&
, m_bInsideAcceleratorItem(sal_False )
{
}
-
+
//-----------------------------------------------
AcceleratorConfigurationReader::~AcceleratorConfigurationReader()
{
}
-
+
//-----------------------------------------------
void SAL_CALL AcceleratorConfigurationReader::startDocument()
throw(css::xml::sax::SAXException,
@@ -107,7 +107,7 @@ void SAL_CALL AcceleratorConfigurationReader::endDocument()
css::uno::RuntimeException )
{
// The xml file seems to be corrupted.
- // Because we found no end-tags ... at least for
+ // Because we found no end-tags... at least for
// one list or item.
if (
(m_bInsideAcceleratorList) ||
@@ -125,9 +125,9 @@ void SAL_CALL
AcceleratorConfigurationReader::startElement(const ::rtl::OUString
css::uno::RuntimeException )
{
EXMLElement eElement =
AcceleratorConfigurationReader::implst_classifyElement(sElement);
-
+
// Note: We handle "accel:item" before "accel:acceleratorlist" to perform
this operation.
- // Because an item occurs very often ... a list should occur one times
only!
+ // Because an item occurs very often... a list should occur one time only!
if (eElement == E_ELEMENT_ITEM)
{
if (!m_bInsideAcceleratorList)
@@ -135,10 +135,10 @@ void SAL_CALL
AcceleratorConfigurationReader::startElement(const ::rtl::OUString
if (m_bInsideAcceleratorItem)
THROW_PARSEEXCEPTION("An element \"accel:item\" is not a
container.")
m_bInsideAcceleratorItem = sal_True;
-
- ::rtl::OUString sCommand;
- css::awt::KeyEvent aEvent ;
-
+
+ ::rtl::OUString sCommand;
+ css::awt::KeyEvent aEvent ;
+
sal_Int16 c = xAttributeList->getLength();
sal_Int16 i = 0;
for (i=0; i<c; ++i)
@@ -151,28 +151,28 @@ void SAL_CALL
AcceleratorConfigurationReader::startElement(const ::rtl::OUString
case E_ATTRIBUTE_URL :
sCommand = sValue.intern();
break;
-
+
case E_ATTRIBUTE_KEYCODE :
aEvent.KeyCode =
m_rKeyMapping->mapIdentifierToCode(sValue);
break;
-
+
case E_ATTRIBUTE_MOD_SHIFT :
aEvent.Modifiers |= css::awt::KeyModifier::SHIFT;
break;
-
- case E_ATTRIBUTE_MOD_MOD1 :
+
+ case E_ATTRIBUTE_MOD_MOD1 :
aEvent.Modifiers |= css::awt::KeyModifier::MOD1;
break;
-
- case E_ATTRIBUTE_MOD_MOD2 :
+
+ case E_ATTRIBUTE_MOD_MOD2 :
aEvent.Modifiers |= css::awt::KeyModifier::MOD2;
break;
- case E_ATTRIBUTE_MOD_MOD3 :
+ case E_ATTRIBUTE_MOD_MOD3 :
aEvent.Modifiers |= css::awt::KeyModifier::MOD3;
}
}
-
+
// validate command and key event.
if (
(!sCommand.getLength()) ||
@@ -181,17 +181,17 @@ void SAL_CALL
AcceleratorConfigurationReader::startElement(const ::rtl::OUString
{
THROW_PARSEEXCEPTION("XML element does not describe a valid
accelerator nor a valid command.")
}
-
- // register key event + command inside cache ...
+
+ // register key event + command inside cache...
// Check for already existing items there.
if (!m_rContainer.hasKey(aEvent))
m_rContainer.setKeyCommandPair(aEvent, sCommand);
#ifdef ENABLE_WARNINGS
else
{
- // Attention: Its not really a reason to throw an exception and
kill the office, if the configuration contains
- // multiple registrations for the same key :-) Show a warning ...
and ignore the second item.
- // THROW_PARSEEXCEPTION("Command is registered for the same key
more then once.")
+ // Attention: It's not really a reason to throw an exception and
kill the office, if the configuration contains
+ // multiple registrations for the same key :-) Show a warning...
and ignore the second item.
+ // THROW_PARSEEXCEPTION("Command is registered for the same key
more than once.")
::rtl::OUStringBuffer sMsg(256);
sMsg.appendAscii("Double registration detected.\nCommand = \"");
sMsg.append (sCommand );
@@ -203,7 +203,7 @@ void SAL_CALL
AcceleratorConfigurationReader::startElement(const ::rtl::OUString
LOG_WARNING("AcceleratorConfigurationReader::startElement()",
U2B(sMsg.makeStringAndClear()))
}
#endif // ENABLE_WARNINGS
- }
+ }
if (eElement == E_ELEMENT_ACCELERATORLIST)
{
@@ -220,16 +220,16 @@ void SAL_CALL
AcceleratorConfigurationReader::endElement(const ::rtl::OUString&
css::uno::RuntimeException )
{
EXMLElement eElement =
AcceleratorConfigurationReader::implst_classifyElement(sElement);
-
+
// Note: We handle "accel:item" before "accel:acceleratorlist" to perform
this operation.
- // Because an item occurs very often ... a list should occur one times
only!
+ // Because an item occurs very often... a list should occur one time only!
if (eElement == E_ELEMENT_ITEM)
{
if (!m_bInsideAcceleratorItem)
THROW_PARSEEXCEPTION("Found end element 'accel:item', but no start
element.")
m_bInsideAcceleratorItem = sal_False;
}
-
+
if (eElement == E_ELEMENT_ACCELERATORLIST)
{
if (!m_bInsideAcceleratorList)
@@ -254,7 +254,7 @@ void SAL_CALL
AcceleratorConfigurationReader::ignorableWhitespace(const ::rtl::O
//-----------------------------------------------
void SAL_CALL AcceleratorConfigurationReader::processingInstruction(const
::rtl::OUString& /*sTarget*/,
- const
::rtl::OUString& /*sData*/ )
+ const
::rtl::OUString& /*sData*/ )
throw(css::xml::sax::SAXException,
css::uno::RuntimeException )
{
@@ -272,7 +272,7 @@ void SAL_CALL
AcceleratorConfigurationReader::setDocumentLocator(const css::uno:
AcceleratorConfigurationReader::EXMLElement
AcceleratorConfigurationReader::implst_classifyElement(const ::rtl::OUString&
sElement)
{
AcceleratorConfigurationReader::EXMLElement eElement;
-
+
if (sElement.equals(NS_ELEMENT_ACCELERATORLIST))
eElement = E_ELEMENT_ACCELERATORLIST;
else
@@ -282,15 +282,15 @@ AcceleratorConfigurationReader::EXMLElement
AcceleratorConfigurationReader::impl
throw css::uno::RuntimeException(
DECLARE_ASCII("Unknown XML element detected!"),
css::uno::Reference< css::xml::sax::XDocumentHandler >());
-
- return eElement;
+
+ return eElement;
}
//-----------------------------------------------
AcceleratorConfigurationReader::EXMLAttribute
AcceleratorConfigurationReader::implst_classifyAttribute(const ::rtl::OUString&
sAttribute)
{
AcceleratorConfigurationReader::EXMLAttribute eAttribute;
-
+
if (sAttribute.equals(NS_ATTRIBUTE_KEYCODE))
eAttribute = E_ATTRIBUTE_KEYCODE;
else
@@ -312,16 +312,16 @@ AcceleratorConfigurationReader::EXMLAttribute
AcceleratorConfigurationReader::im
throw css::uno::RuntimeException(
DECLARE_ASCII("Unknown XML attribute detected!"),
css::uno::Reference< css::xml::sax::XDocumentHandler >());
-
- return eAttribute;
+
+ return eAttribute;
}
//-----------------------------------------------
::rtl::OUString AcceleratorConfigurationReader::implts_getErrorLineString()
{
if (!m_xLocator.is())
- return DECLARE_ASCII("Error during parsing XML. (No further info
available ...)");
-
+ return DECLARE_ASCII("Error during parsing XML. (No further info
available...)");
+
::rtl::OUStringBuffer sMsg(256);
sMsg.appendAscii("Error during parsing XML in\nline = ");
sMsg.append (m_xLocator->getLineNumber() );
@@ -332,3 +332,4 @@ AcceleratorConfigurationReader::EXMLAttribute
AcceleratorConfigurationReader::im
}
} // namespace framework
+
diff --git a/main/framework/source/xml/imagesconfiguration.cxx
b/main/framework/source/xml/imagesconfiguration.cxx
index 66dfafb..a112250 100644
--- a/main/framework/source/xml/imagesconfiguration.cxx
+++ b/main/framework/source/xml/imagesconfiguration.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -163,12 +163,12 @@ sal_Bool ImagesConfiguration::StoreImages(
sal_Bool ImagesConfiguration::LoadImages(
const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
- const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream
>& rInputStream,
- ImageListsDescriptor& rItems )
+ const ::com::sun::star::uno::Reference<
::com::sun::star::io::XInputStream >& rInputStream,
+ ImageListsDescriptor& rItems )
{
Reference< XParser > xParser( GetSaxParser( xServiceFactory ) );
- // connect stream to input stream to the parser
+ // connect stream to input stream to the parser
InputSource aInputSource;
aInputSource.aInputStream = rInputStream;
@@ -201,8 +201,8 @@ sal_Bool ImagesConfiguration::LoadImages(
sal_Bool ImagesConfiguration::StoreImages(
const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
- const ::com::sun::star::uno::Reference<
::com::sun::star::io::XOutputStream >& rOutputStream,
- const ImageListsDescriptor& rItems )
+ const ::com::sun::star::uno::Reference<
::com::sun::star::io::XOutputStream >& rOutputStream,
+ const ImageListsDescriptor& rItems )
{
Reference< XDocumentHandler > xWriter( GetSaxWriter( xServiceFactory )
);
diff --git a/main/framework/source/xml/imagesdocumenthandler.cxx
b/main/framework/source/xml/imagesdocumenthandler.cxx
index f9b6942..fa08156 100644
--- a/main/framework/source/xml/imagesdocumenthandler.cxx
+++ b/main/framework/source/xml/imagesdocumenthandler.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -117,9 +117,9 @@ ImageXMLEntryProperty
ImagesEntries[OReadImagesDocumentHandler::IMG_XML_ENTRY_CO
{ OReadImagesDocumentHandler::IMG_NS_XLINK, ATTRIBUTE_HREF
},
{ OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_MASKCOLOR
},
{ OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_COMMAND
},
- { OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_BITMAPINDEX
},
- { OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_MASKURL
},
- { OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_MASKMODE
},
+ { OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_BITMAPINDEX
},
+ { OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_MASKURL
},
+ { OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_MASKMODE
},
{ OReadImagesDocumentHandler::IMG_NS_IMAGE, ATTRIBUTE_HIGHCONTRASTURL
},
{ OReadImagesDocumentHandler::IMG_NS_IMAGE,
ATTRIBUTE_HIGHCONTRASTMASKURL }
};
@@ -255,7 +255,7 @@ throw( SAXException, RuntimeException )
{
if (
aColor.getStr()[0] == '#' )
{
-
// the color value is given as #rrggbb and used the hexadecimal system!!
+
// the color value is given as #rrggbb and uses the hexadecimal system!
sal_uInt32 nColor = aColor.copy( 1 ).toInt32( 16 );
m_pImages->aMaskColor = Color( COLORDATA_RGB( nColor ) );
@@ -628,7 +628,7 @@ throw( SAXException, RuntimeException )
OWriteImagesDocumentHandler::OWriteImagesDocumentHandler(
const ImageListsDescriptor& aItems,
Reference< XDocumentHandler > rWriteDocumentHandler ) :
- ThreadHelpBase( &Application::GetSolarMutex() ),
+ ThreadHelpBase( &Application::GetSolarMutex() ),
m_aImageListsItems( aItems ),
m_xWriteDocumentHandler( rWriteDocumentHandler )
{
@@ -706,7 +706,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const
ImageListItemDescriptor*
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY
);
- // save required attributes
+ // save required attributes
pList->AddAttribute( m_aAttributeXlinkType,
m_aAttributeType,
m_aAttributeValueSimple );
@@ -756,8 +756,8 @@ void OWriteImagesDocumentHandler::WriteImageList( const
ImageListItemDescriptor*
pImageList->aHighContrastURL );
}
- m_xWriteDocumentHandler->startElement( ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_IMAGES )), xList );
- m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() );
+ m_xWriteDocumentHandler->startElement( ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_IMAGES )), xList );
+ m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() );
ImageItemListDescriptor* pImageItemList = pImageList->pImageItemList;
if ( pImageItemList )
@@ -814,7 +814,7 @@ void OWriteImagesDocumentHandler::WriteExternalImage( const
ExternalImageItemDes
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY
);
- // save required attributes
+ // save required attributes
pList->AddAttribute( m_aAttributeXlinkType,
m_aAttributeType,
m_aAttributeValueSimple );
@@ -842,6 +842,3 @@ void OWriteImagesDocumentHandler::WriteExternalImage( const
ExternalImageItemDes
} // namespace framework
-
-
-
diff --git a/main/l10ntools/source/directory.cxx
b/main/l10ntools/source/directory.cxx
index 5ca1cc8..0561ba2 100644
--- a/main/l10ntools/source/directory.cxx
+++ b/main/l10ntools/source/directory.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,21 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_l10ntools.hxx"
#include <l10ntools/directory.hxx>
@@ -30,7 +29,7 @@
#include <vector>
#include <algorithm>
-namespace transex
+namespace transex
{
Directory::Directory( const rtl::OUString sFullpath ) : bSkipLinks( false )
@@ -52,16 +51,16 @@ Directory::Directory( const ByteString sFullPath ) :
bSkipLinks( false )
bool Directory::lessDir ( const Directory& rKey1, const Directory& rKey2 )
{
- rtl::OUString sName1( ( static_cast< Directory >( rKey1 )
).getDirectoryName() );
- rtl::OUString sName2( ( static_cast< Directory >( rKey2 )
).getDirectoryName() );
-
+ rtl::OUString sName1( ( static_cast< Directory >( rKey1 )
).getDirectoryName() );
+ rtl::OUString sName2( ( static_cast< Directory >( rKey2 )
).getDirectoryName() );
+
return sName1.compareTo( sName2 ) < 0 ;
}
void Directory::dump()
{
-
+
for( std::vector< transex::File >::iterator iter = aFileVec.begin() ; iter
!= aFileVec.end() ; ++iter )
{
std::cout << "FILE " << rtl::OUStringToOString(
(*iter).getFullName().getStr() , RTL_TEXTENCODING_UTF8 ,
(*iter).getFullName().getLength() ).getStr() << "\n";
@@ -71,7 +70,7 @@ void Directory::dump()
{
std::cout << "DIR " << rtl::OUStringToOString(
(*iter).getFullName().getStr() , RTL_TEXTENCODING_UTF8 ,
(*iter).getFullName().getLength() ).getStr() << "\n";
}
-
+
}
void Directory::scanSubDir( int nLevels )
@@ -111,14 +110,14 @@ void Directory::readDirectory ( const rtl::OUString&
sFullpath )
rtl::OString sFullpathext = rtl::OUStringToOString( sFullpath ,
RTL_TEXTENCODING_UTF8 , sFullpath.getLength() );
const char *dirname = sFullpathext.getStr();
-
+
// Get the proper directory path
sprintf(szDir, "%s\\*", dirname);
-
+
// Get the first file
hList = FindFirstFile(szDir, &FileData);
if (hList == INVALID_HANDLE_VALUE)
- {
+ {
//FindClose(hList);
//printf("No files found %s\n", szDir ); return;
}
@@ -127,7 +126,7 @@ void Directory::readDirectory ( const rtl::OUString&
sFullpath )
fFinished = sal_False;
while (!fFinished)
{
-
+
sprintf(szSubDir, "%s\\%s", dirname,
FileData.cFileName);
rtl::OString myfile( FileData.cFileName );
rtl::OString mydir( szSubDir );
@@ -160,7 +159,7 @@ void Directory::readDirectory ( const rtl::OUString&
sFullpath )
}
FindClose(hList);
-
+
::std::sort( aFileVec.begin() , aFileVec.end() , File::lessFile );
::std::sort( aDirVec.begin() , aDirVec.end() , Directory::lessDir );
}
@@ -187,34 +186,34 @@ void Directory::readDirectory( const rtl::OUString&
sFullpath )
if( sFullpath.getLength() < 1 ) return;
rtl::OString sFullpathext = rtl::OUStringToOString( sFullpath ,
RTL_TEXTENCODING_UTF8 , sFullpath.getLength() ).getStr();
-
+
// stat
- if( stat( sFullpathext.getStr() , &statbuf ) < 0 ){ printf("warning:
Can not stat %s" , sFullpathext.getStr() ); return; }// error }
-
+ if( stat( sFullpathext.getStr() , &statbuf ) < 0 ){ printf("warning:
Can not stat %s" , sFullpathext.getStr() ); return; } // error }
+
if( S_ISDIR(statbuf.st_mode ) == 0 ) { return; }// error } return; //
not dir
if( (dir = opendir( sFullpathext.getStr() ) ) == NULL )
{printf("readerror 2 in %s \n",sFullpathext.getStr()); return; } // error }
return; // error
dirholder aHolder(dir);
-
+
sFullpathext += rtl::OString( "/" );
const rtl::OString sDot ( "." ) ;
const rtl::OString sDDot( ".." );
-
+
if ( chdir( sFullpathext.getStr() ) == -1 ) { printf("chdir error in %s
\n",sFullpathext.getStr()); return; } // error
-
+
while( ( dirp = readdir( dir ) ) != NULL )
{
rtl::OString sEntryName( dirp->d_name );
if( sEntryName.equals( sDot ) || sEntryName.equals( sDDot ) )
continue;
-
+
// add dir entry
rtl::OString sEntity = sFullpathext;
sEntity += sEntryName;
-
+
// stat new entry
if( lstat( sEntity.getStr() , &statbuf2 ) < 0 )
{
@@ -226,31 +225,31 @@ void Directory::readDirectory( const rtl::OUString&
sFullpath )
switch( statbuf2.st_mode & S_IFMT )
{
case S_IFREG:
- {
+ {
rtl::OString sFile = sFullpathext;
sFile += sEntryName ;
- transex::File aFile( rtl::OStringToOUString(
sEntity , RTL_TEXTENCODING_UTF8 , sEntity.getLength() ) ,
- rtl::OStringToOUString(
sEntryName , RTL_TEXTENCODING_UTF8 , sEntryName.getLength() )
+ transex::File aFile( rtl::OStringToOUString(
sEntity , RTL_TEXTENCODING_UTF8 , sEntity.getLength() ) ,
+ rtl::OStringToOUString(
sEntryName , RTL_TEXTENCODING_UTF8 , sEntryName.getLength() )
);
- aFileVec.push_back(
aFile ) ;
- break;
- }
+ aFileVec.push_back(
aFile ) ;
+ break;
+ }
case S_IFLNK:
- {
+ {
if( bSkipLinks ) break;
}
case S_IFDIR:
- {
+ {
rtl::OString sDir = sFullpathext;
sDir += sEntryName ;
- transex::Directory aDir(
+ transex::Directory aDir(
rtl::OStringToOUString(
sEntity , RTL_TEXTENCODING_UTF8 , sEntity.getLength() ) ,
- rtl::OStringToOUString(
sEntryName , RTL_TEXTENCODING_UTF8 , sEntryName.getLength() )
- ) ;
- aDirVec.push_back( aDir ) ;
- break;
+ rtl::OStringToOUString(
sEntryName , RTL_TEXTENCODING_UTF8 , sEntryName.getLength() )
+ ) ;
+ aDirVec.push_back( aDir ) ;
+ break;
}
}
}
@@ -264,3 +263,4 @@ void Directory::readDirectory( const rtl::OUString&
sFullpath )
#endif
}
+
diff --git a/main/sw/source/core/doc/doc.cxx b/main/sw/source/core/doc/doc.cxx
index e5e8e60..518f10e 100644
--- a/main/sw/source/core/doc/doc.cxx
+++ b/main/sw/source/core/doc/doc.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,18 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+
+
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
@@ -137,20 +139,20 @@ SV_IMPL_PTRARR( SwFldTypes, SwFldTypePtr)
*/
sal_Int32 SwDoc::acquire()
{
- OSL_ASSERT(mReferenceCount >= 0 && "Negative reference count detected!
This is a sign for unbalanced acquire/release calls.");
- return osl_incrementInterlockedCount(&mReferenceCount);
+ OSL_ASSERT(mReferenceCount >= 0 && "Negative reference count detected!
This is a sign for unbalanced acquire/release calls.");
+ return osl_incrementInterlockedCount(&mReferenceCount);
}
sal_Int32 SwDoc::release()
{
- OSL_PRECOND(mReferenceCount >= 1, "Object is already released! Releasing
it again leads to a negative reference count.");
- return osl_decrementInterlockedCount(&mReferenceCount);
+ OSL_PRECOND(mReferenceCount >= 1, "Object is already released!
Releasing it again leads to a negative reference count.");
+ return osl_decrementInterlockedCount(&mReferenceCount);
}
sal_Int32 SwDoc::getReferenceCount() const
{
- OSL_ASSERT(mReferenceCount >= 0 && "Negative reference count detected!
This is a sign for unbalanced acquire/release calls.");
- return mReferenceCount;
+ OSL_ASSERT(mReferenceCount >= 0 && "Negative reference count detected!
This is a sign for unbalanced acquire/release calls.");
+ return mReferenceCount;
}
/** IDocumentSettingAccess
@@ -340,7 +342,7 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/
bool value)
mbDoNotResetParaAttrsForNumFont = value;
break;
case MATH_BASELINE_ALIGNMENT:
- mbMathBaselineAlignment = value;
+ mbMathBaselineAlignment = value;
break;
default:
ASSERT(false, "Invalid setting id");
@@ -612,7 +614,7 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
// the ItemSet will be deleted by Sfx!
SfxItemSet *pSet = new SfxItemSet( GetAttrPool(),
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
- SID_HTML_MODE, SID_HTML_MODE,
+ SID_HTML_MODE, SID_HTML_MODE,
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
0 );
@@ -637,7 +639,7 @@ const SwPrintData & SwDoc::getPrintData() const
pThis->pPrtData = new SwPrintData;
// SwPrintData should be initialized from the configuration,
- // the respective config item is implememted by SwPrintOptions which
+ // the respective config item is implemented by SwPrintOptions which
// is also derived from SwPrintData
const SwDocShell *pDocSh = GetDocShell();
DBG_ASSERT( pDocSh, "pDocSh is 0, can't determine if this is a WebDoc
or not" );
@@ -676,7 +678,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool
bChkTableStart )
{
SwCntntNode *pNode = rPos.nNode.GetNode().GetCntntNode();
if(0 == pNode)
- return false;
+ return false;
{
// Bug 26675: Sent DataChanged before deletion, then you can
@@ -689,7 +691,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool
bChkTableStart )
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().ClearRedo();
- // insert the Undo object, currentlx only in TextNode
+ // insert the Undo object, currently only in TextNode
if( pNode->IsTxtNode() )
{
pUndo = new SwUndoSplitNode( this, rPos, bChkTableStart );
@@ -1033,7 +1035,7 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const
String& rObjName,
/*************************************************************************
|* SwDoc::GetFldType()
-|* Description: delievers the field type back which is arranged at the
Doc
+|* Description: delivers the field type back which is arranged at the Doc
*************************************************************************/
SwFieldType *SwDoc::GetSysFldType( const sal_uInt16 eWhich ) const
@@ -1062,21 +1064,21 @@ const SwDocStat& SwDoc::GetDocStat() const
struct _PostItFld : public _SetGetExpFld
{
- _PostItFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld, const
SwIndex* pIdx = 0 )
+ _PostItFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld, const
SwIndex* pIdx = 0 )
: _SetGetExpFld( rNdIdx, pFld, pIdx ) {}
sal_uInt16 GetPageNo( const StringRangeEnumerator &rRangeEnum,
- const std::set< sal_Int32 > &rPossiblePages,
+ const std::set< sal_Int32 > &rPossiblePages,
sal_uInt16& rVirtPgNo, sal_uInt16& rLineNo );
-
+
SwPostItField* GetPostIt() const
- {
+ {
return (SwPostItField*) GetTxtFld()->GetFmtFld().GetField();
}
};
-sal_uInt16 _PostItFld::GetPageNo(
+sal_uInt16 _PostItFld::GetPageNo(
const StringRangeEnumerator &rRangeEnum,
const std::set< sal_Int32 > &rPossiblePages,
/* out */ sal_uInt16& rVirtPgNo, /* out */ sal_uInt16& rLineNo )
@@ -1089,7 +1091,7 @@ sal_uInt16 _PostItFld::GetPageNo(
rVirtPgNo = 0;
sal_uInt16 nPos = GetCntnt();
SwIterator<SwTxtFrm,SwTxtNode> aIter( GetTxtFld()->GetTxtNode() );
- for( SwTxtFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
+ for( SwTxtFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
{
if( pFrm->GetOfst() > nPos ||
(pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) )
@@ -1107,8 +1109,8 @@ sal_uInt16 _PostItFld::GetPageNo(
}
-bool lcl_GetPostIts(
- IDocumentFieldsAccess* pIDFA,
+bool lcl_GetPostIts(
+ IDocumentFieldsAccess* pIDFA,
_SetGetExpFlds * pSrtLst )
{
bool bHasPostIts = false;
@@ -1121,7 +1123,7 @@ bool lcl_GetPostIts(
// Modify object found, insert all fields into the array
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
const SwTxtFld* pTxtFld;
- for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
+ for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
{
if( 0 != ( pTxtFld = pFld->GetTxtFld() ) &&
pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
@@ -1143,9 +1145,9 @@ bool lcl_GetPostIts(
}
-static void lcl_FormatPostIt(
- IDocumentContentOperations* pIDCO,
- SwPaM& aPam,
+static void lcl_FormatPostIt(
+ IDocumentContentOperations* pIDCO,
+ SwPaM& aPam,
SwPostItField* pField,
bool bNewPage, bool bIsFirstPostIt,
sal_uInt16 nPageNo, sal_uInt16 nLineNo )
@@ -1165,7 +1167,7 @@ static void lcl_FormatPostIt(
pIDCO->SplitNode( *aPam.GetPoint(), false );
pIDCO->SplitNode( *aPam.GetPoint(), false );
}
-
+
String aStr( ViewShell::GetShellRes()->aPostItPage );
aStr.AppendAscii(sTmp);
@@ -1182,7 +1184,7 @@ static void lcl_FormatPostIt(
aStr.AppendAscii(sTmp);
aStr += pField->GetPar1();
aStr += ' ';
- SvtSysLocale aSysLocale;
+ SvtSysLocale aSysLocale;
aStr += /*(LocaleDataWrapper&)*/aSysLocale.GetLocaleData().getDate(
pField->GetDate() );
pIDCO->InsertString( aPam, aStr );
@@ -1211,11 +1213,11 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm
*pStartFrm )
return nRes;
}
-
+
void SwDoc::CalculatePagesForPrinting(
const SwRootFrm& rLayout,
- /* out */ SwRenderData &rData,
+ /* out */ SwRenderData &rData,
const SwPrintUIOptions &rOptions,
bool bIsPDFExport,
sal_Int32 nDocPageCount )
@@ -1223,15 +1225,15 @@ void SwDoc::CalculatePagesForPrinting(
const sal_Int64 nContent = rOptions.getIntValue( "PrintContent", 0 );
const bool bPrintSelection = nContent == 2;
- // properties to take into account when calcualting the set of pages
+ // properties to take into account when calculating the set of pages
// (PDF export UI does not allow for selecting left or right pages only)
bool bPrintLeftPages = bIsPDFExport ? true :
rOptions.IsPrintLeftPages();
bool bPrintRightPages = bIsPDFExport ? true :
rOptions.IsPrintRightPages();
// #i103700# printing selections should not allow for automatic inserting
empty pages
bool bPrintEmptyPages = bPrintSelection ? false :
rOptions.IsPrintEmptyPages( bIsPDFExport );
-
+
Range aPages( 1, nDocPageCount );
-
+
MultiSelection aMulti( aPages );
aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
aMulti.Select( aPages );
@@ -1324,7 +1326,7 @@ void SwDoc::CalculatePagesForPrinting(
}
}
}
-
+
// now that we have identified the valid pages for printing according
// to the print settings we need to get the PageRange to use and
// use both results to get the actual pages to be printed
@@ -1339,9 +1341,9 @@ void SwDoc::CalculatePagesForPrinting(
// }
// else
if ( !bIsPDFExport )
- // <--
+ // <--
{
- // PageContent :
+ // PageContent :
// 0 -> print all pages (default if aPageRange is empty)
// 1 -> print range according to PageRange
// 2 -> print selection
@@ -1352,9 +1354,9 @@ void SwDoc::CalculatePagesForPrinting(
// note that printing selections is actually implemented by copying
// the selection to a new temporary document and printing all of
that one.
// Thus for Writer "PrintContent" must never be 2.
- // See SwXTextDocument::GetRenderDoc for evaluating if a selection
is to be
+ // See SwXTextDocument::GetRenderDoc for evaluating if a selection
is to be
// printed and for creating the temporary document.
- }
+ }
// please note
}
@@ -1369,16 +1371,16 @@ void SwDoc::CalculatePagesForPrinting(
// get vector of pages to print according to PageRange and valid pages set
from above
// (result may be an empty vector, for example if the range string is not
correct)
- StringRangeEnumerator::getRangesFromString(
+ StringRangeEnumerator::getRangesFromString(
aPageRange, rData.GetPagesToPrint(),
1, nDocPageCount, 0, &rData.GetValidPagesSet() );
}
-
-void SwDoc::UpdatePagesForPrintingWithPostItData(
- /* out */ SwRenderData &rData,
+
+void SwDoc::UpdatePagesForPrintingWithPostItData(
+ /* out */ SwRenderData &rData,
const SwPrintUIOptions &rOptions,
- bool /*bIsPDFExport*/,
+ bool /*bIsPDFExport*/,
sal_Int32 nDocPageCount )
{
@@ -1399,15 +1401,15 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
const StringRangeEnumerator aRangeEnum( rData.GetPageRange(), 1,
nDocPageCount, 0 );
- // For mode POSTITS_ENDPAGE:
+ // For mode POSTITS_ENDPAGE:
// maps a physical page number to the page number in post-it document
that holds
// the first post-it for that physical page . Needed to relate the
correct start frames
// from the post-it doc to the physical page of the document
- std::map< sal_Int32, sal_Int32 > aPostItLastStartPageNum;
+ std::map< sal_Int32, sal_Int32 > aPostItLastStartPageNum;
// add all post-its on valid pages within the page range to the
- // temporary post-it document.
- // Since the array of post-it fileds is sorted by page and line number
we will
+ // temporary post-it document.
+ // Since the array of post-it fields is sorted by page and line number
we will
// already get them in the correct order
sal_uInt16 nVirtPg = 0, nLineNo = 0, nLastPageNum = 0, nPhyPageNum = 0;
bool bIsFirstPostIt = true;
@@ -1415,7 +1417,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
{
_PostItFld& rPostIt = (_PostItFld&)*(*rData.m_pPostItFields)[ i ];
nLastPageNum = nPhyPageNum;
- nPhyPageNum = rPostIt.GetPageNo(
+ nPhyPageNum = rPostIt.GetPageNo(
aRangeEnum, rData.GetValidPagesSet(), nVirtPg, nLineNo );
if (nPhyPageNum)
{
@@ -1424,46 +1426,46 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
// post-it page needs to start on a new page
const bool bNewPage = nPostItMode == POSTITS_ENDPAGE &&
!bIsFirstPostIt && nPhyPageNum != nLastPageNum;
-
+
lcl_FormatPostIt( rData.m_pPostItShell->GetDoc(), aPam,
rPostIt.GetPostIt(), bNewPage, bIsFirstPostIt,
nVirtPg, nLineNo );
bIsFirstPostIt = false;
-
+
if (nPostItMode == POSTITS_ENDPAGE)
{
// get the correct number of current pages for the post-it
document
rData.m_pPostItShell->CalcLayout();
const sal_Int32 nPages =
rData.m_pPostItShell->GetPageCount();
aPostItLastStartPageNum[ nPhyPageNum ] = nPages;
- }
+ }
}
}
-
+
// format post-it doc to get correct number of pages
rData.m_pPostItShell->CalcLayout();
const sal_Int32 nPostItDocPageCount =
rData.m_pPostItShell->GetPageCount();
if (nPostItMode == POSTITS_ONLY || nPostItMode == POSTITS_ENDDOC)
{
- // now add those post-it pages to the vector of pages to print
+ // now add those post-it pages to the vector of pages to print
// or replace them if only post-its should be printed
-
+
rData.GetPostItStartFrames().clear();
if (nPostItMode == POSTITS_ENDDOC)
{
// set all values up to number of pages to print currently
known to NULL,
- // meaning none of the pages currently in the vector is from
the
+ // meaning none of the pages currently in the vector is from
the
// post-it document, they are the documents pages.
rData.GetPostItStartFrames().resize(
rData.GetPagesToPrint().size() );
- }
+ }
else if (nPostItMode == POSTITS_ONLY)
{
// no document page to be printed
rData.GetPagesToPrint().clear();
}
-
+
// now we just need to add the post-it pages to be printed to the
end
- // of the vector of pages to print and keep the
GetValidStartFrames
+ // of the vector of pages to print and keep the GetValidStartFrames
// data conform with it
sal_Int32 nPageNum = 0;
const SwPageFrm * pPageFrm =
(SwPageFrm*)rData.m_pPostItShell->GetLayout()->Lower();
@@ -1471,13 +1473,13 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
{
DBG_ASSERT( pPageFrm, "Empty page frame. How are we going to
print this?" );
++nPageNum;
- rData.GetPagesToPrint().push_back( 0 ); // a page number of 0
indicates this page is from the post-it doc
+ rData.GetPagesToPrint().push_back( 0 ); // a page number of 0
indicates this page is from the post-it doc
DBG_ASSERT( pPageFrm, "pPageFrm is NULL!" );
rData.GetPostItStartFrames().push_back( pPageFrm );
pPageFrm = (SwPageFrm*)pPageFrm->GetNext();
}
DBG_ASSERT( nPageNum == nPostItDocPageCount, "unexpected number of
pages" );
- }
+ }
else if (nPostItMode == POSTITS_ENDPAGE)
{
// the next step is to find all the start frames from the post-it
@@ -1495,14 +1497,14 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
aAllPostItStartFrames.push_back( pPageFrm );
pPageFrm = (SwPageFrm*)pPageFrm->GetNext();
}
- DBG_ASSERT( sal_Int32(aAllPostItStartFrames.size()) ==
nPostItDocPageCount,
+ DBG_ASSERT( sal_Int32(aAllPostItStartFrames.size()) ==
nPostItDocPageCount,
"unexpected number of frames; does not match number of
pages" );
-
- // get a map that holds all post-it frames to be printed for a
+
+ // get a map that holds all post-it frames to be printed for a
// given physical page from the document
sal_Int32 nLastStartPageNum = 0;
- std::map< sal_Int32, sal_Int32 >::const_iterator aIt;
- for (aIt = aPostItLastStartPageNum.begin(); aIt !=
aPostItLastStartPageNum.end(); ++aIt)
+ std::map< sal_Int32, sal_Int32 >::const_iterator aIt;
+ for (aIt = aPostItLastStartPageNum.begin(); aIt !=
aPostItLastStartPageNum.end(); ++aIt)
{
const sal_Int32 nFrames = aIt->second - nLastStartPageNum;
const sal_Int32 nFirstStartPageNum = aIt ==
aPostItLastStartPageNum.begin() ?
@@ -1513,7 +1515,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
for (sal_Int32 i = 0; i < nFrames; ++i)
{
const sal_Int32 nIdx = nFirstStartPageNum - 1 + i; // -1
because lowest page num is 1
- DBG_ASSERT( 0 <= nIdx && nIdx <
sal_Int32(aAllPostItStartFrames.size()),
+ DBG_ASSERT( 0 <= nIdx && nIdx <
sal_Int32(aAllPostItStartFrames.size()),
"index out of range" );
aStartFrames.push_back( aAllPostItStartFrames[ nIdx ] );
}
@@ -1521,12 +1523,12 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
nLastStartPageNum = aIt->second;
}
-
- // ok, now that aPhysPageToPostItFrames can give the start frames
for all
+
+ // ok, now that aPhysPageToPostItFrames can give the start frames
for all
// post-it pages to be printed we need to merge those at the
correct
// position into the GetPagesToPrint vector and build and maintain
the
// GetValidStartFrames vector as well.
- // Since inserting a larger number of entries in the middle of a
vector
+ // Since inserting a larger number of entries in the middle of a
vector
// isn't that efficient we will create new vectors by copying the
required data
std::vector< sal_Int32 > aTmpPagesToPrint;
std::vector< const SwPageFrm * > aTmpPostItStartFrames;
@@ -1537,8 +1539,8 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
const sal_Int32 nPhysPage = rData.GetPagesToPrint()[i];
aTmpPagesToPrint.push_back( nPhysPage );
aTmpPostItStartFrames.push_back( NULL );
-
- // add the post-it document pages to print, i.e those
+
+ // add the post-it document pages to print, i.e. those
// post-it pages that have the data for the above physical page
const std::vector< const SwPageFrm * > &rPostItFrames =
aPhysPageToPostItFrames[ nPhysPage ];
const size_t nPostItFrames = rPostItFrames.size();
@@ -1546,7 +1548,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
{
aTmpPagesToPrint.push_back( 0 );
aTmpPostItStartFrames.push_back( rPostItFrames[k] );
- }
+ }
}
// finally we need to assign those vectors to the resulting ones.
@@ -1554,14 +1556,14 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
// we won't need the temporary vectors anymore
rData.GetPagesToPrint().swap( aTmpPagesToPrint );
rData.GetPostItStartFrames().swap( aTmpPostItStartFrames );
- }
- }
+ }
+ }
}
-
-void SwDoc::CalculatePagePairsForProspectPrinting(
+
+void SwDoc::CalculatePagePairsForProspectPrinting(
const SwRootFrm& rLayout,
- /* out */ SwRenderData &rData,
+ /* out */ SwRenderData &rData,
const SwPrintUIOptions &rOptions,
sal_Int32 nDocPageCount )
{
@@ -1569,13 +1571,13 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
std::set< sal_Int32 > &rValidPagesSet = rData.GetValidPagesSet();
std::map< sal_Int32, const SwPageFrm * > &rValidStartFrms =
rData.GetValidStartFrames();
std::vector< std::pair< sal_Int32, sal_Int32 > > &rPagePairs =
rData.GetPagePairsForProspectPrinting();
-
+
rPagePairs.clear();
rValidPagesSet.clear();
rValidStartFrms.clear();
rtl::OUString aPageRange = rOptions.getStringValue( "PageRange",
rtl::OUString() );
- // PageContent :
+ // PageContent :
// 0 -> print all pages (default if aPageRange is empty)
// 1 -> print range according to PageRange
// 2 -> print selection
@@ -1592,17 +1594,17 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
if ( aRange.size() <= 0)
return;
- const SwPageFrm *pStPage = dynamic_cast<const SwPageFrm*>(
rLayout.Lower() );
+ const SwPageFrm *pStPage = dynamic_cast<const SwPageFrm*>( rLayout.Lower()
);
sal_Int32 i = 0;
for ( i = 1; pStPage && i < nDocPageCount; ++i )
pStPage = (SwPageFrm*)pStPage->GetNext();
if ( !pStPage ) // that's it then
return;
- // currently for prospect printing all pages are valid to be printed
+ // currently for prospect printing all pages are valid to be printed
// thus we add them all to the respective map and set for later use
sal_Int32 nPageNum = 0;
- const SwPageFrm *pPageFrm = dynamic_cast<const SwPageFrm*>(
rLayout.Lower() );
+ const SwPageFrm *pPageFrm = dynamic_cast<const SwPageFrm*>(
rLayout.Lower() );
while( pPageFrm && nPageNum < nDocPageCount )
{
DBG_ASSERT( pPageFrm, "Empty page frame. How are we going to print
this?" );
@@ -1615,19 +1617,19 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
}
DBG_ASSERT( nPageNum == nDocPageCount, "unexpected number of pages" );
- // properties to take into account when calcualting the set of pages
+ // properties to take into account when calculating the set of pages
// Note: here bPrintLeftPages and bPrintRightPages refer to the (virtual)
resulting pages
// of the prospect!
bool bPrintLeftPages = rOptions.IsPrintLeftPages();
bool bPrintRightPages = rOptions.IsPrintRightPages();
- bool bPrintProspectRTL = rOptions.getIntValue( "PrintProspectRTL", 0 ) ?
true : false;
+ bool bPrintProspectRTL = rOptions.getIntValue( "PrintProspectRTL", 0 ) ?
true : false;
// get pages for prospect printing according to the 'PageRange'
- // (duplicates and any order allowed!)
+ // (duplicates and any order allowed!)
std::vector< sal_Int32 > aPagesToPrint;
- StringRangeEnumerator::getRangesFromString(
+ StringRangeEnumerator::getRangesFromString(
aPageRange, aPagesToPrint, 1, nDocPageCount, 0 );
-
+
// now fill the vector for calculating the page pairs with the start frames
// from the above obtained vector
std::vector< const SwPageFrm * > aVec;
@@ -1639,7 +1641,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
}
// just one page is special ...
- if ( 1 == aVec.size() )
+ if ( 1 == aVec.size() )
aVec.insert( aVec.begin() + 1, 0 ); // insert a second empty page
else
{
@@ -1702,7 +1704,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
}
DBG_ASSERT( size_t(nCntPage) == rPagePairs.size(), "size mismatch for
number of page pairs" );
- // luckily prospect printing does not make use of post-its so far,
+ // luckily prospect printing does not make use of post-its so far,
// thus we are done here.
}
@@ -1736,7 +1738,7 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
{
SwFieldType * const pPostits( GetSysFldType(RES_POSTITFLD) );
SwIterator<SwFmtFld,SwFieldType> aIter( *pPostits );
- for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld =
aIter.Next() )
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld =
aIter.Next() )
{
if (pFmtFld->IsFldInDoc())
{
@@ -1845,7 +1847,7 @@ const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex
) const
}
nCount++;
}
- return pRet;
+ return pRet;
}
// return the names of all references that are set in the Doc
@@ -1853,8 +1855,8 @@ const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex
) const
// OS 25.06.96: from now on always return the number of the references
sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
{
- const SfxPoolItem* pItem;
- const SwTxtRefMark* pTxtRef;
+ const SfxPoolItem* pItem;
+ const SwTxtRefMark* pTxtRef;
const sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2(
RES_TXTATR_REFMARK );
sal_uInt16 nCount = 0;
@@ -1871,7 +1873,7 @@ sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames )
const
++nCount;
}
- return nCount;
+ return nCount;
}
bool SwDoc::IsLoaded() const
@@ -1891,7 +1893,7 @@ bool SwDoc::IsNewDoc() const
bool SwDoc::IsPageNums() const
{
- return mbPageNums;
+ return mbPageNums;
}
void SwDoc::SetPageNums(bool b)
@@ -1921,14 +1923,14 @@ bool SwDoc::IsModified() const
void SwDoc::SetModified()
{
- // --> OD 2005-08-29 #125370#
- SwLayouter::ClearMovedFwdFrms( *this );
- SwLayouter::ClearObjsTmpConsiderWrapInfluence( *this );
- SwLayouter::ClearFrmsNotToWrap( *this );
- // <--
- // --> OD 2006-05-10 #i65250#
- SwLayouter::ClearMoveBwdLayoutInfo( *this );
- // <--
+ // --> OD 2005-08-29 #125370#
+ SwLayouter::ClearMovedFwdFrms( *this );
+ SwLayouter::ClearObjsTmpConsiderWrapInfluence( *this );
+ SwLayouter::ClearFrmsNotToWrap( *this );
+ // <--
+ // --> OD 2006-05-10 #i65250#
+ SwLayouter::ClearMoveBwdLayoutInfo( *this );
+ // <--
// return the status to the link, how the flags were and will be
// Bit 0: -> old status
// Bit 1: -> new status
@@ -1951,13 +1953,13 @@ void SwDoc::ResetModified()
// return the status to the link, how the flags were and will be
// Bit 0: -> old status
// Bit 1: -> new status
- long nCall = mbModified ? 1 : 0;
+ long nCall = mbModified ? 1 : 0;
mbModified = sal_False;
- // If there is already a document statistic, we assume that
- // it is correct. In this case we reset the modified flag.
- if ( 0 != pDocStat->nChar )
- pDocStat->bModified = sal_False;
- GetIDocumentUndoRedo().SetUndoNoModifiedPosition();
+ // If there is already a document statistic, we assume that
+ // it is correct. In this case we reset the modified flag.
+ if ( 0 != pDocStat->nChar )
+ pDocStat->bModified = sal_False;
+ GetIDocumentUndoRedo().SetUndoNoModifiedPosition();
if( nCall && aOle2Link.IsSet() )
{
mbInCallModified = sal_True;
@@ -1975,15 +1977,15 @@ void SwDoc::ReRead( SwPaM& rPam, const String& rGrfName,
if( ( !rPam.HasMark()
|| rPam.GetPoint()->nNode.GetIndex() ==
rPam.GetMark()->nNode.GetIndex() )
&& 0 != ( pGrfNd =
rPam.GetPoint()->nNode.GetNode().GetGrfNode() ) )
- {
- if (GetIDocumentUndoRedo().DoesUndo())
- {
- GetIDocumentUndoRedo().AppendUndo(new SwUndoReRead(rPam, *pGrfNd));
- }
+ {
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().AppendUndo(new
SwUndoReRead(rPam, *pGrfNd));
+ }
// Because it's not known if the graphic can be mirrored,
// always set back the MirrorAttribute
- if( RES_MIRROR_GRAPH_DONT != pGrfNd->GetSwAttrSet().
+ if( RES_MIRROR_GRAPH_DONT != pGrfNd->GetSwAttrSet().
GetMirrorGrf().GetValue() )
pGrfNd->SetAttr( SwMirrorGrf() );
@@ -2020,7 +2022,7 @@ sal_Bool lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd,
void* pArgs )
return sal_True;
}
-sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
+sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
{
SwTxtNode *pTxtNode = (SwTxtNode*)rpNd->GetTxtNode();
// sal_Bool bOnlyWrong = *(sal_Bool*)pArgs;
@@ -2046,7 +2048,7 @@ sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd,
void* )
* When bInvalid will be hand over as sal_True, then additionally the
WrongLists
* on all Nodes will be invalidated and on all pages the SpellInvalid flag
* will be set.
- * With bOnlyWrong you can controll, whether only the areas with wrong words
+ * With bOnlyWrong you can control, whether only the areas with wrong words
* or the complete areas have to be checked again.
************************************************************************/
@@ -2058,9 +2060,9 @@ void SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool
bOnlyWrong, sal_Bool bS
{
std::for_each( aAllLayouts.begin(),
aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::AllInvalidateSmartTagsOrSpelling),bSmartTags));//swmod
080305
std::for_each( aAllLayouts.begin(),
aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::SetNeedGrammarCheck),
true) );
- if ( bSmartTags )
- GetNodes().ForEach( lcl_CheckSmartTagsAgain, &bOnlyWrong );
- GetNodes().ForEach( lcl_SpellAndGrammarAgain, &bOnlyWrong );
+ if ( bSmartTags )
+ GetNodes().ForEach( lcl_CheckSmartTagsAgain,
&bOnlyWrong );
+ GetNodes().ForEach( lcl_SpellAndGrammarAgain, &bOnlyWrong );
}
std::for_each( aAllLayouts.begin(),
aAllLayouts.end(),std::mem_fun(&SwRootFrm::SetIdleFlags));//swmod 080307
@@ -2182,12 +2184,12 @@ void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel,
sal_uInt8 nPara, sal_Bool
bool SwDoc::RemoveInvisibleContent()
{
sal_Bool bRet = sal_False;
- GetIDocumentUndoRedo().StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
{
SwTxtNode* pTxtNd;
- SwIterator<SwFmtFld,SwFieldType> aIter( *GetSysFldType(
RES_HIDDENPARAFLD ) );
- for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld =
aIter.Next() )
+ SwIterator<SwFmtFld,SwFieldType> aIter( *GetSysFldType(
RES_HIDDENPARAFLD ) );
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld =
aIter.Next() )
{
if( pFmtFld->GetTxtFld() &&
0 != ( pTxtNd =
(SwTxtNode*)pFmtFld->GetTxtFld()->GetpTxtNode() ) &&
@@ -2370,7 +2372,7 @@ bool SwDoc::HasInvisibleContent() const
if ( pTxtNd )
{
SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
- if( pTxtNd->HasHiddenCharAttribute( true ) || (
pTxtNd->HasHiddenCharAttribute( false ) ) )
+ if( pTxtNd->HasHiddenCharAttribute( true ) || (
pTxtNd->HasHiddenCharAttribute( false ) ) )
{
bRet = sal_True;
}
@@ -2423,7 +2425,7 @@ sal_Bool SwDoc::ConvertFieldsToText()
const SwFldTypes* pMyFldTypes = GetFldTypes();
sal_uInt16 nCount = pMyFldTypes->Count();
//go backward, field types are removed
- for(sal_uInt16 nType = nCount; nType > 0; --nType)
+ for(sal_uInt16 nType = nCount; nType > 0; --nType)
{
const SwFieldType *pCurType = pMyFldTypes->GetObject(nType - 1);
@@ -2476,7 +2478,7 @@ sal_Bool SwDoc::ConvertFieldsToText()
SwPaM aPam2(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
aPam2.SetMark();
aPam2.Move();
- DeleteAndJoin(aPam2);//remove the field
+ DeleteAndJoin(aPam2);//remove the field
}
}
++aBegin;
@@ -2493,32 +2495,32 @@ sal_Bool SwDoc::ConvertFieldsToText()
bool SwDoc::IsVisibleLinks() const
{
- return mbVisibleLinks;
+ return mbVisibleLinks;
}
void SwDoc::SetVisibleLinks(bool bFlag)
{
- mbVisibleLinks = bFlag;
+ mbVisibleLinks = bFlag;
}
sfx2::LinkManager& SwDoc::GetLinkManager()
{
- return *pLinkMgr;
+ return *pLinkMgr;
}
const sfx2::LinkManager& SwDoc::GetLinkManager() const
{
- return *pLinkMgr;
+ return *pLinkMgr;
}
void SwDoc::SetLinksUpdated(const bool bNewLinksUpdated)
{
- mbLinksUpdated = bNewLinksUpdated;
+ mbLinksUpdated = bNewLinksUpdated;
}
bool SwDoc::LinksUpdated() const
{
- return mbLinksUpdated;
+ return mbLinksUpdated;
}
// embed all local links (sections/graphics)
@@ -2544,7 +2546,7 @@ bool SwDoc::LinksUpdated() const
}
}
return 0;
-}
+}
bool SwDoc::EmbedAllLinks()
{
sal_Bool bRet = sal_False;
@@ -2752,10 +2754,11 @@ SwDoc::GetVbaEventProcessor()
void SwDoc::setExternalData(::sw::tExternalDataType eType,
::sw::tExternalDataPointer pPayload)
{
- m_externalData[eType] = pPayload;
+ m_externalData[eType] = pPayload;
}
::sw::tExternalDataPointer SwDoc::getExternalData(::sw::tExternalDataType
eType)
{
- return m_externalData[eType];
+ return m_externalData[eType];
}
+